Compare commits

...
Author SHA1 Message Date
fogelito d91ef699b6 dbg 2024-06-19 11:07:10 +03:00
Jake BarnbyandGitHub e195018abd Merge pull request #8255 from appwrite/feat-update-pwd-abuse
Feat update pwd abuse
2024-06-11 16:56:21 +12:00
Jake Barnby a4c1275764 Add abuse limit for update password 2024-06-10 18:09:30 +12:00
Jake BarnbyandGitHub 3c123d372a Merge pull request #8244 from appwrite/1.5.x
Sync 1.5.x into refactor-usage-sn
2024-06-10 12:22:16 +12:00
Damodar LohaniandGitHub 00a633759e Merge pull request #7936 from appwrite/feat-upgrade-platform-with-module
Use latest Platform and add Core module
2024-06-09 06:40:13 +05:45
Steven NguyenandGitHub 4a168f6948 Merge pull request #8245 from appwrite/fix-oauth2-mfa
Fix MFA for OAuth2 only accounts
2024-06-07 18:11:24 -07:00
Steven Nguyen a09a09a7a9 fix(auth): fix MFA verification for OAuth2 sessions
Before this, users who only signed in with OAuth2 were not able to
verify their sessions with MFA because their session already used an
email factor and they couldn't use an additional email factor.

This commit changes the OAuth2 session to include 2 factors: email and
oauth2. This second special factor is used to bypass MFA checks. It is
fine to bypass MFA checks because OAuth2 is supposed to handle the
entire authentication process, verifying who the user is and we, as the
resource provider, only need to trust the OAuth2 provider.
2024-06-07 16:45:14 -07:00
Jake BarnbyandGitHub 7e3070a4b2 Merge pull request #8240 from appwrite/revert-8237-revert-8193-feat-remove-random-shared-tables
Revert "Merge pull request #8237 from appwrite/revert-8193-feat-remov…
2024-06-07 17:34:14 +12:00
Jake Barnby e58e849504 Fix function test 2024-06-06 21:29:34 +12:00
Jake Barnby c87a6a863b Increase sleep 2024-06-06 20:52:22 +12:00
Damodar Lohani f44ed18b05 remove worker index 2024-06-06 08:45:15 +00:00
Damodar Lohani 131de2ea7a refactor module 2024-06-06 08:35:50 +00:00
Damodar Lohani ec69507818 Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-upgrade-platform-with-module 2024-06-06 08:32:07 +00:00
Jake Barnby 9e487b8ccf Revert "Merge pull request #8237 from appwrite/revert-8193-feat-remove-random-shared-tables"
This reverts commit 930ae6ded0, reversing
changes made to 1f6417b156.
2024-06-06 20:11:19 +12:00
Jake BarnbyandGitHub 035144d1ff Merge pull request #8238 from appwrite/chore-bump-base-image
Bump base image from 0.9.0 to 0.9.1
2024-06-06 13:47:01 +12:00
Steven NguyenandGitHub c7157b3692 chore: bump base image from 0.9.0 to 0.9.1 2024-06-06 00:23:00 +00:00
Christy JacobandGitHub 37a1c804b5 Merge pull request #8230 from appwrite/refactor-redis-cache
refactor redis cache
2024-06-06 01:33:48 +05:30
shimon cdf7e1a8dc composer 2024-06-05 22:29:47 +03:00
Christy JacobandGitHub 930ae6ded0 Merge pull request #8237 from appwrite/revert-8193-feat-remove-random-shared-tables
Revert "Feat remove random shared tables"
2024-06-06 00:15:12 +05:30
Christy JacobandGitHub ff6efc2855 Revert "Feat remove random shared tables" 2024-06-06 00:11:56 +05:30
shimon f06e19d8fa composer 2024-06-05 20:52:35 +03:00
shimon eb28841cb1 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into refactor-redis-cache
 Conflicts:
	composer.lock
2024-06-05 20:47:48 +03:00
shimon e2c6c61083 composer 2024-06-05 20:40:14 +03:00
Jake BarnbyandGitHub 1f6417b156 Merge pull request #8193 from appwrite/feat-remove-random-shared-tables
Feat remove random shared tables
2024-06-05 17:17:58 +12:00
Jake Barnby 5b3a3d5bf9 Add flaky test retry 2024-06-04 20:10:45 +12:00
Damodar Lohani a823bca463 update platform 2024-06-04 08:04:51 +00:00
Damodar Lohani fef769271f Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-upgrade-platform-with-module 2024-06-04 08:00:19 +00:00
Jake Barnby f459a5c458 Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-remove-random-shared-tables
# Conflicts:
#	docker-compose.yml
2024-06-04 17:43:14 +12:00
Jake BarnbyandGitHub 026933ff74 Merge pull request #8218 from appwrite/chore-release-sdks
Release SDKs
2024-06-04 16:05:58 +12:00
shimon e28224976a refactor redis cache 2024-06-02 16:17:11 +03:00
Luke B. SilverandGitHub 065dfa6663 Merge pull request #8222 from appwrite/feat-support-twilio-messaging-service-sid
feat: support twilio messaging service sid
2024-05-30 17:24:38 +01:00
loks0n 61336be50d doc: update _APP_SMS_FROM 2024-05-30 16:51:48 +01:00
loks0n 64e0c88349 Merge branch 'refactor-usage-sn' of https://github.com/appwrite/appwrite into feat-support-twilio-messaging-service-sid 2024-05-30 16:48:08 +01:00
fogelito e91a532e74 Database tag 2024-05-30 18:46:21 +03:00
loks0n ab4401992c Revert "feat: use param instead"
This reverts commit 72cca45d6d.
2024-05-30 16:36:05 +01:00
loks0n 72cca45d6d feat: use param instead 2024-05-30 16:34:43 +01:00
loks0n c6a520909e feat: support twilio messaging service sid 2024-05-30 16:23:15 +01:00
Christy JacobandGitHub fd7c6a6a71 Merge pull request #8220 from appwrite/test-main-1
test
2024-05-30 19:19:46 +04:00
fogelito 065b5f4858 test 2024-05-30 16:07:11 +03:00
Steven Nguyen 4b5e86cc05 chore(sdks): bump major version since there are breaking changes 2024-05-29 13:59:59 -07:00
Steven Nguyen 2f8380e97d fix(docs): remove extraneous word in Verify authenticator description 2024-05-29 13:59:12 -07:00
Bradley Schofield d4db55ab77 Fix failed queue param in failed jobs 2024-05-29 18:11:58 +09:00
Christy JacobandGitHub 7da997b5cd Merge pull request #8189 from appwrite/chore-sync-1.5.x
Sync 1.5.x into main
2024-05-28 18:38:04 +04:00
Christy Jacob 11b94cf22e Merge branch '1.5.x' of https://github.com/appwrite/appwrite into chore-sync-1.5.x 2024-05-28 13:13:37 +00:00
Christy JacobandGitHub c109dcc683 Merge pull request #8205 from appwrite/sync-with-1.5.x
Sync with 1.5.x
2024-05-27 15:42:26 +04:00
Christy Jacob 1c79ccd231 Merge branch '1.5.x' of https://github.com/appwrite/appwrite into sync-with-1.5.x 2024-05-27 11:26:32 +00:00
Damodar LohaniandGitHub 2b8bf3b252 Merge pull request #8120 from appwrite/chore-error-requests-count
Chore:usage requests count on error
2024-05-26 07:04:33 +05:45
Christy JacobandGitHub d5ebde8143 Merge pull request #8197 from appwrite/update-changelog
chore: update changelog
2024-05-24 21:33:25 +04:00
Christy Jacob 671687cf42 chore: update changelog 2024-05-24 16:51:35 +00:00
Christy Jacob ecf4e258b2 chore: update changelog 2024-05-24 16:49:48 +00:00
Christy Jacob 131d66522a chore: update changelog 2024-05-24 16:40:11 +00:00
Christy JacobandGitHub 623a3caa03 Merge pull request #8195 from appwrite/prepare-1.5.7
chore: prepare 1.5.7
2024-05-24 19:56:06 +04:00
Christy JacobandGitHub 3a63ee834a Merge branch '1.5.x' into prepare-1.5.7 2024-05-24 19:55:59 +04:00
Christy JacobandGitHub a414b2b42e Merge pull request #8063 from appwrite/feat-add-version-header
feat: add warning header
2024-05-24 19:54:43 +04:00
Christy Jacob c76dbaaadb Merge branch '1.5.x' of https://github.com/appwrite/appwrite into prepare-1.5.7 2024-05-24 15:53:43 +00:00
loks0n d73a9e75cd refactor: remove version format const 2024-05-24 16:27:13 +01:00
loks0n ad3cc4e68f fix: typo 2024-05-24 16:16:57 +01:00
Luke B. SilverandGitHub a92713d3a2 Merge branch '1.5.x' into feat-add-version-header 2024-05-24 16:08:11 +01:00
loks0n cb4c15ce0a ui: improve warning message 2024-05-24 16:07:22 +01:00
Christy JacobandGitHub e55f0adab2 Merge pull request #8185 from ItzNotABug/fix-robots-txt
Fix: Don't Override `robots.txt` for Other Domains
2024-05-24 17:15:34 +04:00
Christy JacobandGitHub 0e7c417d67 Merge pull request #8089 from appwrite/feat-improve-header-demo-values
feat: improve header demo values
2024-05-24 17:09:09 +04:00
Christy JacobandGitHub 0fcb76570d Merge branch '1.5.x' into prepare-1.5.7 2024-05-24 17:07:57 +04:00
Christy JacobandGitHub 6ea2177818 Merge pull request #8196 from appwrite/sync-with-main
Sync with main
2024-05-24 17:07:42 +04:00
Matej Bačo 1109782af0 Update console 2024-05-24 15:06:52 +02:00
Christy Jacob cd5f6f58a2 Merge branch 'main' of https://github.com/appwrite/appwrite into sync-with-main 2024-05-24 12:43:56 +00:00
Christy Jacob ac49f7497a Merge branch '1.5.x' of https://github.com/appwrite/appwrite into prepare-1.5.7 2024-05-24 12:43:03 +00:00
Christy JacobandGitHub 9f2030fb8c Merge pull request #8147 from appwrite/chore-rename-executor-image-name
Update executor image name
2024-05-24 16:40:39 +04:00
Christy JacobandGitHub 74a9995220 Merge pull request #8188 from appwrite/sync-1.5.x-with-cloud
Sync 1.5.x with cloud
2024-05-24 16:39:52 +04:00
Matej Bačo 8dd883a312 Add comments 2024-05-24 13:04:30 +02:00
Christy Jacob 99a6e81b0d chore: update specs 2024-05-24 11:03:49 +00:00
Christy Jacob 8c851ecdfb chore: remove specs 2024-05-24 10:58:06 +00:00
Christy Jacob c2215ef171 chore: update console 2024-05-24 10:57:31 +00:00
Christy Jacob 344f926c8e chore: update console 2024-05-24 10:55:34 +00:00
Luke B. SilverandGitHub b52de356e9 Merge branch '1.5.x' into feat-improve-header-demo-values 2024-05-24 11:17:28 +01:00
loks0n 6eae908e5e Merge branch '1.5.x' of https://github.com/appwrite/appwrite into feat-improve-header-demo-values 2024-05-24 11:16:54 +01:00
Christy Jacob e266791547 chore: update changelog 2024-05-24 09:51:56 +00:00
Christy Jacob 02acee9e2b chore: fix merge conflicts 2024-05-24 09:51:28 +00:00
Christy Jacob 75de5b0332 chore: update specs 2024-05-24 09:35:57 +00:00
Jake Barnby bbb4b0bc12 Remove shared table headers 2024-05-24 20:29:25 +12:00
Jake Barnby 00c047d804 Run full tests on shared tables 2024-05-24 20:29:06 +12:00
Jake Barnby e19b465ce2 Move shared tables db to env var from const 2024-05-24 20:10:47 +12:00
Khushboo Verma 357409c508 Merge conflicts in CHANGES.md 2024-05-24 13:03:41 +05:30
Khushboo Verma da3ff7f8ec Merge branch 'chore-rename-executor-image-name' of github.com:appwrite/appwrite into chore-rename-executor-image-name 2024-05-24 12:56:00 +05:30
Christy Jacob 2005ddfe47 chore: update env variable 2024-05-24 07:25:39 +00:00
Khushboo Verma ca1f760905 Update executor hostname in variables 2024-05-24 12:55:32 +05:30
Jake Barnby 074b807d8d Merge remote-tracking branch 'origin/refactor-usage-sn' into sync-1.5.x-with-cloud 2024-05-24 16:56:57 +12:00
Jake BarnbyandGitHub 7d18de95ce Merge pull request #7870 from appwrite/fix-setting-secrets
Fix not hiding tokens for clients via realtime
2024-05-24 16:53:36 +12:00
Jake Barnby 4ed125f7c8 Remove random shared tables assignment in preparation of setting as override instead 2024-05-24 16:53:09 +12:00
Jake Barnby a895ce4270 Remove redundant backup checks 2024-05-24 16:51:29 +12:00
Jake Barnby aa8460cfb9 Merge remote-tracking branch 'origin/refactor-usage-sn' into sync-1.5.x-with-cloud 2024-05-24 16:40:18 +12:00
Jake BarnbyandGitHub 7b76455f0b Merge pull request #8192 from appwrite/fix-realtime-stats
Wrap realtime stats in an edition check
2024-05-24 16:39:55 +12:00
Jake Barnby 75d6a7e2a0 Wrap realtime stats in an edition check 2024-05-24 16:34:43 +12:00
Jake Barnby fc7a676dbb Merge remote-tracking branch 'origin/refactor-usage-sn' into sync-1.5.x-with-cloud 2024-05-24 15:47:12 +12:00
Jake BarnbyandGitHub 15ebad5548 Merge pull request #8190 from appwrite/chore-update-executor-host-default-var
Chore update executor host default var
2024-05-24 15:46:35 +12:00
Jake BarnbyandGitHub ddc7de7b7f Merge pull request #8191 from appwrite/chore-update-submodule
Chore update submodule
2024-05-24 15:46:17 +12:00
Jake Barnby 3da213434f Update to 4.3.3 to match cloud 2024-05-24 15:40:42 +12:00
Jake Barnby 96bc307fcd Checkout 4.3.2 2024-05-24 15:39:26 +12:00
Jake Barnby 3eec8317d4 Improve variable desc copy 2024-05-24 15:31:17 +12:00
Jake Barnby e65cc78234 Update executor default var to match new container hostname 2024-05-24 15:30:14 +12:00
Steven NguyenandGitHub 1ac7d3576d Merge branch '1.5.x' into chore-sync-1.5.x 2024-05-24 00:49:02 +00:00
Christy JacobandGitHub 4a4d5109e2 Merge branch '1.5.x' into sync-1.5.x-with-cloud 2024-05-23 23:36:13 +04:00
Steven NguyenandGitHub ecdcd18dab Merge pull request #8183 from appwrite/fix/7887-invalid-cache-document-id
Fix invalid cache document id
2024-05-23 12:34:53 -07:00
shimon a2ef77f0f5 lint 2024-05-23 16:47:37 +03:00
shimon c996dbcdc9 lint 2024-05-23 16:39:23 +03:00
shimon a22d98296c lint 2024-05-23 16:33:40 +03:00
ItzNotABug 81e8502a78 fix: dont override humans.txt too. 2024-05-23 15:54:12 +05:30
ItzNotABug 5462b83d3c fix: don't override robots.txt for other domains. 2024-05-23 14:47:59 +05:30
shimon 2414438ded Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into chore-error-requests-count
 Conflicts:
	app/controllers/shared/api.php
	composer.json
2024-05-23 11:01:28 +03:00
shimon 87cf7776df lint 2024-05-23 10:59:19 +03:00
Jake Barnby 9bb9f1eee7 Merge remote-tracking branch 'origin/refactor-usage-sn' into fix-setting-secrets
# Conflicts:
#	tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
2024-05-23 15:37:13 +12:00
Steven NguyenandGitHub 9db92698dc fix(cache): use the same cache key when loading and saving files 2024-05-22 23:23:16 +00:00
Christy JacobandGitHub 87ee2770a8 Merge pull request #8184 from appwrite/sync-with-1.5.x
Sync refactor-usage-sn with 1.5.x
2024-05-23 01:25:56 +04:00
Torsten Dittmann a9c701cdc1 tests: fix new status codes 2024-05-22 23:19:21 +02:00
Christy Jacob 54093617ee chore: linter 2024-05-22 19:57:57 +00:00
Christy Jacob aa76862692 Merge branch '1.5.x' of https://github.com/appwrite/appwrite into sync-with-1.5.x 2024-05-22 19:43:31 +00:00
Steven NguyenandGitHub 8d5583f0c6 fix(cache): fix invalid cache document id
The document ID should not have special characters like "*" or it will
cause problems with things like cursor based pagination which is done
in migrations.

We did have the cache buster inside the md5 call before, but when the
usage code was reverted and whatnot, the change wasn't added back
properly.

Related: https://github.com/appwrite/appwrite/issues/7887
2024-05-22 19:16:34 +00:00
shimon 892caf4710 update composer 2024-05-22 17:51:28 +03:00
shimon a96a6d56d7 update composer 2024-05-22 17:51:18 +03:00
shimon 24969ebc4f Merge remote-tracking branch 'origin/refactor-usage-sn' into refactor-usage-sn 2024-05-22 17:43:03 +03:00
Christy JacobandGitHub d979b2c997 Merge pull request #8180 from appwrite/feat-get-env-sn
Feat get env
2024-05-22 18:39:09 +04:00
shimon 355e2dc266 updating composer 2024-05-22 16:45:30 +03:00
shimon d201b0b099 updating composer 2024-05-22 16:44:30 +03:00
shimon 5b1a2038bf updating composer 2024-05-22 16:43:35 +03:00
shimon acbcadcbb9 Merge remote-tracking branch 'origin/refactor-usage-sn' into refactor-usage-sn 2024-05-22 16:40:38 +03:00
shimon 7c71e44250 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into feat-get-env-sn 2024-05-22 16:39:42 +03:00
shimon 6639714a1b updating composer 2024-05-22 16:37:45 +03:00
Christy JacobandGitHub c3dba79009 Merge pull request #7592 from appwrite/feat-sms-locale
usage sms per country code count
2024-05-22 17:30:14 +04:00
shimon 074eab3d63 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into feat-sms-locale
 Conflicts:
	composer.json
	composer.lock
2024-05-22 15:51:24 +03:00
Jake BarnbyandGitHub 329b2e151d Merge pull request #8169 from appwrite/remove-pdo-exception
Remove throw PdoException in Error hook
2024-05-22 22:43:21 +12:00
Christy JacobandGitHub c45823a05d Merge pull request #8164 from appwrite/feat-add-schedule-function-tests
Add tests for scheduled functions
2024-05-22 13:57:18 +04:00
loks0n e1e4cb44f3 Merge branch 'main' of https://github.com/appwrite/appwrite into feat-improve-header-demo-values 2024-05-22 10:52:06 +01:00
Khushboo VermaandGitHub 7688d32857 Merge branch '1.5.x' into feat-add-schedule-function-tests 2024-05-22 14:56:03 +05:30
Jake Barnby 680cd5194d Fix returning hashed secrets 2024-05-22 14:11:06 +12:00
Jake Barnby f03281a474 Fix project tests 2024-05-22 13:42:34 +12:00
Jake Barnby 93f50e1e0e Lint 2024-05-22 12:51:27 +12:00
Jake Barnby c7106b9147 Merge remote-tracking branch 'origin/refactor-usage-sn' into fix-setting-secrets 2024-05-22 12:50:58 +12:00
Steven NguyenandGitHub b99628669b Merge pull request #8172 from appwrite/chore-bump-console-4.3.2
Bump console to version 4.3.2
2024-05-21 13:45:56 -07:00
Steven NguyenandGitHub cc6129fd20 Merge branch '1.5.x' into chore-bump-console-4.3.2 2024-05-21 12:45:29 -07:00
Steven NguyenandGitHub 12ac38c079 Merge pull request #8168 from appwrite/chore-release-sdks
Release SDKs
2024-05-21 11:52:07 -07:00
Steven NguyenandGitHub c2c4171d36 Bump console to version 4.3.2 2024-05-21 18:26:39 +00:00
Steven NguyenandGitHub 69f53492fd Merge branch '1.5.x' into chore-release-sdks 2024-05-21 08:47:18 -07:00
Torsten DittmannandGitHub d00aad9d30 Merge pull request #8170 from appwrite/chore-bump-console-4.3.1
Bump console to version 4.3.1
2024-05-21 17:42:38 +02:00
Steven NguyenandGitHub bc74d1eee7 Bump console to version 4.3.1 2024-05-21 14:40:31 +00:00
Khushboo VermaandGitHub 1767d885c2 Merge branch '1.5.x' into feat-add-schedule-function-tests 2024-05-21 19:23:12 +05:30
Christy JacobandGitHub 90bfd77483 Merge pull request #8067 from appwrite/fix-dont-publish-max-users-exceed
Fix don't publish max users exceed
2024-05-21 14:25:12 +04:00
Khushboo Verma df340c0e5b Update code to 400 2024-05-21 15:53:38 +05:30
fogelito 795b595052 Remove throw 2024-05-21 10:18:13 +03:00
Steven Nguyen 5a618840b9 chore: generate sdks and examples 2024-05-20 15:54:37 -07:00
Steven Nguyen 14ec9334a0 chore: update dart and flutter changelogs 2024-05-20 15:54:37 -07:00
Steven Nguyen f0f2e5217c chore: bump SDK versions 2024-05-20 15:54:37 -07:00
Steven Nguyen 215b1a2864 chore: bump sdk generator version 2024-05-20 15:31:06 -07:00
Steven Nguyen 99a9c809ed chore: regenerate specs 2024-05-20 15:30:11 -07:00
Steven Nguyen 9b8b35de85 Add 1.5.6 to CHANGES.md 2024-05-20 15:27:53 -07:00
Steven Nguyen 1269294ff5 Bump appwrite version to 1.5.6 2024-05-20 15:27:52 -07:00
Steven NguyenandGitHub 1bfdab3c98 Merge pull request #8167 from appwrite/chore-sync-with-main
Sync main into 1.5.x
2024-05-20 15:03:33 -07:00
loks0n ff1cabdbf7 chore: refactor finally clause 2024-05-20 22:35:40 +01:00
Steven NguyenandGitHub 47ed708293 Merge branch 'main' into chore-sync-with-main 2024-05-20 19:03:54 +00:00
Steven NguyenandGitHub 722f3291fa Merge branch 'main' into chore-sync-with-main 2024-05-20 18:33:52 +00:00
Luke B. SilverandGitHub 24dc6d4f86 Merge pull request #8165 from appwrite/fix-improve-cold-start-error-cloud
feat: improve cold start error, merge to cloud
2024-05-20 19:14:43 +01:00
loks0n 6bd407eae9 chore: refactor finally block 2024-05-20 18:55:15 +01:00
loks0n 93dc9befd9 refactor-usage-sn specs and composer 2024-05-20 18:13:01 +01:00
loks0n 3e0f38098e revert composer update 2024-05-20 18:11:27 +01:00
loks0n 04ed5f3894 revert specs 2024-05-20 18:11:06 +01:00
loks0n f2d1b79b02 chore: specs 2024-05-20 17:57:39 +01:00
Christy Jacobandloks0n d258240f08 Merge pull request #8152 from appwrite/fix-improve-cold-start-error
fix: improve cold start error
2024-05-20 17:26:58 +01:00
Khushboo Verma ccae83c8a8 Add tests for scheduled functions 2024-05-20 17:44:48 +05:30
Jake BarnbyandGitHub 3d8bdef9a0 Merge pull request #8161 from appwrite/feat-increase-shared-tables-projects
Increase shared tables projects
2024-05-20 14:36:41 +12:00
Jake Barnby 537e2ead3c Update database 2024-05-20 14:24:09 +12:00
Jake Barnby 5b82716986 Change from 1 in 20 to 1 in 5 projects on shared tables DB 2024-05-20 14:00:48 +12:00
shimon 8aabb92fda adding requests count on error 2024-05-19 13:50:25 +03:00
shimon e1ac0d622e adding requests count on error 2024-05-19 10:55:14 +03:00
Luke B. SilverandGitHub 0d5d5336ed Merge branch '1.5.x' into feat-improve-header-demo-values 2024-05-17 18:20:18 +01:00
shimon 2d4e0ddde2 Merge remote-tracking branch 'origin/refactor-usage-sn' into refactor-usage-sn 2024-05-17 17:35:48 +03:00
Christy JacobandGitHub 68f06e3e8e Merge pull request #8146 from appwrite/feat-upgrade-logger-sn
Update Logger and migrations, implement sampler.
2024-05-17 16:07:31 +04:00
Bradley Schofield 51a2731533 Update composer.lock 2024-05-17 18:36:25 +09:00
Khushboo Verma 79616049d0 Update executor image name 2024-05-17 15:03:00 +05:30
Bradley Schofield deacaa2d6f Multiple Changes, See Desc
- Update Logger from 0.3.* to 0.5.*
- Add old sentry syntax conversion
- Add sampler for experiment logger, and set it to 4%
2024-05-17 18:01:33 +09:00
Torsten DittmannandGitHub fd7228984b Merge pull request #8140 from appwrite/chore-bump-console-4.3.0
Bump console to version 4.3.0
2024-05-17 09:50:34 +02:00
Jake BarnbyandGitHub d3dc21a048 Merge pull request #8142 from appwrite/fix-shared-project-delete
Fix shared project delete
2024-05-17 17:55:22 +12:00
Jake BarnbyandGitHub 2af7a5b2ee Merge pull request #8143 from appwrite/fix-catch-delete-errors
Catch DB errors on delete
2024-05-17 17:21:06 +12:00
Jake Barnby 6a9e983651 Catch DB errors on delete 2024-05-17 16:38:40 +12:00
Jake Barnby d03fb1458c Merge remote-tracking branch 'origin/refactor-usage-sn' into fix-shared-project-delete 2024-05-17 14:55:01 +12:00
Jake Barnby 60179b1790 Fix not account for abuse/audit on project delete 2024-05-17 14:54:40 +12:00
Steven NguyenandGitHub 49fc75e59d Bump console to version 4.3.0 2024-05-16 21:13:32 +00:00
Steven NguyenandGitHub aa1388fecc Merge pull request #8130 from appwrite/chore-bump-dependencies
Bump dependencies
2024-05-16 13:16:17 -07:00
Steven NguyenandGitHub d32eb73293 Merge pull request #8127 from appwrite/chore-sync-main
Sync main into 1.5.x
2024-05-16 13:15:52 -07:00
Steven Nguyen 8a18fee89b chore: bump dependencies 2024-05-16 13:01:58 -07:00
shimon dae9cb995c adding requests count on error 2024-05-16 21:21:21 +03:00
shimon cc3f975101 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into chore-error-requests-count 2024-05-16 21:15:21 +03:00
Steven NguyenandGitHub ab153961b7 Merge pull request #8132 from appwrite/fix-textmagic
Fix TextMagic class name
2024-05-16 06:47:43 -07:00
Christy JacobandGitHub d7938e1579 Merge pull request #8123 from appwrite/chore-update-executor-image-name
Update executor image name to exc-1
2024-05-16 17:11:57 +04:00
Luke B. SilverandGitHub 1c1ba6d6b0 Merge branch '1.5.x' into feat-improve-header-demo-values 2024-05-16 11:18:49 +01:00
Torsten DittmannandGitHub 8267ed41fb Merge pull request #8129 from appwrite/fix-users-create-token-description
Update users create token description
2024-05-16 12:04:11 +02:00
Khushboo Verma 8ecc2ee787 Remove hyphen 2024-05-16 14:03:51 +05:30
Steven NguyenandGitHub d54986dc75 fix(messaging): fix TextMagic class name
The class name in utopia-php/mssaging is TextMagic so use the same here
to prevent an error like:

