appwrite-cli 13.6.1 → 14.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.github/workflows/ci.yml +66 -0
- package/CHANGELOG.md +10 -0
- package/README.md +2 -2
- package/dist/bundle-win-arm64.mjs +274 -100
- package/dist/cli.cjs +274 -100
- package/dist/index.cjs +200 -81
- package/dist/index.js +200 -81
- package/dist/lib/commands/generate.d.ts +2 -0
- package/dist/lib/commands/generate.d.ts.map +1 -1
- package/dist/lib/commands/generators/base.d.ts +20 -2
- package/dist/lib/commands/generators/base.d.ts.map +1 -1
- package/dist/lib/commands/generators/index.d.ts +1 -1
- package/dist/lib/commands/generators/index.d.ts.map +1 -1
- package/dist/lib/commands/generators/typescript/databases.d.ts +2 -2
- package/dist/lib/commands/generators/typescript/databases.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/docs/examples/projects/update-status.md +5 -0
- package/docs/examples/sites/create-deployment.md +1 -2
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/commands/generate.ts +15 -2
- package/lib/commands/generators/base.ts +27 -2
- package/lib/commands/generators/index.ts +1 -0
- package/lib/commands/generators/typescript/databases.ts +22 -12
- package/lib/commands/services/account.ts +1 -1
- package/lib/commands/services/databases.ts +20 -19
- package/lib/commands/services/health.ts +13 -0
- package/lib/commands/services/messaging.ts +1 -1
- package/lib/commands/services/projects.ts +25 -0
- package/lib/commands/services/sites.ts +8 -3
- package/lib/commands/services/tables-db.ts +3 -2
- package/lib/commands/services/teams.ts +2 -2
- package/lib/constants.ts +1 -1
- package/package.json +2 -2
- package/scoop/appwrite.config.json +3 -3
package/lib/commands/generate.ts
CHANGED
|
@@ -25,6 +25,8 @@ export interface GenerateCommandOptions {
|
|
|
25
25
|
output: string;
|
|
26
26
|
language?: string;
|
|
27
27
|
server?: ServerSideOverride;
|
|
28
|
+
appwriteImportSource?: string;
|
|
29
|
+
importExtension?: string;
|
|
28
30
|
}
|
|
29
31
|
|
|
30
32
|
const generateAction = async (
|
|
@@ -114,7 +116,10 @@ const generateAction = async (
|
|
|
114
116
|
);
|
|
115
117
|
|
|
116
118
|
try {
|
|
117
|
-
const result = await generator.generate(config
|
|
119
|
+
const result = await generator.generate(config, {
|
|
120
|
+
appwriteImportSource: options.appwriteImportSource,
|
|
121
|
+
importExtension: options.importExtension,
|
|
122
|
+
});
|
|
118
123
|
await generator.writeFiles(absoluteOutputDir, result);
|
|
119
124
|
|
|
120
125
|
const generatedFiles = generator.getGeneratedFilePaths(result);
|
|
@@ -131,7 +136,7 @@ const generateAction = async (
|
|
|
131
136
|
const firstEntity = entities?.[0];
|
|
132
137
|
const dbId = firstEntity?.databaseId ?? "databaseId";
|
|
133
138
|
const tableName = firstEntity?.name ?? "tableName";
|
|
134
|
-
const importExt = detectImportExtension();
|
|
139
|
+
const importExt = options.importExtension ?? detectImportExtension();
|
|
135
140
|
|
|
136
141
|
console.log("");
|
|
137
142
|
log(`Import the generated SDK in your project:`);
|
|
@@ -175,6 +180,14 @@ export const generate = new Command("generate")
|
|
|
175
180
|
"Override server-side generation (auto|true|false)",
|
|
176
181
|
"auto",
|
|
177
182
|
)
|
|
183
|
+
.option(
|
|
184
|
+
"--appwrite-import-source <source>",
|
|
185
|
+
"Override Appwrite import source in generated files (e.g. node-appwrite, appwrite, @appwrite.io/console). Auto-detected from package.json/deno.json if not provided.",
|
|
186
|
+
)
|
|
187
|
+
.option(
|
|
188
|
+
"--import-extension <ext>",
|
|
189
|
+
'Override import file extension in generated files (.js for ESM, empty string for CJS). Auto-detected from package.json "type" field if not provided.',
|
|
190
|
+
)
|
|
178
191
|
.addHelpText(
|
|
179
192
|
"after",
|
|
180
193
|
`
|
|
@@ -26,6 +26,24 @@ export interface GenerateResult {
|
|
|
26
26
|
constantsContent: string;
|
|
27
27
|
}
|
|
28
28
|
|
|
29
|
+
/**
|
|
30
|
+
* Options for overriding auto-detected generation settings.
|
|
31
|
+
*/
|
|
32
|
+
export interface GenerateOptions {
|
|
33
|
+
/**
|
|
34
|
+
* Override the Appwrite import source used in generated files.
|
|
35
|
+
* Auto-detected from package.json/deno.json if not provided.
|
|
36
|
+
* Examples: "node-appwrite", "appwrite", "@appwrite.io/console"
|
|
37
|
+
*/
|
|
38
|
+
appwriteImportSource?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Override the import file extension used in generated files.
|
|
41
|
+
* Auto-detected from package.json "type" field / deno.json if not provided.
|
|
42
|
+
* Use ".js" for ESM projects or "" for CJS/unknown projects.
|
|
43
|
+
*/
|
|
44
|
+
importExtension?: string;
|
|
45
|
+
}
|
|
46
|
+
|
|
29
47
|
/**
|
|
30
48
|
* Base interface for all language-specific database generators.
|
|
31
49
|
* Implement this interface to add support for new languages.
|
|
@@ -44,12 +62,16 @@ export interface IDatabasesGenerator {
|
|
|
44
62
|
/**
|
|
45
63
|
* Generate the SDK files from the configuration.
|
|
46
64
|
* @param config - The project configuration containing tables/collections
|
|
65
|
+
* @param options - Optional overrides for auto-detected settings (e.g. import source, extension)
|
|
47
66
|
* @returns Promise resolving to named file contents:
|
|
48
67
|
* `dbContent` (`databases.ts`), `typesContent` (`types.ts`),
|
|
49
68
|
* `indexContent` (`index.ts`), and `constantsContent` (`constants.ts`).
|
|
50
69
|
* Import your generated SDK from `index.ts` (or `index.js` after transpilation).
|
|
51
70
|
*/
|
|
52
|
-
generate(
|
|
71
|
+
generate(
|
|
72
|
+
config: ConfigType,
|
|
73
|
+
options?: GenerateOptions,
|
|
74
|
+
): Promise<GenerateResult>;
|
|
53
75
|
|
|
54
76
|
/**
|
|
55
77
|
* Write the generated files to disk.
|
|
@@ -80,7 +102,10 @@ export abstract class BaseDatabasesGenerator implements IDatabasesGenerator {
|
|
|
80
102
|
abstract readonly language: SupportedLanguage;
|
|
81
103
|
abstract readonly fileExtension: string;
|
|
82
104
|
|
|
83
|
-
abstract generate(
|
|
105
|
+
abstract generate(
|
|
106
|
+
config: ConfigType,
|
|
107
|
+
options?: GenerateOptions,
|
|
108
|
+
): Promise<GenerateResult>;
|
|
84
109
|
|
|
85
110
|
async writeFiles(outputDir: string, result: GenerateResult): Promise<void> {
|
|
86
111
|
const sdkDir = path.join(outputDir, SDK_TITLE_LOWER);
|
|
@@ -6,6 +6,7 @@ import { TypeScript } from "../../../type-generation/languages/typescript.js";
|
|
|
6
6
|
import { SDK_TITLE, EXECUTABLE_NAME } from "../../../constants.js";
|
|
7
7
|
import {
|
|
8
8
|
BaseDatabasesGenerator,
|
|
9
|
+
GenerateOptions,
|
|
9
10
|
GenerateResult,
|
|
10
11
|
SupportedLanguage,
|
|
11
12
|
} from "../base.js";
|
|
@@ -259,14 +260,13 @@ ${
|
|
|
259
260
|
};`;
|
|
260
261
|
}
|
|
261
262
|
|
|
262
|
-
private generateTypesFile(config: ConfigType): string {
|
|
263
|
+
private generateTypesFile(config: ConfigType, appwriteDep: string): string {
|
|
263
264
|
const entities = config.tables?.length ? config.tables : config.collections;
|
|
264
265
|
|
|
265
266
|
if (!entities || entities.length === 0) {
|
|
266
267
|
return "// No tables or collections found in configuration\n";
|
|
267
268
|
}
|
|
268
269
|
|
|
269
|
-
const appwriteDep = getAppwriteDependency();
|
|
270
270
|
const enums = this.generateEnums(entities);
|
|
271
271
|
const types = entities
|
|
272
272
|
.map((entity: Entity) => this.generateTableType(entity, entities))
|
|
@@ -370,7 +370,11 @@ ${
|
|
|
370
370
|
}`;
|
|
371
371
|
}
|
|
372
372
|
|
|
373
|
-
private generateDatabasesFile(
|
|
373
|
+
private generateDatabasesFile(
|
|
374
|
+
config: ConfigType,
|
|
375
|
+
importExt: string,
|
|
376
|
+
appwriteDep: string,
|
|
377
|
+
): string {
|
|
374
378
|
const entities = config.tables?.length ? config.tables : config.collections;
|
|
375
379
|
|
|
376
380
|
if (!entities || entities.length === 0) {
|
|
@@ -378,7 +382,6 @@ ${
|
|
|
378
382
|
}
|
|
379
383
|
|
|
380
384
|
const entitiesByDb = this.groupEntitiesByDb(entities);
|
|
381
|
-
const appwriteDep = getAppwriteDependency();
|
|
382
385
|
const supportsServerSide = supportsServerSideMethods(
|
|
383
386
|
appwriteDep,
|
|
384
387
|
this.serverSideOverride,
|
|
@@ -405,8 +408,10 @@ ${
|
|
|
405
408
|
});
|
|
406
409
|
}
|
|
407
410
|
|
|
408
|
-
private generateConstantsFile(
|
|
409
|
-
|
|
411
|
+
private generateConstantsFile(
|
|
412
|
+
config: ConfigType,
|
|
413
|
+
appwriteDep: string,
|
|
414
|
+
): string {
|
|
410
415
|
const supportsServerSide = supportsServerSideMethods(
|
|
411
416
|
appwriteDep,
|
|
412
417
|
this.serverSideOverride,
|
|
@@ -420,12 +425,17 @@ ${
|
|
|
420
425
|
});
|
|
421
426
|
}
|
|
422
427
|
|
|
423
|
-
async generate(
|
|
428
|
+
async generate(
|
|
429
|
+
config: ConfigType,
|
|
430
|
+
options?: GenerateOptions,
|
|
431
|
+
): Promise<GenerateResult> {
|
|
424
432
|
if (!config.projectId) {
|
|
425
433
|
throw new Error("Project ID is required in configuration");
|
|
426
434
|
}
|
|
427
435
|
|
|
428
|
-
const
|
|
436
|
+
const appwriteDep =
|
|
437
|
+
options?.appwriteImportSource ?? getAppwriteDependency();
|
|
438
|
+
const importExt = options?.importExtension ?? detectImportExtension();
|
|
429
439
|
|
|
430
440
|
const hasEntities =
|
|
431
441
|
(config.tables && config.tables.length > 0) ||
|
|
@@ -439,15 +449,15 @@ ${
|
|
|
439
449
|
dbContent: "// No tables or collections found in configuration\n",
|
|
440
450
|
typesContent: "// No tables or collections found in configuration\n",
|
|
441
451
|
indexContent: this.generateIndexFile(importExt),
|
|
442
|
-
constantsContent: this.generateConstantsFile(config),
|
|
452
|
+
constantsContent: this.generateConstantsFile(config, appwriteDep),
|
|
443
453
|
};
|
|
444
454
|
}
|
|
445
455
|
|
|
446
456
|
return {
|
|
447
|
-
dbContent: this.generateDatabasesFile(config, importExt),
|
|
448
|
-
typesContent: this.generateTypesFile(config),
|
|
457
|
+
dbContent: this.generateDatabasesFile(config, importExt, appwriteDep),
|
|
458
|
+
typesContent: this.generateTypesFile(config, appwriteDep),
|
|
449
459
|
indexContent: this.generateIndexFile(importExt),
|
|
450
|
-
constantsContent: this.generateConstantsFile(config),
|
|
460
|
+
constantsContent: this.generateConstantsFile(config, appwriteDep),
|
|
451
461
|
};
|
|
452
462
|
}
|
|
453
463
|
}
|
|
@@ -201,7 +201,7 @@ account
|
|
|
201
201
|
|
|
202
202
|
account
|
|
203
203
|
.command(`list-keys`)
|
|
204
|
-
.description(`Get a list of all API keys from the current account
|
|
204
|
+
.description(`Get a list of all API keys from the current account.`)
|
|
205
205
|
.option(
|
|
206
206
|
`--total [value]`,
|
|
207
207
|
`When set to false, the total count returned will be 0 and will not be calculated.`,
|
|
@@ -314,7 +314,7 @@ databases
|
|
|
314
314
|
.description(`Create a boolean attribute.
|
|
315
315
|
`)
|
|
316
316
|
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
317
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new
|
|
317
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID. You can create a new collection using the Database service [server integration](https://appwrite.io/docs/server/databases#databasesCreateCollection).`)
|
|
318
318
|
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
319
319
|
.requiredOption(`--required <required>`, `Is attribute required?`, parseBool)
|
|
320
320
|
.option(
|
|
@@ -801,6 +801,22 @@ databases
|
|
|
801
801
|
),
|
|
802
802
|
);
|
|
803
803
|
|
|
804
|
+
databases
|
|
805
|
+
.command(`update-relationship-attribute`)
|
|
806
|
+
.description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
807
|
+
`)
|
|
808
|
+
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
809
|
+
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
810
|
+
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
811
|
+
.option(`--on-delete <on-delete>`, `Constraints option`)
|
|
812
|
+
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
813
|
+
.action(
|
|
814
|
+
actionRunner(
|
|
815
|
+
async ({ databaseId, collectionId, key, onDelete, newKey }) =>
|
|
816
|
+
parse(await (await getDatabasesClient()).updateRelationshipAttribute(databaseId, collectionId, key, onDelete, newKey)),
|
|
817
|
+
),
|
|
818
|
+
);
|
|
819
|
+
|
|
804
820
|
databases
|
|
805
821
|
.command(`create-string-attribute`)
|
|
806
822
|
.description(`Create a string attribute.
|
|
@@ -1005,22 +1021,6 @@ databases
|
|
|
1005
1021
|
),
|
|
1006
1022
|
);
|
|
1007
1023
|
|
|
1008
|
-
databases
|
|
1009
|
-
.command(`update-relationship-attribute`)
|
|
1010
|
-
.description(`Update relationship attribute. [Learn more about relationship attributes](https://appwrite.io/docs/databases-relationships#relationship-attributes).
|
|
1011
|
-
`)
|
|
1012
|
-
.requiredOption(`--database-id <database-id>`, `Database ID.`)
|
|
1013
|
-
.requiredOption(`--collection-id <collection-id>`, `Collection ID.`)
|
|
1014
|
-
.requiredOption(`--key <key>`, `Attribute Key.`)
|
|
1015
|
-
.option(`--on-delete <on-delete>`, `Constraints option`)
|
|
1016
|
-
.option(`--new-key <new-key>`, `New Attribute Key.`)
|
|
1017
|
-
.action(
|
|
1018
|
-
actionRunner(
|
|
1019
|
-
async ({ databaseId, collectionId, key, onDelete, newKey }) =>
|
|
1020
|
-
parse(await (await getDatabasesClient()).updateRelationshipAttribute(databaseId, collectionId, key, onDelete, newKey)),
|
|
1021
|
-
),
|
|
1022
|
-
);
|
|
1023
|
-
|
|
1024
1024
|
databases
|
|
1025
1025
|
.command(`list-documents`)
|
|
1026
1026
|
.description(`Get a list of all the user's documents in a given collection. You can use the query params to filter your results.`)
|
|
@@ -1034,10 +1034,11 @@ databases
|
|
|
1034
1034
|
(value: string | undefined) =>
|
|
1035
1035
|
value === undefined ? true : parseBool(value),
|
|
1036
1036
|
)
|
|
1037
|
+
.option(`--ttl <ttl>`, `TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).`, parseInteger)
|
|
1037
1038
|
.action(
|
|
1038
1039
|
actionRunner(
|
|
1039
|
-
async ({ databaseId, collectionId, queries, transactionId, total }) =>
|
|
1040
|
-
parse(await (await getDatabasesClient()).listDocuments(databaseId, collectionId, queries, transactionId, total)),
|
|
1040
|
+
async ({ databaseId, collectionId, queries, transactionId, total, ttl }) =>
|
|
1041
|
+
parse(await (await getDatabasesClient()).listDocuments(databaseId, collectionId, queries, transactionId, total, ttl)),
|
|
1041
1042
|
),
|
|
1042
1043
|
);
|
|
1043
1044
|
|
|
@@ -64,6 +64,19 @@ health
|
|
|
64
64
|
),
|
|
65
65
|
);
|
|
66
66
|
|
|
67
|
+
health
|
|
68
|
+
.command(`get-console-pausing`)
|
|
69
|
+
.description(`Get console pausing health status. Monitors projects approaching the pause threshold to detect potential issues with console access tracking.
|
|
70
|
+
`)
|
|
71
|
+
.option(`--threshold <threshold>`, `Percentage threshold of projects approaching pause. When hit (equal or higher), endpoint returns server error. Default value is 10.`, parseInteger)
|
|
72
|
+
.option(`--inactivity-days <inactivity-days>`, `Number of days of inactivity before a project is paused. Should match the plan's projectInactivityDays setting. Default value is 7.`, parseInteger)
|
|
73
|
+
.action(
|
|
74
|
+
actionRunner(
|
|
75
|
+
async ({ threshold, inactivityDays }) =>
|
|
76
|
+
parse(await (await getHealthClient()).getConsolePausing(threshold, inactivityDays)),
|
|
77
|
+
),
|
|
78
|
+
);
|
|
79
|
+
|
|
67
80
|
health
|
|
68
81
|
.command(`get-db`)
|
|
69
82
|
.description(`Check the Appwrite database servers are up and connection is successful.`)
|
|
@@ -993,7 +993,7 @@ messaging
|
|
|
993
993
|
.command(`list-subscribers`)
|
|
994
994
|
.description(`Get a list of all subscribers from the current Appwrite project.`)
|
|
995
995
|
.requiredOption(`--topic-id <topic-id>`, `Topic ID. The topic ID subscribed to.`)
|
|
996
|
-
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes:
|
|
996
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: targetId, topicId, userId, providerType`)
|
|
997
997
|
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
|
|
998
998
|
.option(
|
|
999
999
|
`--total [value]`,
|
|
@@ -270,6 +270,18 @@ projects
|
|
|
270
270
|
),
|
|
271
271
|
);
|
|
272
272
|
|
|
273
|
+
projects
|
|
274
|
+
.command(`update-console-access`)
|
|
275
|
+
.description(`Record console access to a project. This endpoint updates the last accessed timestamp for the project to track console activity.
|
|
276
|
+
`)
|
|
277
|
+
.requiredOption(`--project-id <project-id>`, `Project ID`)
|
|
278
|
+
.action(
|
|
279
|
+
actionRunner(
|
|
280
|
+
async ({ projectId }) =>
|
|
281
|
+
parse(await (await getProjectsClient()).updateConsoleAccess(projectId)),
|
|
282
|
+
),
|
|
283
|
+
);
|
|
284
|
+
|
|
273
285
|
projects
|
|
274
286
|
.command(`list-dev-keys`)
|
|
275
287
|
.description(`List all the project\'s dev keys. Dev keys are project specific and allow you to bypass rate limits and get better error logging during development.'`)
|
|
@@ -639,6 +651,19 @@ projects
|
|
|
639
651
|
),
|
|
640
652
|
);
|
|
641
653
|
|
|
654
|
+
projects
|
|
655
|
+
.command(`update-status`)
|
|
656
|
+
.description(`Update the status of a project. Can be used to archive/restore projects, and to restore paused projects. When restoring a paused project, the console fingerprint header must be provided and the project must not be blocked for any reason other than inactivity.
|
|
657
|
+
`)
|
|
658
|
+
.requiredOption(`--project-id <project-id>`, `Project ID`)
|
|
659
|
+
.requiredOption(`--status <status>`, `New status for the project`)
|
|
660
|
+
.action(
|
|
661
|
+
actionRunner(
|
|
662
|
+
async ({ projectId, status }) =>
|
|
663
|
+
parse(await (await getProjectsClient()).updateStatus(projectId, status)),
|
|
664
|
+
),
|
|
665
|
+
);
|
|
666
|
+
|
|
642
667
|
projects
|
|
643
668
|
.command(`update-team`)
|
|
644
669
|
.description(`Update the team ID of a project allowing for it to be transferred to another team.`)
|
|
@@ -243,14 +243,19 @@ sites
|
|
|
243
243
|
.description(`Create a new site code deployment. Use this endpoint to upload a new version of your site code. To activate your newly uploaded code, you'll need to update the site's deployment to use your new deployment ID.`)
|
|
244
244
|
.requiredOption(`--site-id <site-id>`, `Site ID.`)
|
|
245
245
|
.requiredOption(`--code <code>`, `Gzip file with your code package. When used with the Appwrite CLI, pass the path to your code directory, and the CLI will automatically package your code. Use a path that is within the current directory.`)
|
|
246
|
-
.requiredOption(`--activate <activate>`, `Automatically activate the deployment when it is finished building.`, parseBool)
|
|
247
246
|
.option(`--install-command <install-command>`, `Install Commands.`)
|
|
248
247
|
.option(`--build-command <build-command>`, `Build Commands.`)
|
|
249
248
|
.option(`--output-directory <output-directory>`, `Output Directory.`)
|
|
249
|
+
.option(
|
|
250
|
+
`--activate [value]`,
|
|
251
|
+
`Automatically activate the deployment when it is finished building.`,
|
|
252
|
+
(value: string | undefined) =>
|
|
253
|
+
value === undefined ? true : parseBool(value),
|
|
254
|
+
)
|
|
250
255
|
.action(
|
|
251
256
|
actionRunner(
|
|
252
|
-
async ({ siteId, code,
|
|
253
|
-
parse(await (await getSitesClient()).createDeployment(siteId, code,
|
|
257
|
+
async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) =>
|
|
258
|
+
parse(await (await getSitesClient()).createDeployment(siteId, code, installCommand, buildCommand, outputDirectory, activate)),
|
|
254
259
|
),
|
|
255
260
|
);
|
|
256
261
|
|
|
@@ -1109,10 +1109,11 @@ tablesDB
|
|
|
1109
1109
|
(value: string | undefined) =>
|
|
1110
1110
|
value === undefined ? true : parseBool(value),
|
|
1111
1111
|
)
|
|
1112
|
+
.option(`--ttl <ttl>`, `TTL (seconds) for cached responses when caching is enabled for select queries. Must be between 0 and 86400 (24 hours).`, parseInteger)
|
|
1112
1113
|
.action(
|
|
1113
1114
|
actionRunner(
|
|
1114
|
-
async ({ databaseId, tableId, queries, transactionId, total }) =>
|
|
1115
|
-
parse(await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total)),
|
|
1115
|
+
async ({ databaseId, tableId, queries, transactionId, total, ttl }) =>
|
|
1116
|
+
parse(await (await getTablesDBClient()).listRows(databaseId, tableId, queries, transactionId, total, ttl)),
|
|
1116
1117
|
),
|
|
1117
1118
|
);
|
|
1118
1119
|
|
|
@@ -139,7 +139,7 @@ Use the \`url\` parameter to redirect the user from the invitation email to your
|
|
|
139
139
|
Please note that to avoid a [Redirect Attack](https://github.com/OWASP/CheatSheetSeries/blob/master/cheatsheets/Unvalidated_Redirects_and_Forwards_Cheat_Sheet.md) Appwrite will accept the only redirect URLs under the domains you have added as a platform on the Appwrite Console.
|
|
140
140
|
`)
|
|
141
141
|
.requiredOption(`--team-id <team-id>`, `Team ID.`)
|
|
142
|
-
.requiredOption(`--roles [roles...]`, `Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
142
|
+
.requiredOption(`--roles [roles...]`, `Array of strings. Use this param to set the user roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`)
|
|
143
143
|
.option(`--email <email>`, `Email of the new team member.`)
|
|
144
144
|
.option(`--user-id <user-id>`, `ID of the user to be added to a team.`)
|
|
145
145
|
.option(`--phone <phone>`, `Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
|
|
@@ -170,7 +170,7 @@ teams
|
|
|
170
170
|
`)
|
|
171
171
|
.requiredOption(`--team-id <team-id>`, `Team ID.`)
|
|
172
172
|
.requiredOption(`--membership-id <membership-id>`, `Membership ID.`)
|
|
173
|
-
.requiredOption(`--roles [roles...]`, `An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each
|
|
173
|
+
.requiredOption(`--roles [roles...]`, `An array of strings. Use this param to set the user's roles in the team. A role can be any string. Learn more about [roles and permissions](https://appwrite.io/docs/permissions). Maximum of 100 roles are allowed, each 81 characters long.`)
|
|
174
174
|
.action(
|
|
175
175
|
actionRunner(
|
|
176
176
|
async ({ teamId, membershipId, roles }) =>
|
package/lib/constants.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
// SDK
|
|
2
2
|
export const SDK_TITLE = 'Appwrite';
|
|
3
3
|
export const SDK_TITLE_LOWER = 'appwrite';
|
|
4
|
-
export const SDK_VERSION = '
|
|
4
|
+
export const SDK_VERSION = '14.0.0';
|
|
5
5
|
export const SDK_NAME = 'Command Line';
|
|
6
6
|
export const SDK_PLATFORM = 'console';
|
|
7
7
|
export const SDK_LANGUAGE = 'cli';
|
package/package.json
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"type": "module",
|
|
4
4
|
"homepage": "https://appwrite.io/support",
|
|
5
5
|
"description": "Appwrite is an open-source self-hosted backend server that abstracts and simplifies complex and repetitive development tasks behind a very simple REST API",
|
|
6
|
-
"version": "
|
|
6
|
+
"version": "14.0.0",
|
|
7
7
|
"license": "BSD-3-Clause",
|
|
8
8
|
"main": "dist/index.cjs",
|
|
9
9
|
"module": "dist/index.js",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"windows-arm64": "esbuild cli.ts --bundle --loader:.hbs=text --platform=node --target=node18 --format=esm --external:fsevents --outfile=dist/bundle-win-arm64.mjs && pkg dist/bundle-win-arm64.mjs -t node18-win-arm64 -o build/appwrite-cli-win-arm64.exe"
|
|
48
48
|
},
|
|
49
49
|
"dependencies": {
|
|
50
|
-
"@appwrite.io/console": "^
|
|
50
|
+
"@appwrite.io/console": "^4.0.0",
|
|
51
51
|
"chalk": "4.1.2",
|
|
52
52
|
"chokidar": "^3.6.0",
|
|
53
53
|
"cli-progress": "^3.12.0",
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "14.0.0",
|
|
4
4
|
"description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
|
|
5
5
|
"homepage": "https://github.com/appwrite/sdk-for-cli",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"architecture": {
|
|
8
8
|
"64bit": {
|
|
9
|
-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/
|
|
9
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/14.0.0/appwrite-cli-win-x64.exe",
|
|
10
10
|
"bin": [
|
|
11
11
|
[
|
|
12
12
|
"appwrite-cli-win-x64.exe",
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
]
|
|
16
16
|
},
|
|
17
17
|
"arm64": {
|
|
18
|
-
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/
|
|
18
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/14.0.0/appwrite-cli-win-arm64.exe",
|
|
19
19
|
"bin": [
|
|
20
20
|
[
|
|
21
21
|
"appwrite-cli-win-arm64.exe",
|