Skip to content

Commit 45c7f72

Browse files
authored
Merge pull request #2825 from appwrite/feat-documentsdb
Feat `DocumentsDB`
2 parents 95e6625 + 596ec41 commit 45c7f72

164 files changed

Lines changed: 11360 additions & 1113 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

bun.lock

Lines changed: 47 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

eslint.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ export default ts.config(
3636
// TODO: @itznotabug, this requires a big refactor!
3737
'svelte/no-navigation-without-resolve': 'warn',
3838
'svelte/prefer-svelte-reactivity': 'warn',
39-
'svelte/prefer-writable-derived': 'warn'
39+
'svelte/prefer-writable-derived': 'off'
4040
}
4141
},
4242
{

package.json

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,20 @@
2020
},
2121
"dependencies": {
2222
"@ai-sdk/svelte": "^1.1.24",
23-
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@f063676",
23+
"@appwrite.io/console": "https://pkg.vc/-/@appwrite/@appwrite.io/console@6d0c948",
2424
"@appwrite.io/pink-icons": "0.25.0",
2525
"@appwrite.io/pink-icons-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-icons-svelte@bfe7ce3",
2626
"@appwrite.io/pink-legacy": "^1.0.3",
2727
"@appwrite.io/pink-svelte": "https://pkg.vc/-/@appwrite/@appwrite.io/pink-svelte@8dcaa17",
28+
"@codemirror/autocomplete": "^6.19.0",
29+
"@codemirror/commands": "^6.9.0",
30+
"@codemirror/language": "^6.11.3",
31+
"@codemirror/lint": "^6.9.0",
32+
"@codemirror/search": "^6.5.11",
33+
"@codemirror/state": "^6.5.2",
34+
"@codemirror/view": "^6.38.6",
2835
"@faker-js/faker": "^9.9.0",
36+
"@lezer/highlight": "^1.2.1",
2937
"@plausible-analytics/tracker": "^0.4.4",
3038
"@popperjs/core": "^2.11.8",
3139
"@sentry/sveltekit": "^8.55.1",
@@ -34,12 +42,14 @@
3442
"@threlte/extras": "^9.13.0",
3543
"ai": "^6.0.138",
3644
"analytics": "^0.8.19",
45+
"codemirror-json5": "^1.0.3",
3746
"cron-parser": "^4.9.0",
3847
"dayjs": "^1.11.20",
3948
"deep-equal": "^2.2.3",
4049
"echarts": "^5.6.0",
4150
"flatted": "^3.4.2",
4251
"ignore": "^6.0.2",
52+
"json5": "^2.2.3",
4353
"nanoid": "^5.1.7",
4454
"nanotar": "^0.3.0",
4555
"pretty-bytes": "^6.1.1",
@@ -51,6 +61,7 @@
5161
"devDependencies": {
5262
"@eslint/compat": "^1.4.1",
5363
"@eslint/js": "^9.39.4",
64+
"@lezer/common": "^1.5.0",
5465
"@melt-ui/pp": "^0.3.2",
5566
"@melt-ui/svelte": "^0.86.6",
5667
"@playwright/test": "^1.58.2",
@@ -95,7 +106,7 @@
95106
"immutable": "^5.1.5",
96107
"flatted": "^3.4.2",
97108
"yaml": "^1.10.3",
98-
"picomatch": "^2.3.2",
109+
"picomatch": "^4.0.4",
99110
"cookie": "^0.7.0"
100111
}
101112
}

src/lib/actions/analytics.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ export enum Click {
156156
DatabaseDatabaseDelete = 'click_database_delete',
157157
DatabaseImportCsv = 'click_database_import_csv',
158158
DatabaseExportCsv = 'click_database_export_csv',
159+
DatabaseImportJson = 'click_database_import_json',
159160
DomainCreateClick = 'click_domain_create',
160161
DomainDeleteClick = 'click_domain_delete',
161162
DomainRetryDomainVerificationClick = 'click_domain_retry_domain_verification',
@@ -284,6 +285,7 @@ export enum Submit {
284285
DatabaseUpdateName = 'submit_database_update_name',
285286
DatabaseImportCsv = 'submit_database_import_csv',
286287
DatabaseExportCsv = 'submit_database_export_csv',
288+
DatabaseImportJSON = 'submit_database_import_json',
287289
DatabaseBackupDelete = 'submit_database_backup_delete',
288290
DatabaseBackupPolicyCreate = 'submit_database_backup_policy_create',
289291

@@ -297,6 +299,11 @@ export enum Submit {
297299
RowUpdate = 'submit_row_update',
298300
RowUpdatePermissions = 'submit_row_update_permissions',
299301

302+
DocumentCreate = 'submit_document_create',
303+
DocumentDelete = 'submit_document_delete',
304+
DocumentUpdate = 'submit_document_update',
305+
DocumentUpdatePermissions = 'submit_document_update_permissions',
306+
300307
IndexCreate = 'submit_index_create',
301308
IndexDelete = 'submit_index_delete',
302309

@@ -308,6 +315,14 @@ export enum Submit {
308315
TableUpdateEnabled = 'submit_table_update_enabled',
309316
TableUpdateDisplayNames = 'submit_table_update_display_names',
310317

318+
CollectionCreate = 'submit_collection_create',
319+
CollectionDelete = 'submit_collection_delete',
320+
CollectionUpdateName = 'submit_collection_update_name',
321+
CollectionUpdatePermissions = 'submit_collection_update_permissions',
322+
CollectionUpdateSecurity = 'submit_collection_update_security',
323+
CollectionUpdateEnabled = 'submit_collection_update_enabled',
324+
CollectionUpdateDisplayNames = 'submit_collection_update_display_names',
325+
311326
FunctionCreate = 'submit_function_create',
312327
FunctionDelete = 'submit_function_delete',
313328
FunctionUpdateName = 'submit_function_update_name',

src/lib/commandCenter/commands.ts

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,11 @@ const groups = [
2929
'migrations',
3030
'users',
3131
'tables',
32+
'collections',
3233
'columns',
3334
'indexes',
3435
'rows',
36+
'documents',
3537
'teams',
3638
'security',
3739
'buckets',
@@ -102,8 +104,19 @@ const commandsEnabled = derived(disabledMap, ($disabledMap) => {
102104

103105
export function isTargetInputLike(element: EventTarget | null) {
104106
if (!(element instanceof HTMLElement)) return false;
107+
105108
return !!element.closest(
106-
'input,textarea,select,[contenteditable],[role="combobox"],[role="textbox"],[role="searchbox"],[data-command-center-ignore]'
109+
[
110+
'input',
111+
'textarea',
112+
'select',
113+
'[contenteditable]',
114+
'[role="combobox"]',
115+
'[role="textbox"]',
116+
'[role="searchbox"]',
117+
'[data-command-center-ignore]',
118+
'.cm-editor'
119+
].join(',')
107120
);
108121
}
109122

0 commit comments

Comments
 (0)