> Class "Utopia\Messaging\Adapter\SMS\Textmagic" not found ...
2024-05-16 05:39:46 +00:00
Steven NguyenandGitHub 0c5cf36dcd fix(docs): update users create token description
1. The endpoint does not create a user
2. The endpoint is incorrect
2024-05-15 19:15:44 +00:00
Steven Nguyen 03fd62cc04 Merge branch 'main' into 1.5.x 2024-05-15 11:36:15 -07:00
shimon 12e4f49cba adding requests count on error 2024-05-15 20:25:29 +03:00
Luke B. SilverandGitHub 44ef0c365a Merge branch '1.5.x' into feat-improve-header-demo-values 2024-05-15 17:30:21 +01:00
Khushboo Verma 503495df16 Update executor image name to exc-1 2024-05-15 18:32:37 +05:30
loks0n e73b4b8573 feat: generic approach 2024-05-15 10:46:31 +01:00
Luke B. SilverandGitHub 8ff98bcb41 Merge branch '1.5.x' into feat-add-version-header 2024-05-15 10:30:36 +01:00
shimon 9f7d83c53d Merge remote-tracking branch 'origin/refactor-usage-sn' into refactor-usage-sn 2024-05-15 09:52:22 +03:00
shimon c38a598d3a adding requests count on error 2024-05-15 09:52:05 +03:00
Torsten DittmannandGitHub 0365f4818b Merge pull request #8102 from appwrite/fix-7268-oauth-apple-name
Fix email used for name when user is created via Apple OAuth2
2024-05-14 11:40:45 +02:00
Torsten DittmannandGitHub 6483ebcb83 Merge pull request #8117 from appwrite/fix-8110-missing-usage
Set limit to retrieve all stats for the usage range
2024-05-14 00:41:34 +02:00
Steven NguyenandGitHub 1626168d37 fix(project): set limit to retrieve all stats for the usage range
Because limit was not passed for the find() query, the limit defaulted to 25. As such, when requesting stats for the last 30 days, only the last 25 were retrieved.
2024-05-13 21:23:47 +00:00
Jake BarnbyandGitHub 191e1abefa Merge pull request #8113 from appwrite/chore-update-db
Update db
2024-05-13 12:44:31 +12:00
Jake Barnby d2ac197c04 Revert "Force tests"
This reverts commit 0f01f648e1.
2024-05-13 12:18:36 +12:00
Jake Barnby 0f01f648e1 Force tests 2024-05-13 12:18:09 +12:00
Jake Barnby d1ee8aeeed Update database 2024-05-13 12:09:08 +12:00
shimon e53a074d32 composer update 2024-05-12 20:19:17 +03:00
shimon aabd81ee8c composer update 2024-05-12 20:18:40 +03:00
shimon 3a46ac237c composer update 2024-05-12 20:15:37 +03:00
shimon c26f09ddf3 composer update 2024-05-12 20:11:11 +03:00
shimon 02eacf67bf composer update 2024-05-12 20:08:33 +03:00
shimon 510f864b06 adding null safety 2024-05-12 19:51:16 +03:00
shimon d185002d0c composer format 2024-05-12 18:23:45 +03:00
shimon 122b8e201e composer format 2024-05-12 18:21:26 +03:00
shimon 62a3521657 composer format 2024-05-12 18:15:04 +03:00
shimon 15b8aa5b16 composer format 2024-05-12 18:12:40 +03:00
shimon 989b0d9f10 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into feat-sms-locale 2024-05-12 15:29:00 +03:00
Eldad A. FuxandGitHub 53cd729412 Merge pull request #8078 from appwrite/fix-python-build-logs
Fix: Python failing builds
2024-05-10 19:48:27 +01:00
Khushboo VermaandGitHub 7bb5ce9cb6 Merge pull request #8099 from appwrite/feat-increase-chunk-size-to-10-MB
Increase chunk size to 10 MB
2024-05-10 17:53:44 +05:30
Matej Bačo 8cc2530210 PR review changes 2024-05-09 13:40:31 +00:00
Khushboo Verma cd6878c597 Add comment for payload size 2024-05-09 15:11:02 +05:30
Damodar Lohani 1d9f5fa29d Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-upgrade-platform-with-module 2024-05-09 07:50:17 +00:00
Jake BarnbyandGitHub 86a822c601 Merge pull request #8106 from appwrite/fix-realtime-string-error-code
Handle SQL error code 'HY000' in realtime
2024-05-09 18:11:29 +12:00
Steven NguyenandGitHub e5f49b420c fix(realtime): handle SQL error code 'HY000'
SQL can throw an error where the code is a string like 'HY000', but
$server->close() expects an integer. This change ensures we only pass
an integer into $server->close().
2024-05-09 05:55:34 +00:00
Jake BarnbyandGitHub 1ee1284577 Merge pull request #8107 from appwrite/fix-project-deletes
Fix project deletes for shared tables
2024-05-09 17:51:38 +12:00
Jake BarnbyandGitHub 207c725d4d Merge pull request #8076 from appwrite/fix-tests-for-cl-1
Fix tests for CL
2024-05-09 17:36:10 +12:00
Jake Barnby d0e258854c Fix project deletes for shared tables 2024-05-09 16:52:53 +12:00
Damodar Lohani 729db1aa17 fix date format 2024-05-09 03:08:27 +00:00
Steven NguyenandSteven Nguyen c52bf2a0a1 fix(auth): Don't use email in place for name for Apple OAuth2
Apple OAuth2 does not return the user's name in the claims and so we
used email instead, but this can look broken to users and developers to
see an email where the name should be.
2024-05-08 16:35:17 -07:00
Steven NguyenandSteven Nguyen c76e29077c feat(auth): try to get user name from request param if not from oauth2
This is only applicable for Apple OAuth2 because this is the only
provider that does not return user name from an API call and only
returns the name in the callback URL.

Reference:
* https://developer.apple.com/documentation/sign_in_with_apple/sign_in_with_apple_js/incorporating_sign_in_with_apple_into_other_platforms#3332115
2024-05-08 16:35:17 -07:00
Steven NguyenandGitHub 6b31f1323d Merge pull request #8104 from appwrite/fix-unreliable-realtime-workaround
Disable sending realtime stats
2024-05-08 15:33:26 -07:00
Steven NguyenandGitHub fa78ae078f fix(realtime): disable sending realtime stats
Disable sending realtime stats because the $database->find('realtime')
is throwing:

> Cannot execute queries while other unbuffered queries are active.

In addition, the realtime stats are not being collected so there's no
point in having this enabled.
2024-05-08 21:37:46 +00:00
Steven NguyenandGitHub df064adce3 feat(auth): forward OAuth2 callback params
The only place Apple includes the user's name is in the params so we
need to forward the params to the redirect endpoint so they can be used
when creating the user.
2024-05-08 17:36:46 +00:00
shimon 9609ae3549 getCountryCode 2024-05-08 20:08:50 +03:00
shimon 88e67c8d58 getCountryCode 2024-05-08 14:23:11 +03:00
shimon 17b9f136f1 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into feat-sms-locale
 Conflicts:
	composer.json
	composer.lock
	src/Appwrite/Platform/Workers/Messaging.php
2024-05-08 14:05:14 +03:00
Jake BarnbyandGitHub 8562823b07 Merge pull request #8095 from appwrite/chore-update-database
Update database
2024-05-08 21:48:37 +12:00
Jake BarnbyandGitHub 637c3fb8c9 Merge pull request #8094 from appwrite/fix-missing-id-attribute
Fix missing id attribute error
2024-05-08 21:31:04 +12:00
Jake Barnby 0fe7235c44 Update database 2024-05-08 21:30:49 +12:00
Jake BarnbyandGitHub bb887bc08e Merge pull request #8093 from appwrite/fix-syntax-error
Fix syntax error
2024-05-08 21:19:53 +12:00
Jake Barnby 360abf4b69 Return from create attribute job is unable to find it in the attributes table 2024-05-08 21:16:27 +12:00
loks0n 91ee67d69f Revert "Merge branch 'main' of https://github.com/appwrite/appwrite into feat-add-version-header"
This reverts commit 824309e4e6, reversing
changes made to 2d09a3a17b.
2024-05-08 10:09:28 +01:00
loks0n 0aadda9605 chore: steven review 2024-05-08 10:07:10 +01:00
Jake Barnby f01922daf9 Fix syntax error 2024-05-08 21:06:30 +12:00
loks0n 824309e4e6 Merge branch 'main' of https://github.com/appwrite/appwrite into feat-add-version-header 2024-05-08 10:05:23 +01:00
Damodar Lohani 5105d07bbf Merge remote-tracking branch 'origin/refactor-usage-sn' into fix-tests-for-cl-1 2024-05-08 06:09:46 +00:00
Damodar Lohani b27f70ee81 ignore few tests 2024-05-08 06:08:23 +00:00
Jake BarnbyandGitHub 57a8a8f187 Merge pull request #8092 from appwrite/fix-shared-queue-name
Fix shared queue name
2024-05-08 16:31:27 +12:00
Jake Barnby f00133d199 Add tests for queued job status 2024-05-08 16:28:00 +12:00
Jake Barnby 6e3dee4e1f Fix shared tables db queue name 2024-05-08 16:25:12 +12:00
Jake BarnbyandGitHub f31ebd9c60 Merge pull request #8091 from appwrite/fix-namespace-with-override
Ensure namespace is set if override equals shared tables
2024-05-08 16:05:32 +12:00
Jake Barnby f7cd1e2361 Ensure namespace is set if override equals shared tables 2024-05-08 16:04:28 +12:00
Jake BarnbyandGitHub 89d6d25749 Merge pull request #7206 from appwrite/feat-isolation-modes
Shared tables support
2024-05-08 15:13:02 +12:00
loks0n f1a344a119 chore: specs 2024-05-07 20:02:15 +01:00
loks0n 8d6e176b66 feat: better head demo values 2024-05-07 19:55:58 +01:00
Torsten DittmannandGitHub 239a0b4dde Merge pull request #8081 from appwrite/fix-dont-kick-after-enabling-mfa
Don't kick user and require verification after enabling MFA
2024-05-07 17:49:18 +02:00
Steven NguyenandGitHub 7ea7c83415 Merge pull request #8082 from appwrite/fix-mfa-email-verification-code-font
Fix MFA email verification code font
2024-05-07 07:40:09 -07:00
Christy JacobandGitHub 2abd016fe5 Merge pull request #8048 from appwrite/fix-8039-version-in-response
Fix version in error response
2024-05-07 18:39:47 +04:00
Luke B. SilverandGitHub 2d09a3a17b Merge branch '1.5.x' into feat-add-version-header 2024-05-07 11:34:02 +01:00
Jake Barnby 921eb2b900 App::getEnv -> System::getEnv 2024-05-07 22:08:00 +12:00
Matej BačoandGitHub 977fb67d8b Merge branch 'refactor-usage-sn' into fix-python-build-logs 2024-05-07 11:16:04 +02:00
Jake Barnby 5f9c192d72 Add assertion 2024-05-07 19:53:20 +12:00
Jake Barnby 7023cdfb9e Revert "Fix google issuer change"
This reverts commit e69862bd6f.
2024-05-07 18:23:54 +12:00
Jake Barnby 82dfbbd614 Fix isolation user test 2024-05-07 18:11:30 +12:00
Jake Barnby e69862bd6f Fix google issuer change 2024-05-07 18:11:15 +12:00
Jake Barnby e9bac08de0 Fix header test 2024-05-07 17:59:24 +12:00
Jake Barnby 356d155df2 Add shared tables enabled flag for quick toggle 2024-05-07 17:29:12 +12:00
Jake Barnby 74a147f3b2 Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-shared-tables
# Conflicts:
#	tests/e2e/Services/Projects/ProjectsCustomServerTest.php
2024-05-07 15:53:58 +12:00
Jake Barnby 0e9838d290 Remove logging and test files 2024-05-07 15:48:20 +12:00
Shimon NewmanandGitHub 96ac6dcf32 Merge pull request #7843 from appwrite/fix-file-size-limit
Fix file size default limit
2024-05-07 06:00:08 +03:00
Jake Barnby 912e3b01dc Add clarifying comments 2024-05-07 14:07:04 +12:00
Jake Barnby bfc4c98600 Update to DSN release 2024-05-07 14:03:06 +12:00
Jake BarnbyandGitHub 33f95dab6d Merge pull request #8080 from appwrite/chore-bump-database
Bump database
2024-05-07 13:38:03 +12:00
Steven Nguyen fabe6921b4 fix(auth): Fix MFA email verification code font
The font family was set to Inter without any fallback and since the
Inter isn't available in emails, the font rendered the default font,
Times New Roman. This commit adds a fallback font to the font-family
ensuring an sans-serif font like Inter is used.
2024-05-06 18:25:38 -07:00
Steven Nguyen 5b5505cf97 fix(auth): ensure session factors don't contain duplicates 2024-05-06 17:48:44 -07:00
Steven Nguyen 7e07f6b958 feat(auth): ensure user isn't kicked out after enabling MFA
User's were kicked out and forced to verify their session after enabling
MFA if they already had factors enabled. This change ensures that they
are not kicked out of their current session after MFA is enabled by
adding all relevant factors to the session.
2024-05-06 17:48:08 -07:00
Steven Nguyen 98d18ecc47 refactor(auth): remove auth duration from Auth::sessionVerify() calls
The paramter was removed from the method so we don't need to pass it
in anymore.
2024-05-06 17:16:56 -07:00
Steven Nguyen b9e79dfd0c chore: bump database and update dependencies 2024-05-06 13:34:15 -07:00
Matej Bačo 7d42db82a0 Fix python failing logs 2024-05-06 15:05:13 +00:00
Jake Barnby 35365e067a Update IDE helper 2024-05-06 21:19:56 +12:00
Jake Barnby 5e62007c8f Fix dbForProject resources 2024-05-06 21:19:19 +12:00
Damodar Lohani 39db496e93 fix accertion order 2024-05-06 07:55:11 +00:00
Damodar Lohani add3c6b75b fix depractation notice 2024-05-06 07:03:51 +00:00
Damodar Lohani e25e7f8ec7 fix null 2024-05-06 06:50:36 +00:00
Damodar Lohani 53547f8677 fix null 2024-05-06 06:48:19 +00:00
Damodar Lohani 7b6e527b27 fix path 2024-05-06 06:29:15 +00:00
Jake Barnby 52c52fa519 Add scheme to DSN on fail 2024-05-06 18:13:41 +12:00
Jake Barnby ec2878b505 Lint 2024-05-06 17:34:17 +12:00
Jake Barnby db94070162 Use DSN for project database 2024-05-06 17:33:36 +12:00
shimon 8e291f3700 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into fix-file-size-limit
 Conflicts:
	app/controllers/api/storage.php
	composer.lock
2024-05-05 11:52:49 +03:00
Eldad A. FuxandGitHub 49a3a62b9d Merge pull request #7933 from appwrite/pea-699
prevent functions domain and subdomain to be added as custom domain
2024-05-05 06:53:46 +01:00
Damodar LohaniandGitHub 61af107c82 Merge pull request #7776 from appwrite/feat-react-native-sdk
React Native SDK
2024-05-05 11:09:46 +05:45
Damodar Lohani d4d88fc43e remove mock test 2024-05-05 04:58:10 +00:00
Damodar Lohani 1094238820 add test 2024-05-05 04:56:49 +00:00
Damodar Lohani 9b0bacb1a2 Merge remote-tracking branch 'origin/refactor-usage-sn' into pea-699 2024-05-05 04:06:25 +00:00
Khushboo Verma e583f44147 Increase chunk size to 10 MB 2024-05-03 18:01:15 +05:30
loks0n c746fb40f8 chore: better name 2024-05-03 12:03:01 +01:00
loks0n 1295128b10 fix: use APP_VERSION_STABLE 2024-05-03 11:56:54 +01:00
Khushboo Verma f81f2e0411 Add publish: false flag 2024-05-03 15:39:08 +05:30
Jake Barnby c4deb0ba93 Allow shared tables namespace override 2024-05-03 21:30:38 +12:00
Jake Barnby a680b27e2b Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-shared-tables 2024-05-03 19:07:23 +12:00
Christy JacobandGitHub fd17b467c7 Merge pull request #8066 from appwrite/revert-8060-feat-increase-chunk-size
Revert "Update chunk size to 7 MB"
2024-05-03 10:19:14 +04:00
Christy JacobandGitHub 95300d796b Revert "Update chunk size to 7 MB" 2024-05-03 10:19:03 +04:00
Jake Barnby 99d05b3d8c Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-shared-tables 2024-05-03 14:24:57 +12:00
Christy JacobandGitHub 4c7432a891 Merge pull request #8060 from appwrite/feat-increase-chunk-size
Update chunk size to 7 MB
2024-05-02 23:28:34 +04:00
Christy JacobandGitHub 2884ad0ca6 Merge pull request #8065 from appwrite/remove-logger-from-avatars
Remove logger code from avatars.php
2024-05-02 20:46:47 +04:00
Khushboo Verma ce5dd899a5 Remove unnecessary code 2024-05-02 20:48:36 +05:30
Khushboo Verma abcd74d224 Remove logger code from avatars.php 2024-05-02 19:49:55 +05:30
Khushboo Verma 87fb11914e Update chunk size to 7 MB 2024-05-02 19:38:45 +05:30
loks0n 644bbe1f5b fix: version 2024-05-02 14:25:41 +01:00
loks0n 3ab9875ca7 feat: use x-appwrite-response-format 2024-05-02 14:16:35 +01:00
loks0n 2ed38271a0 feat: add version header 2024-05-02 13:51:19 +01:00
Khushboo Verma 89daa5e479 Update payload size to 11 MB to accomodate 10 MB chunk size 2024-05-02 14:30:18 +05:30
Jake Barnby 1959e6498b Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-shared-tables 2024-05-02 18:29:05 +12:00
Jake Barnby d4254b34e2 Update db name 2024-05-02 18:28:03 +12:00
Khushboo Verma 885e7019f8 Update chunk size to 10 MB 2024-05-01 23:37:18 +05:30
Bradley SchofieldandGitHub 11aeb2956d Merge pull request #8057 from appwrite/fix-migration-logging
Migration Logging Improvements
2024-05-02 02:28:30 +09:00
Bradley Schofield 8a055dacc7 Use breadcrumbs for tracking migration stages 2024-05-02 02:15:16 +09:00
Bradley Schofield 26d4d65895 Run Linter 2024-05-02 01:46:19 +09:00
Bradley Schofield 234e2e020b Update lock file 2024-05-02 01:32:47 +09:00
Bradley Schofield 77e3dec6ed Update Migrations.php 2024-05-02 01:31:31 +09:00
Damodar Lohani 64d4ede05d mark beta 2024-05-01 08:55:45 +00:00
Jake BarnbyandGitHub 7d7e005c00 Merge pull request #7878 from appwrite/string-error-code
Handle string error codes
2024-05-01 19:50:23 +12:00
Jake Barnby 0112fd9b84 Add unique email test 2024-05-01 16:17:02 +12:00
Damodar Lohani ef0b27840c update readme 2024-04-30 11:51:36 +00:00
Jake Barnby b2e956a14d Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-isolation-modes
# Conflicts:
#	.gitignore
#	app/cli.php
#	app/controllers/api/account.php
#	app/controllers/api/databases.php
#	app/controllers/api/projects.php
#	app/controllers/general.php
#	app/controllers/shared/api.php
#	app/init.php
#	app/realtime.php
#	app/worker.php
#	composer.json
#	composer.lock
#	src/Appwrite/Platform/Tasks/DeleteOrphanedProjects.php
#	src/Appwrite/Platform/Tasks/GetMigrationStats.php
#	src/Appwrite/Platform/Workers/Databases.php
#	src/Appwrite/Platform/Workers/Deletes.php
#	src/Appwrite/Platform/Workers/Hamster.php
#	tests/e2e/General/HTTPTest.php
#	tests/e2e/Services/Databases/DatabasesCustomServerTest.php
#	tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
2024-04-30 19:40:47 +12:00
Jake BarnbyandGitHub 4378ff2425 Merge pull request #8050 from appwrite/feat-upgrade-db
Feat upgrade db
2024-04-30 14:42:07 +12:00
Jake Barnby 9f06043c68 Revert "Force re-run to unblock snyk"
This reverts commit 210ddf9129.
2024-04-30 13:50:26 +12:00
Jake Barnby 210ddf9129 Force re-run to unblock snyk 2024-04-30 13:50:19 +12:00
Jake Barnby 31d4a2ee98 Update database 2024-04-30 13:41:23 +12:00
Jake BarnbyandGitHub 3c3e066bce Update src/Appwrite/Extend/Exception.php 2024-04-30 12:30:35 +12:00
Jake BarnbyandGitHub 9bf13a2400 Update src/Appwrite/Extend/Exception.php 2024-04-30 12:28:29 +12:00
Jake BarnbyandGitHub e6b6e4e54e Update src/Appwrite/Extend/Exception.php 2024-04-30 12:25:29 +12:00
Jake BarnbyandGitHub c7f2de6500 Update src/Appwrite/Extend/Exception.php 2024-04-30 12:25:12 +12:00
Jake BarnbyandGitHub 7140d8e6a5 Merge pull request #8036 from appwrite/feat-upgrade-db
Update database
2024-04-30 11:55:47 +12:00
Steven NguyenandGitHub bfb51328fe fix: version in error response
The APP_VERSION_STABLE constant should be used for the version
in API errors so that developers see a version that makes more
sense (such as 1.5.5).
2024-04-29 22:50:20 +00:00
Christy JacobandGitHub 2b18ac8953 Merge pull request #7610 from appwrite/fix-templates-copy-hidden-files
fix: templates copy hidden files
2024-04-29 15:37:30 +04:00
Luke B. SilverandGitHub 4b338d3740 Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-04-29 11:58:43 +01:00
Jake Barnby 19be97fae5 Update database 2024-04-29 22:10:32 +12:00
Jake BarnbyandGitHub aeea5e8328 Merge pull request #7341 from appwrite/collection-not-found
databases.php collection not found
2024-04-29 21:04:31 +12:00
Jake Barnby bcca318494 Merge remote-tracking branch 'origin/refactor-usage-sn-invalid-relationship' into feat-upgrade-db
# Conflicts:
#	composer.lock
2024-04-29 20:54:44 +12:00
Jake Barnby ef2a475b6b Update database 2024-04-29 20:18:37 +12:00
Jake BarnbyandGitHub ecff8f5b7e Update app/controllers/general.php 2024-04-29 20:16:09 +12:00
Jake Barnby ab7a5f4575 Fix test 2024-04-29 19:07:16 +12:00
Jake Barnby a48812649c Update database
# Conflicts:
#	composer.lock
2024-04-29 18:47:30 +12:00
Jake BarnbyandGitHub 9a7c424e85 Update app/controllers/general.php 2024-04-29 16:52:46 +12:00
Damodar Lohani 665812c28b fix typo 2024-04-28 01:38:46 +00:00
Damodar Lohani 3451dd3f4b fix typo 2024-04-28 01:38:21 +00:00
Matej Bačo c768adacdc Re-enable experiment 4xx logging 2024-04-26 17:05:24 +02:00
Christy JacobandGitHub b144064ce9 Merge pull request #7908 from appwrite/refactor-usage-sn-1.5.x
Merge 1.5.x to refactor branch
2024-04-26 15:30:22 +04:00
Matej Bačo 84b8b0409c Linter fix 2024-04-26 13:15:21 +02:00
Matej Bačo 5849de5773 Update composer.lock 2024-04-26 13:14:16 +02:00
Matej Bačo 0a85809532 Merge branch 'refactor-usage-sn' into refactor-usage-sn-1.5.x 2024-04-26 13:14:00 +02:00
Matej Bačo 20ff098c2e Update composer.lock 2024-04-26 13:11:55 +02:00
Matej Bačo 9616de7576 Merge branch 'main' into refactor-usage-sn-1.5.x 2024-04-26 13:11:21 +02:00
Christy Jacob 92c41954af Merge branch 'main' of https://github.com/appwrite/appwrite into refactor-usage-sn-1.5.x 2024-04-26 09:19:09 +00:00
Damodar Lohani b76f91218c fixes 2024-04-25 08:56:17 +00:00
Damodar Lohani 7e2c486ee1 Merge remote-tracking branch 'origin/1.5.x' into feat-react-native-sdk 2024-04-25 08:52:37 +00:00
shimon 4e639526d6 pull changes 2024-04-24 12:25:49 +03:00
Matej Bačo a99d9f3015 Disable experimental 4XX logging 2024-04-24 10:53:09 +02:00
Matej Bačo d89f8cc6b9 Upgrade pools lib 2024-04-19 13:14:00 +02:00
Christy Jacob c5316681ca chore: update database library 2024-04-18 13:43:32 +00:00
Christy JacobandGitHub ccfe363905 Merge pull request #7992 from appwrite/chore-task-addition
Chore task addition
2024-04-18 14:17:14 +04:00
shimon e3ed9b43f4 adding QueueRetry,QueueCount to tasks list 2024-04-18 13:13:40 +03:00
Christy JacobandGitHub f97f24eb16 Merge pull request #7991 from appwrite/chore-queue-retry-update
Chore: queue retry update
2024-04-18 13:32:19 +04:00
shimon 92716ed72e queue retry validator update 2024-04-18 12:09:39 +03:00
fogelito 6a2b40db50 Remove redundent AppwriteException 2024-04-18 11:37:20 +03:00
fogelito 9d14fc75f1 Remove redundent AppwriteException 2024-04-18 11:36:27 +03:00
fogelito e15afe65c0 Fix error 2024-04-18 11:33:17 +03:00
Matej Bačo 43b8030f10 Upgrade DB lib 2024-04-18 10:32:14 +02:00
fogelito 6c92962468 composer.lock 2024-04-18 11:29:57 +03:00
fogelito 0e8bc6b4b4 Fix bad copy 2024-04-18 11:25:03 +03:00
2fcbc4867b Update app/controllers/general.php
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
2024-04-18 11:08:15 +03:00
4d1698eab5 Update app/controllers/general.php
Co-authored-by: Jake Barnby <jakeb994@gmail.com>
2024-04-18 11:08:09 +03:00
fogelito b224aee2fe GENERAL_ACCESS_FORBIDDEN 2024-04-18 09:58:51 +03:00
fogelito a7318fdf8b Chnage message 2024-04-18 09:26:11 +03:00
Matej Bačo 55fa230224 Fix unit tests 2024-04-17 18:12:43 +02:00
Matej Bačo 7ad7d42106 Update composer.lock 2024-04-17 17:57:28 +02:00
Matej Bačo 2551cf6fb1 Merge branch 'refactor-usage-sn' into refactor-usage-sn-1.5.x 2024-04-17 17:56:31 +02:00
Matej Bačo 9605fd9204 Fix unit test 2024-04-17 17:47:55 +02:00
fogelito cd9a274f79 Message x-appwrite-project 2024-04-17 16:17:44 +03:00
Matej Bačo fd81c95e38 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into refactor-usage-sn 2024-04-16 09:59:24 +02:00
Matej Bačo 487d93bf04 Revert breaking changes 2024-04-16 09:59:02 +02:00
Christy JacobandGitHub d1a7d8f54a Merge pull request #7960 from appwrite/revert-connection-changes
Revert connection changes
2024-04-16 11:56:33 +04:00
Jake Barnby f95800de73 Revert connection changes 2024-04-12 14:37:15 +12:00
fogelito bec10c0052 Add previous Error 2024-04-11 10:49:45 +03:00
fogelito 00ebf5c10f Remove var_dumps 2024-04-11 10:46:18 +03:00
fogelito c7281af6e2 Move App::init to general.php 2024-04-11 10:28:16 +03:00
Jake BarnbyandGitHub 3f92987002 Merge pull request #7953 from appwrite/feat-check-internal-id
Match memberships on internal ID
2024-04-11 19:12:11 +12:00
Jake Barnby ff8ebb4f7e Match memberships on internal ID 2024-04-11 19:09:04 +12:00
fogelito 99666aa34e stopOnFailure 2024-04-11 10:06:31 +03:00
fogelito ab3b1ac51a Add groups 2024-04-11 10:06:07 +03:00
Damodar Lohani 5976295051 sdk docs 2024-04-11 05:15:10 +00:00
Damodar Lohani f724974195 update version 2024-04-11 05:07:38 +00:00
Damodar Lohani 3f43e239c0 fixed 2024-04-11 05:06:37 +00:00
Damodar Lohani 019408ebcd composer update 2024-04-11 05:05:39 +00:00
Damodar Lohani 8fbd4e5269 Merge remote-tracking branch 'origin/main' into feat-react-native-sdk 2024-04-11 05:04:19 +00:00
Jake Barnby 114a450f26 Update websockets to release version (no change) 2024-04-11 14:18:31 +12:00
Eldad A. FuxandGitHub 143b73deef Merge pull request #7951 from appwrite/fix-admin-mode-on-console
fix: admin mode on console
2024-04-10 20:18:51 +02:00
Torsten Dittmann 7cff879e58 style: remove unused imports 2024-04-10 19:52:14 +02:00
Torsten Dittmann 11fdefa2b8 chore: run formatter 2024-04-10 19:49:16 +02:00
Torsten Dittmann 8cad8f5533 fix: admin mode on console 2024-04-10 19:46:31 +02:00
Jake BarnbyandGitHub d6be999c12 Merge pull request #7941 from appwrite/feat-reclaim-only-current-connection
Reclaim only current connection
2024-04-10 17:08:53 +12:00
fogelito 84ffc95773 Revert 2024-04-09 18:25:49 +03:00
fogelito f73f8c9ae1 Move test tp base 2024-04-09 18:24:01 +03:00
fogelito d74504c837 formatting 2024-04-09 17:59:32 +03:00
fogelito 2baa074629 pull main 2024-04-09 17:57:38 +03:00
fogelito 6edd0ea90d Merge branch 'main' of https://github.com/appwrite/appwrite into collection-not-found
 Conflicts:
	composer.lock
2024-04-09 17:56:52 +03:00
fogelito 7f0ae2dc87 stopOnFailure 2024-04-09 17:55:04 +03:00
fogelito d293774bfb revert init 2024-04-09 17:54:33 +03:00
fogelito a465c625e9 mode 2024-04-09 17:52:30 +03:00
fogelito 2fde4e8e39 revert serviceStatusForDatabases 2024-04-09 17:51:19 +03:00
fogelito 2bbff0e0b6 Disable console project 2024-04-09 17:45:16 +03:00
fogelito 12434fd846 RELATIONSHIP_VALUE_INVALID 2024-04-09 15:38:55 +03:00
fogelito 65ab721c3d InvalidRelationshipValue 2024-04-09 15:32:23 +03:00
Jake Barnby 3859f037a1 Revert "Reclaim only used connections for workers"
This reverts commit fefb60557d.

# Conflicts:
#	app/worker.php
2024-04-09 20:50:33 +12:00
Jake Barnby 9a3f6e7f71 Add connections test 2024-04-09 20:27:30 +12:00
Jake Barnby b50ec49ac1 Move Connections to pools namespace 2024-04-09 20:26:42 +12:00
Jake Barnby 388f450d89 Fix missing injection 2024-04-09 18:11:08 +12:00
Jake Barnby 4bef6125f7 Use on worker stop to properly reclaim realtime redis connections and unsubscribe 2024-04-09 17:05:44 +12:00
Jake Barnby fefb60557d Reclaim only used connections for workers 2024-04-09 17:04:31 +12:00
Jake Barnby 730e7319df Use connection group to reclaim all use connections for request 2024-04-09 17:03:28 +12:00
Jake BarnbyandGitHub 0e5f6a34b0 Merge pull request #7937 from appwrite/feat-reclaim-only-current-connection
Update database
2024-04-08 20:29:39 +12:00
Jake Barnby a0051eaa81 Update database 2024-04-08 19:59:36 +12:00
Damodar Lohani 70eb56a388 refactor module 2024-04-08 05:25:55 +00:00
Damodar Lohani a67c6bfacb update platform version 2024-04-08 05:16:37 +00:00
Damodar Lohani 5e12eaa2e3 fix type 2024-04-08 05:09:51 +00:00
Damodar Lohani 8c008df1a9 fix change 2024-04-08 05:08:55 +00:00
Damodar Lohani 8fe6ce64b2 create and use core module 2024-04-08 05:05:04 +00:00
Damodar Lohani 4d15e0dbd2 update platform version 2024-04-08 05:03:18 +00:00
Jake BarnbyandGitHub c5c0c8a8e6 Merge pull request #6886 from appwrite/feat-reclaim-only-current-connection
Fix connection reclaim logic.
2024-04-08 16:14:04 +12:00
Jake Barnby 7b66cc5672 Revert getProjectDB change 2024-04-08 15:48:57 +12:00
Damodar Lohani 4612636144 fix test 2024-04-08 03:45:02 +00:00
Damodar Lohani 82e6db903a prevent functions domain and subdomain to be added as custom domain 2024-04-08 03:29:35 +00:00
Jake Barnby 899bba64d1 Add try/catch/reclaim around sending stats 2024-04-08 14:55:41 +12:00
Jake Barnby fc4cbb8174 Move getConsole tick inside try/catch 2024-04-08 14:40:51 +12:00
Jake BarnbyandGitHub be761dd5cd Merge branch 'refactor-usage-sn' into feat-reclaim-only-current-connection 2024-04-08 14:34:52 +12:00
Jake Barnby 293d85525c Fix on message db resource fetch 2024-04-08 13:43:53 +12:00
shimon 574035d638 sms country code 2024-04-07 18:20:42 +03:00
shimon 7df94fcee6 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into feat-sms-locale
 Conflicts:
	composer.json
	composer.lock
