mirror of
https://github.com/appwrite/appwrite
synced 2026-05-22 16:38:32 +00:00
Merge remote-tracking branch 'origin/feat-single-shared-metadata-docs' into feat-migration
# Conflicts: # composer.json # composer.lock
This commit is contained in:
commit
52647cef23
33 changed files with 478 additions and 93 deletions
87
.github/workflows/pr-scan.yml
vendored
Normal file
87
.github/workflows/pr-scan.yml
vendored
Normal file
|
|
@ -0,0 +1,87 @@
|
|||
name: PR Security Scan
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, synchronize, reopened]
|
||||
workflow_dispatch:
|
||||
jobs:
|
||||
scan:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Check out code
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
submodules: 'recursive'
|
||||
- name: Build the Docker image
|
||||
uses: docker/build-push-action@v5
|
||||
with:
|
||||
context: .
|
||||
push: false
|
||||
load: true
|
||||
tags: pr_image:${{ github.sha }}
|
||||
- name: Run Trivy vulnerability scanner on image
|
||||
uses: aquasecurity/trivy-action@0.20.0
|
||||
with:
|
||||
image-ref: 'pr_image:${{ github.sha }}'
|
||||
format: 'json'
|
||||
output: 'trivy-image-results.json'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
- name: Run Trivy vulnerability scanner on source code
|
||||
uses: aquasecurity/trivy-action@0.20.0
|
||||
with:
|
||||
scan-type: 'fs'
|
||||
scan-ref: '.'
|
||||
format: 'json'
|
||||
output: 'trivy-fs-results.json'
|
||||
severity: 'CRITICAL,HIGH'
|
||||
- name: Process and post Trivy scan results
|
||||
uses: actions/github-script@v7
|
||||
with:
|
||||
github-token: ${{secrets.GITHUB_TOKEN}}
|
||||
script: |
|
||||
const fs = require('fs');
|
||||
let commentBody = '## Security Scan Results for PR\n\n';
|
||||
|
||||
function processResults(results, title) {
|
||||
let sectionBody = `### ${title}\n\n`;
|
||||
if (results.Results && results.Results.some(result => result.Vulnerabilities && result.Vulnerabilities.length > 0)) {
|
||||
sectionBody += '| Package | Version | Vulnerability | Severity |\n';
|
||||
sectionBody += '|---------|---------|----------------|----------|\n';
|
||||
|
||||
const uniqueVulns = new Set();
|
||||
results.Results.forEach(result => {
|
||||
if (result.Vulnerabilities) {
|
||||
result.Vulnerabilities.forEach(vuln => {
|
||||
const vulnKey = `${vuln.PkgName}-${vuln.InstalledVersion}-${vuln.VulnerabilityID}`;
|
||||
if (!uniqueVulns.has(vulnKey)) {
|
||||
uniqueVulns.add(vulnKey);
|
||||
sectionBody += `| ${vuln.PkgName} | ${vuln.InstalledVersion} | [${vuln.VulnerabilityID}](https://nvd.nist.gov/vuln/detail/${vuln.VulnerabilityID}) | ${vuln.Severity} |\n`;
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
} else {
|
||||
sectionBody += '🎉 No vulnerabilities found!\n';
|
||||
}
|
||||
return sectionBody;
|
||||
}
|
||||
|
||||
try {
|
||||
const imageResults = JSON.parse(fs.readFileSync('trivy-image-results.json', 'utf8'));
|
||||
const fsResults = JSON.parse(fs.readFileSync('trivy-fs-results.json', 'utf8'));
|
||||
|
||||
commentBody += processResults(imageResults, "Docker Image Scan Results");
|
||||
commentBody += '\n';
|
||||
commentBody += processResults(fsResults, "Source Code Scan Results");
|
||||
|
||||
} catch (error) {
|
||||
commentBody += `There was an error while running the security scan: ${error.message}\n`;
|
||||
commentBody += 'Please contact the core team for assistance.';
|
||||
}
|
||||
|
||||
github.rest.issues.createComment({
|
||||
issue_number: context.issue.number,
|
||||
owner: context.repo.owner,
|
||||
repo: context.repo.repo,
|
||||
body: commentBody
|
||||
});
|
||||
2
.gitmodules
vendored
2
.gitmodules
vendored
|
|
@ -1,4 +1,4 @@
|
|||
[submodule "app/console"]
|
||||
path = app/console
|
||||
url = https://github.com/appwrite/console
|
||||
branch = 4.3.27
|
||||
branch = 4.3.29
|
||||
|
|
|
|||
39
CHANGES.md
39
CHANGES.md
|
|
@ -1,3 +1,22 @@
|
|||
# Version 1.5.9
|
||||
|
||||
## What's Changed
|
||||
|
||||
### Notable changes
|
||||
|
||||
* Add Darija (Moroccan Arabic) translation file in [7501](https://github.com/appwrite/appwrite/pull/7501)
|
||||
* Bump console to version 4.3.29 in [8504](https://github.com/appwrite/appwrite/pull/8504)
|
||||
|
||||
### Fixes
|
||||
|
||||
* Fix domain check in [8472](https://github.com/appwrite/appwrite/pull/8472)
|
||||
* Fix "API must be called in the coroutine" in [8495](https://github.com/appwrite/appwrite/pull/8495)
|
||||
* Bump executor version from 0.5.5 to 0.5.7 in [8502](https://github.com/appwrite/appwrite/pull/8502)
|
||||
|
||||
### Miscellaneous
|
||||
* Add profiler for debugging in [8397](https://github.com/appwrite/appwrite/pull/8397)
|
||||
* Document APIs that don't support redirects in [8233](https://github.com/appwrite/appwrite/pull/8233)
|
||||
|
||||
# Version 1.5.8
|
||||
|
||||
## What's Changed
|
||||
|
|
@ -7,8 +26,11 @@
|
|||
* Support Twilio messaging service SID in [8222](https://github.com/appwrite/appwrite/pull/8222)
|
||||
* Improve cache performance in [8230](https://github.com/appwrite/appwrite/pull/8230)
|
||||
* Add hk in translations in [8179](https://github.com/appwrite/appwrite/pull/8179)
|
||||
* Bump console to version 4.3.14 in [8321](https://github.com/appwrite/appwrite/pull/8321)
|
||||
* Update pwd abuse in [8255](https://github.com/appwrite/appwrite/pull/8255)
|
||||
* Remove detailed trace in [8374](https://github.com/appwrite/appwrite/pull/8374)
|
||||
* Remove relationship attributes from realtime event payloads in [8381](https://github.com/appwrite/appwrite/pull/8381)
|
||||
* Sanitize URLs in emails in [8415](https://github.com/appwrite/appwrite/pull/8415)
|
||||
* Bump console to version 4.3.27 in [8482](https://github.com/appwrite/appwrite/pull/8482)
|
||||
|
||||
### Fixes
|
||||
|
||||
|
|
@ -21,6 +43,14 @@
|
|||
* Fix Create bucket endpoint validator for maximum file size in [8275](https://github.com/appwrite/appwrite/pull/8275)
|
||||
* Disable validation for subquery to prevent error in [8297](https://github.com/appwrite/appwrite/pull/8297)
|
||||
* Fix 'Missing required attribute "expire"' on `users.createSession()` in [8308](https://github.com/appwrite/appwrite/pull/8308)
|
||||
* Fix certificate emails in [8292](https://github.com/appwrite/appwrite/pull/8292)
|
||||
* Fix browser-cached deleted file in [8264](https://github.com/appwrite/appwrite/pull/8264)
|
||||
* Fix migration of firebase users [8377](https://github.com/appwrite/appwrite/pull/8377)
|
||||
* Fix `path` for vcs function deployments in [8408](https://github.com/appwrite/appwrite/pull/8408)
|
||||
* Fix calculations in [8431](https://github.com/appwrite/appwrite/pull/8431)
|
||||
* Fix bugs with migrations in [8442](https://github.com/appwrite/appwrite/pull/8442)
|
||||
* Fix queueForUsage not triggering for domain executions in [8463](https://github.com/appwrite/appwrite/pull/8463)
|
||||
* Fix realtime permission change in [8416](https://github.com/appwrite/appwrite/pull/8416)
|
||||
|
||||
### Miscellaneous
|
||||
|
||||
|
|
@ -31,6 +61,13 @@
|
|||
* Update cache & database in [8285](https://github.com/appwrite/appwrite/pull/8285)
|
||||
* Fix flaky certificate test in [8316](https://github.com/appwrite/appwrite/pull/8316)
|
||||
* Fix flaky function test in [8317](https://github.com/appwrite/appwrite/pull/8317)
|
||||
* Update account API reference in [8305](https://github.com/appwrite/appwrite/pull/8305)
|
||||
* Update functions API reference in [8346](https://github.com/appwrite/appwrite/pull/8346)
|
||||
* Implement deploymentsStorage metric for projects API in [8258](https://github.com/appwrite/appwrite/pull/8258)
|
||||
* Add new audit events in [8424](https://github.com/appwrite/appwrite/pull/8424)
|
||||
* Move mbSeconds into 1.5.x in [8449](https://github.com/appwrite/appwrite/pull/8449)
|
||||
* Clean projects cache while migrating in [8395](https://github.com/appwrite/appwrite/pull/8395)
|
||||
* Use git tags for function template in [8445](https://github.com/appwrite/appwrite/pull/8445)
|
||||
|
||||
# Version 1.5.7
|
||||
## What's Changed
|
||||
|
|
|
|||
|
|
@ -497,6 +497,18 @@ If you are in PHP Storm you don't need any plugin. Below are the settings requir
|
|||
2. If needed edit the **dev/xdebug.ini** file to your needs.
|
||||
3. Launch your Appwrite instance while your debugger is listening for connections.
|
||||
|
||||
## Profiling
|
||||
Appwrite uses XDebug [Profiler](https://xdebug.org/docs/profiler) for generating **CacheGrind** files. The generated file would be located in each of the `appwrite` containers inside the `/tmp/xdebug` folder.
|
||||
|
||||
To disable the profiler while debugging remove the `,profiler` mode from the `xdebug.ini` file
|
||||
```diff
|
||||
zend_extension=xdebug
|
||||
|
||||
[xdebug]
|
||||
-xdebug.mode=develop,debug,profile
|
||||
+xdebug.mode=develop,debug
|
||||
```
|
||||
|
||||
### VS Code Launch Configuration
|
||||
|
||||
```json
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM composer:2.0 as composer
|
||||
FROM composer:2.0 AS composer
|
||||
|
||||
ARG TESTING=false
|
||||
ENV TESTING=$TESTING
|
||||
|
|
@ -12,7 +12,7 @@ RUN composer install --ignore-platform-reqs --optimize-autoloader \
|
|||
--no-plugins --no-scripts --prefer-dist \
|
||||
`if [ "$TESTING" != "true" ]; then echo "--no-dev"; fi`
|
||||
|
||||
FROM --platform=$BUILDPLATFORM node:20.11.0-alpine3.19 as node
|
||||
FROM --platform=$BUILDPLATFORM node:20.11.0-alpine3.19 AS node
|
||||
|
||||
COPY app/console /usr/local/src/console
|
||||
|
||||
|
|
@ -29,7 +29,7 @@ ENV VITE_APPWRITE_GROWTH_ENDPOINT=$VITE_APPWRITE_GROWTH_ENDPOINT
|
|||
RUN npm ci
|
||||
RUN npm run build
|
||||
|
||||
FROM appwrite/base:0.9.1 as final
|
||||
FROM appwrite/base:0.9.1 AS final
|
||||
|
||||
LABEL maintainer="team@appwrite.io"
|
||||
|
||||
|
|
@ -108,9 +108,10 @@ RUN mkdir -p /etc/letsencrypt/live/ && chmod -Rf 755 /etc/letsencrypt/live/
|
|||
|
||||
# Enable Extensions
|
||||
RUN if [ "$DEBUG" == "true" ]; then cp /usr/src/code/dev/xdebug.ini /usr/local/etc/php/conf.d/xdebug.ini; fi
|
||||
RUN if [ "$DEBUG" == "true" ]; then mkdir -p /tmp/xdebug; fi
|
||||
RUN if [ "$DEBUG" = "false" ]; then rm -rf /usr/src/code/dev; fi
|
||||
RUN if [ "$DEBUG" = "false" ]; then rm -f /usr/local/lib/php/extensions/no-debug-non-zts-20220829/xdebug.so; fi
|
||||
|
||||
EXPOSE 80
|
||||
|
||||
CMD [ "php", "app/http.php" ]
|
||||
CMD [ "php", "app/http.php" ]
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ docker run -it --rm \
|
|||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||
--entrypoint="install" \
|
||||
appwrite/appwrite:1.5.8
|
||||
appwrite/appwrite:1.5.9
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
|
@ -79,7 +79,7 @@ docker run -it --rm ^
|
|||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||
--entrypoint="install" ^
|
||||
appwrite/appwrite:1.5.8
|
||||
appwrite/appwrite:1.5.9
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
|
|
@ -89,7 +89,7 @@ docker run -it --rm `
|
|||
--volume /var/run/docker.sock:/var/run/docker.sock `
|
||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
||||
--entrypoint="install" `
|
||||
appwrite/appwrite:1.5.8
|
||||
appwrite/appwrite:1.5.9
|
||||
```
|
||||
|
||||
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
|
||||
|
|
|
|||
|
|
@ -75,7 +75,7 @@ docker run -it --rm \
|
|||
--volume /var/run/docker.sock:/var/run/docker.sock \
|
||||
--volume "$(pwd)"/appwrite:/usr/src/code/appwrite:rw \
|
||||
--entrypoint="install" \
|
||||
appwrite/appwrite:1.5.8
|
||||
appwrite/appwrite:1.5.9
|
||||
```
|
||||
|
||||
### Windows
|
||||
|
|
@ -87,7 +87,7 @@ docker run -it --rm ^
|
|||
--volume //var/run/docker.sock:/var/run/docker.sock ^
|
||||
--volume "%cd%"/appwrite:/usr/src/code/appwrite:rw ^
|
||||
--entrypoint="install" ^
|
||||
appwrite/appwrite:1.5.8
|
||||
appwrite/appwrite:1.5.9
|
||||
```
|
||||
|
||||
#### PowerShell
|
||||
|
|
@ -97,7 +97,7 @@ docker run -it --rm `
|
|||
--volume /var/run/docker.sock:/var/run/docker.sock `
|
||||
--volume ${pwd}/appwrite:/usr/src/code/appwrite:rw `
|
||||
--entrypoint="install" `
|
||||
appwrite/appwrite:1.5.8
|
||||
appwrite/appwrite:1.5.9
|
||||
```
|
||||
|
||||
Once the Docker installation is complete, go to http://localhost to access the Appwrite console from your browser. Please note that on non-Linux native hosts, the server might take a few minutes to start after completing the installation.
|
||||
|
|
|
|||
238
app/config/locale/translations/ar-ma.json
Normal file
238
app/config/locale/translations/ar-ma.json
Normal file
|
|
@ -0,0 +1,238 @@
|
|||
{
|
||||
"settings.inspire": "\"الفن ديال الحكمة هو الفن ديال أنك تعرف أش تنخّل.\"",
|
||||
"settings.locale": "ar-ma",
|
||||
"settings.direction": "rtl",
|
||||
"emails.sender": "فرقة %s",
|
||||
"emails.verification.subject": "التيْقان ديال الحساب",
|
||||
"emails.verification.hello": "السلام {{user}}",
|
||||
"emails.verification.body": "تبّع هاد الوصلة باش تيقّن لادريسة تاع ليميل ديالك.",
|
||||
"emails.verification.footer": "إلا ماشي نتا اللي طلبتي تيقّن هاد لادريسة تاع ليميل، ممكن تنخّل هاد البرية.",
|
||||
"emails.verification.thanks": "شكرا",
|
||||
"emails.verification.signature": "فرقة {{project}}",
|
||||
"emails.magicSession.subject": "تكونيكطا",
|
||||
"emails.magicSession.hello": "السلام,",
|
||||
"emails.magicSession.body": "تبّع هاد الوصلة باش تتكونيكطا.",
|
||||
"emails.magicSession.footer": "إلا ماشي نتا اللي طلبتي تتكونيكطا بهاد ليميل، ممكن تنخّل هاد البرية.",
|
||||
"emails.magicSession.thanks": "شكرا",
|
||||
"emails.magicSession.signature": "فرقة {{project}}",
|
||||
"emails.recovery.subject": "تبدال كلمة السر",
|
||||
"emails.recovery.hello": "السلام {{user}}",
|
||||
"emails.recovery.body": "تبّع هاد الوصلة باش تبدّل كلمة السر تاع {{project}}.",
|
||||
"emails.recovery.footer": "إلا ماشي نتا اللي طلبتي تبدّل كلمة السر، ممكن تنخّل هاد البرية.",
|
||||
"emails.recovery.thanks": "شكرا",
|
||||
"emails.recovery.signature": "فرقة {{project}}",
|
||||
"emails.invitation.subject": "عراضة ل فرقة %s ف %s",
|
||||
"emails.invitation.hello": "السلام",
|
||||
"emails.invitation.body": "هاد البرية تصيفطات ليك حيت {{owner}} بغى يعرض عليك تولّي عضو ف فرقة {{team}} عند {{project}}.",
|
||||
"emails.invitation.footer": "إلا كنتي ما مسوّقش, ممكن تنخّل هاد البرية.",
|
||||
"emails.invitation.thanks": "شكرا",
|
||||
"emails.invitation.signature": "فرقة {{project}}",
|
||||
"emails.certificate.subject": "السرتافيكة فشلات ل %s",
|
||||
"emails.certificate.hello": "السلام",
|
||||
"emails.certificate.body": "السرتافيكة ديال الضومين ديالك '{{domain}}' ما قدّاتش تجينيرا. هادي هي المحاولة نمرة {{attempt}}, السبب ديال هاد الفشل هو: {{error}}",
|
||||
"emails.certificate.footer": "السرتافيكة الفايتة ديالك غاتبقى مزيانة لمدة 30 يوم من عند أول فشل. كانشجعوك بزاف أنك تبقشش فهاد الموضوع, وا إلّا الضومين ديالك ما غايبقاش خدّام فيه الـ SSL.",
|
||||
"emails.certificate.thanks": "شكرا",
|
||||
"emails.certificate.signature": "فرقة {{project}}",
|
||||
"locale.country.unknown": "ما معروفش",
|
||||
"countries.af": "أفغانستان",
|
||||
"countries.ao": "أنڭولا",
|
||||
"countries.al": "ألبانيا",
|
||||
"countries.ad": "أندورا",
|
||||
"countries.ae": "الإمارات العربية المتّاحدة",
|
||||
"countries.ar": "الأرجنتين",
|
||||
"countries.am": "أرمينيا",
|
||||
"countries.ag": "أنتيڭوا وبربودا",
|
||||
"countries.au": "ؤسطراليا",
|
||||
"countries.at": "النامسا",
|
||||
"countries.az": "أديربيجان",
|
||||
"countries.bi": "بوروندي",
|
||||
"countries.be": "بلجيكا",
|
||||
"countries.bj": "بينين",
|
||||
"countries.bf": "بوركينا فاصو",
|
||||
"countries.bd": "بنڭلاديش",
|
||||
"countries.bg": "بلڭاريا",
|
||||
"countries.bh": "البحرين",
|
||||
"countries.bs": "دزيرات البهاما",
|
||||
"countries.ba": "البوسنة ؤ الهرسك",
|
||||
"countries.by": "بيلاروسيا",
|
||||
"countries.bz": "بيليز",
|
||||
"countries.bo": "بوليڤيا",
|
||||
"countries.br": "البرازيل",
|
||||
"countries.bb": "باربادوس",
|
||||
"countries.bn": "بروناي",
|
||||
"countries.bt": "بوتان",
|
||||
"countries.bw": "بوتسوانا",
|
||||
"countries.cf": "جمهورية إفريقيا الوسطانية",
|
||||
"countries.ca": "كانادا",
|
||||
"countries.ch": "سويسرا",
|
||||
"countries.cl": "تشيلي",
|
||||
"countries.cn": "الشينوا",
|
||||
"countries.ci": "ساحل العاج",
|
||||
"countries.cm": "الكاميرون",
|
||||
"countries.cd": "جمهورية الكونڭو الديمقراطية",
|
||||
"countries.cg": "جمهورية الكونڭو",
|
||||
"countries.co": "كولومبيا",
|
||||
"countries.km": "دزيرات القومور",
|
||||
"countries.cv": "الراس الخضر",
|
||||
"countries.cr": "كوسطاريكا",
|
||||
"countries.cu": "كوبا",
|
||||
"countries.cy": "قوبروص",
|
||||
"countries.cz": "التشيك",
|
||||
"countries.de": "ألمانيا",
|
||||
"countries.dj": "دجيبوتي",
|
||||
"countries.dm": "ضومينيكا",
|
||||
"countries.dk": "الدنمارك",
|
||||
"countries.do": "جمهورية الضومينيكان",
|
||||
"countries.dz": "الدزاير",
|
||||
"countries.ec": "إكوادور",
|
||||
"countries.eg": "مصر",
|
||||
"countries.er": "إريتريا",
|
||||
"countries.es": "سبانيا",
|
||||
"countries.ee": "إسطونيا",
|
||||
"countries.et": "إتيوپيا",
|
||||
"countries.fi": "فينلاندا",
|
||||
"countries.fj": "فيدجي",
|
||||
"countries.fr": "فرانسا",
|
||||
"countries.fm": "ميكرونيزيا",
|
||||
"countries.ga": "الڭابون",
|
||||
"countries.gb": "المملكة المتّاحدة",
|
||||
"countries.ge": "تجورجيا",
|
||||
"countries.gh": "غانا",
|
||||
"countries.gn": "غينيا",
|
||||
"countries.gm": "ڭامبيا",
|
||||
"countries.gw": "غينيا بيساو",
|
||||
"countries.gq": "غينيا الستوائية",
|
||||
"countries.gr": "اليونان",
|
||||
"countries.gd": "ڭرينادا",
|
||||
"countries.gt": "ڭواتيمالا",
|
||||
"countries.gy": "ڭيانا",
|
||||
"countries.hn": "هوندوراس",
|
||||
"countries.hr": "كرواتيا",
|
||||
"countries.ht": "هايتي",
|
||||
"countries.hu": "الماجر",
|
||||
"countries.id": "إندونيسيا",
|
||||
"countries.in": "الهند",
|
||||
"countries.ie": "إرلاندا",
|
||||
"countries.ir": "إران",
|
||||
"countries.iq": "العراق",
|
||||
"countries.is": "إسلاندا",
|
||||
"countries.il": "إسرائيل",
|
||||
"countries.it": "الطاليان",
|
||||
"countries.jm": "جامايكا",
|
||||
"countries.jo": "الأردن",
|
||||
"countries.jp": "الجاپون",
|
||||
"countries.kz": "كازاخستان",
|
||||
"countries.ke": "كينيا",
|
||||
"countries.kg": "قيرغيزستان",
|
||||
"countries.kh": "كمبوديا",
|
||||
"countries.ki": "كيريباتي",
|
||||
"countries.kn": "سانت كيتس ؤ نيفيس",
|
||||
"countries.kr": "كوريا الجنوبية",
|
||||
"countries.kw": "الكويت",
|
||||
"countries.la": "لاوس",
|
||||
"countries.lb": "لبنان",
|
||||
"countries.lr": "ليبيريا",
|
||||
"countries.ly": "ليبيا",
|
||||
"countries.lc": "سانت لوسيا",
|
||||
"countries.li": "ليختنشتاين",
|
||||
"countries.lk": "سري لانكا",
|
||||
"countries.ls": "ليسوتو",
|
||||
"countries.lt": "ليتوانيا",
|
||||
"countries.lu": "لوكسمبورڭ",
|
||||
"countries.lv": "لاتفيا",
|
||||
"countries.ma": "المغريب",
|
||||
"countries.mc": "موناكو",
|
||||
"countries.md": "مولضوڤا",
|
||||
"countries.mg": "ماداغشقار",
|
||||
"countries.mv": "دزيرات المالديڤ",
|
||||
"countries.mx": "الميكسيك",
|
||||
"countries.mh": "دزيرات مارشال",
|
||||
"countries.mk": "مقدونيا",
|
||||
"countries.ml": "مالي",
|
||||
"countries.mt": "مالطا",
|
||||
"countries.mm": "ميانمار",
|
||||
"countries.me": "مونطينيڭرو",
|
||||
"countries.mn": "منغوليا",
|
||||
"countries.mz": "الموزمبيق",
|
||||
"countries.mr": "موريتانيا",
|
||||
"countries.mu": "موريشيوس",
|
||||
"countries.mw": "مالاوي",
|
||||
"countries.my": "ماليزيا",
|
||||
"countries.na": "ناميبيا",
|
||||
"countries.ne": "النيجر",
|
||||
"countries.ng": "نيجيريا",
|
||||
"countries.ni": "نيكاراڭوا",
|
||||
"countries.nl": "هولاندا",
|
||||
"countries.no": "النرويج",
|
||||
"countries.np": "نيپال",
|
||||
"countries.nr": "ناورو",
|
||||
"countries.nz": "نيوزيلاندا",
|
||||
"countries.om": "عمّان",
|
||||
"countries.pk": "پاكيستان",
|
||||
"countries.pa": "پاناما",
|
||||
"countries.pe": "الپيرو",
|
||||
"countries.ph": "الفيليپين",
|
||||
"countries.pw": "پالاو",
|
||||
"countries.pg": "پاپوا غينيا الجديدة",
|
||||
"countries.pl": "پولاندا",
|
||||
"countries.kp": "كوريا الشمالية",
|
||||
"countries.pt": "البرطقيز",
|
||||
"countries.py": "الپاراڭواي",
|
||||
"countries.qa": "قطر",
|
||||
"countries.ro": "رومانيا",
|
||||
"countries.ru": "روسيا",
|
||||
"countries.rw": "روّاندا",
|
||||
"countries.sa": "المملكة العربية السعودية",
|
||||
"countries.sd": "السودان",
|
||||
"countries.sn": "السينيڭال",
|
||||
"countries.sg": "سنغافورة",
|
||||
"countries.sb": "دزيرات سليمان",
|
||||
"countries.sl": "صييراليون",
|
||||
"countries.sv": "السالڤاضور",
|
||||
"countries.sm": "سان مارينو",
|
||||
"countries.so": "الصومال",
|
||||
"countries.rs": "صيربيا",
|
||||
"countries.ss": "جنوب السودان",
|
||||
"countries.st": "صاو طومي ؤ پرينسيپي",
|
||||
"countries.sr": "سورينام",
|
||||
"countries.sk": "صلوڤاكيا",
|
||||
"countries.si": "صلوڤينيا",
|
||||
"countries.se": "السويد",
|
||||
"countries.sz": "سوازيلاند",
|
||||
"countries.sc": "السيشيل",
|
||||
"countries.sy": "سوريا",
|
||||
"countries.td": "تشاد",
|
||||
"countries.tg": "الطوڭو",
|
||||
"countries.th": "الطايلوند",
|
||||
"countries.tj": "طادجيكيستان",
|
||||
"countries.tm": "تركمانيستان",
|
||||
"countries.tl": "تيمور الشرقية",
|
||||
"countries.to": "تونڭا",
|
||||
"countries.tt": "ترينيداد ؤ طوباڭو",
|
||||
"countries.tn": "تونس",
|
||||
"countries.tr": "توركيا",
|
||||
"countries.tv": "توڤالو",
|
||||
"countries.tz": "طنزانيا",
|
||||
"countries.ug": "ؤڭاندا",
|
||||
"countries.ua": "ؤكرانيا",
|
||||
"countries.uy": "ؤروڭواي",
|
||||
"countries.us": "ميريكان",
|
||||
"countries.uz": "ؤزباكيستان",
|
||||
"countries.va": "مدينة الڤاتيكان",
|
||||
"countries.vc": "سانت ڤانسون ؤ دزيرات ڭرينادين",
|
||||
"countries.ve": "ڤينيزويلا",
|
||||
"countries.vn": "ڤيطنام",
|
||||
"countries.vu": "ڤانواتو",
|
||||
"countries.ws": "ساموا",
|
||||
"countries.ye": "اليمن",
|
||||
"countries.za": "جنوب إفريقيا",
|
||||
"countries.zm": "زامبيا",
|
||||
"countries.zw": "زيمبابوي",
|
||||
"continents.af": "أفريقيا",
|
||||
"continents.an": "القارة القطبية الجنوبية",
|
||||
"continents.as": "أسيا",
|
||||
"continents.eu": "ؤروپا",
|
||||
"continents.na": "ميريكان الشمالية",
|
||||
"continents.oc": "ؤقيانوسيا",
|
||||
"continents.sa": "ميريكان الجنوبية"
|
||||
}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +1 @@
|
|||
Subproject commit e0828010f4c222bb99cf65ddfed288e60602666f
|
||||
Subproject commit 48696c8f593cb01ccaaf63f88cc248520a54d6da
|
||||
|
|
@ -188,7 +188,7 @@ App::post('/v1/projects')
|
|||
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
|
||||
$dbForProject
|
||||
->setSharedTables(true)
|
||||
->setTenant($project->getInternalId())
|
||||
->setTenant(null)
|
||||
->setNamespace($dsn->getParam('namespace'));
|
||||
} else {
|
||||
$dbForProject
|
||||
|
|
@ -197,7 +197,11 @@ App::post('/v1/projects')
|
|||
->setNamespace('_' . $project->getInternalId());
|
||||
}
|
||||
|
||||
$dbForProject->create();
|
||||
try {
|
||||
$dbForProject->create();
|
||||
} catch (Duplicate) {
|
||||
// Database already exists
|
||||
}
|
||||
|
||||
$audit = new Audit($dbForProject);
|
||||
$audit->setup();
|
||||
|
|
|
|||
|
|
@ -51,7 +51,7 @@ App::post('/v1/proxy/rules')
|
|||
}
|
||||
|
||||
$functionsDomain = System::getEnv('_APP_DOMAIN_FUNCTIONS', '');
|
||||
if (str_ends_with($domain, $functionsDomain)) {
|
||||
if ($functionsDomain != '' && str_ends_with($domain, $functionsDomain)) {
|
||||
throw new Exception(Exception::GENERAL_ARGUMENT_INVALID, 'You cannot assign your functions domain or it\'s subdomain to specific resource. Please use different domain.');
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -16,6 +16,7 @@ use Utopia\CLI\Console;
|
|||
use Utopia\Config\Config;
|
||||
use Utopia\Database\Database;
|
||||
use Utopia\Database\Document;
|
||||
use Utopia\Database\Exception\Duplicate;
|
||||
use Utopia\Database\Helpers\ID;
|
||||
use Utopia\Database\Helpers\Permission;
|
||||
use Utopia\Database\Helpers\Role;
|
||||
|
|
@ -94,7 +95,7 @@ $http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $reg
|
|||
try {
|
||||
Console::success('[Setup] - Creating database: appwrite...');
|
||||
$dbForConsole->create();
|
||||
} catch (\Throwable $e) {
|
||||
} catch (Duplicate) {
|
||||
Console::success('[Setup] - Skip: metadata table already exists');
|
||||
}
|
||||
|
||||
|
|
@ -226,7 +227,7 @@ $http->on(Constant::EVENT_START, function (Server $http) use ($payloadSize, $reg
|
|||
});
|
||||
});
|
||||
|
||||
$http->on('request', function (SwooleRequest $swooleRequest, SwooleResponse $swooleResponse) use ($register) {
|
||||
$http->on(Constant::EVENT_REQUEST, function (SwooleRequest $swooleRequest, SwooleResponse $swooleResponse) use ($register) {
|
||||
App::setResource('swooleRequest', fn () => $swooleRequest);
|
||||
App::setResource('swooleResponse', fn () => $swooleResponse);
|
||||
|
||||
|
|
|
|||
|
|
@ -112,8 +112,8 @@ const APP_LIMIT_LIST_DEFAULT = 25; // Default maximum number of items to return
|
|||
const APP_KEY_ACCCESS = 24 * 60 * 60; // 24 hours
|
||||
const APP_USER_ACCCESS = 24 * 60 * 60; // 24 hours
|
||||
const APP_CACHE_UPDATE = 24 * 60 * 60; // 24 hours
|
||||
const APP_CACHE_BUSTER = 4327;
|
||||
const APP_VERSION_STABLE = '1.5.8';
|
||||
const APP_CACHE_BUSTER = 4329;
|
||||
const APP_VERSION_STABLE = '1.5.9';
|
||||
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
|
||||
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
|
||||
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
|
||||
|
|
|
|||
|
|
@ -753,7 +753,7 @@ $image = $this->getParam('image', '');
|
|||
<<: *x-logging
|
||||
restart: unless-stopped
|
||||
stop_signal: SIGINT
|
||||
image: openruntimes/executor:0.5.5
|
||||
image: openruntimes/executor:0.5.7
|
||||
networks:
|
||||
- appwrite
|
||||
- runtimes
|
||||
|
|
|
|||
|
|
@ -50,7 +50,7 @@
|
|||
"utopia-php/cache": "0.10.*",
|
||||
"utopia-php/cli": "0.15.*",
|
||||
"utopia-php/config": "0.2.*",
|
||||
"utopia-php/database": "dev-feat-migrations as 0.50.0",
|
||||
"utopia-php/database": "dev-feat-migrations as 0.50.4",
|
||||
"utopia-php/domains": "0.5.*",
|
||||
"utopia-php/dsn": "0.2.1",
|
||||
"utopia-php/framework": "0.33.*",
|
||||
|
|
|
|||
16
composer.lock
generated
16
composer.lock
generated
|
|
@ -4,7 +4,7 @@
|
|||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "7680daa08c49ca1a1307df557c9ee87c",
|
||||
"content-hash": "9f0148c3d90031407444e496f05c52ab",
|
||||
"packages": [
|
||||
{
|
||||
"name": "adhocore/jwt",
|
||||
|
|
@ -1724,12 +1724,12 @@
|
|||
"source": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/utopia-php/database.git",
|
||||
"reference": "6b0defbcb442507a5928afb7c40035f245e04d5c"
|
||||
"reference": "09da873eec2aff442a6201b74c9ddc2bee566cd7"
|
||||
},
|
||||
"dist": {
|
||||
"type": "zip",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/6b0defbcb442507a5928afb7c40035f245e04d5c",
|
||||
"reference": "6b0defbcb442507a5928afb7c40035f245e04d5c",
|
||||
"url": "https://api.github.com/repos/utopia-php/database/zipball/09da873eec2aff442a6201b74c9ddc2bee566cd7",
|
||||
"reference": "09da873eec2aff442a6201b74c9ddc2bee566cd7",
|
||||
"shasum": ""
|
||||
},
|
||||
"require": {
|
||||
|
|
@ -1747,7 +1747,7 @@
|
|||
"phpstan/phpstan": "1.10.*",
|
||||
"phpunit/phpunit": "^9.4",
|
||||
"rregeer/phpunit-coverage-check": "^0.3.1",
|
||||
"swoole/ide-helper": "4.8.0",
|
||||
"swoole/ide-helper": "5.1.2",
|
||||
"utopia-php/cli": "^0.14.0"
|
||||
},
|
||||
"type": "library",
|
||||
|
|
@ -1772,7 +1772,7 @@
|
|||
"issues": "https://github.com/utopia-php/database/issues",
|
||||
"source": "https://github.com/utopia-php/database/tree/feat-migrations"
|
||||
},
|
||||
"time": "2024-07-23T05:38:47+00:00"
|
||||
"time": "2024-08-13T10:00:28+00:00"
|
||||
},
|
||||
{
|
||||
"name": "utopia-php/domains",
|
||||
|
|
@ -5595,8 +5595,8 @@
|
|||
{
|
||||
"package": "utopia-php/database",
|
||||
"version": "dev-feat-migrations",
|
||||
"alias": "0.50.0",
|
||||
"alias_normalized": "0.50.0.0"
|
||||
"alias": "0.50.4",
|
||||
"alias_normalized": "0.50.4.0"
|
||||
}
|
||||
],
|
||||
"minimum-stability": "stable",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,8 @@
|
|||
zend_extension=xdebug
|
||||
|
||||
[xdebug]
|
||||
xdebug.mode=develop,debug
|
||||
xdebug.mode=develop,debug,profile
|
||||
xdebug.client_host=host.docker.internal
|
||||
xdebug.start_with_request=yes
|
||||
xdebug.start_with_request=yes
|
||||
xdebug.output_dir=/tmp/xdebug
|
||||
xdebug.use_compression=false
|
||||
|
|
|
|||
|
|
@ -833,7 +833,7 @@ services:
|
|||
hostname: exc1
|
||||
<<: *x-logging
|
||||
stop_signal: SIGINT
|
||||
image: openruntimes/executor:0.5.5
|
||||
image: openruntimes/executor:0.5.7
|
||||
restart: unless-stopped
|
||||
networks:
|
||||
- appwrite
|
||||
|
|
|
|||
|
|
@ -1 +1,3 @@
|
|||
Use this endpoint to fetch the favorite icon (AKA favicon) of any remote website URL.
|
||||
|
||||
This endpoint does not follow HTTP redirects.
|
||||
|
|
@ -1,3 +1,5 @@
|
|||
Use this endpoint to fetch a remote image URL and crop it to any image size you want. This endpoint is very useful if you need to crop and display remote images in your app or in case you want to make sure a 3rd party image is properly served using a TLS protocol.
|
||||
|
||||
When one dimension is specified and the other is 0, the image is scaled with preserved aspect ratio. If both dimensions are 0, the API provides an image at source quality. If dimensions are not specified, the default size of image returned is 400x400px.
|
||||
|
||||
This endpoint does not follow HTTP redirects.
|
||||
|
|
@ -87,6 +87,7 @@ abstract class Migration
|
|||
'1.5.6' => 'V20',
|
||||
'1.5.7' => 'V20',
|
||||
'1.5.8' => 'V20',
|
||||
'1.5.9' => 'V20',
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -171,29 +172,27 @@ abstract class Migration
|
|||
|
||||
Console::log('Migrating Collection ' . $collection['$id'] . ':');
|
||||
|
||||
\Co\run(function (array $collection, callable $callback) {
|
||||
foreach ($this->documentsIterator($collection['$id']) as $document) {
|
||||
go(function (Document $document, callable $callback) {
|
||||
if (empty($document->getId()) || empty($document->getCollection())) {
|
||||
return;
|
||||
}
|
||||
foreach ($this->documentsIterator($collection['$id']) as $document) {
|
||||
go(function (Document $document, callable $callback) {
|
||||
if (empty($document->getId()) || empty($document->getCollection())) {
|
||||
return;
|
||||
}
|
||||
|
||||
$old = $document->getArrayCopy();
|
||||
$new = call_user_func($callback, $document);
|
||||
$old = $document->getArrayCopy();
|
||||
$new = call_user_func($callback, $document);
|
||||
|
||||
if (is_null($new) || $new->getArrayCopy() == $old) {
|
||||
return;
|
||||
}
|
||||
if (is_null($new) || $new->getArrayCopy() == $old) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->projectDB->updateDocument($document->getCollection(), $document->getId(), $document);
|
||||
} catch (\Throwable $th) {
|
||||
Console::error('Failed to update document: ' . $th->getMessage());
|
||||
return;
|
||||
}
|
||||
}, $document, $callback);
|
||||
}
|
||||
}, $collection, $callback);
|
||||
try {
|
||||
$this->projectDB->updateDocument($document->getCollection(), $document->getId(), $document);
|
||||
} catch (\Throwable $th) {
|
||||
Console::error('Failed to update document: ' . $th->getMessage());
|
||||
return;
|
||||
}
|
||||
}, $document, $callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -816,29 +816,27 @@ class V19 extends Migration
|
|||
|
||||
Console::log('Migrating Collection ' . $collection['$id'] . ':');
|
||||
|
||||
\Co\run(function (array $collection, callable $callback) {
|
||||
foreach ($this->documentsIterator($collection['$id']) as $document) {
|
||||
go(function (Document $document, callable $callback) {
|
||||
if (empty($document->getId()) || empty($document->getCollection())) {
|
||||
return;
|
||||
}
|
||||
foreach ($this->documentsIterator($collection['$id']) as $document) {
|
||||
go(function (Document $document, callable $callback) {
|
||||
if (empty($document->getId()) || empty($document->getCollection())) {
|
||||
return;
|
||||
}
|
||||
|
||||
$old = $document->getArrayCopy();
|
||||
$new = call_user_func($callback, $document);
|
||||
$old = $document->getArrayCopy();
|
||||
$new = call_user_func($callback, $document);
|
||||
|
||||
if (is_null($new) || $new->getArrayCopy() == $old) {
|
||||
return;
|
||||
}
|
||||
if (is_null($new) || $new->getArrayCopy() == $old) {
|
||||
return;
|
||||
}
|
||||
|
||||
try {
|
||||
$this->projectDB->updateDocument($document->getCollection(), $document->getId(), $document);
|
||||
} catch (\Throwable $th) {
|
||||
Console::error('Failed to update document: ' . $th->getMessage());
|
||||
return;
|
||||
}
|
||||
}, $document, $callback);
|
||||
}
|
||||
}, $collection, $callback);
|
||||
try {
|
||||
$this->projectDB->updateDocument($document->getCollection(), $document->getId(), $document);
|
||||
} catch (\Throwable $th) {
|
||||
Console::error('Failed to update document: ' . $th->getMessage());
|
||||
return;
|
||||
}
|
||||
}, $document, $callback);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -33,8 +33,11 @@ class Migrate extends Action
|
|||
->inject('dbForConsole')
|
||||
->inject('getProjectDB')
|
||||
->inject('register')
|
||||
->callback(fn ($version, $dbForConsole, $getProjectDB, Registry $register) => $this->action($version, $dbForConsole, $getProjectDB, $register));
|
||||
|
||||
->callback(function ($version, $dbForConsole, $getProjectDB, Registry $register) {
|
||||
\Co\run(function () use ($version, $dbForConsole, $getProjectDB, $register) {
|
||||
$this->action($version, $dbForConsole, $getProjectDB, $register);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
private function clearProjectsCache(Document $project)
|
||||
|
|
@ -50,16 +53,15 @@ class Migrate extends Action
|
|||
}
|
||||
}
|
||||
} while ($iterator > 0);
|
||||
|
||||
} catch (\Throwable $th) {
|
||||
Console::error('Failed to clear project ("'.$project->getId().'") cache with error: '.$th->getMessage());
|
||||
Console::error('Failed to clear project ("' . $project->getId() . '") cache with error: ' . $th->getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
public function action(string $version, Database $dbForConsole, callable $getProjectDB, Registry $register)
|
||||
{
|
||||
Authorization::disable();
|
||||
if (! array_key_exists($version, Migration::$versions)) {
|
||||
if (!array_key_exists($version, Migration::$versions)) {
|
||||
Console::error("Version {$version} not found.");
|
||||
Console::exit(1);
|
||||
|
||||
|
|
@ -77,7 +79,7 @@ class Migrate extends Action
|
|||
|
||||
$app = new App('UTC');
|
||||
|
||||
Console::success('Starting Data Migration to version '.$version);
|
||||
Console::success('Starting Data Migration to version ' . $version);
|
||||
|
||||
$console = $app->getResource('console');
|
||||
|
||||
|
|
@ -97,11 +99,11 @@ class Migrate extends Action
|
|||
$totalProjects = $dbForConsole->count('projects') + 1;
|
||||
}
|
||||
|
||||
$class = 'Appwrite\\Migration\\Version\\'.Migration::$versions[$version];
|
||||
$class = 'Appwrite\\Migration\\Version\\' . Migration::$versions[$version];
|
||||
/** @var Migration $migration */
|
||||
$migration = new $class();
|
||||
|
||||
while (! empty($projects)) {
|
||||
while (!empty($projects)) {
|
||||
foreach ($projects as $project) {
|
||||
/**
|
||||
* Skip user projects with id 'console'
|
||||
|
|
@ -122,7 +124,7 @@ class Migrate extends Action
|
|||
->setPDO($register->get('db', true))
|
||||
->execute();
|
||||
} catch (\Throwable $th) {
|
||||
Console::error('Failed to update project ("'.$project->getId().'") version with error: '.$th->getMessage());
|
||||
Console::error('Failed to update project ("' . $project->getId() . '") version with error: ' . $th->getMessage());
|
||||
throw $th;
|
||||
}
|
||||
|
||||
|
|
@ -135,7 +137,7 @@ class Migrate extends Action
|
|||
$offset = $offset + $limit;
|
||||
$count = $count + $sum;
|
||||
|
||||
Console::log('Migrated '.$count.'/'.$totalProjects.' projects...');
|
||||
Console::log('Migrated ' . $count . '/' . $totalProjects . ' projects...');
|
||||
}
|
||||
|
||||
Console::success('Data Migration Completed');
|
||||
|
|
|
|||
Loading…
Reference in a new issue