2024-04-07 18:17:16 +03:00
shimon d99fef527e Merge remote-tracking branch 'origin/feat-sms-locale' into feat-sms-locale 2024-04-07 18:15:57 +03:00
shimon fcba25d004 dummy commit 2024-04-07 18:15:46 +03:00
Khushboo VermaandGitHub 9f7ecb98d3 Merge pull request #7925 from appwrite/chore-bump-executor-version
Bump executor version to 0.5.1
2024-04-05 23:04:00 +05:30
Khushboo Verma 6d5b087605 Bump executor version to 0.5.1 2024-04-05 22:39:52 +05:30
Jake Barnby 048b4f76c8 Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-reclaim-only-current-connection 2024-04-04 20:28:14 +13:00
Jake BarnbyandGitHub 6ff50103ac Merge pull request #7917 from appwrite/feat-db-update
Update db for relationships and object as array attributes fixes
2024-04-04 20:16:44 +13:00
Jake Barnby ccf437dac4 Update db for relationships and object as array attributes fixes 2024-04-04 19:56:09 +13:00
Jake Barnby 2452d3a479 Reclaim only the used connection for realtime 2024-04-04 18:57:33 +13:00
Jake Barnby 479ed3d0b1 Inline defaults 2024-04-04 18:51:40 +13:00
Jake Barnby 8974dcfb39 Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-reclaim-only-current-connection
# Conflicts:
#	app/console
#	app/init.php
2024-04-04 17:21:16 +13:00
Eldad A. FuxandGitHub 47213c50b6 Merge pull request #7911 from appwrite/remove-realtime-timer-tick
Comment timer tick
2024-04-03 19:49:26 +02:00
Khushboo Verma f66a65f27b Comment timer tick 2024-04-03 22:54:14 +05:30
Matej BačoandGitHub aa92257c76 Merge pull request #7910 from appwrite/chore-update-executor-version
Update executor version
2024-04-03 14:08:26 +02:00
Khushboo Verma 008c3ac19a Update executor version 2024-04-03 17:18:15 +05:30
Jake Barnby 6f18303fcc Test that secret is not included in realtime payload 2024-04-03 16:37:58 +13:00
Jake Barnby fb408636a4 Set token secrets as sensitive event params 2024-04-03 16:36:53 +13:00
Jake Barnby e224ca440b Allow setting event parameters as sensitive 2024-04-03 16:36:21 +13:00
Matej Bačo a5dbfeee0f Fix unit test 2024-04-02 20:23:38 +00:00
Matej Bačo baeaa9204c Linter fix 2024-04-02 20:03:15 +00:00
Matej Bačo aaa1465e21 Fix code bugs 2024-04-02 16:58:45 +00:00
Matej Bačo 1234770dc8 CI/CD fixes 2024-04-02 18:48:12 +02:00
Matej Bačo d091b37a15 Merge branch 'refactor-usage-sn' into refactor-usage-sn-1.5.x 2024-04-02 18:42:17 +02:00
Christy JacobandGitHub a792f3de1d Merge pull request #7896 from appwrite/fix-deployment-not-found-error
Create failed execution from worker if deployment doesn't exist
2024-04-02 17:49:28 +04:00
Khushboo Verma 26db6fa4c5 Remove var-dump 2024-04-02 17:49:09 +05:30
Matej Bačo 7c691b3c7c Fix version missmatch 2024-04-02 13:01:55 +02:00
Matej Bačo e3a039db49 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into refactor-usage-sn 2024-04-02 11:42:18 +02:00
Matej Bačo 7a25a3c529 Upgrade database lib for ZDT 2024-04-02 11:42:10 +02:00
Damodar LohaniandGitHub 76eacaf8e2 Merge pull request #7905 from appwrite/PEA-649-fix-storage-issue
PEA-649 storage do adapter http version
2024-04-02 14:37:43 +05:45
Damodar Lohani 026f5dde2d set http version to 1.1 for do spaces 2024-04-02 08:35:14 +00:00
Damodar Lohani 39da1b8028 composer update 2024-04-02 08:32:30 +00:00
Eldad A. FuxandGitHub f875c6aa70 Merge pull request #7884 from appwrite/refactor-var-dump
Remove var_dump calls
2024-04-01 20:11:49 +02:00
Khushboo Verma 3469ebf7b0 Add var_dump to debug flaky test 2024-04-01 23:07:11 +05:30
Khushboo Verma 7f038ec704 Merge branch 'refactor-usage-sn' into fix-deployment-not-found-error 2024-04-01 22:10:00 +05:30
Eldad A. FuxandGitHub 532ed5b340 Merge pull request #7893 from appwrite/fix-oauth-error-code
Fix OAuth error code
2024-04-01 18:36:55 +02:00
Christy JacobandGitHub 4e08c6d02d Merge pull request #7882 from appwrite/feat-configurable-collections
Feat configurable collections
2024-04-01 21:35:47 +05:30
Khushboo Verma e7e85bfb76 Update response code 2024-04-01 19:37:51 +05:30
Khushboo Verma a3a7763340 Created failed execution for build errors 2024-04-01 19:07:17 +05:30
Khushboo Verma ec930bf125 Add request headers 2024-04-01 17:18:42 +05:30
Khushboo Verma eb8543c690 Create failed execution if deployment doesn't exist 2024-04-01 17:04:36 +05:30
Khushboo Verma 75d8cc3327 Updated error code for OAuth error 2024-04-01 13:27:44 +05:30
Steven NguyenandGitHub 5ee5ffb288 refactor: remove var_dump calls 2024-03-29 21:24:05 +00:00
Christy Jacob f8c44c8a50 chore: linter 2024-03-29 10:18:33 +00:00
Matej Bačo 803ba6182c Update composer.lock 2024-03-29 10:48:31 +01:00
Matej Bačo 5275d0b021 Merge branch 'refactor-usage-sn' into feat-configurable-collections 2024-03-29 10:48:11 +01:00
fogelito acfd6633a2 non integer errors 2024-03-28 14:36:44 +02:00
Jake BarnbyandGitHub 3d53249335 Merge pull request #7877 from appwrite/refactor-usage-sn-45-8
Transaction and reconnection fixes
2024-03-29 00:54:28 +13:00
fogelito 5ff5c930a5 composer.lock 2024-03-28 13:32:54 +02:00
fogelito 5657e7d04e Bust database 45-8 2024-03-28 13:08:55 +02:00
Jake Barnby d5d45c5076 Fix not hiding tokens for clients via realtime 2024-03-26 18:59:56 +13:00
Christy JacobandGitHub 9adf124274 Merge pull request #7854 from appwrite/feat-improve-vcs-comment-1
Update VCS Comment
2024-03-25 19:24:38 +05:30
Christy JacobandGitHub 20e82b1b8b Merge pull request #7777 from appwrite/fix-cloud-tests
Fix tests required for Cloud
2024-03-25 12:38:33 +05:30
Damodar LohaniandGitHub 7d68c12f1b Update init.php 2024-03-25 11:35:28 +05:45
Damodar LohaniandGitHub b3c2b54d09 Merge branch 'refactor-usage-sn' into fix-cloud-tests 2024-03-25 07:03:45 +05:45
fogelito 88ba765953 tests serviceStatusForDatabases 2024-03-24 09:54:24 +02:00
Damodar LohaniandGitHub 061368fae0 Update init.php 2024-03-24 12:09:30 +05:45
fogelito b7103e9462 tests serviceStatusForDatabases 2024-03-21 22:59:09 +02:00
fogelito cdb521a311 Try to reproduce 2024-03-21 22:23:19 +02:00
fogelito d1be965e8c disable serviceStatusForDatabases 2024-03-21 22:20:39 +02:00
fogelito 0461d6fa6c Merge branch 'main' of https://github.com/appwrite/appwrite into collection-not-found
 Conflicts:
	app/controllers/api/databases.php
	composer.lock
2024-03-21 21:04:31 +02:00
fogelito 48176b8ff3 composer.lock 2024-03-21 21:02:07 +02:00
Christy JacobandGitHub f2dbda10c0 Merge pull request #7852 from appwrite/fix-function-domain-permissions
Fix function domain permissions
2024-03-21 12:29:21 +05:30
Christy JacobandGitHub 380b5f7f84 Merge pull request #7414 from appwrite/remove-cloud-scripts
remove cloud related scripts
2024-03-21 01:27:34 +05:30
Khushboo Verma fe4362c29f Update VCS Comment 2024-03-20 22:17:48 +05:30
Steven NguyenandGitHub 47f442b98e fix(functions): fix permissions for function domains
Execution via domain should be blocked if permissions does not contain
any and permissions does not contain guests.
2024-03-20 15:49:05 +00:00
Steven NguyenandGitHub ac397935a1 fix: remove escaping
It's done automatically when setting the params already.
2024-03-20 15:47:33 +00:00
Steven NguyenandGitHub fcfff2ab04 chore: remove dead code in error template 2024-03-20 15:46:42 +00:00
Matej Bačo 440d924518 Allow getCache override 2024-03-20 14:14:23 +01:00
Matej Bačo 2ae9d0b710 Make realtime resources configurable 2024-03-20 13:47:20 +01:00
shimon 938f98d8fd Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into fix-file-size-limit 2024-03-20 11:06:27 +02:00
Christy JacobandGitHub 446ebfffee Merge pull request #7683 from appwrite/fix-vcs-silent-mode
Fix vcs silent mode
2024-03-20 02:57:10 +05:30
shimon fa97ac7019 maximumFileSize fix 2024-03-19 15:16:21 +02:00
shimon 0ee4b95648 maximumFileSize fix 2024-03-19 15:09:03 +02:00
shimon 2213ddb54d maximumFileSize fix 2024-03-19 12:54:47 +02:00
shimon 63a30ed083 maximumFileSize fix 2024-03-19 12:15:39 +02:00
Eldad A. FuxandGitHub f824c3c83e Merge pull request #7838 from appwrite/fix-identities-query-to-use-internal-ids
use internal ids for query
2024-03-18 18:35:01 +01:00
Christy JacobandGitHub a2d8e6d44e Merge pull request #7840 from appwrite/update-avatars-api
chore: update avatars API
2024-03-18 22:44:34 +05:30
Christy Jacob eeba452fb5 chore: linter 2024-03-18 12:43:42 +00:00
Christy Jacob 5e6c94d307 chore: update checks 2024-03-18 12:41:51 +00:00
Christy Jacob a306cb87d8 chore: update avatars API 2024-03-18 12:07:14 +00:00
Damodar Lohani 979f6ee150 Merge remote-tracking branch 'origin/refactor-usage-sn' into fix-cloud-tests 2024-03-18 09:41:43 +00:00
Damodar Lohani 21d4b8feef check user internal Id on membership 2024-03-18 09:01:54 +00:00
Damodar Lohani 2a6da11842 Merge remote-tracking branch 'origin/refactor-usage-sn' into fix-identities-query-to-use-internal-ids 2024-03-18 08:55:30 +00:00
Damodar Lohani c849ff0b0f use internal ids for query 2024-03-18 08:52:47 +00:00
Damodar LohaniandGitHub a75ce14218 Merge pull request #7835 from appwrite/lohanidamodar-patch-5
Admin mode use teamInternalId
2024-03-17 15:50:40 +05:45
Damodar LohaniandGitHub 795f1035ef Merge pull request #7834 from appwrite/lohanidamodar-patch-4
Fix membership query to use internalId
2024-03-17 15:50:06 +05:45
Damodar LohaniandGitHub c5512ae010 Update init.php 2024-03-17 15:01:09 +05:45
Damodar LohaniandGitHub 05221334e2 use team internal id in delete memberships 2024-03-17 14:55:31 +05:45
Damodar LohaniandGitHub 4fcb399867 use team internal id for membership check on update 2024-03-17 14:54:08 +05:45
Damodar LohaniandGitHub 24319b8417 Fix membership query to use internalId 2024-03-17 14:51:27 +05:45
Damodar Lohani 17d85a478a fix event test dsn 2024-03-14 01:18:17 +00:00
Jake BarnbyandGitHub f2cdd9cc1d Merge pull request #7825 from appwrite/chore-update
Update db
2024-03-13 19:10:07 +01:00
Jake Barnby 310aa56e5d Update db 2024-03-13 19:08:07 +01:00
Jake BarnbyandGitHub 5c0df92346 Merge pull request #7818 from appwrite/fix-exception-wrap-order
Fix exception wrap order
2024-03-13 12:46:41 +01:00
Jake Barnby a4bdf63afd Fix exception wrap order of operations 2024-03-13 12:41:55 +01:00
Damodar LohaniandGitHub f356f13ee6 Merge branch 'refactor-usage-sn' into fix-cloud-tests 2024-03-13 11:20:12 +05:45
Eldad A. FuxandGitHub 993c9df840 Merge pull request #7808 from appwrite/escape-function-build-command
Escape function build command
2024-03-13 01:21:11 +01:00
Steven Nguyen b4c065a342 Escape function build command
The extra trim is neded to because the extra quotes interfere with
additional operations in the executor/orchestration library.
2024-03-13 01:03:51 +01:00
Jake Barnby c7bf9bb3ec Debug 2024-03-12 17:09:09 +01:00
Jake Barnby cfc69b0f92 Debug 2024-03-12 16:54:06 +01:00
Jake Barnby c8e817a019 Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-isolation-modes
# Conflicts:
#	app/controllers/api/teams.php
2024-03-12 10:47:50 +01:00
Jake BarnbyandGitHub 267f6bc752 Merge pull request #7787 from appwrite/fix-query-exceptions
Fix database exception wrapping
2024-03-12 10:17:10 +01:00
7c7d09514a Update docs/sdks/react-native/GETTING_STARTED.md
Co-authored-by: Vincent (Wen Yu) Ge <vincent@appwrite.io>
2024-03-12 08:35:17 +05:45
cfd7534993 Update docs/sdks/react-native/GETTING_STARTED.md
Co-authored-by: Vincent (Wen Yu) Ge <vincent@appwrite.io>
2024-03-12 08:35:10 +05:45
e03102a112 Update docs/sdks/react-native/GETTING_STARTED.md
Co-authored-by: Vincent (Wen Yu) Ge <vincent@appwrite.io>
2024-03-12 08:34:54 +05:45
Jake Barnby a1d86c9b3f Switch over errors 2024-03-11 16:11:37 +01:00
Jake Barnby 7e1894feb5 Debug 2024-03-11 14:14:32 +01:00
Jake Barnby 550837b572 Pass through query exception message 2024-03-11 13:46:02 +01:00
Jake Barnby 22b3ea7e8d Catch auth fixes 2024-03-11 13:03:30 +01:00
Jake Barnby cea4e0d8b6 Wrap all db exceptions in error handler 2024-03-11 12:54:42 +01:00
Christy JacobandGitHub f482d96225 Merge pull request #7784 from appwrite/feat-cloud-log-400
Upload 400s to separate error logger
2024-03-11 15:47:53 +05:30
Bradley Schofield 9c100758de Update general.php 2024-03-11 10:29:57 +01:00
Bradley Schofield 15a6c510a0 Upload 400s to separate error logger 2024-03-11 10:23:52 +01:00
Jake Barnby 7fc990a56d Debug 2024-03-10 18:45:50 +01:00
Jake Barnby 65c21a34c0 Update database 2024-03-10 12:50:51 +01:00
Damodar Lohani b409efc492 fix path 2024-03-10 08:01:10 +00:00
Damodar Lohani ef61879f5e fix import 2024-03-10 04:20:27 +00:00
Damodar Lohani f3927c3d20 fix linter 2024-03-10 03:57:54 +00:00
Damodar Lohani c11a1af99b react native SDK 2024-03-10 02:49:45 +00:00
Damodar Lohani 271db5ce69 react native getting started 2024-03-10 02:21:50 +00:00
Jake Barnby 9ca1375af3 Fix index lengths given tenant is added 2024-03-09 22:56:20 +01:00
Jake Barnby 664df69a5f Fix method refs 2024-03-07 17:49:59 +01:00
Jake Barnby f166a1c201 Update db 2024-03-07 17:43:44 +01:00
Jake Barnby 8a73203635 Revert debugs 2024-03-07 14:52:13 +01:00
Jake Barnby b857fa3cdc Debug 2024-03-07 14:06:33 +01:00
Jake Barnby 503fb2ca82 Debug 2024-03-07 12:49:54 +01:00
Jake Barnby 1db9d8b9ab Fix method refs 2024-03-07 10:40:03 +01:00
Jake Barnby 1ffb80f2f7 Fix realtime db 2024-03-07 10:37:57 +01:00
Jake Barnby 2bed17de35 Debug 2024-03-06 21:50:31 +01:00
Jake Barnby 3312ed1c5d Debug 2024-03-06 21:14:55 +01:00
5b00737b55 Update app/init.php
Co-authored-by: Eldad A. Fux <eldad.fux@gmail.com>
2024-03-06 18:09:13 +01:00
shimon 54a02fbb96 Merge remote-tracking branch 'origin/remove-cloud-scripts' into remove-cloud-scripts 2024-03-06 18:00:00 +01:00
shimon dfac3d585a Merge branch 'main' of github.com:appwrite/appwrite into remove-cloud-scripts 2024-03-06 17:58:58 +01:00
Jake Barnby 1b7ce8fc61 Debug 2024-03-06 10:59:05 +01:00
Jake Barnby 7fc214afbe Update libs 2024-03-05 11:55:29 +01:00
Jake Barnby c768375e13 Set tenant for CLI scope db 2024-03-04 20:54:35 +01:00
Jake Barnby fcc5a747d1 Fix test 2024-03-04 20:26:11 +01:00
Jake Barnby 78e4c0611b Update deps 2024-03-04 20:02:45 +01:00
Jake Barnby 74a3d6531f Merge remote-tracking branch 'origin/refactor-usage-sn' into feat-isolation-modes
# Conflicts:
#	composer.json
#	composer.lock
#	src/Appwrite/Platform/Tasks/CalcTierStats.php
#	tests/e2e/Services/Projects/ProjectsConsoleClientTest.php
2024-03-04 19:50:10 +01:00
Damodar Lohani 57d7995e36 fix file path 2024-03-04 12:58:28 +00:00
Damodar Lohani 5e6f53d6aa reclaim pool 2024-03-04 12:50:49 +00:00
Damodar Lohani 5f4970befd fix path 2024-03-04 12:49:56 +00:00
Damodar Lohani 060ec455b3 fix 2024-03-04 12:44:40 +00:00
Damodar Lohani 86dc85f3a4 fix file path 2024-03-04 12:17:35 +00:00
Damodar Lohani 064ac2ccf8 fix dsn in event test 2024-03-04 11:15:45 +00:00
Luke B. SilverandGitHub ab36448731 Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-02-29 14:51:59 +00:00
Luke B. SilverandGitHub 827d8c02c1 Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-02-28 13:58:34 +00:00
Khushboo Verma 4e2120952f Fix vcs silent mode 2024-02-28 13:27:36 +05:30
Christy JacobandGitHub ac5d45d71c Merge branch 'refactor-usage-sn' into remove-cloud-scripts 2024-02-28 09:52:12 +05:30
Luke B. SilverandGitHub ad20d400e5 Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-02-26 16:40:54 +00:00
Luke B. SilverandGitHub 00c8774554 Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-02-26 09:29:08 +00:00
Luke B. SilverandGitHub 95ef88c80e Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-02-25 17:01:34 +00:00
Luke B. SilverandGitHub 34d2dde51d Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-02-24 13:45:20 +00:00
Luke B. SilverandGitHub 5822f22109 Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-02-22 18:06:09 +00:00
Luke B. SilverandGitHub 0f09fd5ade Merge branch '1.5.x' into fix-templates-copy-hidden-files 2024-02-22 13:41:16 +00:00
shimon 22e7c58d7d Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into remove-cloud-scripts 2024-02-19 17:38:13 +02:00
loks0n 050f501186 fix: templates copy hidden files 2024-02-19 09:11:15 +00:00
shimon ad44c7a430 Addressed comments 2024-02-15 16:43:58 +02:00
44ead217ac Update src/Appwrite/Platform/Workers/Messaging.php
Co-authored-by: Christy Jacob <christyjacob4@gmail.com>
2024-02-15 16:28:02 +02:00
shimon 62ee10493b usage sms per country code count 2024-02-15 10:10:01 +02:00
shimon 207811a224 usage updates 2024-02-13 19:26:23 +02:00
shimon 84e4748625 usage updates 2024-02-13 17:58:27 +02:00
shimon 7d38860d16 usage updates 2024-02-13 17:04:16 +02:00
shimon e1e5f5d96b usage updates 2024-02-13 16:27:01 +02:00
shimon 219b28e9bf usage updates 2024-02-13 16:08:40 +02:00
shimon 96317f0acb sync with main 2024-02-13 10:46:24 +02:00
shimon a0e82ccfab sync with main 2024-02-13 10:35:33 +02:00
shimon 8c44627da1 Merge branch 'main' of github.com:appwrite/appwrite into remove-cloud-scripts
 Conflicts:
	Dockerfile
	src/Appwrite/Platform/Services/Workers.php
2024-02-13 10:29:17 +02:00
Matej Bačo abb1007385 Rework project creation 2024-02-07 12:04:46 +01:00
Matej Bačo a89b73d20b Fix bug 2024-02-07 10:48:02 +01:00
Matej Bačo d5216d5b14 Linter fix 2024-02-07 10:17:34 +01:00
Matej Bačo 939aec866e Add getProxyProjectDatabase hook 2024-02-07 10:16:17 +01:00
Matej Bačo a7e95588c6 Fix bug on ZDT 2024-02-06 16:08:42 +01:00
Matej Bačo 3a5c233b59 Fix bug 2024-02-06 11:47:43 +00:00
Matej Bačo 8154b4c131 Linter fix 2024-02-06 12:11:27 +01:00
Matej Bačo d4afe22396 Add ZDT migration support to project creation 2024-02-06 12:07:47 +01:00
shimon ab80999d1e cleanup 2024-01-31 12:13:02 +02:00
shimon be829e2db4 Merge branch 'refactor-usage-sn' of github.com:appwrite/appwrite into remove-cloud-scripts
 Conflicts:
	Dockerfile
	docker-compose.yml
	src/Appwrite/Platform/Services/Tasks.php
	src/Appwrite/Platform/Services/Workers.php
	src/Appwrite/Platform/Tasks/CalcTierStats.php
	src/Appwrite/Platform/Workers/Hamster.php
2024-01-30 20:47:35 +02:00
shimon 6ad63b6f7b addressing comments 2024-01-17 10:44:16 +02:00
shimon 4b23440c2d remove cloud related scripts 2024-01-09 15:44:56 +02:00
shimon 85950868f2 remove cloud related scripts 2024-01-09 15:30:43 +02:00
shimon eb70990bf0 remove cloud related scripts 2024-01-09 15:22:02 +02:00
shimon 880526d6d3 Merge branch 'main' of github.com:appwrite/appwrite into remove-cloud-scripts 2024-01-09 12:11:32 +02:00
shimon 1da476e5ac remove cloud related scripts 2024-01-09 11:13:58 +02:00
fogelito d5428f8f7a databases.php collection not found 2023-12-27 16:28:53 +02:00
Jake Barnby 4710310629 Check if self-hosted 2023-12-08 18:33:35 +01:00
Jake Barnby 4245c0b86e Update dependencies 2023-12-08 18:07:38 +01:00
Jake Barnby 6b0586eaf6 Remove DB attribute 2023-12-08 18:06:53 +01:00
Jake Barnby 018b7c38bd Merge remote-tracking branch 'origin/1.4.x' into feat-isolation-modes
# Conflicts:
#	src/Appwrite/Platform/Tasks/Hamster.php
2023-12-08 13:34:28 +01:00
Jake Barnby 7e12da5a2a Use hard-coded DB name instead of project attribute 2023-11-30 16:32:15 +13:00
Jake Barnby e109f1e008 Add metadata in worker dbs 2023-11-30 16:06:49 +13:00
Jake Barnby 4f539f1ed4 Update switch to match 2023-11-30 16:04:15 +13:00
Jake Barnby 7104f9e2c8 Add comments marking shareTables project attributes + header overrides as temporary 2023-11-28 02:08:04 +13:00
Jake Barnby 632c902e1c Remove debug trace 2023-11-28 01:53:24 +13:00
Jake Barnby c1f10b06a3 Fix index limit test 2023-11-28 01:34:29 +13:00
Jake Barnby c4806e883e Update lock 2023-11-28 01:00:22 +13:00
Jake Barnby 2c71de1d1b Merge remote-tracking branch 'origin/1.4.x' into feat-isolation-modes
# Conflicts:
#	composer.lock
2023-11-28 00:57:17 +13:00
Jake Barnby 2e89113e6a Self review 2023-11-28 00:52:46 +13:00
Jake Barnby edee5400ba Fix casing 2023-11-28 00:43:21 +13:00
Jake Barnby 82dfe5ddee Add tests 2023-11-28 00:30:02 +13:00
Jake Barnby 0885f31dd7 Update database 2023-11-28 00:29:23 +13:00
Jake Barnby 9472bff8f9 Fix project create tenant set/reset 2023-11-28 00:27:41 +13:00
Jake Barnby 68548ebd47 Fix worker tenant set/reset 2023-11-28 00:27:16 +13:00
Jake Barnby b9ac8e644d Set/reset tenant on init 2023-11-28 00:26:35 +13:00
Jake Barnby 7b8e37b03d Update method names 2023-11-27 15:22:05 +13:00
Jake Barnby 35163ff52a Check project shareTables status when configuring databases 2023-11-23 01:13:24 +13:00
Jake Barnby f44543f083 Add shareTables attribute to project 2023-11-23 01:12:19 +13:00
Jake Barnby cefc1b6519 Add base share tables check when creating project 2023-11-23 01:11:48 +13:00
Jake Barnby eb5fc0797f Update abuse/audit 2023-11-23 00:43:32 +13:00
Jake Barnby 464b913e90 Update for function name change 2023-11-22 21:32:36 +13:00
Eldad Fux f4fedc832e Fix formating 2023-10-21 08:30:35 -04:00
Eldad Fux 92538c57f6 cleanups 2023-10-21 07:29:23 -04:00
Eldad Fux 77a4300669 cleanups 2023-10-21 07:22:46 -04:00
Eldad Fux 2884cb636b cleanup 2023-10-21 07:18:21 -04:00
Eldad Fux 025a0292f4 Revert "Sync with main"
This reverts commit 0ea1418132.
2023-10-21 07:02:44 -04:00
Eldad Fux 0ea1418132 Sync with main 2023-10-21 07:00:21 -04:00
Eldad A. FuxandGitHub e5fca85d88 Merge branch 'main' into feat-reclaim-only-current-connection 2023-10-21 06:42:59 -04:00
Eldad Fux c6c7734c29 Merge pull request #6496 from appwrite/fix-readme-cn
Update logo in README-CN.md

<!--
Thank you for sending the PR! We appreciate you spending the time to work on these changes.

Help us understand your motivation by explaining why you decided to make this change.

You can learn more about contributing to appwrite here: https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md

Happy contributing!

-->

## What does this PR do?

(Provide a description of what this PR does and why it's needed.)

## Test Plan

(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work. Screenshots may also be helpful.)

## Related PRs and Issues

- (Related PR or issue)

## Checklist

- [ ] Have you read the [Contributing Guidelines on issues](https://github.com/appwrite/appwrite/blob/master/CONTRIBUTING.md)?
- [ ] If the PR includes a change to an API's metadata (desc, label, params, etc.), does it also include updated API specs and example docs?
2023-10-11 22:01:01 +02:00
229 changed files with 3425 additions and 1222 deletions
+1
View File
@@ -1,4 +1,5 @@
_APP_ENV=development
_APP_EDITION=self-hosted
_APP_LOCALE=en
_APP_WORKER_PER_CORE=6
_APP_CONSOLE_WHITELIST_ROOT=disabled
+3
View File
@@ -145,3 +145,6 @@ jobs:
- name: Run ${{matrix.service}} Tests
run: docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.service}} --debug
- name: Run ${{matrix.service}} Shared Tables Tests
run: _APP_DATABASE_SHARED_TABLES=database_db_main docker compose exec -T appwrite test /usr/src/code/tests/e2e/Services/${{matrix.service}} --debug
+1
View File
@@ -14,3 +14,4 @@ app/sdks
dev/yasd_init.php
.phpunit.result.cache
Makefile
appwrite.json
+1 -1
View File
@@ -1,4 +1,4 @@
[submodule "app/console"]
path = app/console
url = https://github.com/appwrite/console
branch = 4.0.6
branch = 4.3.5
+118
View File
@@ -1,3 +1,121 @@
# Version 1.5.7
## What's Changed
### Fixes
* Fix database exception wrapping by @abnegate in https://github.com/appwrite/appwrite/pull/7787
* Fix exception wrap order by @abnegate in https://github.com/appwrite/appwrite/pull/7818
* Fix membership query to use internalId by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7834
* Fix vcs silent mode by @vermakhushboo in https://github.com/appwrite/appwrite/pull/7683
* Fix function domain permissions by @stnguyen90 in https://github.com/appwrite/appwrite/pull/7852
* Fix tests required for Cloud by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7777
* Fix OAuth error code by @vermakhushboo in https://github.com/appwrite/appwrite/pull/7893
* Fix connection reclaim logic. by @eldadfux in https://github.com/appwrite/appwrite/pull/6886
* Fix shared queue name by @abnegate in https://github.com/appwrite/appwrite/pull/8092
* Fix syntax error by @abnegate in https://github.com/appwrite/appwrite/pull/8093
* Fix missing id attribute error by @abnegate in https://github.com/appwrite/appwrite/pull/8094
* Fix tests for CL by @lohanidamodar in https://github.com/appwrite/appwrite/pull/8076
* Fix project deletes for shared tables by @abnegate in https://github.com/appwrite/appwrite/pull/8107
* Handle SQL error code 'HY000' in realtime by @stnguyen90 in https://github.com/appwrite/appwrite/pull/8106
* Fix: Don't Override `robots.txt` for Other Domains by @ItzNotABug in https://github.com/appwrite/appwrite/pull/8185
* Escape function build command by @stnguyen90 in https://github.com/appwrite/appwrite/pull/7808
* Create failed execution from worker if deployment doesn't exist by @vermakhushboo in https://github.com/appwrite/appwrite/pull/7896
* Fix: admin mode on console by @TorstenDittmann in https://github.com/appwrite/appwrite/pull/7951
* Fix file size default limit by @shimonewman in https://github.com/appwrite/appwrite/pull/7843
* Fix: Python failing builds by @Meldiron in https://github.com/appwrite/appwrite/pull/8078
* Fix shared project delete by @abnegate in https://github.com/appwrite/appwrite/pull/8142
* Fix TextMagic class name by @stnguyen90 in https://github.com/appwrite/appwrite/pull/8132
* Prevent functions domain and subdomain to be added as custom domain by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7933
* Fix don't publish max users exceed by @vermakhushboo in https://github.com/appwrite/appwrite/pull/8067
* Fix invalid cache document id by @stnguyen90 in https://github.com/appwrite/appwrite/pull/8183
* Fix not hiding tokens for clients via realtime by @abnegate in https://github.com/appwrite/appwrite/pull/7870
### Miscellaneous
* Upload 400s to separate error logger by @PineappleIOnic in https://github.com/appwrite/appwrite/pull/7784
* Admin mode use teamInternalId by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7835
* Chore: update avatars API by @christyjacob4 in https://github.com/appwrite/appwrite/pull/7840
* Use internal ids for query by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7838
* Remove cloud related scripts by @shimonewman in https://github.com/appwrite/appwrite/pull/7414
* Update VCS Comment by @vermakhushboo in https://github.com/appwrite/appwrite/pull/7854
* Transaction and reconnection fixes by @fogelito in https://github.com/appwrite/appwrite/pull/7877
* Feat configurable collections by @christyjacob4 in https://github.com/appwrite/appwrite/pull/7882
* Remove var_dump calls by @stnguyen90 in https://github.com/appwrite/appwrite/pull/7884
* Storage DO adapter http version by @lohanidamodar in https://github.com/appwrite/appwrite/pull/7905
* Update executor version by @vermakhushboo in https://github.com/appwrite/appwrite/pull/7910
* Comment timer tick by @vermakhushboo in https://github.com/appwrite/appwrite/pull/7911
* Update db for relationships and object as array attributes fixes by @abnegate in https://github.com/appwrite/appwrite/pull/7917
* Bump executor version to 0.5.1 by @vermakhushboo in https://github.com/appwrite/appwrite/pull/7925
* Update database by @abnegate in https://github.com/appwrite/appwrite/pull/7937
* Reclaim only current connection by @abnegate in https://github.com/appwrite/appwrite/pull/7941
* Match memberships on internal ID by @abnegate in https://github.com/appwrite/appwrite/pull/7953
* Chore: queue retry update by @shimonewman in https://github.com/appwrite/appwrite/pull/7991
* Chore task addition by @shimonewman in https://github.com/appwrite/appwrite/pull/7992
* Databases.php collection not found by @fogelito in https://github.com/appwrite/appwrite/pull/7341
* Update database by @abnegate in https://github.com/appwrite/appwrite/pull/8036
* Feat upgrade db by @abnegate in https://github.com/appwrite/appwrite/pull/8050
* Handle string error codes by @fogelito in https://github.com/appwrite/appwrite/pull/7878
* Migration Logging Improvements by @PineappleIOnic in https://github.com/appwrite/appwrite/pull/8057
* Remove logger code from avatars.php by @vermakhushboo in https://github.com/appwrite/appwrite/pull/8065
* Update chunk size to 7 MB by @vermakhushboo in https://github.com/appwrite/appwrite/pull/8060
* Shared tables support by @abnegate in https://github.com/appwrite/appwrite/pull/7206
* Ensure namespace is set if override equals shared tables by @abnegate in https://github.com/appwrite/appwrite/pull/8091
* Update database by @abnegate in https://github.com/appwrite/appwrite/pull/8095
* Disable sending realtime stats by @stnguyen90 in https://github.com/appwrite/appwrite/pull/8104
* Increase chunk size to 10 MB by @vermakhushboo in https://github.com/appwrite/appwrite/pull/8099
* Update db by @abnegate in https://github.com/appwrite/appwrite/pull/8113
* Update executor image name to exc-1 by @vermakhushboo in https://github.com/appwrite/appwrite/pull/8123
* Catch DB errors on delete by @abnegate in https://github.com/appwrite/appwrite/pull/8143
* Update Logger and migrations, implement sampler. by @PineappleIOnic in https://github.com/appwrite/appwrite/pull/8146
* Increase shared tables projects by @abnegate in https://github.com/appwrite/appwrite/pull/8161
* Feat: improve cold start error, merge to cloud by @loks0n in https://github.com/appwrite/appwrite/pull/8165
* Add tests for scheduled functions by @vermakhushboo in https://github.com/appwrite/appwrite/pull/8164
* Remove throw PdoException in Error hook by @fogelito in https://github.com/appwrite/appwrite/pull/8169
* Refactor localdevice injection by @byawitz in https://github.com/appwrite/appwrite/pull/8173
* Usage sms per country code count by @shimonewman in https://github.com/appwrite/appwrite/pull/7592
* GetEnv on worker.php by @shimonewman in https://github.com/appwrite/appwrite/pull/8026
* Feat get env by @shimonewman in https://github.com/appwrite/appwrite/pull/8180
* Chore: remove compose version by @loks0n in https://github.com/appwrite/appwrite/pull/8148
* Chore update executor host default var by @abnegate in https://github.com/appwrite/appwrite/pull/8190
* Wrap realtime stats in an edition check by @abnegate in https://github.com/appwrite/appwrite/pull/8192
* Update executor image name by @vermakhushboo in https://github.com/appwrite/appwrite/pull/8147
* Feat: improve header demo values by @loks0n in https://github.com/appwrite/appwrite/pull/8089
* Feat: add warning header by @loks0n in https://github.com/appwrite/appwrite/pull/8063
# Version 1.5.6
## What's Changed
### Notable Changes
* Prevent functions domain to be used as custom domain in [#7934](https://github.com/appwrite/appwrite/pull/7934)
### Fixes
* Fix auth mode check in [#7980](https://github.com/appwrite/appwrite/pull/7980)
* Fix templates not copying hidden files in [#7610](https://github.com/appwrite/appwrite/pull/7610)
* Use `resourceInternalId` for Querying Function Deployments in [#8038](https://github.com/appwrite/appwrite/pull/8038)
* Fix Email OTP not verifying account in [#8084](https://github.com/appwrite/appwrite/pull/8084)
* Fix MFA email verification code font in [#8082](https://github.com/appwrite/appwrite/pull/8082)
* Don't kick user and require verification after enabling MFA in [#8081](https://github.com/appwrite/appwrite/pull/8081)
* Fix typo in credit-cards.php credit card image filename in [#8074](https://github.com/appwrite/appwrite/pull/8074)
* Fix Deprecated Warning in Doctor.php in [#8105](https://github.com/appwrite/appwrite/pull/8105)
* Set limit to retrieve all stats for the usage range in [#8117](https://github.com/appwrite/appwrite/pull/8117)
* Fix email used for name when user is created via Apple OAuth2 in [#8102](https://github.com/appwrite/appwrite/pull/8102)
### Miscellaneous
* Add GitHub action to close stale issues in [#7927](https://github.com/appwrite/appwrite/pull/7927)
* Document the standard we follow for country codes in [#8014](https://github.com/appwrite/appwrite/pull/8014)
* Add OSV Scanner for vulnerability scans in [#6506](https://github.com/appwrite/appwrite/pull/6506)
* Fix stale action close reason in [#8046](https://github.com/appwrite/appwrite/pull/8046)
* Add OSV Scanner for vulnerability scans in [#8021](https://github.com/appwrite/appwrite/pull/8021)
* Fix some typos in comments in [#7993](https://github.com/appwrite/appwrite/pull/7993)
* Replace missing domain paths in README.md in [#8049](https://github.com/appwrite/appwrite/pull/8049)
* Add the React Native SDK in [#7776](https://github.com/appwrite/appwrite/pull/7776)
* Bump database in [#8080](https://github.com/appwrite/appwrite/pull/8080)
* Add documentation for metrics in [#8088](https://github.com/appwrite/appwrite/pull/8088)
* Add new country Palestine with its translations in [#8031](https://github.com/appwrite/appwrite/pull/8031)
* Update users create token description in [#8129](https://github.com/appwrite/appwrite/pull/8129)
* Bump dependencies in [#8130](https://github.com/appwrite/appwrite/pull/8130)
# Version 1.5.5
## What's Changed
### Notable changes
+1 -1
View File
@@ -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.0 as final
FROM appwrite/base:0.9.1 as final
LABEL maintainer="team@appwrite.io"
+3 -3
View File
@@ -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.5
appwrite/appwrite:1.5.7
```
### 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.5
appwrite/appwrite:1.5.7
```
#### 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.5
appwrite/appwrite:1.5.7
```
运行后,可以在浏览器上访问 http://localhost 找到 Appwrite 控制台。在非 Linux 的本机主机上完成安装后,服务器可能需要几分钟才能启动。
+3 -3
View File
@@ -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.5
appwrite/appwrite:1.5.7
```
### 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.5
appwrite/appwrite:1.5.7
```
#### 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.5
appwrite/appwrite:1.5.7
```
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.
+37 -8
View File
@@ -15,6 +15,7 @@ use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Database\Validator\Authorization;
use Utopia\DSN\DSN;
use Utopia\Logger\Log;
use Utopia\Platform\Service;
use Utopia\Pools\Group;
@@ -98,25 +99,53 @@ CLI::setResource('getProjectDB', function (Group $pools, Database $dbForConsole,
return $dbForConsole;
}
$databaseName = $project->getAttribute('database');
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
if (isset($databases[$dsn->getHost()])) {
$database = $databases[$dsn->getHost()];
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
if (isset($databases[$databaseName])) {
$database = $databases[$databaseName];
$database->setNamespace('_' . $project->getInternalId());
return $database;
}
$dbAdapter = $pools
->get($databaseName)
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$databases[$databaseName] = $database;
$databases[$dsn->getHost()] = $database;
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
$database
->setNamespace('_' . $project->getInternalId())
->setMetadata('host', \gethostname())
->setMetadata('project', $project->getId());
@@ -173,7 +202,7 @@ CLI::setResource('logError', function (Registry $register) {
}, ['register']);
$platform = new Appwrite();
$platform->init(Service::TYPE_CLI);
$platform->init(Service::TYPE_TASK);
$cli = $platform->getCli();
+11 -11
View File
@@ -390,7 +390,7 @@ $commonCollections = [
'$id' => ID::custom('_key_email'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['email'],
'lengths' => [320],
'lengths' => [256],
'orders' => [Database::ORDER_ASC],
],
[
@@ -996,7 +996,7 @@ $commonCollections = [
'$id' => ID::custom('_key_provider_providerUid'),
'type' => Database::INDEX_KEY,
'attributes' => ['provider', 'providerUid'],
'lengths' => [100, 100],
'lengths' => [128, 128],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
[
@@ -1120,14 +1120,14 @@ $commonCollections = [
'$id' => ID::custom('_key_userInternalId_provider_providerUid'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['userInternalId', 'provider', 'providerUid'],
'lengths' => [Database::LENGTH_KEY, 100, 385],
'lengths' => [11, 128, 128],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_provider_providerUid'),
'type' => Database::INDEX_UNIQUE,
'attributes' => ['provider', 'providerUid'],
'lengths' => [100, 640],
'lengths' => [128, 128],
'orders' => [Database::ORDER_ASC, Database::ORDER_ASC],
],
[
@@ -1148,7 +1148,7 @@ $commonCollections = [
'$id' => ID::custom('_key_provider'),
'type' => Database::INDEX_KEY,
'attributes' => ['provider'],
'lengths' => [100],
'lengths' => [128],
'orders' => [Database::ORDER_ASC],
],
[
@@ -3068,7 +3068,7 @@ $projectCollections = array_merge([
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [768],
'lengths' => [256],
'orders' => [Database::ORDER_ASC],
],
[
@@ -3117,7 +3117,7 @@ $projectCollections = array_merge([
'$id' => ID::custom('_key_runtime'),
'type' => Database::INDEX_KEY,
'attributes' => ['runtime'],
'lengths' => [768],
'lengths' => [64],
'orders' => [Database::ORDER_ASC],
],
[
@@ -3857,14 +3857,14 @@ $projectCollections = array_merge([
'$id' => ID::custom('_key_trigger'),
'type' => Database::INDEX_KEY,
'attributes' => ['trigger'],
'lengths' => [128],
'lengths' => [32],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_status'),
'type' => Database::INDEX_KEY,
'attributes' => ['status'],
'lengths' => [128],
'lengths' => [32],
'orders' => [Database::ORDER_ASC],
],
[
@@ -5833,14 +5833,14 @@ $bucketCollections = [
'$id' => ID::custom('_key_name'),
'type' => Database::INDEX_KEY,
'attributes' => ['name'],
'lengths' => [768],
'lengths' => [256],
'orders' => [Database::ORDER_ASC],
],
[
'$id' => ID::custom('_key_signature'),
'type' => Database::INDEX_KEY,
'attributes' => ['signature'],
'lengths' => [768],
'lengths' => [256],
'orders' => [Database::ORDER_ASC],
],
[
+7 -2
View File
@@ -134,7 +134,7 @@ return [
Exception::USER_COUNT_EXCEEDED => [
'name' => Exception::USER_COUNT_EXCEEDED,
'description' => 'The current project has exceeded the maximum number of users. Please check your user limit in the Appwrite console.',
'code' => 501,
'code' => 400,
],
Exception::USER_CONSOLE_COUNT_EXCEEDED => [
'name' => Exception::USER_CONSOLE_COUNT_EXCEEDED,
@@ -673,6 +673,11 @@ return [
'description' => 'The attribute type is invalid.',
'code' => 400,
],
Exception::RELATIONSHIP_VALUE_INVALID => [
'name' => Exception::RELATIONSHIP_VALUE_INVALID,
'description' => 'The relationship value is invalid.',
'code' => 400,
],
/** Indexes */
Exception::INDEX_NOT_FOUND => [
@@ -715,7 +720,7 @@ return [
Exception::PROJECT_PROVIDER_UNSUPPORTED => [
'name' => Exception::PROJECT_PROVIDER_UNSUPPORTED,
'description' => 'The chosen OAuth provider is unsupported. Please check the <a href="/docs/client/account?sdk=web-default#accountCreateOAuth2Session">Create OAuth2 Session docs</a> for the complete list of supported OAuth providers.',
'code' => 501,
'code' => 400,
],
Exception::PROJECT_INVALID_SUCCESS_URL => [
'name' => Exception::PROJECT_INVALID_SUCCESS_URL,
@@ -5,7 +5,7 @@
<table border="0" cellspacing="0" cellpadding="0" style="padding-top: 10px; padding-bottom: 10px; display: inline-block;">
<tr>
<td align="center" style="border-radius: 8px; background-color: #ffffff;">
<p style="font-size: 24px; text-indent: 18px; letter-spacing: 18px; font-family: Inter; color: #414146; text-decoration: none; border-radius: 8px; padding: 24px 12px; border: 1px solid #EDEDF0; display: inline-block; font-weight: bold; ">{{otp}}</p>
<p style="font-size: 24px; text-indent: 18px; letter-spacing: 18px; font-family: 'Inter', sans-serif; color: #414146; text-decoration: none; border-radius: 8px; padding: 24px 12px; border: 1px solid #EDEDF0; display: inline-block; font-weight: bold; ">{{otp}}</p>
</td>
</tr>
</table>
+35 -17
View File
@@ -15,7 +15,7 @@ return [
[
'key' => 'web',
'name' => 'Web',
'version' => '14.0.0',
'version' => '15.0.0',
'url' => 'https://github.com/appwrite/sdk-for-web',
'package' => 'https://www.npmjs.com/package/appwrite',
'enabled' => true,
@@ -63,7 +63,7 @@ return [
[
'key' => 'flutter',
'name' => 'Flutter',
'version' => '12.0.3',
'version' => '12.0.4',
'url' => 'https://github.com/appwrite/sdk-for-flutter',
'package' => 'https://pub.dev/packages/appwrite',
'enabled' => true,
@@ -81,7 +81,7 @@ return [
[
'key' => 'apple',
'name' => 'Apple',
'version' => '5.0.0',
'version' => '6.0.0',
'url' => 'https://github.com/appwrite/sdk-for-apple',
'package' => 'https://github.com/appwrite/sdk-for-apple',
'enabled' => true,
@@ -116,7 +116,7 @@ return [
[
'key' => 'android',
'name' => 'Android',
'version' => '5.0.0',
'version' => '5.1.1',
'url' => 'https://github.com/appwrite/sdk-for-android',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-android',
'enabled' => true,
@@ -135,6 +135,24 @@ return [
'Java' => 'java',
],
],
[
'key' => 'react-native',
'name' => 'React Native',
'version' => '0.4.0',
'url' => 'https://github.com/appwrite/sdk-for-react-native',
'package' => 'https://npmjs.com/package/react-native-appwrite',
'enabled' => true,
'beta' => true,
'dev' => false,
'hidden' => false,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'javascript',
'source' => \realpath(__DIR__ . '/../sdks/client-react-native'),
'gitUrl' => 'git@github.com:appwrite/sdk-for-react-native.git',
'gitRepoName' => 'sdk-for-react-native',
'gitUserName' => 'appwrite',
'gitBranch' => 'dev',
],
[
'key' => 'graphql',
'name' => 'GraphQL',
@@ -185,7 +203,7 @@ return [
[
'key' => 'web',
'name' => 'Console',
'version' => '0.6.1',
'version' => '0.6.3',
'url' => 'https://github.com/appwrite/sdk-for-console',
'package' => '',
'enabled' => true,
@@ -203,7 +221,7 @@ return [
[
'key' => 'cli',
'name' => 'Command Line',
'version' => '5.0.2',
'version' => '5.0.5',
'url' => 'https://github.com/appwrite/sdk-for-cli',
'package' => 'https://www.npmjs.com/package/appwrite-cli',
'enabled' => true,
@@ -231,7 +249,7 @@ return [
[
'key' => 'nodejs',
'name' => 'Node.js',
'version' => '12.0.1',
'version' => '13.0.0',
'url' => 'https://github.com/appwrite/sdk-for-node',
'package' => 'https://www.npmjs.com/package/node-appwrite',
'enabled' => true,
@@ -249,7 +267,7 @@ return [
[
'key' => 'deno',
'name' => 'Deno',
'version' => '10.0.1',
'version' => '11.0.0',
'url' => 'https://github.com/appwrite/sdk-for-deno',
'package' => 'https://deno.land/x/appwrite',
'enabled' => true,
@@ -267,7 +285,7 @@ return [
[
'key' => 'php',
'name' => 'PHP',
'version' => '11.0.1',
'version' => '11.0.2',
'url' => 'https://github.com/appwrite/sdk-for-php',
'package' => 'https://packagist.org/packages/appwrite/appwrite',
'enabled' => true,
@@ -285,7 +303,7 @@ return [
[
'key' => 'python',
'name' => 'Python',
'version' => '5.0.2',
'version' => '5.0.3',
'url' => 'https://github.com/appwrite/sdk-for-python',
'package' => 'https://pypi.org/project/appwrite/',
'enabled' => true,
@@ -303,7 +321,7 @@ return [
[
'key' => 'ruby',
'name' => 'Ruby',
'version' => '11.0.1',
'version' => '11.0.2',
'url' => 'https://github.com/appwrite/sdk-for-ruby',
'package' => 'https://rubygems.org/gems/appwrite',
'enabled' => true,
@@ -321,7 +339,7 @@ return [
[
'key' => 'go',
'name' => 'Go',
'version' => '4.0.0',
'version' => '4.0.1',
'url' => 'https://github.com/appwrite/sdk-for-go',
'package' => '',
'enabled' => false,
@@ -339,7 +357,7 @@ return [
[
'key' => 'java',
'name' => 'Java',
'version' => '4.0.1',
'version' => '4.0.2',
'url' => 'https://github.com/appwrite/sdk-for-java',
'package' => '',
'enabled' => false,
@@ -357,7 +375,7 @@ return [
[
'key' => 'dotnet',
'name' => '.NET',
'version' => '0.8.1',
'version' => '0.8.2',
'url' => 'https://github.com/appwrite/sdk-for-dotnet',
'package' => 'https://www.nuget.org/packages/Appwrite',
'enabled' => true,
@@ -375,7 +393,7 @@ return [
[
'key' => 'dart',
'name' => 'Dart',
'version' => '11.0.2',
'version' => '11.0.3',
'url' => 'https://github.com/appwrite/sdk-for-dart',
'package' => 'https://pub.dev/packages/dart_appwrite',
'enabled' => true,
@@ -393,7 +411,7 @@ return [
[
'key' => 'kotlin',
'name' => 'Kotlin',
'version' => '5.0.1',
'version' => '5.0.2',
'url' => 'https://github.com/appwrite/sdk-for-kotlin',
'package' => 'https://search.maven.org/artifact/io.appwrite/sdk-for-kotlin',
'enabled' => true,
@@ -415,7 +433,7 @@ return [
[
'key' => 'swift',
'name' => 'Swift',
'version' => '5.0.1',
'version' => '5.0.2',
'url' => 'https://github.com/appwrite/sdk-for-swift',
'package' => 'https://github.com/appwrite/sdk-for-swift',
'enabled' => true,
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
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+9 -9
View File
@@ -450,7 +450,7 @@ return [
],
[
'name' => '_APP_SMS_FROM',
'description' => 'Phone number used for sending out messages. Must start with a leading \'+\' and maximum of 15 digits without spaces (+123456789).',
'description' => 'Phone number used for sending out messages. If using Twilio, this may be a Messaging Service SID, starting with MG. Otherwise, the number must start with a leading \'+\' and maximum of 15 digits without spaces (+123456789). ',
'introduction' => '0.15.0',
'default' => '',
'required' => false,
@@ -756,7 +756,7 @@ return [
],
[
'name' => '_APP_EXECUTOR_SECRET',
'description' => 'The secret key used by Appwrite to communicate with the function executor. Make sure to change this!',
'description' => 'The secret key used by Appwrite to communicate with the function executor. Make sure to change this.',
'introduction' => '0.13.0',
'default' => 'your-secret-key',
'required' => false,
@@ -765,9 +765,9 @@ return [
],
[
'name' => '_APP_EXECUTOR_HOST',
'description' => 'The host used by Appwrite to communicate with the function executor!',
'description' => 'The host used by Appwrite to communicate with the function executor.',
'introduction' => '0.13.0',
'default' => 'http://appwrite-executor/v1',
'default' => 'http://exc1/v1',
'required' => false,
'overwrite' => true,
'question' => '',
@@ -775,7 +775,7 @@ return [
],
[
'name' => '_APP_EXECUTOR_RUNTIME_NETWORK',
'description' => 'Deprecated with 0.14.0, use \'OPEN_RUNTIMES_NETWORK\' instead!',
'description' => 'Deprecated with 0.14.0, use \'OPEN_RUNTIMES_NETWORK\' instead.',
'introduction' => '0.13.0',
'default' => 'appwrite_runtimes',
'required' => false,
@@ -784,7 +784,7 @@ return [
],
[
'name' => '_APP_FUNCTIONS_ENVS',
'description' => 'Deprecated with 0.8.0, use \'_APP_FUNCTIONS_RUNTIMES\' instead!',
'description' => 'Deprecated with 0.8.0, use \'_APP_FUNCTIONS_RUNTIMES\' instead.',
'introduction' => '0.7.0',
'default' => 'node-16.0,php-7.4,python-3.9,ruby-3.0',
'required' => false,
@@ -802,7 +802,7 @@ return [
],
[
'name' => 'DOCKERHUB_PULL_USERNAME',
'description' => 'Deprecated with 1.2.0, use \'_APP_DOCKER_HUB_USERNAME\' instead!',
'description' => 'Deprecated with 1.2.0, use \'_APP_DOCKER_HUB_USERNAME\' instead.',
'introduction' => '0.10.0',
'default' => '',
'required' => false,
@@ -811,7 +811,7 @@ return [
],
[
'name' => 'DOCKERHUB_PULL_PASSWORD',
'description' => 'Deprecated with 1.2.0, use \'_APP_DOCKER_HUB_PASSWORD\' instead!',
'description' => 'Deprecated with 1.2.0, use \'_APP_DOCKER_HUB_PASSWORD\' instead.',
'introduction' => '0.10.0',
'default' => '',
'required' => false,
@@ -829,7 +829,7 @@ return [
],
[
'name' => 'OPEN_RUNTIMES_NETWORK',
'description' => 'Deprecated with 1.2.0, use \'_APP_FUNCTIONS_RUNTIMES_NETWORK\' instead!',
'description' => 'Deprecated with 1.2.0, use \'_APP_FUNCTIONS_RUNTIMES_NETWORK\' instead.',
'introduction' => '0.13.0',
'default' => 'appwrite_runtimes',
'required' => false,
+112 -81
View File
@@ -86,8 +86,8 @@ $createSession = function (string $userId, string $secret, Request $request, Res
$factor = (match ($verifiedToken->getAttribute('type')) {
Auth::TOKEN_TYPE_MAGIC_URL,
Auth::TOKEN_TYPE_OAUTH2,
Auth::TOKEN_TYPE_EMAIL => 'email',
Auth::TOKEN_TYPE_PHONE => 'phone',
Auth::TOKEN_TYPE_EMAIL => Type::EMAIL,
Auth::TOKEN_TYPE_PHONE => Type::PHONE,
Auth::TOKEN_TYPE_GENERIC => 'token',
default => throw new Exception(Exception::USER_INVALID_TOKEN)
});
@@ -1070,17 +1070,15 @@ App::get('/v1/account/sessions/oauth2/callback/:provider/:projectId')
$domain = $request->getHostname();
$protocol = $request->getProtocol();
$params = $request->getParams();
$params['project'] = $projectId;
unset($params['projectId']);
$response
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
->addHeader('Pragma', 'no-cache')
->redirect($protocol . '://' . $domain . '/v1/account/sessions/oauth2/' . $provider . '/redirect?'
. \http_build_query([
'project' => $projectId,
'code' => $code,
'state' => $state,
'error' => $error,
'error_description' => $error_description
]));
. \http_build_query($params));
});
App::post('/v1/account/sessions/oauth2/callback/:provider/:projectId')
@@ -1103,17 +1101,15 @@ App::post('/v1/account/sessions/oauth2/callback/:provider/:projectId')
$domain = $request->getHostname();
$protocol = $request->getProtocol();
$params = $request->getParams();
$params['project'] = $projectId;
unset($params['projectId']);
$response
->addHeader('Cache-Control', 'no-store, no-cache, must-revalidate, max-age=0')
->addHeader('Pragma', 'no-cache')
->redirect($protocol . '://' . $domain . '/v1/account/sessions/oauth2/' . $provider . '/redirect?'
. \http_build_query([
'project' => $projectId,
'code' => $code,
'state' => $state,
'error' => $error,
'error_description' => $error_description
]));
. \http_build_query($params));
});
App::get('/v1/account/sessions/oauth2/:provider/redirect')
@@ -1240,7 +1236,17 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
$failureRedirect(Exception::USER_MISSING_ID);
}
$name = $oauth2->getUserName($accessToken);
$name = '';
$nameOAuth = $oauth2->getUserName($accessToken);
$userParam = \json_decode($request->getParam('user'), true);
if (!empty($nameOAuth)) {
$name = $nameOAuth;
} elseif (is_array($userParam)) {
$nameParam = $userParam['name'];
if (is_array($nameParam) && isset($nameParam['firstName']) && isset($nameParam['lastName'])) {
$name = $nameParam['firstName'] . ' ' . $nameParam['lastName'];
}
}
$email = $oauth2->getUserEmail($accessToken);
// Check if this identity is connected to a different user
@@ -1500,7 +1506,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
'secret' => Auth::hash($secret), // One way hash encryption to protect DB leak
'userAgent' => $request->getUserAgent('UNKNOWN'),
'ip' => $request->getIP(),
'factors' => ['email'],
'factors' => [TYPE::EMAIL, 'oauth2'], // include a special oauth2 factor to bypass MFA checks
'countryCode' => ($record) ? \strtolower($record['country']['iso_code']) : '--',
'expire' => DateTime::addSeconds(new \DateTime(), $duration)
], $detector->getOS(), $detector->getClient(), $detector->getDevice()));
@@ -1544,7 +1550,7 @@ App::get('/v1/account/sessions/oauth2/:provider/redirect')
$target
->setAttribute('sessionId', $session->getId())
->setAttrubte('sessionInternalId', $session->getInternalId());
->setAttribute('sessionInternalId', $session->getInternalId());
$dbForProject->updateDocument('targets', $target->getId(), $target);
}
@@ -1857,15 +1863,16 @@ App::post('/v1/account/tokens/magic-url')
->setRecipient($email)
->trigger();
$queueForEvents->setPayload(
$response->output(
$token->setAttribute('secret', $tokenSecret),
Response::MODEL_TOKEN
)
);
// Set to unhashed secret for events and server responses
$token->setAttribute('secret', $tokenSecret);
$queueForEvents
->setPayload($response->output($token, Response::MODEL_TOKEN), sensitive: ['secret']);
// Hide secret for clients
$token->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $tokenSecret : '');
if (!$isPrivilegedUser && !$isAppUser) {
$token->setAttribute('secret', '');
}
if (!empty($phrase)) {
$token->setAttribute('phrase', $phrase);
@@ -1873,8 +1880,7 @@ App::post('/v1/account/tokens/magic-url')
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($token, Response::MODEL_TOKEN)
;
->dynamic($token, Response::MODEL_TOKEN);
});
App::post('/v1/account/tokens/email')
@@ -2086,15 +2092,16 @@ App::post('/v1/account/tokens/email')
->setRecipient($email)
->trigger();
$queueForEvents->setPayload(
$response->output(
$token->setAttribute('secret', $tokenSecret),
Response::MODEL_TOKEN
)
);
// Set to unhashed secret for events and server responses
$token->setAttribute('secret', $tokenSecret);
$queueForEvents
->setPayload($response->output($token, Response::MODEL_TOKEN), sensitive: ['secret']);
// Hide secret for clients
$token->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $tokenSecret : '');
if (!$isPrivilegedUser && !$isAppUser) {
$token->setAttribute('secret', '');
}
if (!empty($phrase)) {
$token->setAttribute('phrase', $phrase);
@@ -2102,8 +2109,7 @@ App::post('/v1/account/tokens/email')
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($token, Response::MODEL_TOKEN)
;
->dynamic($token, Response::MODEL_TOKEN);
});
App::put('/v1/account/sessions/magic-url')
@@ -2320,20 +2326,18 @@ App::post('/v1/account/tokens/phone')
->setRecipients([$phone])
->setProviderType(MESSAGE_TYPE_SMS);
$queueForEvents->setPayload(
$response->output(
$token->setAttribute('secret', $secret),
Response::MODEL_TOKEN
)
);
// Set to unhashed secret for events and server responses
$token->setAttribute('secret', $secret);
$queueForEvents
->setPayload($response->output($token, Response::MODEL_TOKEN), sensitive: ['secret']);
// Hide secret for clients
$token->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? Auth::encodeSession($user->getId(), $secret) : '');
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($token, Response::MODEL_TOKEN)
;
->dynamic($token, Response::MODEL_TOKEN);
});
App::post('/v1/account/jwt')
@@ -2520,6 +2524,7 @@ App::patch('/v1/account/password')
->label('sdk.response.model', Response::MODEL_USER)
->label('sdk.offline.model', '/account')
->label('sdk.offline.key', 'current')
->label('abuse-limit', 10)
->param('password', '', fn ($project, $passwordsDictionary) => new PasswordDictionary($passwordsDictionary, $project->getAttribute('auths', [])['passwordDictionary'] ?? false), 'New user password. Must be at least 8 chars.', false, ['project', 'passwordsDictionary'])
->param('oldPassword', '', new Password(), 'Current user password. Must be at least 8 chars.', true)
->inject('requestTimestamp')
@@ -2617,7 +2622,7 @@ App::patch('/v1/account/email')
// Makes sure this email is not already used in another identity
$identityWithMatchingEmail = $dbForProject->findOne('identities', [
Query::equal('providerEmail', [$email]),
Query::notEqual('userId', $user->getId()),
Query::notEqual('userInternalId', $user->getInternalId()),
]);
if ($identityWithMatchingEmail !== false && !$identityWithMatchingEmail->isEmpty()) {
throw new Exception(Exception::GENERAL_BAD_REQUEST); /** Return a generic bad request to prevent exposing existing accounts */
@@ -2981,18 +2986,19 @@ App::post('/v1/account/recovery')
->setSubject($subject)
->trigger();
// Set to unhashed secret for events and server responses
$recovery->setAttribute('secret', $secret);
$queueForEvents
->setParam('userId', $profile->getId())
->setParam('tokenId', $recovery->getId())
->setUser($profile)
->setPayload($response->output(
$recovery->setAttribute('secret', $secret),
Response::MODEL_TOKEN
))
;
->setPayload($response->output($recovery, Response::MODEL_TOKEN), sensitive: ['secret']);
// Hide secret for clients
$recovery->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $secret : '');
if (!$isPrivilegedUser && !$isAppUser) {
$recovery->setAttribute('secret', '');
}
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
@@ -3163,6 +3169,7 @@ App::post('/v1/account/verification')
->setParam('{{footer}}', $locale->getText("emails.verification.footer"))
->setParam('{{thanks}}', $locale->getText("emails.verification.thanks"))
->setParam('{{signature}}', $locale->getText("emails.verification.signature"));
$body = $message->render();
$smtp = $project->getAttribute('smtp', []);
@@ -3229,16 +3236,18 @@ App::post('/v1/account/verification')
->setName($user->getAttribute('name') ?? '')
->trigger();
// Set to unhashed secret for events and server responses
$verification->setAttribute('secret', $verificationSecret);
$queueForEvents
->setParam('userId', $user->getId())
->setParam('tokenId', $verification->getId())
->setPayload($response->output(
$verification->setAttribute('secret', $verificationSecret),
Response::MODEL_TOKEN
));
->setPayload($response->output($verification, Response::MODEL_TOKEN), sensitive: ['secret']);
// Hide secret for clients
$verification->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $verificationSecret : '');
if (!$isPrivilegedUser && !$isAppUser) {
$verification->setAttribute('secret', '');
}
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
@@ -3288,7 +3297,7 @@ App::put('/v1/account/verification')
$user->setAttributes($profile->getArrayCopy());
$verificationDocument = $dbForProject->getDocument('tokens', $verifiedToken->getId());
$verification = $dbForProject->getDocument('tokens', $verifiedToken->getId());
/**
* We act like we're updating and validating
@@ -3299,10 +3308,9 @@ App::put('/v1/account/verification')
$queueForEvents
->setParam('userId', $userId)
->setParam('tokenId', $verificationDocument->getId())
;
->setParam('tokenId', $verification->getId());
$response->dynamic($verificationDocument, Response::MODEL_TOKEN);
$response->dynamic($verification, Response::MODEL_TOKEN);
});
App::post('/v1/account/verification/phone')
@@ -3400,17 +3408,18 @@ App::post('/v1/account/verification/phone')
->setRecipients([$user->getAttribute('phone')])
->setProviderType(MESSAGE_TYPE_SMS);
// Set to unhashed secret for events and server responses
$verification->setAttribute('secret', $secret);
$queueForEvents
->setParam('userId', $user->getId())
->setParam('tokenId', $verification->getId())
->setPayload($response->output(
$verification->setAttribute('secret', $secret),
Response::MODEL_TOKEN
))
;
->setPayload($response->output($verification, Response::MODEL_TOKEN), sensitive: ['secret']);
// Hide secret for clients
$verification->setAttribute('secret', ($isPrivilegedUser || $isAppUser) ? $secret : '');
if (!$isPrivilegedUser && !$isAppUser) {
$verification->setAttribute('secret', '');
}
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
@@ -3496,14 +3505,33 @@ App::patch('/v1/account/mfa')
->inject('requestTimestamp')
->inject('response')
->inject('user')
->inject('session')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (bool $mfa, ?\DateTime $requestTimestamp, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
->action(function (bool $mfa, ?\DateTime $requestTimestamp, Response $response, Document $user, Document $session, Database $dbForProject, Event $queueForEvents) {
$user->setAttribute('mfa', $mfa);
$user = $dbForProject->withRequestTimestamp($requestTimestamp, fn () => $dbForProject->updateDocument('users', $user->getId(), $user));
if ($mfa) {
$factors = $session->getAttribute('factors', []);
$totp = TOTP::getAuthenticatorFromUser($user);
if ($totp !== null && $totp->getAttribute('verified', false)) {
$factors[] = Type::TOTP;
}
if ($user->getAttribute('email', false) && $user->getAttribute('emailVerification', false)) {
$factors[] = Type::EMAIL;
}
if ($user->getAttribute('phone', false) && $user->getAttribute('phoneVerification', false)) {
$factors[] = Type::PHONE;
}
$factors = \array_unique($factors);
$session->setAttribute('factors', $factors);
$dbForProject->updateDocument('sessions', $session->getId(), $session);
}
$queueForEvents->setParam('userId', $user->getId());
$response->dynamic($user, Response::MODEL_ACCOUNT);
@@ -3634,10 +3662,10 @@ App::put('/v1/account/mfa/authenticators/:type')
->param('otp', '', new Text(256), 'Valid verification token.')
->inject('response')
->inject('user')
->inject('project')
->inject('session')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $type, string $otp, Response $response, Document $user, Document $project, Database $dbForProject, Event $queueForEvents) {
->action(function (string $type, string $otp, Response $response, Document $user, Document $session, Database $dbForProject, Event $queueForEvents) {
$authenticator = (match ($type) {
Type::TOTP => TOTP::getAuthenticatorFromUser($user),
@@ -3666,10 +3694,12 @@ App::put('/v1/account/mfa/authenticators/:type')
$dbForProject->updateDocument('authenticators', $authenticator->getId(), $authenticator);
$dbForProject->purgeCachedDocument('users', $user->getId());
$authDuration = $project->getAttribute('auths', [])['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG;
$sessionId = Auth::sessionVerify($user->getAttribute('sessions', []), Auth::$secret, $authDuration);
$session = $dbForProject->getDocument('sessions', $sessionId);
$dbForProject->updateDocument('sessions', $sessionId, $session->setAttribute('factors', $type, Document::SET_TYPE_APPEND));
$factors = $session->getAttribute('factors', []);
$factors[] = $type;
$factors = \array_unique($factors);
$session->setAttribute('factors', $factors);
$dbForProject->updateDocument('sessions', $session->getId(), $session);
$queueForEvents->setParam('userId', $user->getId());
@@ -4058,9 +4088,10 @@ App::put('/v1/account/mfa/challenge')
->inject('project')
->inject('response')
->inject('user')
->inject('session')
->inject('dbForProject')
->inject('queueForEvents')
->action(function (string $challengeId, string $otp, Document $project, Response $response, Document $user, Database $dbForProject, Event $queueForEvents) {
->action(function (string $challengeId, string $otp, Document $project, Response $response, Document $user, Document $session, Database $dbForProject, Event $queueForEvents) {
$challenge = $dbForProject->getDocument('challenges', $challengeId);
@@ -4106,15 +4137,15 @@ App::put('/v1/account/mfa/challenge')
$dbForProject->deleteDocument('challenges', $challengeId);
$dbForProject->purgeCachedDocument('users', $user->getId());
$authDuration = $project->getAttribute('auths', [])['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG;
$sessionId = Auth::sessionVerify($user->getAttribute('sessions', []), Auth::$secret, $authDuration);
$session = $dbForProject->getDocument('sessions', $sessionId);
$factors = $session->getAttribute('factors', []);
$factors[] = $type;
$factors = \array_unique($factors);
$session = $session
->setAttribute('factors', $type, Document::SET_TYPE_APPEND)
$session
->setAttribute('factors', $factors)
->setAttribute('mfaUpdatedAt', DateTime::now());
$dbForProject->updateDocument('sessions', $sessionId, $session);
$dbForProject->updateDocument('sessions', $session->getId(), $session);
$queueForEvents
->setParam('userId', $user->getId())
+42 -65
View File
@@ -6,7 +6,6 @@ use Appwrite\Utopia\Response;
use chillerlan\QRCode\QRCode;
use chillerlan\QRCode\QROptions;
use Utopia\App;
use Utopia\CLI\Console;
use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\DateTime;
@@ -14,8 +13,8 @@ use Utopia\Database\Document;
use Utopia\Database\Validator\Authorization;
use Utopia\Database\Validator\UID;
use Utopia\Domains\Domain;
use Utopia\Fetch\Client;
use Utopia\Image\Image;
use Utopia\Logger\Log;
use Utopia\Logger\Logger;
use Utopia\System\System;
use Utopia\Validator\Boolean;
@@ -155,40 +154,8 @@ $getUserGitHub = function (string $userId, Document $project, Database $dbForPro
'id' => $githubId
];
} catch (Exception $error) {
if ($logger) {
$version = System::getEnv('_APP_VERSION', 'UNKNOWN');
$log = new Log();
$log->setNamespace('console');
$log->setServer(\gethostname());
$log->setVersion($version);
$log->setType(Log::TYPE_ERROR);
$log->setMessage($error->getMessage());
$log->addTag('code', $error->getCode());
$log->addTag('verboseType', get_class($error));
$log->addExtra('file', $error->getFile());
$log->addExtra('line', $error->getLine());
$log->addExtra('trace', $error->getTraceAsString());
$log->addExtra('detailedTrace', $error->getTrace());
$log->setAction('avatarsGetGitHub');
$isProduction = System::getEnv('_APP_ENV', 'development') === 'production';
$log->setEnvironment($isProduction ? Log::ENVIRONMENT_PRODUCTION : Log::ENVIRONMENT_STAGING);
$responseCode = $logger->addLog($log);
Console::info('GitHub error log pushed with status code: ' . $responseCode);
}
Console::warning("Failed: {$error->getMessage()}");
Console::warning($error->getTraceAsString());
return [];
}
return [];
};
App::get('/v1/avatars/credit-cards/:code')
@@ -284,14 +251,21 @@ App::get('/v1/avatars/image')
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
$fetch = @\file_get_contents($url);
$client = new Client();
try {
$res = $client
->setAllowRedirects(false)
->fetch($url);
} catch (\Throwable) {
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
if (!$fetch) {
if ($res->getStatusCode() !== 200) {
throw new Exception(Exception::AVATAR_IMAGE_NOT_FOUND);
}
try {
$image = new Image($fetch);
$image = new Image($res->getBody());
} catch (\Throwable $exception) {
throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Unable to parse image');
}
@@ -340,31 +314,27 @@ App::get('/v1/avatars/favicon')
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
$curl = \curl_init();
$client = new Client();
try {
$res = $client
->setAllowRedirects(false)
->setUserAgent(\sprintf(
APP_USERAGENT,
System::getEnv('_APP_VERSION', 'UNKNOWN'),
System::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS', APP_EMAIL_SECURITY)
))
->fetch($url);
} catch (\Throwable) {
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
\curl_setopt_array($curl, [
CURLOPT_RETURNTRANSFER => 1,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_MAXREDIRS => 3,
CURLOPT_URL => $url,
CURLOPT_USERAGENT => \sprintf(
APP_USERAGENT,
System::getEnv('_APP_VERSION', 'UNKNOWN'),
System::getEnv('_APP_SYSTEM_SECURITY_EMAIL_ADDRESS', APP_EMAIL_SECURITY)
),
]);
$html = \curl_exec($curl);
\curl_close($curl);
if (!$html) {
if ($res->getStatusCode() !== 200) {
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
$doc = new DOMDocument();
$doc->strictErrorChecking = false;
@$doc->loadHTML($html);
@$doc->loadHTML($res->getBody());
$links = $doc->getElementsByTagName('link');
$outputHref = '';
@@ -419,9 +389,22 @@ App::get('/v1/avatars/favicon')
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
if ('ico' == $outputExt) { // Skip crop, Imagick isn\'t supporting icon files
$data = @\file_get_contents($outputHref, false);
$client = new Client();
try {
$res = $client
->setAllowRedirects(false)
->fetch($outputHref);
} catch (\Throwable) {
throw new Exception(Exception::AVATAR_REMOTE_URL_FAILED);
}
if ($res->getStatusCode() !== 200) {
throw new Exception(Exception::AVATAR_ICON_NOT_FOUND);
}
$data = $res->getBody();
if ('ico' == $outputExt) { // Skip crop, Imagick isn\'t supporting icon files
if (empty($data) || (\mb_substr($data, 0, 5) === '<html') || \mb_substr($data, 0, 5) === '<!doc') {
throw new Exception(Exception::AVATAR_ICON_NOT_FOUND, 'Favicon not found');
}
@@ -431,13 +414,7 @@ App::get('/v1/avatars/favicon')
->file($data);
}
$fetch = @\file_get_contents($outputHref, false);
if (!$fetch) {
throw new Exception(Exception::AVATAR_ICON_NOT_FOUND);
}
$image = new Image($fetch);
$image = new Image($data);
$image->crop((int) $width, (int) $height);
$output = (empty($output)) ? $type : $output;
$data = $image->output($output, $quality);
+23 -34
View File
@@ -24,7 +24,6 @@ use Utopia\Database\Exception\Authorization as AuthorizationException;
use Utopia\Database\Exception\Conflict as ConflictException;
use Utopia\Database\Exception\Duplicate as DuplicateException;
use Utopia\Database\Exception\Limit as LimitException;
use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Exception\Restricted as RestrictedException;
use Utopia\Database\Exception\Structure as StructureException;
use Utopia\Database\Helpers\ID;
@@ -666,16 +665,10 @@ App::put('/v1/databases/:databaseId')
throw new Exception(Exception::DATABASE_NOT_FOUND);
}
try {
$database = $dbForProject->updateDocument('databases', $databaseId, $database
->setAttribute('name', $name)
->setAttribute('enabled', $enabled)
->setAttribute('search', implode(' ', [$databaseId, $name])));
} catch (AuthorizationException) {
throw new Exception(Exception::USER_UNAUTHORIZED);
} catch (StructureException $exception) {
throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, 'Bad structure. ' . $exception->getMessage());
}
$database = $dbForProject->updateDocument('databases', $databaseId, $database
->setAttribute('name', $name)
->setAttribute('enabled', $enabled)
->setAttribute('search', implode(' ', [$databaseId, $name])));
$queueForEvents->setParam('databaseId', $database->getId());
@@ -1036,19 +1029,14 @@ App::put('/v1/databases/:databaseId/collections/:collectionId')
$enabled ??= $collection->getAttribute('enabled', true);
try {
$collection = $dbForProject->updateDocument('database_' . $database->getInternalId(), $collectionId, $collection
->setAttribute('name', $name)
->setAttribute('$permissions', $permissions)
->setAttribute('documentSecurity', $documentSecurity)
->setAttribute('enabled', $enabled)
->setAttribute('search', implode(' ', [$collectionId, $name])));
$dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $permissions, $documentSecurity);
} catch (AuthorizationException) {
throw new Exception(Exception::USER_UNAUTHORIZED);
} catch (StructureException $exception) {
throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, 'Bad structure. ' . $exception->getMessage());
}
$collection = $dbForProject->updateDocument('database_' . $database->getInternalId(), $collectionId, $collection
->setAttribute('name', $name)
->setAttribute('$permissions', $permissions)
->setAttribute('documentSecurity', $documentSecurity)
->setAttribute('enabled', $enabled)
->setAttribute('search', implode(' ', [$collectionId, $name])));
$dbForProject->updateCollection('database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(), $permissions, $documentSecurity);
$queueForEvents
->setContext('database', $database)
@@ -2322,7 +2310,14 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/attributes/:key
$attribute = $dbForProject->updateDocument('attributes', $attribute->getId(), $attribute->setAttribute('status', 'deleting'));
}
var_dump("purgeCachedDocument");
var_dump('database_' . $db->getInternalId());
var_dump($collectionId);
$dbForProject->purgeCachedDocument('database_' . $db->getInternalId(), $collectionId);
var_dump("purgeCachedCollection");
var_dump('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId());
$dbForProject->purgeCachedCollection('database_' . $db->getInternalId() . '_collection_' . $collection->getInternalId());
if ($attribute->getAttribute('type') === Database::VAR_RELATIONSHIP) {
@@ -3599,16 +3594,10 @@ App::delete('/v1/databases/:databaseId/collections/:collectionId/documents/:docu
}
$dbForProject->withRequestTimestamp($requestTimestamp, function () use ($dbForProject, $database, $collection, $documentId) {
try {
$dbForProject->deleteDocument(
'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(),
$documentId
);
} catch (AuthorizationException) {
throw new Exception(Exception::USER_UNAUTHORIZED);
} catch (RestrictedException) {
throw new Exception(Exception::DOCUMENT_DELETE_RESTRICTED);
}
$dbForProject->deleteDocument(
'database_' . $database->getInternalId() . '_collection_' . $collection->getInternalId(),
$documentId
);
});
// Add $collectionId and $databaseId for all documents
+4 -7
View File
@@ -1753,9 +1753,6 @@ App::post('/v1/functions/:functionId/executions')
Console::error($th->getMessage());
if ($th instanceof AppwriteException) {
if ($function->getAttribute('logging')) {
Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
throw $th;
}
} finally {
@@ -1765,11 +1762,11 @@ App::post('/v1/functions/:functionId/executions')
->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000)) // per project
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) // per function
;
}
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
}
$roles = Authorization::getRoles();
+1 -1
View File
@@ -852,7 +852,7 @@ App::get('/v1/health/queue/failed/:name')
Event::FUNCTIONS_QUEUE_NAME,
Event::USAGE_QUEUE_NAME,
Event::USAGE_DUMP_QUEUE_NAME,
Event::WEBHOOK_CLASS_NAME,
Event::WEBHOOK_QUEUE_NAME,
Event::CERTIFICATES_QUEUE_NAME,
Event::BUILDS_QUEUE_NAME,
Event::MESSAGING_QUEUE_NAME,
+2 -1
View File
@@ -70,7 +70,7 @@ App::get('/v1/project/usage')
'1d' => 'Y-m-d\T00:00:00.000P',
};
Authorization::skip(function () use ($dbForProject, $firstDay, $lastDay, $period, $metrics, &$total, &$stats) {
Authorization::skip(function () use ($dbForProject, $firstDay, $lastDay, $period, $metrics, $limit, &$total, &$stats) {
foreach ($metrics['total'] as $metric) {
$result = $dbForProject->findOne('stats', [
Query::equal('metric', [$metric]),
@@ -85,6 +85,7 @@ App::get('/v1/project/usage')
Query::equal('period', [$period]),
Query::greaterThanEqual('time', $firstDay),
Query::lessThan('time', $lastDay),
Query::limit($limit),
Query::orderDesc('time'),
]);
+71 -64
View File
@@ -5,11 +5,13 @@ use Appwrite\Event\Delete;
use Appwrite\Event\Mail;
use Appwrite\Event\Validator\Event;
use Appwrite\Extend\Exception;
use Appwrite\Hooks\Hooks;
use Appwrite\Network\Validator\Email;
use Appwrite\Network\Validator\Origin;
use Appwrite\Template\Template;
use Appwrite\Utopia\Database\Validator\ProjectId;
use Appwrite\Utopia\Database\Validator\Queries\Projects;
use Appwrite\Utopia\Request;
use Appwrite\Utopia\Response;
use PHPMailer\PHPMailer\PHPMailer;
use Utopia\Abuse\Adapters\TimeLimit;
@@ -28,6 +30,7 @@ use Utopia\Database\Query;
use Utopia\Database\Validator\Datetime as DatetimeValidator;
use Utopia\Database\Validator\UID;
use Utopia\Domains\Validator\PublicDomain;
use Utopia\DSN\DSN;
use Utopia\Locale\Locale;
use Utopia\Pools\Group;
use Utopia\System\System;
@@ -73,11 +76,13 @@ App::post('/v1/projects')
->param('legalCity', '', new Text(256), 'Project legal City. Max length: 256 chars.', true)
->param('legalAddress', '', new Text(256), 'Project legal Address. Max length: 256 chars.', true)
->param('legalTaxId', '', new Text(256), 'Project legal Tax ID. Max length: 256 chars.', true)
->inject('request')
->inject('response')
->inject('dbForConsole')
->inject('cache')
->inject('pools')
->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Response $response, Database $dbForConsole, Cache $cache, Group $pools) {
->inject('hooks')
->action(function (string $projectId, string $name, string $teamId, string $region, string $description, string $logo, string $url, string $legalName, string $legalCountry, string $legalState, string $legalCity, string $legalAddress, string $legalTaxId, Request $request, Response $response, Database $dbForConsole, Cache $cache, Group $pools, Hooks $hooks) {
$team = $dbForConsole->getDocument('teams', $teamId);
@@ -92,54 +97,46 @@ App::post('/v1/projects')
}
$auth = Config::getParam('auth', []);
$auths = ['limit' => 0, 'maxSessions' => APP_LIMIT_USER_SESSIONS_DEFAULT, 'passwordHistory' => 0, 'passwordDictionary' => false, 'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG, 'personalDataCheck' => false];
foreach ($auth as $index => $method) {
$auths = [
'limit' => 0,
'maxSessions' => APP_LIMIT_USER_SESSIONS_DEFAULT,
'passwordHistory' => 0,
'passwordDictionary' => false,
'duration' => Auth::TOKEN_EXPIRATION_LOGIN_LONG,
'personalDataCheck' => false
];
foreach ($auth as $method) {
$auths[$method['key'] ?? ''] = true;
}
$projectId = ($projectId == 'unique()') ? ID::unique() : $projectId;
$backups['database_db_fra1_v14x_02'] = ['from' => '03:00', 'to' => '05:00'];
$backups['database_db_fra1_v14x_03'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_04'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_05'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_06'] = ['from' => '00:00', 'to' => '02:00'];
$backups['database_db_fra1_v14x_07'] = ['from' => '00:00', 'to' => '02:00'];
$databases = Config::getParam('pools-database', []);
/**
* Remove databases from the list that are currently undergoing an backup
*/
if (count($databases) > 1) {
$now = new \DateTime();
foreach ($databases as $index => $database) {
if (empty($backups[$database])) {
continue;
}
$backup = $backups[$database];
$from = \DateTime::createFromFormat('H:i', $backup['from']);
$to = \DateTime::createFromFormat('H:i', $backup['to']);
if ($now >= $from && $now <= $to) {
unset($databases[$index]);
break;
}
}
}
$databaseOverride = System::getEnv('_APP_DATABASE_OVERRIDE', null);
$index = array_search($databaseOverride, $databases);
$databaseOverride = System::getEnv('_APP_DATABASE_OVERRIDE');
$index = \array_search($databaseOverride, $databases);
if ($index !== false) {
$database = $databases[$index];
$dsn = $databases[$index];
} else {
$database = $databases[array_rand($databases)];
$dsn = $databases[array_rand($databases)];
}
if ($projectId === 'console') {
throw new Exception(Exception::PROJECT_RESERVED_PROJECT, "'console' is a reserved project.");
}
// TODO: Temporary until all projects are using shared tables.
if ($dsn === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$schema = 'appwrite';
$database = 'appwrite';
$namespace = System::getEnv('_APP_DATABASE_SHARED_NAMESPACE', '');
$dsn = $schema . '://' . System::getEnv('_APP_DATABASE_SHARED_TABLES', '') . '?database=' . $database;
if (!empty($namespace)) {
$dsn .= '&namespace=' . $namespace;
}
}
try {
$project = $dbForConsole->createDocument('projects', new Document([
'$id' => $projectId,
@@ -171,21 +168,41 @@ App::post('/v1/projects')
'keys' => null,
'auths' => $auths,
'search' => implode(' ', [$projectId, $name]),
'database' => $database
'database' => $dsn,
]));
} catch (Duplicate $th) {
} catch (Duplicate) {
throw new Exception(Exception::PROJECT_ALREADY_EXISTS);
}
$dbForProject = new Database($pools->get($database)->pop()->getResource(), $cache);
$dbForProject->setNamespace("_{$project->getInternalId()}");
try {
$dsn = new DSN($dsn);
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $dsn);
}
$adapter = $pools->get($dsn->getHost())->pop()->getResource();
$dbForProject = new Database($adapter, $cache);
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$dbForProject
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$dbForProject
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
$dbForProject->create();
$audit = new Audit($dbForProject);
$audit->setup();
$adapter = new TimeLimit('', 0, 1, $dbForProject);
$adapter->setup();
$abuse = new TimeLimit('', 0, 1, $dbForProject);
$abuse->setup();
/** @var array $collections */
$collections = Config::getParam('collections', [])['projects'] ?? [];
@@ -195,35 +212,25 @@ App::post('/v1/projects')
continue;
}
$attributes = [];
$indexes = [];
$attributes = \array_map(function (array $attribute) {
return new Document($attribute);
}, $collection['attributes']);
foreach ($collection['attributes'] as $attribute) {
$attributes[] = new Document([
'$id' => $attribute['$id'],
'type' => $attribute['type'],
'size' => $attribute['size'],
'required' => $attribute['required'],
'signed' => $attribute['signed'],
'array' => $attribute['array'],
'filters' => $attribute['filters'],
'default' => $attribute['default'] ?? null,
'format' => $attribute['format'] ?? ''
]);
}
$indexes = \array_map(function (array $index) {
return new Document($index);
}, $collection['indexes']);
foreach ($collection['indexes'] as $index) {
$indexes[] = new Document([
'$id' => $index['$id'],
'type' => $index['type'],
'attributes' => $index['attributes'],
'lengths' => $index['lengths'],
'orders' => $index['orders'],
]);
try {
$dbForProject->createCollection($key, $attributes, $indexes);
} catch (Duplicate) {
// Collection already exists
}
$dbForProject->createCollection($key, $attributes, $indexes);
}
// Hook allowing instant project mirroring during migration
// Outside of migration, hook is not registered and has no effect
$hooks->trigger('afterProjectCreation', [ $project, $pools, $cache ]);
$response
->setStatusCode(Response::STATUS_CODE_CREATED)
->dynamic($project, Response::MODEL_PROJECT);
+84 -111
View File
@@ -16,11 +16,8 @@ use Utopia\App;
use Utopia\Config\Config;
use Utopia\Database\Database;
use Utopia\Database\Document;
use Utopia\Database\Exception\Authorization as AuthorizationException;
use Utopia\Database\Exception\Duplicate;
use Utopia\Database\Exception\Duplicate as DuplicateException;
use Utopia\Database\Exception\Query as QueryException;
use Utopia\Database\Exception\Structure as StructureException;
use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Permission;
use Utopia\Database\Helpers\Role;
@@ -66,7 +63,7 @@ App::post('/v1/storage/buckets')
->param('permissions', null, new Permissions(APP_LIMIT_ARRAY_PARAMS_SIZE), 'An array of permission strings. By default, no user is granted with any permissions. [Learn more about permissions](https://appwrite.io/docs/permissions).', true)
->param('fileSecurity', false, new Boolean(true), 'Enables configuring permissions for individual file. A user needs one of file or bucket level permissions to access a file. [Learn more about permissions](https://appwrite.io/docs/permissions).', true)
->param('enabled', true, new Boolean(true), 'Is bucket enabled? When set to \'disabled\', users cannot access the files in this bucket but Server SDKs with and API key can still access the bucket. No files are lost when this is toggled.', true)
->param('maximumFileSize', (int) System::getEnv('_APP_STORAGE_LIMIT', 0), new Range(1, (int) System::getEnv('_APP_STORAGE_LIMIT', 0)), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true)
->param('maximumFileSize', fn (array $plan) => empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1024 * 1024, fn (array $plan) => new Range(1, empty($plan['fileSize']) ? (int) System::getEnv('_APP_STORAGE_LIMIT', 0) : $plan['fileSize'] * 1024 * 1024 * 1024), 'Maximum file size allowed in bytes. Maximum allowed value is ' . Storage::human(System::getEnv('_APP_STORAGE_LIMIT', 0), 0) . '.', true, ['plan'])
->param('allowedFileExtensions', [], new ArrayList(new Text(64), APP_LIMIT_ARRAY_PARAMS_SIZE), 'Allowed file extensions. Maximum of ' . APP_LIMIT_ARRAY_PARAMS_SIZE . ' extensions are allowed, each 64 characters long.', true)
->param('compression', Compression::NONE, new WhiteList([Compression::NONE, Compression::GZIP, Compression::ZSTD]), 'Compression algorithm choosen for compression. Can be one of ' . Compression::NONE . ', [' . Compression::GZIP . '](https://en.wikipedia.org/wiki/Gzip), or [' . Compression::ZSTD . '](https://en.wikipedia.org/wiki/Zstd), For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' compression is skipped even if it\'s enabled', true)
->param('encryption', true, new Boolean(true), 'Is encryption enabled? For file size above ' . Storage::human(APP_STORAGE_READ_BUFFER, 0) . ' encryption is skipped even if it\'s enabled', true)
@@ -588,111 +585,95 @@ App::post('/v1/storage/buckets/:bucketId/files')
$openSSLIV = \bin2hex($iv);
}
try {
if ($file->isEmpty()) {
$doc = new Document([
'$id' => $fileId,
'$permissions' => $permissions,
'bucketId' => $bucket->getId(),
'bucketInternalId' => $bucket->getInternalId(),
'name' => $fileName,
'path' => $path,
'signature' => $fileHash,
'mimeType' => $mimeType,
'sizeOriginal' => $fileSize,
'sizeActual' => $sizeActual,
'algorithm' => $algorithm,
'comment' => '',
'chunksTotal' => $chunks,
'chunksUploaded' => $chunksUploaded,
'openSSLVersion' => $openSSLVersion,
'openSSLCipher' => $openSSLCipher,
'openSSLTag' => $openSSLTag,
'openSSLIV' => $openSSLIV,
'search' => implode(' ', [$fileId, $fileName]),
'metadata' => $metadata,
]);
if ($file->isEmpty()) {
$doc = new Document([
'$id' => $fileId,
'$permissions' => $permissions,
'bucketId' => $bucket->getId(),
'bucketInternalId' => $bucket->getInternalId(),
'name' => $fileName,
'path' => $path,
'signature' => $fileHash,
'mimeType' => $mimeType,
'sizeOriginal' => $fileSize,
'sizeActual' => $sizeActual,
'algorithm' => $algorithm,
'comment' => '',
'chunksTotal' => $chunks,
'chunksUploaded' => $chunksUploaded,
'openSSLVersion' => $openSSLVersion,
'openSSLCipher' => $openSSLCipher,
'openSSLTag' => $openSSLTag,
'openSSLIV' => $openSSLIV,
'search' => implode(' ', [$fileId, $fileName]),
'metadata' => $metadata,
]);
$file = $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc);
} else {
$file = $file
->setAttribute('$permissions', $permissions)
->setAttribute('signature', $fileHash)
->setAttribute('mimeType', $mimeType)
->setAttribute('sizeActual', $sizeActual)
->setAttribute('algorithm', $algorithm)
->setAttribute('openSSLVersion', $openSSLVersion)
->setAttribute('openSSLCipher', $openSSLCipher)
->setAttribute('openSSLTag', $openSSLTag)
->setAttribute('openSSLIV', $openSSLIV)
->setAttribute('metadata', $metadata)
->setAttribute('chunksUploaded', $chunksUploaded);
$file = $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc);
} else {
$file = $file
->setAttribute('$permissions', $permissions)
->setAttribute('signature', $fileHash)
->setAttribute('mimeType', $mimeType)
->setAttribute('sizeActual', $sizeActual)
->setAttribute('algorithm', $algorithm)
->setAttribute('openSSLVersion', $openSSLVersion)
->setAttribute('openSSLCipher', $openSSLCipher)
->setAttribute('openSSLTag', $openSSLTag)
->setAttribute('openSSLIV', $openSSLIV)
->setAttribute('metadata', $metadata)
->setAttribute('chunksUploaded', $chunksUploaded);
/**
* Validate create permission and skip authorization in updateDocument
* Without this, the file creation will fail when user doesn't have update permission
* However as with chunk upload even if we are updating, we are essentially creating a file
* adding it's new chunk so we validate create permission instead of update
*/
$validator = new Authorization(Database::PERMISSION_CREATE);
if (!$validator->isValid($bucket->getCreate())) {
throw new Exception(Exception::USER_UNAUTHORIZED);
}
$file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file));
/**
* Validate create permission and skip authorization in updateDocument
* Without this, the file creation will fail when user doesn't have update permission
* However as with chunk upload even if we are updating, we are essentially creating a file
* adding it's new chunk so we validate create permission instead of update
*/
$validator = new Authorization(Database::PERMISSION_CREATE);
if (!$validator->isValid($bucket->getCreate())) {
throw new Exception(Exception::USER_UNAUTHORIZED);
}
} catch (AuthorizationException) {
throw new Exception(Exception::USER_UNAUTHORIZED);
} catch (StructureException $exception) {
throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $exception->getMessage());
} catch (DuplicateException) {
throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS);
$file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file));
}
} else {
try {
if ($file->isEmpty()) {
$doc = new Document([
'$id' => ID::custom($fileId),
'$permissions' => $permissions,
'bucketId' => $bucket->getId(),
'bucketInternalId' => $bucket->getInternalId(),
'name' => $fileName,
'path' => $path,
'signature' => '',
'mimeType' => '',
'sizeOriginal' => $fileSize,
'sizeActual' => 0,
'algorithm' => '',
'comment' => '',
'chunksTotal' => $chunks,
'chunksUploaded' => $chunksUploaded,
'search' => implode(' ', [$fileId, $fileName]),
'metadata' => $metadata,
]);
if ($file->isEmpty()) {
$doc = new Document([
'$id' => ID::custom($fileId),
'$permissions' => $permissions,
'bucketId' => $bucket->getId(),
'bucketInternalId' => $bucket->getInternalId(),
'name' => $fileName,
'path' => $path,
'signature' => '',
'mimeType' => '',
'sizeOriginal' => $fileSize,
'sizeActual' => 0,
'algorithm' => '',
'comment' => '',
'chunksTotal' => $chunks,
'chunksUploaded' => $chunksUploaded,
'search' => implode(' ', [$fileId, $fileName]),
'metadata' => $metadata,
]);
$file = $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc);
} else {
$file = $file
->setAttribute('chunksUploaded', $chunksUploaded)
->setAttribute('metadata', $metadata);
$file = $dbForProject->createDocument('bucket_' . $bucket->getInternalId(), $doc);
} else {
$file = $file
->setAttribute('chunksUploaded', $chunksUploaded)
->setAttribute('metadata', $metadata);
/**
* Validate create permission and skip authorization in updateDocument
* Without this, the file creation will fail when user doesn't have update permission
* However as with chunk upload even if we are updating, we are essentially creating a file
* adding it's new chunk so we validate create permission instead of update
*/
$validator = new Authorization(Database::PERMISSION_CREATE);
if (!$validator->isValid($bucket->getCreate())) {
throw new Exception(Exception::USER_UNAUTHORIZED);
}
$file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file));
/**
* Validate create permission and skip authorization in updateDocument
* Without this, the file creation will fail when user doesn't have update permission
* However as with chunk upload even if we are updating, we are essentially creating a file
* adding it's new chunk so we validate create permission instead of update
*/
$validator = new Authorization(Database::PERMISSION_CREATE);
if (!$validator->isValid($bucket->getCreate())) {
throw new Exception(Exception::USER_UNAUTHORIZED);
}
} catch (AuthorizationException) {
throw new Exception(Exception::USER_UNAUTHORIZED);
} catch (StructureException $exception) {
throw new Exception(Exception::DOCUMENT_INVALID_STRUCTURE, $exception->getMessage());
} catch (DuplicateException) {
throw new Exception(Exception::DOCUMENT_ALREADY_EXISTS);
$file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file));
}
}
@@ -1554,11 +1535,7 @@ App::put('/v1/storage/buckets/:bucketId/files/:fileId')
}
if ($fileSecurity && !$valid) {
try {
$file = $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file);
} catch (AuthorizationException) {
throw new Exception(Exception::USER_UNAUTHORIZED);
}
$file = $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file);
} else {
$file = Authorization::skip(fn () => $dbForProject->updateDocument('bucket_' . $bucket->getInternalId(), $fileId, $file));
}
@@ -1643,11 +1620,7 @@ App::delete('/v1/storage/buckets/:bucketId/files/:fileId')
;
if ($fileSecurity && !$valid) {
try {
$deleted = $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId);
} catch (AuthorizationException) {
throw new Exception(Exception::USER_UNAUTHORIZED);
}
$deleted = $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId);
} else {
$deleted = Authorization::skip(fn () => $dbForProject->deleteDocument('bucket_' . $bucket->getInternalId(), $fileId));
}
+1 -1
View File
@@ -102,7 +102,7 @@ $createGitDeployments = function (GitHub $github, string $providerInstallationId
$latestCommentId = '';
if (!empty($providerPullRequestId)) {
if (!empty($providerPullRequestId) && $function->getAttribute('providerSilentMode', false) === false) {
$latestComment = Authorization::skip(fn () => $dbForConsole->findOne('vcsComments', [
Query::equal('providerRepositoryId', [$providerRepositoryId]),
Query::equal('providerPullRequestId', [$providerPullRequestId]),
+186 -61
View File
@@ -2,6 +2,7 @@
require_once __DIR__ . '/../init.php';
use Appwrite\Auth\Auth;
use Appwrite\Event\Certificate;
use Appwrite\Event\Event;
use Appwrite\Event\Usage;
@@ -26,6 +27,7 @@ use Utopia\Database\Helpers\ID;
use Utopia\Database\Query;
use Utopia\Database\Validator\Authorization;
use Utopia\Domains\Domain;
use Utopia\DSN\DSN;
use Utopia\Locale\Locale;
use Utopia\Logger\Log;
use Utopia\Logger\Log\User;
@@ -300,9 +302,6 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
Console::error($th->getMessage());
if ($th instanceof AppwriteException) {
if ($function->getAttribute('logging')) {
Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
throw $th;
}
} finally {
@@ -312,11 +311,11 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
->addMetric(METRIC_EXECUTIONS_COMPUTE, (int)($execution->getAttribute('duration') * 1000)) // per project
->addMetric(str_replace('{functionInternalId}', $function->getInternalId(), METRIC_FUNCTION_ID_EXECUTIONS_COMPUTE), (int)($execution->getAttribute('duration') * 1000)) // per function
;
}
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
if ($function->getAttribute('logging')) {
/** @var Document $execution */
$execution = Authorization::skip(fn () => $dbForProject->createDocument('executions', $execution));
}
}
$execution->setAttribute('logs', '');
@@ -365,6 +364,31 @@ function router(App $utopia, Database $dbForConsole, callable $getProjectDB, Swo
return false;
}
/*
App::init()
->groups(['api'])
->inject('project')
->inject('mode')
->action(function (Document $project, string $mode) {
if ($mode === APP_MODE_ADMIN && $project->getId() === 'console') {
throw new AppwriteException(AppwriteException::GENERAL_BAD_REQUEST, 'Admin mode is not allowed for console project');
}
});
*/
App::init()
->groups(['database', 'functions', 'storage', 'messaging'])
->inject('project')
->inject('request')
->action(function (Document $project, Request $request) {
if ($project->getId() === 'console') {
$message = empty($request->getHeader('x-appwrite-project')) ?
'No Appwrite project was specified. Please specify your project ID when initializing your Appwrite SDK.' :
'This endpoint is not available for the console project. The Appwrite Console is a reserved project ID and cannot be used with the Appwrite SDKs and APIs. Please check if your project ID is correct.';
throw new AppwriteException(AppwriteException::GENERAL_ACCESS_FORBIDDEN, $message);
}
});
App::init()
->groups(['api', 'web'])
->inject('utopia')
@@ -402,7 +426,9 @@ App::init()
Request::setRoute($route);
if ($route === null) {
return $response->setStatusCode(404)->send('Not Found');
return $response
->setStatusCode(404)
->send('Not Found');
}
$requestFormat = $request->getHeader('x-appwrite-response-format', System::getEnv('_APP_SYSTEM_RESPONSE_FORMAT', ''));
@@ -529,6 +555,9 @@ App::init()
if (version_compare($responseFormat, '1.5.0', '<')) {
$response->addFilter(new ResponseV17());
}
if (version_compare($responseFormat, APP_VERSION_STABLE, '>')) {
$response->addHeader('X-Appwrite-Warning', "The current SDK is built for Appwrite " . $responseFormat . ". However, the current Appwrite server version is ". APP_VERSION_STABLE . ". Please downgrade your SDK to match the Appwrite version: https://appwrite.io/docs/sdks");
}
}
/*
@@ -621,9 +650,71 @@ App::error()
->inject('project')
->inject('logger')
->inject('log')
->action(function (Throwable $error, App $utopia, Request $request, Response $response, Document $project, ?Logger $logger, Log $log) {
->inject('queueForUsage')
->action(function (Throwable $error, App $utopia, Request $request, Response $response, Document $project, ?Logger $logger, Log $log, Usage $queueForUsage) {
$version = System::getEnv('_APP_VERSION', 'UNKNOWN');
$route = $utopia->getRoute();
$class = \get_class($error);
$code = $error->getCode();
$message = $error->getMessage();
$file = $error->getFile();
$line = $error->getLine();
$trace = $error->getTrace();
if (php_sapi_name() === 'cli') {
Console::error('[Error] Timestamp: ' . date('c', time()));
if ($route) {
Console::error('[Error] Method: ' . $route->getMethod());
Console::error('[Error] URL: ' . $route->getPath());
}
Console::error('[Error] Type: ' . get_class($error));
Console::error('[Error] Message: ' . $message);
Console::error('[Error] File: ' . $file);
Console::error('[Error] Line: ' . $line);
}
switch ($class) {
case 'Utopia\Exception':
$error = new AppwriteException(AppwriteException::GENERAL_UNKNOWN, $message, $code, $error);
switch ($code) {
case 400:
$error->setType(AppwriteException::GENERAL_ARGUMENT_INVALID);
break;
case 404:
$error->setType(AppwriteException::GENERAL_ROUTE_NOT_FOUND);
break;
}
break;
case 'Utopia\Database\Exception\Conflict':
$error = new AppwriteException(AppwriteException::DOCUMENT_UPDATE_CONFLICT, previous: $error);
break;
case 'Utopia\Database\Exception\Timeout':
$error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error);
break;
case 'Utopia\Database\Exception\Query':
$error = new AppwriteException(AppwriteException::GENERAL_QUERY_INVALID, $error->getMessage(), previous: $error);
break;
case 'Utopia\Database\Exception\Structure':
$error = new AppwriteException(AppwriteException::DOCUMENT_INVALID_STRUCTURE, $error->getMessage(), previous: $error);
break;
case 'Utopia\Database\Exception\Duplicate':
$error = new AppwriteException(AppwriteException::DOCUMENT_ALREADY_EXISTS);
break;
case 'Utopia\Database\Exception\Restricted':
$error = new AppwriteException(AppwriteException::DOCUMENT_DELETE_RESTRICTED);
break;
case 'Utopia\Database\Exception\Authorization':
$error = new AppwriteException(AppwriteException::USER_UNAUTHORIZED);
break;
case 'Utopia\Database\Exception\Relationship':
$error = new AppwriteException(AppwriteException::RELATIONSHIP_VALUE_INVALID, $error->getMessage(), previous: $error);
break;
}
$code = $error->getCode();
$message = $error->getMessage();
if ($error instanceof AppwriteException) {
$publish = $error->isPublishable();
@@ -631,11 +722,49 @@ App::error()
$publish = $error->getCode() === 0 || $error->getCode() >= 500;
}
if ($logger && ($publish || $error->getCode() === 0)) {
if ($error->getCode() >= 400 && $error->getCode() < 500) {
// Register error logger
$providerName = System::getEnv('_APP_EXPERIMENT_LOGGING_PROVIDER', '');
$providerConfig = System::getEnv('_APP_EXPERIMENT_LOGGING_CONFIG', '');
if (!(empty($providerName) || empty($providerConfig))) {
if (!Logger::hasProvider($providerName)) {
throw new Exception("Logging provider not supported. Logging is disabled");
}
$classname = '\\Utopia\\Logger\\Adapter\\' . \ucfirst($providerName);
$adapter = new $classname($providerConfig);
$logger = new Logger($adapter);
$logger->setSample(0.04);
$publish = true;
}
}
if ($publish && $project->getId() !== 'console') {
if (!Auth::isPrivilegedUser(Authorization::getRoles())) {
$fileSize = 0;
$file = $request->getFiles('file');
if (!empty($file)) {
$fileSize = (\is_array($file['size']) && isset($file['size'][0])) ? $file['size'][0] : $file['size'];
}
$queueForUsage
->addMetric(METRIC_NETWORK_REQUESTS, 1)
->addMetric(METRIC_NETWORK_INBOUND, $request->getSize() + $fileSize)
->addMetric(METRIC_NETWORK_OUTBOUND, $response->getSize());
}
$queueForUsage
->setProject($project)
->trigger();
}
if ($logger && $publish) {
try {
/** @var Utopia\Database\Document $user */
$user = $utopia->getResource('user');
} catch (\Throwable $th) {
} catch (\Throwable) {
// All good, user is optional information for logger
}
@@ -643,13 +772,20 @@ App::error()
$log->setUser(new User($user->getId()));
}
try {
$dsn = new DSN($project->getAttribute('database', 'console'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database', 'console'));
}
$log->setNamespace("http");
$log->setServer(\gethostname());
$log->setVersion($version);
$log->setType(Log::TYPE_ERROR);
$log->setMessage($error->getMessage());
$log->addTag('database', $project->getAttribute('database', 'console'));
$log->addTag('database', $dsn->getHost());
$log->addTag('method', $route->getMethod());
$log->addTag('url', $route->getPath());
$log->addTag('verboseType', get_class($error));
@@ -674,47 +810,6 @@ App::error()
Console::info('Log pushed with status code: ' . $responseCode);
}
$code = $error->getCode();
$message = $error->getMessage();
$file = $error->getFile();
$line = $error->getLine();
$trace = $error->getTrace();
if (php_sapi_name() === 'cli') {
Console::error('[Error] Timestamp: ' . date('c', time()));
if ($route) {
Console::error('[Error] Method: ' . $route->getMethod());
Console::error('[Error] URL: ' . $route->getPath());
}
Console::error('[Error] Type: ' . get_class($error));
Console::error('[Error] Message: ' . $message);
Console::error('[Error] File: ' . $file);
Console::error('[Error] Line: ' . $line);
}
/** Handle Utopia Errors */
if ($error instanceof Utopia\Exception) {
$error = new AppwriteException(AppwriteException::GENERAL_UNKNOWN, $message, $code, $error);
switch ($code) {
case 400:
$error->setType(AppwriteException::GENERAL_ARGUMENT_INVALID);
break;
case 404:
$error->setType(AppwriteException::GENERAL_ROUTE_NOT_FOUND);
break;
}
} elseif ($error instanceof Utopia\Database\Exception\Conflict) {
$error = new AppwriteException(AppwriteException::DOCUMENT_UPDATE_CONFLICT, previous: $error);
$code = $error->getCode();
$message = $error->getMessage();
} elseif ($error instanceof Utopia\Database\Exception\Timeout) {
$error = new AppwriteException(AppwriteException::DATABASE_TIMEOUT, previous: $error);
$code = $error->getCode();
$message = $error->getMessage();
}
/** Wrap all exceptions inside Appwrite\Extend\Exception */
if (!($error instanceof AppwriteException)) {
$error = new AppwriteException(AppwriteException::GENERAL_UNKNOWN, $message, $code, $error);
@@ -750,12 +845,12 @@ App::error()
'file' => $file,
'line' => $line,
'trace' => \json_encode($trace, JSON_UNESCAPED_UNICODE) === false ? [] : $trace, // check for failing encode
'version' => $version,
'version' => APP_VERSION_STABLE,
'type' => $type,
] : [
'message' => $message,
'code' => $code,
'version' => $version,
'version' => APP_VERSION_STABLE,
'type' => $type,
];
@@ -793,20 +888,50 @@ App::get('/robots.txt')
->desc('Robots.txt File')
->label('scope', 'public')
->label('docs', false)
->inject('utopia')
->inject('swooleRequest')
->inject('request')
->inject('response')
->action(function (Response $response) {
$template = new View(__DIR__ . '/../views/general/robots.phtml');
$response->text($template->render(false));
->inject('dbForConsole')
->inject('getProjectDB')
->inject('queueForEvents')
->inject('queueForUsage')
->inject('geodb')
->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Database $dbForConsole, callable $getProjectDB, Event $queueForEvents, Usage $queueForUsage, Reader $geodb) {
$host = $request->getHostname() ?? '';
$mainDomain = System::getEnv('_APP_DOMAIN', '');
if ($host === $mainDomain) {
$template = new View(__DIR__ . '/../views/general/robots.phtml');
$response->text($template->render(false));
} else {
router($utopia, $dbForConsole, $getProjectDB, $swooleRequest, $request, $response, $queueForEvents, $queueForUsage, $geodb);
}
});
App::get('/humans.txt')
->desc('Humans.txt File')
->label('scope', 'public')
->label('docs', false)
->inject('utopia')
->inject('swooleRequest')
->inject('request')
->inject('response')
->action(function (Response $response) {
$template = new View(__DIR__ . '/../views/general/humans.phtml');
$response->text($template->render(false));
->inject('dbForConsole')
->inject('getProjectDB')
->inject('queueForEvents')
->inject('queueForUsage')
->inject('geodb')
->action(function (App $utopia, SwooleRequest $swooleRequest, Request $request, Response $response, Database $dbForConsole, callable $getProjectDB, Event $queueForEvents, Usage $queueForUsage, Reader $geodb) {
$host = $request->getHostname() ?? '';
$mainDomain = System::getEnv('_APP_DOMAIN', '');
if ($host === $mainDomain) {
$template = new View(__DIR__ . '/../views/general/humans.phtml');
$response->text($template->render(false));
} else {
router($utopia, $dbForConsole, $getProjectDB, $swooleRequest, $request, $response, $queueForEvents, $queueForUsage, $geodb);
}
});
App::get('/.well-known/acme-challenge/*')
+3 -3
View File
@@ -411,7 +411,7 @@ App::init()
$useCache = $route->getLabel('cache', false);
if ($useCache) {
$key = md5($request->getURI() . implode('*', $request->getParams()) . '*' . APP_CACHE_BUSTER);
$key = md5($request->getURI() . '*' . implode('*', $request->getParams()) . '*' . APP_CACHE_BUSTER);
$cacheLog = Authorization::skip(fn () => $dbForProject->getDocument('cache', $key));
$cache = new Cache(
new Filesystem(APP_STORAGE_CACHE . DIRECTORY_SEPARATOR . 'app-' . $project->getId())
@@ -586,7 +586,7 @@ App::shutdown()
Realtime::send(
projectId: $target['projectId'] ?? $project->getId(),
payload: $queueForEvents->getPayload(),
payload: $queueForEvents->getRealtimePayload(),
events: $allEvents,
channels: $target['channels'],
roles: $target['roles'],
@@ -666,7 +666,7 @@ App::shutdown()
$resourceType = $parseLabel($pattern, $responsePayload, $requestParams, $user);
}
$key = md5($request->getURI() . '*' . implode('*', $request->getParams())) . '*' . APP_CACHE_BUSTER;
$key = md5($request->getURI() . '*' . implode('*', $request->getParams()) . '*' . APP_CACHE_BUSTER);
$signature = md5($data['payload']);
$cacheLog = Authorization::skip(fn () => $dbForProject->getDocument('cache', $key));
$accessedAt = $cacheLog->getAttribute('accessedAt', '');
+1 -1
View File
@@ -32,7 +32,7 @@ $http = new Server(
mode: SWOOLE_PROCESS,
);
$payloadSize = 6 * (1024 * 1024); // 6MB
$payloadSize = 12 * (1024 * 1024); // 12MB - adding slight buffer for headers and other data that might be sent with the payload - update later with valid testing
$workerNumber = swoole_cpu_num() * intval(System::getEnv('_APP_WORKER_PER_CORE', 6));
$http
+128 -84
View File
@@ -12,11 +12,11 @@ if (\file_exists(__DIR__ . '/../vendor/autoload.php')) {
require_once __DIR__ . '/../vendor/autoload.php';
}
ini_set('memory_limit', '512M');
ini_set('display_errors', 1);
ini_set('display_startup_errors', 1);
ini_set('default_socket_timeout', -1);
error_reporting(E_ALL);
\ini_set('memory_limit', '512M');
\ini_set('display_errors', 1);
\ini_set('display_startup_errors', 1);
\ini_set('default_socket_timeout', -1);
\error_reporting(E_ALL);
use Ahc\Jwt\JWT;
use Ahc\Jwt\JWTException;
@@ -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 = 406;
const APP_VERSION_STABLE = '1.5.5';
const APP_CACHE_BUSTER = 443;
const APP_VERSION_STABLE = '1.5.7';
const APP_DATABASE_ATTRIBUTE_EMAIL = 'email';
const APP_DATABASE_ATTRIBUTE_ENUM = 'enum';
const APP_DATABASE_ATTRIBUTE_IP = 'ip';
@@ -200,7 +200,7 @@ const APP_AUTH_TYPE_JWT = 'JWT';
const APP_AUTH_TYPE_KEY = 'Key';
const APP_AUTH_TYPE_ADMIN = 'Admin';
// Response related
const MAX_OUTPUT_CHUNK_SIZE = 2 * 1024 * 1024; // 2MB
const MAX_OUTPUT_CHUNK_SIZE = 10 * 1024 * 1024; // 10MB
// Function headers
const FUNCTION_ALLOWLIST_HEADERS_REQUEST = ['content-type', 'agent', 'content-length', 'host'];
const FUNCTION_ALLOWLIST_HEADERS_RESPONSE = ['content-type', 'content-length'];
@@ -212,6 +212,7 @@ const MESSAGE_TYPE_PUSH = 'push';
const METRIC_TEAMS = 'teams';
const METRIC_USERS = 'users';
const METRIC_MESSAGES = 'messages';
const METRIC_MESSAGES_COUNTRY_CODE = '{countryCode}.messages';
const METRIC_SESSIONS = 'sessions';
const METRIC_DATABASES = 'databases';
const METRIC_COLLECTIONS = 'collections';
@@ -732,6 +733,16 @@ $register->set('logger', function () {
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Logging provider not supported. Logging is disabled");
}
// Old Sentry Format conversion. Fallback until the old syntax is completely deprecated.
if (str_contains($providerConfig, ';') && strtolower($providerName) == 'sentry') {
$configChunks = \explode(";", $providerConfig);
$sentryKey = $configChunks[0];
$projectId = $configChunks[1];
$providerConfig = 'https://' . $sentryKey . '@sentry.io/' . $projectId;
}
$classname = '\\Utopia\\Logger\\Adapter\\' . \ucfirst($providerName);
$adapter = new $classname($providerConfig);
return new Logger($adapter);
@@ -807,14 +818,13 @@ $register->set('pools', function () {
foreach ($connections as $key => $connection) {
$type = $connection['type'] ?? '';
$dsns = $connection['dsns'] ?? '';
$multipe = $connection['multiple'] ?? false;
$multiple = $connection['multiple'] ?? false;
$schemes = $connection['schemes'] ?? [];
$config = [];
$dsns = explode(',', $connection['dsns'] ?? '');
foreach ($dsns as &$dsn) {
$dsn = explode('=', $dsn);
$name = ($multipe) ? $key . '_' . $dsn[0] : $key;
$name = ($multiple) ? $key . '_' . $dsn[0] : $key;
$dsn = $dsn[1] ?? '';
$config[] = $name;
if (empty($dsn)) {
@@ -841,38 +851,31 @@ $register->set('pools', function () {
*
* Resource assignment to an adapter will happen below.
*/
switch ($dsnScheme) {
case 'mysql':
case 'mariadb':
$resource = function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) {
return new PDOProxy(function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) {
return new PDO("mysql:host={$dsnHost};port={$dsnPort};dbname={$dsnDatabase};charset=utf8mb4", $dsnUser, $dsnPass, array(
// No need to set PDO::ATTR_ERRMODE it is overwritten in PDOProxy
PDO::ATTR_TIMEOUT => 3, // Seconds
PDO::ATTR_PERSISTENT => true,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => true,
PDO::ATTR_STRINGIFY_FETCHES => true
));
});
};
break;
case 'redis':
$resource = function () use ($dsnHost, $dsnPort, $dsnPass) {
$redis = new Redis();
@$redis->pconnect($dsnHost, (int)$dsnPort);
if ($dsnPass) {
$redis->auth($dsnPass);
}
$redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
$resource = match ($dsnScheme) {
'mysql',
'mariadb' => function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) {
return new PDOProxy(function () use ($dsnHost, $dsnPort, $dsnUser, $dsnPass, $dsnDatabase) {
return new PDO("mysql:host={$dsnHost};port={$dsnPort};dbname={$dsnDatabase};charset=utf8mb4", $dsnUser, $dsnPass, array(
PDO::ATTR_TIMEOUT => 3, // Seconds
PDO::ATTR_PERSISTENT => true,
PDO::ATTR_DEFAULT_FETCH_MODE => PDO::FETCH_ASSOC,
PDO::ATTR_EMULATE_PREPARES => true,
PDO::ATTR_STRINGIFY_FETCHES => true
));
});
},
'redis' => function () use ($dsnHost, $dsnPort, $dsnPass) {
$redis = new Redis();
@$redis->pconnect($dsnHost, (int)$dsnPort);
if ($dsnPass) {
$redis->auth($dsnPass);
}
$redis->setOption(Redis::OPT_READ_TIMEOUT, -1);
return $redis;
};
break;
default:
throw new Exception(Exception::GENERAL_SERVER_ERROR, "Invalid scheme");
}
return $redis;
},
default => throw new Exception(Exception::GENERAL_SERVER_ERROR, 'Invalid scheme'),
};
$pool = new Pool($name, $poolSize, function () use ($type, $resource, $dsn) {
// Get Adapter
@@ -1096,24 +1099,25 @@ App::setResource('clients', function ($request, $console, $project) {
fn ($node) => $node['hostname'],
\array_filter(
$console->getAttribute('platforms', []),
fn ($node) => (isset($node['type']) && ($node['type'] === Origin::CLIENT_TYPE_WEB) && isset($node['hostname']) && !empty($node['hostname']))
fn ($node) => (isset($node['type']) && ($node['type'] === Origin::CLIENT_TYPE_WEB) && !empty($node['hostname']))
)
);
$clients = \array_unique(
\array_merge(
$clientsConsole,
\array_map(
fn ($node) => $node['hostname'],
\array_filter(
$project->getAttribute('platforms', []),
fn ($node) => (isset($node['type']) && ($node['type'] === Origin::CLIENT_TYPE_WEB || $node['type'] === Origin::CLIENT_TYPE_FLUTTER_WEB) && isset($node['hostname']) && !empty($node['hostname']))
)
)
)
);
$clients = $clientsConsole;
$platforms = $project->getAttribute('platforms', []);
return $clients;
foreach ($platforms as $node) {
if (
isset($node['type']) &&
($node['type'] === Origin::CLIENT_TYPE_WEB ||
$node['type'] === Origin::CLIENT_TYPE_FLUTTER_WEB) &&
!empty($node['hostname'])
) {
$clients[] = $node['hostname'];
}
}
return \array_unique($clients);
}, ['request', 'console', 'project']);
App::setResource('user', function ($mode, $project, $console, $request, $response, $dbForProject, $dbForConsole) {
@@ -1187,7 +1191,7 @@ App::setResource('user', function ($mode, $project, $console, $request, $respons
}
if (APP_MODE_ADMIN === $mode) {
if ($user->find('teamId', $project->getAttribute('teamId'), 'memberships')) {
if ($user->find('teamInternalId', $project->getAttribute('teamInternalId'), 'memberships')) {
Authorization::setDefaultStatus(false); // Cancel security segmentation for admin users.
} else {
$user = new Document([]);
@@ -1239,14 +1243,13 @@ App::setResource('project', function ($dbForConsole, $request, $console) {
return $project;
}, ['dbForConsole', 'request', 'console']);
App::setResource('session', function (Document $user, Document $project) {
App::setResource('session', function (Document $user) {
if ($user->isEmpty()) {
return;
}
$sessions = $user->getAttribute('sessions', []);
$authDuration = $project->getAttribute('auths', [])['duration'] ?? Auth::TOKEN_EXPIRATION_LOGIN_LONG;
$sessionId = Auth::sessionVerify($user->getAttribute('sessions'), Auth::$secret, $authDuration);
$sessionId = Auth::sessionVerify($user->getAttribute('sessions'), Auth::$secret);
if (!$sessionId) {
return;
@@ -1259,7 +1262,7 @@ App::setResource('session', function (Document $user, Document $project) {
}
return;
}, ['user', 'project']);
}, ['user']);
App::setResource('console', function () {
return new Document([
@@ -1306,19 +1309,44 @@ App::setResource('dbForProject', function (Group $pools, Database $dbForConsole,
return $dbForConsole;
}
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
$dbAdapter = $pools
->get($project->getAttribute('database'))
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$database
->setNamespace('_' . $project->getInternalId())
->setMetadata('host', \gethostname())
->setMetadata('project', $project->getId())
->setTimeout(APP_DATABASE_TIMEOUT_MILLISECONDS);
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
return $database;
}, ['pools', 'dbForConsole', 'cache', 'project']);
@@ -1326,8 +1354,7 @@ App::setResource('dbForConsole', function (Group $pools, Cache $cache) {
$dbAdapter = $pools
->get('console')
->pop()
->getResource()
;
->getResource();
$database = new Database($dbAdapter, $cache);
@@ -1343,44 +1370,54 @@ App::setResource('dbForConsole', function (Group $pools, Cache $cache) {
App::setResource('getProjectDB', function (Group $pools, Database $dbForConsole, $cache) {
$databases = []; // TODO: @Meldiron This should probably be responsibility of utopia-php/pools
$getProjectDB = function (Document $project) use ($pools, $dbForConsole, $cache, &$databases) {
return function (Document $project) use ($pools, $dbForConsole, $cache, &$databases) {
if ($project->isEmpty() || $project->getId() === 'console') {
return $dbForConsole;
}
$databaseName = $project->getAttribute('database');
if (isset($databases[$databaseName])) {
$database = $databases[$databaseName];
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
$configure = (function (Database $database) use ($project, $dsn) {
$database
->setNamespace('_' . $project->getInternalId())
->setMetadata('host', \gethostname())
->setMetadata('project', $project->getId())
->setTimeout(APP_DATABASE_TIMEOUT_MILLISECONDS);
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
});
if (isset($databases[$dsn->getHost()])) {
$database = $databases[$dsn->getHost()];
$configure($database);
return $database;
}
$dbAdapter = $pools
->get($databaseName)
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$databases[$databaseName] = $database;
$database
->setNamespace('_' . $project->getInternalId())
->setMetadata('host', \gethostname())
->setMetadata('project', $project->getId())
->setTimeout(APP_DATABASE_TIMEOUT_MILLISECONDS);
$databases[$dsn->getHost()] = $database;
$configure($database);
return $database;
};
return $getProjectDB;
}, ['pools', 'dbForConsole', 'cache']);
App::setResource('cache', function (Group $pools) {
@@ -1441,7 +1478,9 @@ function getDevice($root): Device
case Storage::DEVICE_S3:
return new S3($root, $accessKey, $accessSecret, $bucket, $region, $acl);
case STORAGE::DEVICE_DO_SPACES:
return new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl);
$device = new DOSpaces($root, $accessKey, $accessSecret, $bucket, $region, $acl);
$device->setHttpVersion(S3::HTTP_VERSION_1_1);
return $device;
case Storage::DEVICE_BACKBLAZE:
return new Backblaze($root, $accessKey, $accessSecret, $bucket, $region, $acl);
case Storage::DEVICE_LINODE:
@@ -1470,7 +1509,9 @@ function getDevice($root): Device
$doSpacesRegion = System::getEnv('_APP_STORAGE_DO_SPACES_REGION', '');
$doSpacesBucket = System::getEnv('_APP_STORAGE_DO_SPACES_BUCKET', '');
$doSpacesAcl = 'private';
return new DOSpaces($root, $doSpacesAccessKey, $doSpacesSecretKey, $doSpacesBucket, $doSpacesRegion, $doSpacesAcl);
$device = new DOSpaces($root, $doSpacesAccessKey, $doSpacesSecretKey, $doSpacesBucket, $doSpacesRegion, $doSpacesAcl);
$device->setHttpVersion(S3::HTTP_VERSION_1_1);
return $device;
case Storage::DEVICE_BACKBLAZE:
$backblazeAccessKey = System::getEnv('_APP_STORAGE_BACKBLAZE_ACCESS_KEY', '');
$backblazeSecretKey = System::getEnv('_APP_STORAGE_BACKBLAZE_SECRET', '');
@@ -1654,3 +1695,6 @@ App::setResource('requestTimestamp', function ($request) {
}
return $requestTimestamp;
}, ['request']);
App::setResource('plan', function (array $plan = []) {
return [];
});
+161 -122
View File
@@ -26,6 +26,7 @@ use Utopia\Database\Helpers\ID;
use Utopia\Database\Helpers\Role;
use Utopia\Database\Query;
use Utopia\Database\Validator\Authorization;
use Utopia\DSN\DSN;
use Utopia\Logger\Log;
use Utopia\System\System;
use Utopia\WebSocket\Adapter;
@@ -38,74 +39,100 @@ require_once __DIR__ . '/init.php';
Runtime::enableCoroutine(SWOOLE_HOOK_ALL);
function getConsoleDB(): Database
{
global $register;
// Allows overriding
if (!function_exists("getConsoleDB")) {
function getConsoleDB(): Database
{
global $register;
/** @var \Utopia\Pools\Group $pools */
$pools = $register->get('pools');
/** @var \Utopia\Pools\Group $pools */
$pools = $register->get('pools');
$dbAdapter = $pools
->get('console')
->pop()
->getResource()
;
$database = new Database($dbAdapter, getCache());
$database
->setNamespace('_console')
->setMetadata('host', \gethostname())
->setMetadata('project', '_console');
return $database;
}
function getProjectDB(Document $project): Database
{
global $register;
/** @var \Utopia\Pools\Group $pools */
$pools = $register->get('pools');
if ($project->isEmpty() || $project->getId() === 'console') {
return getConsoleDB();
}
$dbAdapter = $pools
->get($project->getAttribute('database'))
->pop()
->getResource()
;
$database = new Database($dbAdapter, getCache());
$database
->setNamespace('_' . $project->getInternalId())
->setMetadata('host', \gethostname())
->setMetadata('project', $project->getId());
return $database;
}
function getCache(): Cache
{
global $register;
$pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */
$list = Config::getParam('pools-cache', []);
$adapters = [];
foreach ($list as $value) {
$adapters[] = $pools
->get($value)
$dbAdapter = $pools
->get('console')
->pop()
->getResource()
;
}
return new Cache(new Sharding($adapters));
$database = new Database($dbAdapter, getCache());
$database
->setNamespace('_console')
->setMetadata('host', \gethostname())
->setMetadata('project', '_console');
return $database;
}
}
// Allows overriding
if (!function_exists("getProjectDB")) {
function getProjectDB(Document $project): Database
{
global $register;
/** @var \Utopia\Pools\Group $pools */
$pools = $register->get('pools');
if ($project->isEmpty() || $project->getId() === 'console') {
return getConsoleDB();
}
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
$adapter = $pools
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($adapter, getCache());
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
$database
->setMetadata('host', \gethostname())
->setMetadata('project', $project->getId());
return $database;
}
}
// Allows overriding
if (!function_exists("getCache")) {
function getCache(): Cache
{
global $register;
$pools = $register->get('pools'); /** @var \Utopia\Pools\Group $pools */
$list = Config::getParam('pools-cache', []);
$adapters = [];
foreach ($list as $value) {
$adapters[] = $pools
->get($value)
->pop()
->getResource()
;
}
return new Cache(new Sharding($adapters));
}
}
$realtime = new Realtime();
@@ -206,29 +233,32 @@ $server->onStart(function () use ($stats, $register, $containerId, &$statsDocume
/**
* Save current connections to the Database every 5 seconds.
*/
Timer::tick(5000, function () use ($register, $stats, &$statsDocument, $logError) {
$payload = [];
foreach ($stats as $projectId => $value) {
$payload[$projectId] = $stats->get($projectId, 'connectionsTotal');
}
if (empty($payload) || empty($statsDocument)) {
return;
}
// TODO: Remove this if check once it doesn't cause issues for cloud
if (System::getEnv('_APP_EDITION', 'self-hosted') === 'self-hosted') {
Timer::tick(5000, function () use ($register, $stats, &$statsDocument, $logError) {
$payload = [];
foreach ($stats as $projectId => $value) {
$payload[$projectId] = $stats->get($projectId, 'connectionsTotal');
}
if (empty($payload) || empty($statsDocument)) {
return;
}
try {
$database = getConsoleDB();
try {
$database = getConsoleDB();
$statsDocument
->setAttribute('timestamp', DateTime::now())
->setAttribute('value', json_encode($payload));
$statsDocument
->setAttribute('timestamp', DateTime::now())
->setAttribute('value', json_encode($payload));
Authorization::skip(fn () => $database->updateDocument('realtime', $statsDocument->getId(), $statsDocument));
} catch (Throwable $th) {
call_user_func($logError, $th, "updateWorkerDocument");
} finally {
$register->get('pools')->reclaim();
}
});
Authorization::skip(fn () => $database->updateDocument('realtime', $statsDocument->getId(), $statsDocument));
} catch (Throwable $th) {
call_user_func($logError, $th, "updateWorkerDocument");
} finally {
$register->get('pools')->reclaim();
}
});
}
});
$server->onWorkerStart(function (int $workerId) use ($server, $register, $stats, $realtime, $logError) {
@@ -241,53 +271,56 @@ $server->onWorkerStart(function (int $workerId) use ($server, $register, $stats,
/**
* Sending current connections to project channels on the console project every 5 seconds.
*/
if ($realtime->hasSubscriber('console', Role::users()->toString(), 'project')) {
$database = getConsoleDB();
// TODO: Remove this if check once it doesn't cause issues for cloud
if (System::getEnv('_APP_EDITION', 'self-hosted') === 'self-hosted') {
if ($realtime->hasSubscriber('console', Role::users()->toString(), 'project')) {
$database = getConsoleDB();
$payload = [];
$payload = [];
$list = Authorization::skip(fn () => $database->find('realtime', [
Query::greaterThan('timestamp', DateTime::addSeconds(new \DateTime(), -15)),
]));
$list = Authorization::skip(fn () => $database->find('realtime', [
Query::greaterThan('timestamp', DateTime::addSeconds(new \DateTime(), -15)),
]));
/**
* Aggregate stats across containers.
*/
foreach ($list as $document) {
foreach (json_decode($document->getAttribute('value')) as $projectId => $value) {
if (array_key_exists($projectId, $payload)) {
$payload[$projectId] += $value;
} else {
$payload[$projectId] = $value;
/**
* Aggregate stats across containers.
*/
foreach ($list as $document) {
foreach (json_decode($document->getAttribute('value')) as $projectId => $value) {
if (array_key_exists($projectId, $payload)) {
$payload[$projectId] += $value;
} else {
$payload[$projectId] = $value;
}
}
}
}
foreach ($stats as $projectId => $value) {
if (!array_key_exists($projectId, $payload)) {
continue;
foreach ($stats as $projectId => $value) {
if (!array_key_exists($projectId, $payload)) {
continue;
}
$event = [
'project' => 'console',
'roles' => ['team:' . $stats->get($projectId, 'teamId')],
'data' => [
'events' => ['stats.connections'],
'channels' => ['project'],
'timestamp' => DateTime::formatTz(DateTime::now()),
'payload' => [
$projectId => $payload[$projectId]
]
]
];
$server->send($realtime->getSubscribers($event), json_encode([
'type' => 'event',
'data' => $event['data']
]));
}
$event = [
'project' => 'console',
'roles' => ['team:' . $stats->get($projectId, 'teamId')],
'data' => [
'events' => ['stats.connections'],
'channels' => ['project'],
'timestamp' => DateTime::formatTz(DateTime::now()),
'payload' => [
$projectId => $payload[$projectId]
]
]
];
$server->send($realtime->getSubscribers($event), json_encode([
'type' => 'event',
'data' => $event['data']
]));
$register->get('pools')->reclaim();
}
$register->get('pools')->reclaim();
}
/**
* Sending test message for SDK E2E tests every 5 seconds.
@@ -484,16 +517,22 @@ $server->onOpen(function (int $connection, SwooleRequest $request) use ($server,
} catch (Throwable $th) {
call_user_func($logError, $th, "initServer");
// Handle SQL error code is 'HY000'
$code = $th->getCode();
if (!is_int($code)) {
$code = 500;
}
$response = [
'type' => 'error',
'data' => [
'code' => $th->getCode(),
'code' => $code,
'message' => $th->getMessage()
]
];
$server->send([$connection], json_encode($response));
$server->close($connection, $th->getCode());
$server->close($connection, $code);
if (App::isDevelopment()) {
Console::error('[Error] Connection Error');
+1 -1
View File
@@ -748,7 +748,7 @@ $image = $this->getParam('image', '');
openruntimes-executor:
container_name: openruntimes-executor
hostname: appwrite-executor
hostname: exc1
<<: *x-logging
restart: unless-stopped
stop_signal: SIGINT
+69 -22
View File
@@ -16,6 +16,7 @@ use Appwrite\Event\Usage;
use Appwrite\Event\UsageDump;
use Appwrite\Platform\Appwrite;
use Swoole\Runtime;
use Utopia\App;
use Utopia\Cache\Adapter\Sharding;
use Utopia\Cache\Cache;
use Utopia\CLI\Console;
@@ -24,6 +25,7 @@ use Utopia\Database\Database;
use Utopia\Database\DateTime;
use Utopia\Database\Document;
use Utopia\Database\Validator\Authorization;
use Utopia\DSN\DSN;
use Utopia\Logger\Log;
use Utopia\Logger\Logger;
use Utopia\Platform\Service;
@@ -69,14 +71,41 @@ Server::setResource('dbForProject', function (Cache $cache, Registry $register,
}
$pools = $register->get('pools');
$database = $pools
->get($project->getAttribute('database'))
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
$adapter = $pools
->get($dsn->getHost())
->pop()
->getResource();
$adapter = new Database($database, $cache);
$adapter->setNamespace('_' . $project->getInternalId());
return $adapter;
$database = new Database($adapter, $cache);
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
return $database;
}, ['cache', 'register', 'message', 'project', 'dbForConsole']);
Server::setResource('getProjectDB', function (Group $pools, Database $dbForConsole, $cache) {
@@ -87,24 +116,51 @@ Server::setResource('getProjectDB', function (Group $pools, Database $dbForConso
return $dbForConsole;
}
$databaseName = $project->getAttribute('database');
try {
$dsn = new DSN($project->getAttribute('database'));
} catch (\InvalidArgumentException) {
// TODO: Temporary until all projects are using shared tables
$dsn = new DSN('mysql://' . $project->getAttribute('database'));
}
if (isset($databases[$dsn->getHost()])) {
$database = $databases[$dsn->getHost()];
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
if (isset($databases[$databaseName])) {
$database = $databases[$databaseName];
$database->setNamespace('_' . $project->getInternalId());
return $database;
}
$dbAdapter = $pools
->get($databaseName)
->get($dsn->getHost())
->pop()
->getResource();
$database = new Database($dbAdapter, $cache);
$databases[$databaseName] = $database;
$databases[$dsn->getHost()] = $database;
$database->setNamespace('_' . $project->getInternalId());
if ($dsn->getHost() === System::getEnv('_APP_DATABASE_SHARED_TABLES', '')) {
$database
->setSharedTables(true)
->setTenant($project->getInternalId())
->setNamespace($dsn->getParam('namespace'));
} else {
$database
->setSharedTables(false)
->setTenant(null)
->setNamespace('_' . $project->getInternalId());
}
return $database;
};
@@ -228,11 +284,6 @@ if (!isset($args[1])) {
\array_shift($args);
$workerName = $args[0];
$workerIndex = $args[1] ?? '';
if (!empty($workerIndex)) {
$workerName .= '_' . $workerIndex;
}
if (\str_starts_with($workerName, 'databases')) {
$queueName = System::getEnv('_APP_QUEUE_NAME', 'database_db_main');
@@ -245,7 +296,7 @@ try {
* Any worker can be configured with the following env vars:
* - _APP_WORKERS_NUM The total number of worker processes
* - _APP_WORKER_PER_CORE The number of worker processes per core (ignored if _APP_WORKERS_NUM is set)
* - _APP_QUEUE_NAME The name of the queue to read for database events
* - _APP_QUEUE_NAME The name of the queue to read for database events
*/
$platform->init(Service::TYPE_WORKER, [
'workersNum' => System::getEnv('_APP_WORKERS_NUM', 1),
@@ -277,10 +328,6 @@ $worker
$pools->reclaim();
$version = System::getEnv('_APP_VERSION', 'UNKNOWN');
if ($error instanceof PDOException) {
throw $error;
}
if ($logger) {
$log->setNamespace("appwrite-worker");
$log->setServer(\gethostname());
+12 -11
View File
@@ -44,24 +44,26 @@
"ext-sockets": "*",
"appwrite/php-runtimes": "0.13.*",
"appwrite/php-clamav": "2.0.*",
"utopia-php/abuse": "0.36.*",
"utopia-php/abuse": "0.37.*",
"utopia-php/analytics": "0.10.*",
"utopia-php/audit": "0.38.*",
"utopia-php/cache": "0.9.*",
"utopia-php/audit": "0.39.*",
"utopia-php/cache": "0.10.*",
"utopia-php/cli": "0.15.*",
"utopia-php/config": "0.2.*",
"utopia-php/database": "0.48.*",
"utopia-php/database": "0.49.*",
"utopia-php/domains": "0.5.*",
"utopia-php/dsn": "0.2.*",
"utopia-php/dsn": "0.2.1",
"utopia-php/framework": "0.33.*",
"utopia-php/fetch": "0.2.*",
"utopia-php/image": "0.6.*",
"utopia-php/locale": "0.4.*",
"utopia-php/logger": "0.3.*",
"utopia-php/messaging": "0.10.*",
"utopia-php/logger": "0.5.*",
"utopia-php/messaging": "0.12.*",
"utopia-php/migration": "0.4.*",
"utopia-php/orchestration": "0.9.*",
"utopia-php/platform": "0.5.*",
"utopia-php/pools": "0.4.*",
"utopia-php/platform": "0.7.*",
"utopia-php/pools": "0.5.*",
"utopia-php/preloader": "0.2.*",
"utopia-php/queue": "0.7.*",
"utopia-php/registry": "0.5.*",
"utopia-php/storage": "0.18.*",
@@ -82,9 +84,8 @@
"ext-fileinfo": "*",
"appwrite/sdk-generator": "0.38.*",
"phpunit/phpunit": "9.5.20",
"swoole/ide-helper": "5.0.2",
"swoole/ide-helper": "5.1.2",
"textalk/websocket": "1.5.7",
"utopia-php/fetch": "0.1.*",
"laravel/pint": "^1.14"
},
"provide": {
Generated
+345 -205
View File
@@ -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": "3f703f77225d4022cd5823814ab7c3e7",
"content-hash": "e002600539435ca8eaaace6e73b4004d",
"packages": [
{
"name": "adhocore/jwt",
@@ -480,6 +480,89 @@
],
"time": "2022-09-10T18:51:20+00:00"
},
{
"name": "giggsey/libphonenumber-for-php-lite",
"version": "8.13.36",
"source": {
"type": "git",
"url": "https://github.com/giggsey/libphonenumber-for-php-lite.git",
"reference": "144bbe70d67664b5245910a475c7190ff140ab4b"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/giggsey/libphonenumber-for-php-lite/zipball/144bbe70d67664b5245910a475c7190ff140ab4b",
"reference": "144bbe70d67664b5245910a475c7190ff140ab4b",
"shasum": ""
},
"require": {
"php": "^8.1",
"symfony/polyfill-mbstring": "^1.17"
},
"conflict": {
"giggsey/libphonenumber-for-php": "*"
},
"require-dev": {
"ext-dom": "*",
"friendsofphp/php-cs-fixer": "^3.12",
"infection/infection": "^0.28",
"pear/pear-core-minimal": "^1.10.11",
"pear/pear_exception": "^1.0.2",
"pear/versioncontrol_git": "^0.7",
"phing/phing": "^2.17.4",
"phpstan/extension-installer": "^1.2",
"phpstan/phpstan": "^1.8",
"phpstan/phpstan-phpunit": "^1.2",
"phpunit/phpunit": "^10.5",
"symfony/console": "^6.0",
"symfony/var-exporter": "^6.0"
},
"suggest": {
"giggsey/libphonenumber-for-php": "Use libphonenumber-for-php for geocoding, carriers, timezones and matching"
},
"type": "library",
"extra": {
"branch-alias": {
"dev-master": "8.x-dev"
}
},
"autoload": {
"psr-4": {
"libphonenumber\\": "src/"
},
"exclude-from-classmap": [
"/src/data/",
"/src/carrier/data/",
"/src/geocoding/data/",
"/src/timezone/data/"
]
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"Apache-2.0"
],
"authors": [
{
"name": "Joshua Gigg",
"email": "giggsey@gmail.com",
"homepage": "https://giggsey.com/"
}
],
"description": "A lite version of giggsey/libphonenumber-for-php, which is a PHP Port of Google's libphonenumber",
"homepage": "https://github.com/giggsey/libphonenumber-for-php-lite",
"keywords": [
"geocoding",
"geolocation",
"libphonenumber",
"mobile",
"phonenumber",
"validation"
],
"support": {
"issues": "https://github.com/giggsey/libphonenumber-for-php-lite/issues",
"source": "https://github.com/giggsey/libphonenumber-for-php-lite"
},
"time": "2024-05-03T06:31:11+00:00"
},
{
"name": "jean85/pretty-package-versions",
"version": "2.0.6",
@@ -1043,6 +1126,86 @@
},
"time": "2022-03-17T08:00:35+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-php80",
"version": "v1.29.0",
@@ -1264,23 +1427,23 @@
},
{
"name": "utopia-php/abuse",
"version": "0.36.0",
"version": "0.37.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/abuse.git",
"reference": "d3d09b4fa0db75935110714ad4b2a87f3ace31ed"
"reference": "4dfcff4754c7804d1a70039792c0f2d59a5cc981"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/d3d09b4fa0db75935110714ad4b2a87f3ace31ed",
"reference": "d3d09b4fa0db75935110714ad4b2a87f3ace31ed",
"url": "https://api.github.com/repos/utopia-php/abuse/zipball/4dfcff4754c7804d1a70039792c0f2d59a5cc981",
"reference": "4dfcff4754c7804d1a70039792c0f2d59a5cc981",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-pdo": "*",
"php": ">=8.0",
"utopia-php/database": "0.48.*"
"utopia-php/database": "0.49.*"
},
"require-dev": {
"laravel/pint": "1.5.*",
@@ -1307,9 +1470,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/abuse/issues",
"source": "https://github.com/utopia-php/abuse/tree/0.36.0"
"source": "https://github.com/utopia-php/abuse/tree/0.37.1"
},
"time": "2024-01-19T09:32:56+00:00"
"time": "2024-06-05T18:03:59+00:00"
},
{
"name": "utopia-php/analytics",
@@ -1359,21 +1522,21 @@
},
{
"name": "utopia-php/audit",
"version": "0.38.0",
"version": "0.39.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/audit.git",
"reference": "a9067f4af76e8787f1d29850a8ec94fc32bb6539"
"reference": "7ea91e0ceea7b94293612fea94022b73315677c2"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/audit/zipball/a9067f4af76e8787f1d29850a8ec94fc32bb6539",
"reference": "a9067f4af76e8787f1d29850a8ec94fc32bb6539",
"url": "https://api.github.com/repos/utopia-php/audit/zipball/7ea91e0ceea7b94293612fea94022b73315677c2",
"reference": "7ea91e0ceea7b94293612fea94022b73315677c2",
"shasum": ""
},
"require": {
"php": ">=8.0",
"utopia-php/database": "0.48.*"
"utopia-php/database": "0.49.*"
},
"require-dev": {
"laravel/pint": "1.5.*",
@@ -1400,22 +1563,22 @@
],
"support": {
"issues": "https://github.com/utopia-php/audit/issues",
"source": "https://github.com/utopia-php/audit/tree/0.38.0"
"source": "https://github.com/utopia-php/audit/tree/0.39.1"
},
"time": "2024-01-19T09:33:05+00:00"
"time": "2024-06-05T19:28:22+00:00"
},
{
"name": "utopia-php/cache",
"version": "0.9.1",
"version": "0.10.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/cache.git",
"reference": "552b4c554bb14d0c529631ce304cdf4a2b9d06a6"
"reference": "313bcdfbb166f75c2c205a59d1467cead63a9626"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/552b4c554bb14d0c529631ce304cdf4a2b9d06a6",
"reference": "552b4c554bb14d0c529631ce304cdf4a2b9d06a6",
"url": "https://api.github.com/repos/utopia-php/cache/zipball/313bcdfbb166f75c2c205a59d1467cead63a9626",
"reference": "313bcdfbb166f75c2c205a59d1467cead63a9626",
"shasum": ""
},
"require": {
@@ -1450,9 +1613,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/cache/issues",
"source": "https://github.com/utopia-php/cache/tree/0.9.1"
"source": "https://github.com/utopia-php/cache/tree/0.10.0"
},
"time": "2024-03-19T17:07:20+00:00"
"time": "2024-06-05T16:40:43+00:00"
},
{
"name": "utopia-php/cli",
@@ -1556,23 +1719,23 @@
},
{
"name": "utopia-php/database",
"version": "0.48.4",
"version": "0.49.12",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/database.git",
"reference": "02f20bd901b8fab26d7dc2c58f7da1d6a08d21c0"
"reference": "45def2f7c6bc5f631dbb67e5df0e8e7331af5f63"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/database/zipball/02f20bd901b8fab26d7dc2c58f7da1d6a08d21c0",
"reference": "02f20bd901b8fab26d7dc2c58f7da1d6a08d21c0",
"url": "https://api.github.com/repos/utopia-php/database/zipball/45def2f7c6bc5f631dbb67e5df0e8e7331af5f63",
"reference": "45def2f7c6bc5f631dbb67e5df0e8e7331af5f63",
"shasum": ""
},
"require": {
"ext-mbstring": "*",
"ext-pdo": "*",
"php": ">=8.0",
"utopia-php/cache": "0.9.*",
"utopia-php/cache": "0.10.*",
"utopia-php/framework": "0.33.*",
"utopia-php/mongo": "0.3.*"
},
@@ -1606,9 +1769,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/database/issues",
"source": "https://github.com/utopia-php/database/tree/0.48.4"
"source": "https://github.com/utopia-php/database/tree/0.49.12"
},
"time": "2024-02-23T03:22:55+00:00"
"time": "2024-06-05T16:52:59+00:00"
},
{
"name": "utopia-php/domains",
@@ -1717,6 +1880,45 @@
},
"time": "2024-05-07T02:01:25+00:00"
},
{
"name": "utopia-php/fetch",
"version": "0.2.1",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/fetch.git",
"reference": "1423c0ee3eef944d816ca6e31706895b585aea82"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/fetch/zipball/1423c0ee3eef944d816ca6e31706895b585aea82",
"reference": "1423c0ee3eef944d816ca6e31706895b585aea82",
"shasum": ""
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"laravel/pint": "^1.5.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Utopia\\Fetch\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A simple library that provides an interface for making HTTP Requests.",
"support": {
"issues": "https://github.com/utopia-php/fetch/issues",
"source": "https://github.com/utopia-php/fetch/tree/0.2.1"
},
"time": "2024-03-18T11:50:59+00:00"
},
{
"name": "utopia-php/framework",
"version": "0.33.6",
@@ -1863,22 +2065,23 @@
},
{
"name": "utopia-php/logger",
"version": "0.3.2",
"version": "0.5.2",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/logger.git",
"reference": "ba763c10688fe2ed715ad2bed3f13d18dfec6253"
"reference": "c6dfdb672e41364c309b0c30dc03bc6d45446dba"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/logger/zipball/ba763c10688fe2ed715ad2bed3f13d18dfec6253",
"reference": "ba763c10688fe2ed715ad2bed3f13d18dfec6253",
"url": "https://api.github.com/repos/utopia-php/logger/zipball/c6dfdb672e41364c309b0c30dc03bc6d45446dba",
"reference": "c6dfdb672e41364c309b0c30dc03bc6d45446dba",
"shasum": ""
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"laravel/pint": "1.2.*",
"phpstan/phpstan": "1.9.x-dev",
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1"
@@ -1910,27 +2113,28 @@
],
"support": {
"issues": "https://github.com/utopia-php/logger/issues",
"source": "https://github.com/utopia-php/logger/tree/0.3.2"
"source": "https://github.com/utopia-php/logger/tree/0.5.2"
},
"time": "2023-11-22T14:45:43+00:00"
"time": "2024-05-17T09:32:59+00:00"
},
{
"name": "utopia-php/messaging",
"version": "0.10.0",
"version": "0.12.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/messaging.git",
"reference": "71dce00ad43eb278a877cb2c329f7b8d677adfeb"
"reference": "6e466d3511981291843c6ebf9ce3f44fc75e37b0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/messaging/zipball/71dce00ad43eb278a877cb2c329f7b8d677adfeb",
"reference": "71dce00ad43eb278a877cb2c329f7b8d677adfeb",
"url": "https://api.github.com/repos/utopia-php/messaging/zipball/6e466d3511981291843c6ebf9ce3f44fc75e37b0",
"reference": "6e466d3511981291843c6ebf9ce3f44fc75e37b0",
"shasum": ""
},
"require": {
"ext-curl": "*",
"ext-openssl": "*",
"giggsey/libphonenumber-for-php-lite": "8.13.36",
"php": ">=8.0.0",
"phpmailer/phpmailer": "6.9.1"
},
@@ -1960,9 +2164,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/messaging/issues",
"source": "https://github.com/utopia-php/messaging/tree/0.10.0"
"source": "https://github.com/utopia-php/messaging/tree/0.12.0"
},
"time": "2024-02-20T07:30:15+00:00"
"time": "2024-05-30T14:58:25+00:00"
},
{
"name": "utopia-php/migration",
@@ -2123,16 +2327,16 @@
},
{
"name": "utopia-php/platform",
"version": "0.5.2",
"version": "0.7.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/platform.git",
"reference": "b9feabc79b92dc2b05683a986ad43bce5c1583e3"
"reference": "beeea0f2c9bce14a6869fc5c87a1047cdecb5c52"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/platform/zipball/b9feabc79b92dc2b05683a986ad43bce5c1583e3",
"reference": "b9feabc79b92dc2b05683a986ad43bce5c1583e3",
"url": "https://api.github.com/repos/utopia-php/platform/zipball/beeea0f2c9bce14a6869fc5c87a1047cdecb5c52",
"reference": "beeea0f2c9bce14a6869fc5c87a1047cdecb5c52",
"shasum": ""
},
"require": {
@@ -2140,7 +2344,8 @@
"ext-redis": "*",
"php": ">=8.0",
"utopia-php/cli": "0.15.*",
"utopia-php/framework": "0.33.*"
"utopia-php/framework": "0.33.*",
"utopia-php/queue": "0.7.*"
},
"require-dev": {
"laravel/pint": "1.2.*",
@@ -2166,22 +2371,22 @@
],
"support": {
"issues": "https://github.com/utopia-php/platform/issues",
"source": "https://github.com/utopia-php/platform/tree/0.5.2"
"source": "https://github.com/utopia-php/platform/tree/0.7.0"
},
"time": "2024-05-22T12:50:35+00:00"
"time": "2024-05-08T17:00:55+00:00"
},
{
"name": "utopia-php/pools",
"version": "0.4.2",
"version": "0.5.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/pools.git",
"reference": "d2870ab74b31b7f4027799f082e85122154f8bed"
"reference": "6f716a213a08db95eda1b5dddfa90983c1834817"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/pools/zipball/d2870ab74b31b7f4027799f082e85122154f8bed",
"reference": "d2870ab74b31b7f4027799f082e85122154f8bed",
"url": "https://api.github.com/repos/utopia-php/pools/zipball/6f716a213a08db95eda1b5dddfa90983c1834817",
"reference": "6f716a213a08db95eda1b5dddfa90983c1834817",
"shasum": ""
},
"require": {
@@ -2217,9 +2422,62 @@
],
"support": {
"issues": "https://github.com/utopia-php/pools/issues",
"source": "https://github.com/utopia-php/pools/tree/0.4.2"
"source": "https://github.com/utopia-php/pools/tree/0.5.0"
},
"time": "2022-11-22T07:55:45+00:00"
"time": "2024-04-19T11:11:54+00:00"
},
{
"name": "utopia-php/preloader",
"version": "0.2.4",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/preloader.git",
"reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/preloader/zipball/65ef48392e72172f584b0baa2e224f9a1cebcce0",
"reference": "65ef48392e72172f584b0baa2e224f9a1cebcce0",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"require-dev": {
"phpunit/phpunit": "^9.3",
"vimeo/psalm": "4.0.1"
},
"type": "library",
"autoload": {
"psr-4": {
"Utopia\\Preloader\\": "src/Preloader"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Eldad Fux",
"email": "team@appwrite.io"
}
],
"description": "Utopia Preloader library is simple and lite library for managing PHP preloading configuration",
"keywords": [
"framework",
"php",
"preload",
"preloader",
"preloading",
"upf",
"utopia"
],
"support": {
"issues": "https://github.com/utopia-php/preloader/issues",
"source": "https://github.com/utopia-php/preloader/tree/0.2.4"
},
"time": "2020-10-24T07:04:59+00:00"
},
{
"name": "utopia-php/queue",
@@ -2498,22 +2756,22 @@
},
{
"name": "utopia-php/vcs",
"version": "0.6.6",
"version": "0.6.7",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/vcs.git",
"reference": "e538264cfee5e3efdfe1771efba04750cf20b2c4"
"reference": "8d8ff1ac68e991b95adb6f91fcde8f9bb8f24974"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/vcs/zipball/e538264cfee5e3efdfe1771efba04750cf20b2c4",
"reference": "e538264cfee5e3efdfe1771efba04750cf20b2c4",
"url": "https://api.github.com/repos/utopia-php/vcs/zipball/8d8ff1ac68e991b95adb6f91fcde8f9bb8f24974",
"reference": "8d8ff1ac68e991b95adb6f91fcde8f9bb8f24974",
"shasum": ""
},
"require": {
"adhocore/jwt": "^1.1",
"php": ">=8.0",
"utopia-php/cache": "^0.9.0",
"utopia-php/cache": "^0.10.0",
"utopia-php/framework": "0.*.*"
},
"require-dev": {
@@ -2541,9 +2799,9 @@
],
"support": {
"issues": "https://github.com/utopia-php/vcs/issues",
"source": "https://github.com/utopia-php/vcs/tree/0.6.6"
"source": "https://github.com/utopia-php/vcs/tree/0.6.7"
},
"time": "2024-05-17T09:36:30+00:00"
"time": "2024-06-05T17:38:29+00:00"
},
{
"name": "utopia-php/websocket",
@@ -2730,16 +2988,16 @@
"packages-dev": [
{
"name": "appwrite/sdk-generator",
"version": "0.38.6",
"version": "0.38.7",
"source": {
"type": "git",
"url": "https://github.com/appwrite/sdk-generator.git",
"reference": "d7016d6d72545e84709892faca972eb4bf5bd699"
"reference": "0a66c1149ef05ed9f45ce1c897c4a0ce9ee5e95a"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/d7016d6d72545e84709892faca972eb4bf5bd699",
"reference": "d7016d6d72545e84709892faca972eb4bf5bd699",
"url": "https://api.github.com/repos/appwrite/sdk-generator/zipball/0a66c1149ef05ed9f45ce1c897c4a0ce9ee5e95a",
"reference": "0a66c1149ef05ed9f45ce1c897c4a0ce9ee5e95a",
"shasum": ""
},
"require": {
@@ -2775,9 +3033,9 @@
"description": "Appwrite PHP library for generating API SDKs for multiple programming languages and platforms",
"support": {
"issues": "https://github.com/appwrite/sdk-generator/issues",
"source": "https://github.com/appwrite/sdk-generator/tree/0.38.6"
"source": "https://github.com/appwrite/sdk-generator/tree/0.38.7"
},
"time": "2024-05-20T18:00:16+00:00"
"time": "2024-06-10T00:23:02+00:00"
},
{
"name": "doctrine/deprecations",
@@ -3088,16 +3346,16 @@
},
{
"name": "myclabs/deep-copy",
"version": "1.11.1",
"version": "1.12.0",
"source": {
"type": "git",
"url": "https://github.com/myclabs/DeepCopy.git",
"reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c"
"reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
"reference": "7284c22080590fb39f2ffa3e9057f10a4ddd0e0c",
"url": "https://api.github.com/repos/myclabs/DeepCopy/zipball/3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
"reference": "3a6b9a42cd8f8771bd4295d13e1423fa7f3d942c",
"shasum": ""
},
"require": {
@@ -3105,11 +3363,12 @@
},
"conflict": {
"doctrine/collections": "<1.6.8",
"doctrine/common": "<2.13.3 || >=3,<3.2.2"
"doctrine/common": "<2.13.3 || >=3 <3.2.2"
},
"require-dev": {
"doctrine/collections": "^1.6.8",
"doctrine/common": "^2.13.3 || ^3.2.2",
"phpspec/prophecy": "^1.10",
"phpunit/phpunit": "^7.5.20 || ^8.5.23 || ^9.5.13"
},
"type": "library",
@@ -3135,7 +3394,7 @@
],
"support": {
"issues": "https://github.com/myclabs/DeepCopy/issues",
"source": "https://github.com/myclabs/DeepCopy/tree/1.11.1"
"source": "https://github.com/myclabs/DeepCopy/tree/1.12.0"
},
"funding": [
{
@@ -3143,7 +3402,7 @@
"type": "tidelift"
}
],
"time": "2023-03-08T13:26:56+00:00"
"time": "2024-06-12T14:39:25+00:00"
},
{
"name": "nikic/php-parser",
@@ -3567,16 +3826,16 @@
},
{
"name": "phpstan/phpdoc-parser",
"version": "1.29.0",
"version": "1.29.1",
"source": {
"type": "git",
"url": "https://github.com/phpstan/phpdoc-parser.git",
"reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc"
"reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/536889f2b340489d328f5ffb7b02bb6b183ddedc",
"reference": "536889f2b340489d328f5ffb7b02bb6b183ddedc",
"url": "https://api.github.com/repos/phpstan/phpdoc-parser/zipball/fcaefacf2d5c417e928405b71b400d4ce10daaf4",
"reference": "fcaefacf2d5c417e928405b71b400d4ce10daaf4",
"shasum": ""
},
"require": {
@@ -3608,9 +3867,9 @@
"description": "PHPDoc parser with support for nullable, intersection and generic types",
"support": {
"issues": "https://github.com/phpstan/phpdoc-parser/issues",
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.0"
"source": "https://github.com/phpstan/phpdoc-parser/tree/1.29.1"
},
"time": "2024-05-06T12:04:23+00:00"
"time": "2024-05-31T08:52:43+00:00"
},
{
"name": "phpunit/php-code-coverage",
@@ -5049,16 +5308,16 @@
},
{
"name": "swoole/ide-helper",
"version": "5.0.2",
"version": "5.1.2",
"source": {
"type": "git",
"url": "https://github.com/swoole/ide-helper.git",
"reference": "16cfee44a6ec92254228c39bcab2fb8ae74cc2ea"
"reference": "33ec7af9111b76d06a70dd31191cc74793551112"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/swoole/ide-helper/zipball/16cfee44a6ec92254228c39bcab2fb8ae74cc2ea",
"reference": "16cfee44a6ec92254228c39bcab2fb8ae74cc2ea",
"url": "https://api.github.com/repos/swoole/ide-helper/zipball/33ec7af9111b76d06a70dd31191cc74793551112",
"reference": "33ec7af9111b76d06a70dd31191cc74793551112",
"shasum": ""
},
"type": "library",
@@ -5075,9 +5334,9 @@
"description": "IDE help files for Swoole.",
"support": {
"issues": "https://github.com/swoole/ide-helper/issues",
"source": "https://github.com/swoole/ide-helper/tree/5.0.2"
"source": "https://github.com/swoole/ide-helper/tree/5.1.2"
},
"time": "2023-03-20T06:05:55+00:00"
"time": "2024-02-01T22:28:11+00:00"
},
{
"name": "symfony/polyfill-ctype",
@@ -5158,86 +5417,6 @@
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "symfony/polyfill-mbstring",
"version": "v1.29.0",
"source": {
"type": "git",
"url": "https://github.com/symfony/polyfill-mbstring.git",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"reference": "9773676c8a1bb1f8d4340a62efe641cf76eda7ec",
"shasum": ""
},
"require": {
"php": ">=7.1"
},
"provide": {
"ext-mbstring": "*"
},
"suggest": {
"ext-mbstring": "For best performance"
},
"type": "library",
"extra": {
"thanks": {
"name": "symfony/polyfill",
"url": "https://github.com/symfony/polyfill"
}
},
"autoload": {
"files": [
"bootstrap.php"
],
"psr-4": {
"Symfony\\Polyfill\\Mbstring\\": ""
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"authors": [
{
"name": "Nicolas Grekas",
"email": "p@tchwork.com"
},
{
"name": "Symfony Community",
"homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony polyfill for the Mbstring extension",
"homepage": "https://symfony.com",
"keywords": [
"compatibility",
"mbstring",
"polyfill",
"portable",
"shim"
],
"support": {
"source": "https://github.com/symfony/polyfill-mbstring/tree/v1.29.0"
},
"funding": [
{
"url": "https://symfony.com/sponsor",
"type": "custom"
},
{
"url": "https://github.com/fabpot",
"type": "github"
},
{
"url": "https://tidelift.com/funding/github/packagist/symfony/symfony",
"type": "tidelift"
}
],
"time": "2024-01-29T20:11:03+00:00"
},
{
"name": "textalk/websocket",
"version": "1.5.7",
@@ -5408,45 +5587,6 @@
}
],
"time": "2023-11-21T18:54:41+00:00"
},
{
"name": "utopia-php/fetch",
"version": "0.1.0",
"source": {
"type": "git",
"url": "https://github.com/utopia-php/fetch.git",
"reference": "2fa214b9262acd1a3583515a364da4f35929d5c5"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/utopia-php/fetch/zipball/2fa214b9262acd1a3583515a364da4f35929d5c5",
"reference": "2fa214b9262acd1a3583515a364da4f35929d5c5",
"shasum": ""
},
"require": {
"php": ">=8.0"
},
"require-dev": {
"laravel/pint": "^1.5.0",
"phpstan/phpstan": "^1.10",
"phpunit/phpunit": "^9.5"
},
"type": "library",
"autoload": {
"psr-4": {
"Utopia\\Fetch\\": "src/"
}
},
"notification-url": "https://packagist.org/downloads/",
"license": [
"MIT"
],
"description": "A simple library that provides an interface for making HTTP Requests.",
"support": {
"issues": "https://github.com/utopia-php/fetch/issues",
"source": "https://github.com/utopia-php/fetch/tree/0.1.0"
},
"time": "2023-10-10T11:58:32+00:00"
}
],
"aliases": [],
@@ -5475,5 +5615,5 @@
"platform-overrides": {
"php": "8.3"
},
"plugin-api-version": "2.2.0"
"plugin-api-version": "2.6.0"
}
+26 -25
View File
@@ -51,7 +51,7 @@ services:
DEBUG: false
TESTING: true
VERSION: dev
ports:
ports:
- 9501:80
networks:
- appwrite
@@ -82,6 +82,8 @@ services:
- ./public:/usr/src/code/public
- ./src:/usr/src/code/src
- ./dev:/usr/src/code/dev
- ./vendor/utopia-php/database:/usr/src/code/vendor/utopia-php/database
- ./vendor/utopia-php/cache:/usr/src/code/vendor/utopia-php/cache
depends_on:
- mariadb
- redis
@@ -92,6 +94,7 @@ services:
- app/http.php
environment:
- _APP_ENV
- _APP_EDITION
- _APP_WORKER_PER_CORE
- _APP_LOCALE
- _APP_CONSOLE_WHITELIST_ROOT
@@ -186,6 +189,9 @@ services:
- _APP_MESSAGE_EMAIL_TEST_DSN
- _APP_MESSAGE_PUSH_TEST_DSN
- _APP_CONSOLE_COUNTRIES_DENYLIST
- _APP_EXPERIMENT_LOGGING_PROVIDER
- _APP_EXPERIMENT_LOGGING_CONFIG
- _APP_DATABASE_SHARED_TABLES
appwrite-realtime:
entrypoint: realtime
@@ -235,6 +241,7 @@ services:
- _APP_USAGE_STATS
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-audits:
entrypoint: worker-audits
@@ -264,6 +271,7 @@ services:
- _APP_DB_PASS
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-webhooks:
entrypoint: worker-webhooks
@@ -296,6 +304,7 @@ services:
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_WEBHOOK_MAX_FAILED_ATTEMPTS
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-deletes:
entrypoint: worker-deletes
@@ -353,6 +362,7 @@ services:
- _APP_LOGGING_CONFIG
- _APP_EXECUTOR_SECRET
- _APP_EXECUTOR_HOST
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-databases:
entrypoint: worker-databases
@@ -384,6 +394,7 @@ services:
- _APP_LOGGING_CONFIG
- _APP_WORKERS_NUM
- _APP_QUEUE_NAME
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-builds:
entrypoint: worker-builds
@@ -449,6 +460,7 @@ services:
- _APP_STORAGE_WASABI_SECRET
- _APP_STORAGE_WASABI_REGION
- _APP_STORAGE_WASABI_BUCKET
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-certificates:
entrypoint: worker-certificates
@@ -484,6 +496,7 @@ services:
- _APP_DB_PASS
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-functions:
entrypoint: worker-functions
@@ -523,6 +536,7 @@ services:
- _APP_DOCKER_HUB_PASSWORD
- _APP_LOGGING_CONFIG
- _APP_LOGGING_PROVIDER
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-mails:
entrypoint: worker-mails
@@ -557,6 +571,7 @@ services:
- _APP_LOGGING_CONFIG
- _APP_DOMAIN
- _APP_OPTIONS_FORCE_HTTPS
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-messaging:
entrypoint: worker-messaging
@@ -611,6 +626,7 @@ services:
- _APP_STORAGE_WASABI_SECRET
- _APP_STORAGE_WASABI_REGION
- _APP_STORAGE_WASABI_BUCKET
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-migrations:
entrypoint: worker-migrations
@@ -646,6 +662,7 @@ services:
- _APP_LOGGING_CONFIG
- _APP_MIGRATIONS_FIREBASE_CLIENT_ID
- _APP_MIGRATIONS_FIREBASE_CLIENT_SECRET
- _APP_DATABASE_SHARED_TABLES
appwrite-task-maintenance:
entrypoint: maintenance
@@ -683,6 +700,7 @@ services:
- _APP_MAINTENANCE_RETENTION_USAGE_HOURLY
- _APP_MAINTENANCE_RETENTION_SCHEDULES
- _APP_MAINTENANCE_DELAY
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-usage:
entrypoint: worker-usage
@@ -714,6 +732,7 @@ services:
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_USAGE_AGGREGATION_INTERVAL
- _APP_DATABASE_SHARED_TABLES
appwrite-worker-usage-dump:
entrypoint: worker-usage-dump
@@ -745,6 +764,7 @@ services:
- _APP_LOGGING_PROVIDER
- _APP_LOGGING_CONFIG
- _APP_USAGE_AGGREGATION_INTERVAL
- _APP_DATABASE_SHARED_TABLES
appwrite-task-scheduler-functions:
entrypoint: schedule-functions
@@ -772,6 +792,7 @@ services:
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS
- _APP_DATABASE_SHARED_TABLES
appwrite-task-scheduler-messages:
entrypoint: schedule-messages
@@ -799,6 +820,7 @@ services:
- _APP_DB_SCHEMA
- _APP_DB_USER
- _APP_DB_PASS
- _APP_DATABASE_SHARED_TABLES
appwrite-assistant:
container_name: appwrite-assistant
@@ -810,7 +832,7 @@ services:
openruntimes-executor:
container_name: openruntimes-executor
hostname: appwrite-executor
hostname: exc1
<<: *x-logging
stop_signal: SIGINT
image: openruntimes/executor:0.5.5
@@ -876,7 +898,7 @@ services:
- OPR_PROXY_LOGGING_PROVIDER=$_APP_LOGGING_PROVIDER
- OPR_PROXY_LOGGING_CONFIG=$_APP_LOGGING_CONFIG
- OPR_PROXY_ALGORITHM=random
- OPR_PROXY_EXECUTORS=appwrite-executor
- OPR_PROXY_EXECUTORS=exc1
- OPR_PROXY_HEALTHCHECK_INTERVAL=10000
- OPR_PROXY_MAX_TIMEOUT=600
- OPR_PROXY_HEALTHCHECK=enabled
@@ -897,20 +919,7 @@ services:
- MYSQL_USER=${_APP_DB_USER}
- MYSQL_PASSWORD=${_APP_DB_PASS}
- MARIADB_AUTO_UPGRADE=1
command: "mysqld --innodb-flush-method=fsync" # add ' --query_cache_size=0' for DB tests
# command: mv /var/lib/mysql/ib_logfile0 /var/lib/mysql/ib_logfile0.bu && mv /var/lib/mysql/ib_logfile1 /var/lib/mysql/ib_logfile1.bu
# smtp:
# image: appwrite/smtp:1.2.0
# container_name: appwrite-smtp
# restart: unless-stopped
# networks:
# - appwrite
# environment:
# - LOCAL_DOMAINS=@
# - RELAY_FROM_HOSTS=192.168.0.0/16 ; *.yourdomain.com
# - SMARTHOST_HOST=smtp
# - SMARTHOST_PORT=587
command: "mysqld --innodb-flush-method=fsync"
redis:
image: redis:7.2.4-alpine
@@ -928,14 +937,6 @@ services:
volumes:
- appwrite-redis:/data:rw
# clamav:
# image: appwrite/clamav:1.2.0
# container_name: appwrite-clamav
# networks:
# - appwrite
# volumes:
# - appwrite-uploads:/storage/uploads
# Dev Tools Start ------------------------------------------------------------------------------------------
#
# The Appwrite Team uses the following tools to help debug, monitor and diagnose the Appwrite stack
@@ -7,7 +7,7 @@ let client = Client()
let account = Account(client)
let user = try await account.deleteMfaAuthenticator(
let result = try await account.deleteMfaAuthenticator(
type: .totp,
otp: "<OTP>"
)
@@ -2,6 +2,7 @@ mutation {
accountCreateAnonymousSession {
_id
_createdAt
_updatedAt
userId
expire
provider
@@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider
@@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider
@@ -3,35 +3,6 @@ mutation {
type: "totp",
otp: "<OTP>"
) {
_id
_createdAt
_updatedAt
name
password
hash
hashOptions
registration
status
labels
passwordUpdate
email
phone
emailVerification
phoneVerification
mfa
prefs {
data
}
targets {
_id
_createdAt
_updatedAt
name
userId
providerId
providerType
identifier
}
accessedAt
}
}
@@ -4,6 +4,7 @@ query {
) {
_id
_createdAt
_updatedAt
userId
expire
provider
@@ -3,5 +3,6 @@ query {
totp
phone
email
recoveryCode
}
}
@@ -4,6 +4,7 @@ query {
sessions {
_id
_createdAt
_updatedAt
userId
expire
provider
@@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider
@@ -5,6 +5,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider
@@ -4,6 +4,7 @@ mutation {
) {
_id
_createdAt
_updatedAt
userId
expire
provider
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createAnonymousSession();
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createEmailPasswordSession(
'email@example.com', // email
'password' // password
);
console.log(response);
@@ -0,0 +1,15 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createEmailToken(
'<USER_ID>', // userId
'email@example.com', // email
false // phrase (optional)
);
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createJWT();
console.log(response);
@@ -0,0 +1,16 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMagicURLToken(
'<USER_ID>', // userId
'email@example.com', // email
'https://example.com', // url (optional)
false // phrase (optional)
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account, AuthenticatorType } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaAuthenticator(
AuthenticatorType.Totp // type
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account, AuthenticationFactor } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaChallenge(
AuthenticationFactor.Email // factor
);
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createMfaRecoveryCodes();
console.log(response);
@@ -0,0 +1,15 @@
import { Client, Account, OAuthProvider } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
account.createOAuth2Session(
OAuthProvider.Amazon, // provider
'https://example.com', // success (optional)
'https://example.com', // failure (optional)
[] // scopes (optional)
);
@@ -0,0 +1,15 @@
import { Client, Account, OAuthProvider } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
account.createOAuth2Token(
OAuthProvider.Amazon, // provider
'https://example.com', // success (optional)
'https://example.com', // failure (optional)
[] // scopes (optional)
);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createPhoneToken(
'<USER_ID>', // userId
'+12065550100' // phone
);
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createPhoneVerification();
console.log(response);
@@ -0,0 +1,15 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createPushTarget(
'<TARGET_ID>', // targetId
'<IDENTIFIER>', // identifier
'<PROVIDER_ID>' // providerId (optional)
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createRecovery(
'email@example.com', // email
'https://example.com' // url
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createSession(
'<USER_ID>', // userId
'<SECRET>' // secret
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.createVerification(
'https://example.com' // url
);
console.log(response);
@@ -0,0 +1,16 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.create(
'<USER_ID>', // userId
'email@example.com', // email
'', // password
'<NAME>' // name (optional)
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.deleteIdentity(
'<IDENTITY_ID>' // identityId
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account, AuthenticatorType } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.deleteMfaAuthenticator(
AuthenticatorType.Totp, // type
'<OTP>' // otp
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.deletePushTarget(
'<TARGET_ID>' // targetId
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.deleteSession(
'<SESSION_ID>' // sessionId
);
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.deleteSessions();
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.getMfaRecoveryCodes();
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.getPrefs();
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.getSession(
'<SESSION_ID>' // sessionId
);
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.get();
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.listIdentities(
[] // queries (optional)
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.listLogs(
[] // queries (optional)
);
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.listMfaFactors();
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.listSessions();
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateEmail(
'email@example.com', // email
'password' // password
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateMFA(
false // mfa
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateMagicURLSession(
'<USER_ID>', // userId
'<SECRET>' // secret
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account, AuthenticatorType } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateMfaAuthenticator(
AuthenticatorType.Totp, // type
'<OTP>' // otp
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateMfaChallenge(
'<CHALLENGE_ID>', // challengeId
'<OTP>' // otp
);
console.log(response);
@@ -0,0 +1,11 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateMfaRecoveryCodes();
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updateName(
'<NAME>' // name
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updatePassword(
'', // password
'password' // oldPassword (optional)
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updatePhoneSession(
'<USER_ID>', // userId
'<SECRET>' // secret
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updatePhoneVerification(
'<USER_ID>', // userId
'<SECRET>' // secret
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updatePhone(
'+12065550100', // phone
'password' // password
);
console.log(response);
@@ -0,0 +1,13 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updatePrefs(
{} // prefs
);
console.log(response);
@@ -0,0 +1,14 @@
import { Client, Account } from "react-native-appwrite";
const client = new Client()
.setEndpoint('https://cloud.appwrite.io/v1') // Your API Endpoint
.setProject('5df5acd0d48c2'); // Your project ID
const account = new Account(client);
const result = await account.updatePushTarget(
'<TARGET_ID>', // targetId
'<IDENTIFIER>' // identifier
);
console.log(response);

Some files were not shown because too many files have changed in this diff Show More