appwrite-cli 13.6.0 → 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 +14 -0
- package/README.md +2 -2
- package/cli.ts +3 -3
- package/dist/bundle-win-arm64.mjs +608 -310
- package/dist/cli.cjs +608 -310
- package/dist/index.cjs +354 -183
- package/dist/index.js +354 -183
- package/dist/lib/commands/config-validations.d.ts +1 -1
- package/dist/lib/commands/config-validations.d.ts.map +1 -1
- package/dist/lib/commands/errors.d.ts +4 -4
- package/dist/lib/commands/errors.d.ts.map +1 -1
- 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 +25 -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/commands/generic.d.ts.map +1 -1
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/run.d.ts.map +1 -1
- package/dist/lib/commands/types.d.ts.map +1 -1
- package/dist/lib/commands/update.d.ts.map +1 -1
- package/dist/lib/commands/utils/change-approval.d.ts +3 -3
- package/dist/lib/commands/utils/change-approval.d.ts.map +1 -1
- package/dist/lib/commands/utils/database-sync.d.ts.map +1 -1
- package/dist/lib/commands/utils/deployment.d.ts +16 -4
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
- package/dist/lib/commands/utils/pools.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/emulation/docker.d.ts.map +1 -1
- package/dist/lib/json.d.ts +1 -1
- package/dist/lib/json.d.ts.map +1 -1
- package/dist/lib/paginate.d.ts +5 -6
- package/dist/lib/paginate.d.ts.map +1 -1
- package/dist/lib/parser.d.ts +5 -4
- package/dist/lib/parser.d.ts.map +1 -1
- package/dist/lib/spinner.d.ts +1 -1
- package/dist/lib/spinner.d.ts.map +1 -1
- package/dist/lib/utils.d.ts +6 -1
- package/dist/lib/utils.d.ts.map +1 -1
- package/dist/lib/validations.d.ts +1 -1
- package/dist/lib/validations.d.ts.map +1 -1
- package/docs/examples/projects/update-status.md +5 -0
- package/docs/examples/sites/create-deployment.md +1 -2
- package/eslint.config.js +45 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.ts +3 -3
- package/lib/commands/config-validations.ts +1 -1
- package/lib/commands/config.ts +2 -2
- package/lib/commands/errors.ts +2 -2
- package/lib/commands/generate.ts +23 -8
- package/lib/commands/generators/base.ts +33 -2
- package/lib/commands/generators/index.ts +1 -0
- package/lib/commands/generators/typescript/databases.ts +31 -21
- package/lib/commands/generators/typescript/templates/databases.ts.hbs +16 -16
- package/lib/commands/generic.ts +21 -16
- package/lib/commands/init.ts +147 -61
- package/lib/commands/pull.ts +1 -1
- package/lib/commands/push.ts +19 -19
- package/lib/commands/run.ts +15 -9
- 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/commands/types.ts +18 -8
- package/lib/commands/update.ts +24 -16
- package/lib/commands/utils/attributes.ts +6 -6
- package/lib/commands/utils/change-approval.ts +26 -19
- package/lib/commands/utils/database-sync.ts +58 -18
- package/lib/commands/utils/deployment.ts +22 -5
- package/lib/commands/utils/pools.ts +11 -5
- package/lib/config.ts +1 -1
- package/lib/constants.ts +1 -1
- package/lib/emulation/docker.ts +5 -6
- package/lib/emulation/utils.ts +2 -2
- package/lib/json.ts +15 -7
- package/lib/paginate.ts +30 -20
- package/lib/parser.ts +46 -15
- package/lib/questions.ts +38 -38
- package/lib/spinner.ts +5 -1
- package/lib/utils.ts +15 -3
- package/lib/validations.ts +1 -1
- package/package.json +8 -2
- package/scoop/appwrite.config.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config-validations.d.ts","sourceRoot":"","sources":["../../../lib/commands/config-validations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,
|
|
1
|
+
{"version":3,"file":"config-validations.d.ts","sourceRoot":"","sources":["../../../lib/commands/config-validations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAMxB;;GAEG;AACH,eAAO,MAAM,uBAAuB,GAAI,MAAM;IAC5C,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,YAKA,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,kBAAkB,GAAI,MAAM;IACvC,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,YAiBA,CAAC;AAMF,UAAU,iBAAiB;IACzB,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,KAAK;IACb,GAAG,EAAE,MAAM,CAAC;CACb;AAED,UAAU,qBAAqB;IAC7B,UAAU,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACjC,OAAO,CAAC,EAAE,iBAAiB,EAAE,CAAC;IAC9B,OAAO,CAAC,EAAE,KAAK,EAAE,CAAC;CACnB;AAED;;GAEG;AACH,eAAO,MAAM,2BAA2B,GACtC,MAAM,qBAAqB,EAC3B,KAAK,CAAC,CAAC,aAAa,SAuCrB,CAAC;AAMF,UAAU,gBAAgB;IACxB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,iBAAiB,CAAC,EAAE,MAAM,CAAC;CAC5B;AAED,UAAU,qBAAqB;IAC7B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,CAAC,EAAE,gBAAgB,EAAE,CAAC;IAC7B,UAAU,CAAC,EAAE,gBAAgB,EAAE,CAAC;CACjC;AAED,UAAU,UAAU;IAClB,MAAM,CAAC,EAAE,qBAAqB,EAAE,CAAC;IACjC,WAAW,CAAC,EAAE,qBAAqB,EAAE,CAAC;CACvC;AAED;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAChC,MAAM,UAAU,EAChB,KAAK,CAAC,CAAC,aAAa,SAsErB,CAAC"}
|
|
@@ -9,8 +9,8 @@ export declare class DestructiveChangeError extends Error {
|
|
|
9
9
|
type: string;
|
|
10
10
|
resource: string;
|
|
11
11
|
field: string;
|
|
12
|
-
oldValue?:
|
|
13
|
-
newValue?:
|
|
12
|
+
oldValue?: unknown;
|
|
13
|
+
newValue?: unknown;
|
|
14
14
|
}>;
|
|
15
15
|
affectedResources: number;
|
|
16
16
|
});
|
|
@@ -22,8 +22,8 @@ export declare class DestructiveChangeError extends Error {
|
|
|
22
22
|
type: string;
|
|
23
23
|
resource: string;
|
|
24
24
|
field: string;
|
|
25
|
-
oldValue?:
|
|
26
|
-
newValue?:
|
|
25
|
+
oldValue?: unknown;
|
|
26
|
+
newValue?: unknown;
|
|
27
27
|
}>;
|
|
28
28
|
affectedResources: number;
|
|
29
29
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../lib/commands/errors.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,qBAAa,sB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IAGrC,YAAY,EAAE,MAAM;IACpB,UAAU,EAAE,MAAM;gBAFzB,OAAO,EAAE,MAAM,EACR,YAAY,EAAE,MAAM,EACpB,UAAU,EAAE,MAAM;CAM5B;AAED;;GAEG;AACH,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAK5B;AAED;;GAEG;AACH,qBAAa,0BAA2B,SAAQ,KAAK;gBAEjD,OAAO,GAAE,MAA8E;CAM1F"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../lib/commands/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,KAAK,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"generate.d.ts","sourceRoot":"","sources":["../../../lib/commands/generate.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAoBpC,KAAK,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;AAEpD,MAAM,WAAW,sBAAsB;IACrC,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,kBAAkB,CAAC;IAC5B,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAuID,eAAO,MAAM,QAAQ,SAwCkB,CAAC"}
|
|
@@ -20,6 +20,23 @@ export interface GenerateResult {
|
|
|
20
20
|
indexContent: string;
|
|
21
21
|
constantsContent: string;
|
|
22
22
|
}
|
|
23
|
+
/**
|
|
24
|
+
* Options for overriding auto-detected generation settings.
|
|
25
|
+
*/
|
|
26
|
+
export interface GenerateOptions {
|
|
27
|
+
/**
|
|
28
|
+
* Override the Appwrite import source used in generated files.
|
|
29
|
+
* Auto-detected from package.json/deno.json if not provided.
|
|
30
|
+
* Examples: "node-appwrite", "appwrite", "@appwrite.io/console"
|
|
31
|
+
*/
|
|
32
|
+
appwriteImportSource?: string;
|
|
33
|
+
/**
|
|
34
|
+
* Override the import file extension used in generated files.
|
|
35
|
+
* Auto-detected from package.json "type" field / deno.json if not provided.
|
|
36
|
+
* Use ".js" for ESM projects or "" for CJS/unknown projects.
|
|
37
|
+
*/
|
|
38
|
+
importExtension?: string;
|
|
39
|
+
}
|
|
23
40
|
/**
|
|
24
41
|
* Base interface for all language-specific database generators.
|
|
25
42
|
* Implement this interface to add support for new languages.
|
|
@@ -36,12 +53,13 @@ export interface IDatabasesGenerator {
|
|
|
36
53
|
/**
|
|
37
54
|
* Generate the SDK files from the configuration.
|
|
38
55
|
* @param config - The project configuration containing tables/collections
|
|
56
|
+
* @param options - Optional overrides for auto-detected settings (e.g. import source, extension)
|
|
39
57
|
* @returns Promise resolving to named file contents:
|
|
40
58
|
* `dbContent` (`databases.ts`), `typesContent` (`types.ts`),
|
|
41
59
|
* `indexContent` (`index.ts`), and `constantsContent` (`constants.ts`).
|
|
42
60
|
* Import your generated SDK from `index.ts` (or `index.js` after transpilation).
|
|
43
61
|
*/
|
|
44
|
-
generate(config: ConfigType): Promise<GenerateResult>;
|
|
62
|
+
generate(config: ConfigType, options?: GenerateOptions): Promise<GenerateResult>;
|
|
45
63
|
/**
|
|
46
64
|
* Write the generated files to disk.
|
|
47
65
|
* @param outputDir - The base output directory
|
|
@@ -54,6 +72,11 @@ export interface IDatabasesGenerator {
|
|
|
54
72
|
* @param result - The generation result
|
|
55
73
|
*/
|
|
56
74
|
getGeneratedFilePaths(result: GenerateResult): string[];
|
|
75
|
+
/**
|
|
76
|
+
* Optional method to override server-side generation behavior.
|
|
77
|
+
* @param override - The override value
|
|
78
|
+
*/
|
|
79
|
+
setServerSideOverride?(override: "auto" | "true" | "false"): void;
|
|
57
80
|
}
|
|
58
81
|
/**
|
|
59
82
|
* Abstract base class providing common functionality for database generators.
|
|
@@ -62,7 +85,7 @@ export interface IDatabasesGenerator {
|
|
|
62
85
|
export declare abstract class BaseDatabasesGenerator implements IDatabasesGenerator {
|
|
63
86
|
abstract readonly language: SupportedLanguage;
|
|
64
87
|
abstract readonly fileExtension: string;
|
|
65
|
-
abstract generate(config: ConfigType): Promise<GenerateResult>;
|
|
88
|
+
abstract generate(config: ConfigType, options?: GenerateOptions): Promise<GenerateResult>;
|
|
66
89
|
writeFiles(outputDir: string, result: GenerateResult): Promise<void>;
|
|
67
90
|
getGeneratedFilePaths(_result: GenerateResult): string[];
|
|
68
91
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../lib/commands/generators/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAAC;AAE7C;;;;;;;;;GASG;AACH,MAAM,WAAW,cAAc;IAC7B,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,MAAM,CAAC;CAC1B;AAED;;;GAGG;AACH,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAC;IAErC;;OAEG;IACH,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAE/B
|
|
1
|
+
{"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../../../lib/commands/generators/base.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAG1C;;;GAGG;AACH,MAAM,MAAM,iBAAiB,GAAG,YAAY,CAA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Ac,GAAG,OAAO,CAAC,IAAI,CAAC;IA6B1E,qBAAqB,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,EAAE;CAQzD"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { IDatabasesGenerator, SupportedLanguage } from "./base.js";
|
|
2
2
|
import { LanguageDetectionResult } from "./language-detector.js";
|
|
3
|
-
export { IDatabasesGenerator, SupportedLanguage, GenerateResult, } from "./base.js";
|
|
3
|
+
export { IDatabasesGenerator, SupportedLanguage, GenerateResult, GenerateOptions, } from "./base.js";
|
|
4
4
|
export { LanguageDetector, LanguageDetectionResult, } from "./language-detector.js";
|
|
5
5
|
/**
|
|
6
6
|
* Create a database generator for the specified language.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/commands/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAEL,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../lib/commands/generators/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,WAAW,CAAC;AACnE,OAAO,EAEL,uBAAuB,EACxB,MAAM,wBAAwB,CAAC;AAGhC,OAAO,EACL,mBAAmB,EACnB,iBAAiB,EACjB,cAAc,EACd,eAAe,GAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EACL,gBAAgB,EAChB,uBAAuB,GACxB,MAAM,wBAAwB,CAAC;AAmBhC;;;;;GAKG;AACH,wBAAgB,eAAe,CAC7B,QAAQ,EAAE,iBAAiB,GAC1B,mBAAmB,CASrB;AAED;;;;;GAKG;AACH,wBAAgB,4BAA4B,CAAC,GAAG,CAAC,EAAE,MAAM,GAAG;IAC1D,SAAS,EAAE,mBAAmB,CAAC;IAC/B,SAAS,EAAE,uBAAuB,CAAC;CACpC,CAiBA;AAED;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,iBAAiB,EAAE,CAE3D"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConfigType } from "../../config.js";
|
|
2
|
-
import { BaseDatabasesGenerator, GenerateResult, SupportedLanguage } from "../base.js";
|
|
2
|
+
import { BaseDatabasesGenerator, GenerateOptions, GenerateResult, SupportedLanguage } from "../base.js";
|
|
3
3
|
/**
|
|
4
4
|
* TypeScript-specific database generator.
|
|
5
5
|
* Generates type-safe SDK files for TypeScript/JavaScript projects.
|
|
@@ -30,6 +30,6 @@ export declare class TypeScriptDatabasesGenerator extends BaseDatabasesGenerator
|
|
|
30
30
|
private generateDatabasesFile;
|
|
31
31
|
private generateIndexFile;
|
|
32
32
|
private generateConstantsFile;
|
|
33
|
-
generate(config: ConfigType): Promise<GenerateResult>;
|
|
33
|
+
generate(config: ConfigType, options?: GenerateOptions): Promise<GenerateResult>;
|
|
34
34
|
}
|
|
35
35
|
//# sourceMappingURL=databases.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"databases.d.ts","sourceRoot":"","sources":["../../../../../lib/commands/generators/typescript/databases.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,UAAU,EAAmB,MAAM,iBAAiB,CAAC;AAI9D,OAAO,EACL,sBAAsB,EACtB,cAAc,EACd,iBAAiB,EAClB,MAAM,YAAY,CAAC;AAiCpB;;;GAGG;AACH,qBAAa,4BAA6B,SAAQ,sBAAsB;IACtE,QAAQ,CAAC,QAAQ,EAAE,iBAAiB,CAAgB;IACpD,QAAQ,CAAC,aAAa,QAAQ;IAC9B,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAoB;IACzC,OAAO,CAAC,kBAAkB,CAAqC;IAE/D,qBAAqB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,OAA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BvB,QAAQ,CACZ,MAAM,EAAE,UAAU,EAClB,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,cAAc,CAAC;CAgC3B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../lib/commands/generic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"generic.d.ts","sourceRoot":"","sources":["../../../lib/commands/generic.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgKpC,eAAO,MAAM,YAAY,GAAU,2CAMhC;IACD,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,MAAM,CAAC;CACf,KAAG,OAAO,CAAC,IAAI,CAyHf,CAAC;AAEF,eAAO,MAAM,MAAM,SAyChB,CAAC;AAEJ,eAAO,MAAM,QAAQ,SAMlB,CAAC;AAEJ,eAAO,MAAM,KAAK,SAgBmB,CAAC;AAEtC,eAAO,MAAM,MAAM,SAyEhB,CAAC;AAWJ,eAAO,MAAM,MAAM,SA8IhB,CAAC;AAEJ,eAAO,MAAM,OAAO,QAAa,OAAO,CAAC,IAAI,CAmB5C,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../lib/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"init.d.ts","sourceRoot":"","sources":["../../../lib/commands/init.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAuuBpC,eAAO,MAAM,IAAI,SAEqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../lib/commands/run.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"run.d.ts","sourceRoot":"","sources":["../../../lib/commands/run.ts"],"names":[],"mappings":"AAYA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAgYpC,eAAO,MAAM,GAAG,SASb,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/commands/types.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAoB,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../lib/commands/types.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,OAAO,EAAoB,MAAM,WAAW,CAAC;AA8NtD,eAAO,MAAM,KAAK,SAKK,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../lib/commands/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"update.d.ts","sourceRoot":"","sources":["../../../lib/commands/update.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAsPpC,eAAO,MAAM,MAAM,SAMe,CAAC"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Check if a value is considered empty
|
|
3
3
|
*/
|
|
4
|
-
export declare const isEmpty: (value:
|
|
4
|
+
export declare const isEmpty: (value: unknown) => boolean;
|
|
5
5
|
/**
|
|
6
6
|
* Prompt user for confirmation to proceed with push
|
|
7
7
|
*/
|
|
@@ -15,11 +15,11 @@ interface ObjectChange {
|
|
|
15
15
|
remote: string;
|
|
16
16
|
local: string;
|
|
17
17
|
}
|
|
18
|
-
export declare const getObjectChanges: <T extends Record<string,
|
|
18
|
+
export declare const getObjectChanges: <T extends Record<string, unknown>>(remote: T, local: T, index: keyof T, what: string) => ObjectChange[];
|
|
19
19
|
/**
|
|
20
20
|
* Approve changes before pushing resources
|
|
21
21
|
* Compares local resources with remote resources and prompts user for confirmation
|
|
22
22
|
*/
|
|
23
|
-
export declare const approveChanges: (resource:
|
|
23
|
+
export declare const approveChanges: (resource: Array<Record<string, unknown>>, resourceGetFunction: (options: Record<string, unknown>) => Promise<Record<string, unknown>>, keys: Set<string>, resourceName: string, resourcePlural: string, skipKeys?: string[], secondId?: string, secondResourceName?: string) => Promise<boolean>;
|
|
24
24
|
export {};
|
|
25
25
|
//# sourceMappingURL=change-approval.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-approval.d.ts","sourceRoot":"","sources":["../../../../lib/commands/utils/change-approval.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"change-approval.d.ts","sourceRoot":"","sources":["../../../../lib/commands/utils/change-approval.ts"],"names":[],"mappings":"AAUA;;GAEG;AACH,eAAO,MAAM,OAAO,GAAI,OAAO,OAAO,KAAG,OAIK,CAAC;AAE/C;;GAEG;AACH,eAAO,MAAM,eAAe,QAAa,OAAO,CAAC,OAAO,CA0BvD,CAAC;AAEF;;GAEG;AACH,UAAU,YAAY;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,EAAE,MAAM,CAAC;CACf;AAID,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAChE,QAAQ,CAAC,EACT,OAAO,CAAC,EACR,OAAO,MAAM,CAAC,EACd,MAAM,MAAM,KACX,YAAY,EAuCd,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,UAAU,KAAK,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACxC,qBAAqB,CACnB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAC7B,OAAO,CAAC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC,EACrC,MAAM,GAAG,CAAC,MAAM,CAAC,EACjB,cAAc,MAAM,EACpB,gBAAgB,MAAM,EACtB,WAAU,MAAM,EAAO,EACvB,WAAU,MAAW,EACrB,qBAAoB,MAAW,KAC9B,OAAO,CAAC,OAAO,CAqEjB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"database-sync.d.ts","sourceRoot":"","sources":["../../../../lib/commands/utils/database-sync.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"database-sync.d.ts","sourceRoot":"","sources":["../../../../lib/commands/utils/database-sync.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,YAAY,EAAE,OAAO,CAAC;CACvB;AAmCD;;;GAGG;AACH,eAAO,MAAM,4BAA4B,QAC7B,OAAO,CAAC,qBAAqB,CAwKtC,CAAC"}
|
|
@@ -1,4 +1,15 @@
|
|
|
1
1
|
import { Client } from "@appwrite.io/console";
|
|
2
|
+
interface DeploymentListResult {
|
|
3
|
+
total: number;
|
|
4
|
+
deployments: Array<{
|
|
5
|
+
$id: string;
|
|
6
|
+
}>;
|
|
7
|
+
}
|
|
8
|
+
interface DeploymentDetails {
|
|
9
|
+
$id: string;
|
|
10
|
+
status: string;
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
}
|
|
2
13
|
/**
|
|
3
14
|
* Download and extract deployment code for a resource
|
|
4
15
|
*/
|
|
@@ -10,19 +21,19 @@ export declare function downloadDeploymentCode(params: {
|
|
|
10
21
|
value: string;
|
|
11
22
|
}[];
|
|
12
23
|
withVariables?: boolean;
|
|
13
|
-
listDeployments: () => Promise<
|
|
24
|
+
listDeployments: () => Promise<DeploymentListResult>;
|
|
14
25
|
getDownloadUrl: (deploymentId: string) => string;
|
|
15
26
|
projectClient: Client;
|
|
16
27
|
}): Promise<void>;
|
|
17
28
|
export interface PushDeploymentParams {
|
|
18
29
|
resourcePath: string;
|
|
19
|
-
createDeployment: (codeFile: File) => Promise<
|
|
20
|
-
getDeployment?: (deploymentId: string) => Promise<
|
|
30
|
+
createDeployment: (codeFile: File) => Promise<DeploymentDetails>;
|
|
31
|
+
getDeployment?: (deploymentId: string) => Promise<DeploymentDetails>;
|
|
21
32
|
pollForStatus?: boolean;
|
|
22
33
|
onStatusUpdate?: (status: string) => void;
|
|
23
34
|
}
|
|
24
35
|
export interface PushDeploymentResult {
|
|
25
|
-
deployment:
|
|
36
|
+
deployment: DeploymentDetails;
|
|
26
37
|
wasPolled: boolean;
|
|
27
38
|
finalStatus?: string;
|
|
28
39
|
}
|
|
@@ -31,4 +42,5 @@ export interface PushDeploymentResult {
|
|
|
31
42
|
* Handles packaging, creating the deployment, and optionally polling for status
|
|
32
43
|
*/
|
|
33
44
|
export declare function pushDeployment(params: PushDeploymentParams): Promise<PushDeploymentResult>;
|
|
45
|
+
export {};
|
|
34
46
|
//# sourceMappingURL=deployment.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../../lib/commands/utils/deployment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAqB,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../../lib/commands/utils/deployment.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,MAAM,EAAqB,MAAM,sBAAsB,CAAC;AAKjE,UAAU,oBAAoB;IAC5B,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,KAAK,CAAC;QACjB,GAAG,EAAE,MAAM,CAAC;KACb,CAAC,CAAC;CACJ;AAED,UAAU,iBAAiB;IACzB,GAAG,EAAE,MAAM,CAAC;IACZ,MA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Y,MAAM,EAClB,cAAc,MAAM,EACpB,eAAe,GAAG,EAAE,EACpB,YAAW,MAAU,KACpB,OAAO,CAAC,OAAO,CAAC,CAsDjB;IAEK,gBAAgB,GACrB,YAAY,MAAM,EAClB,cAAc,MAAM,EACpB,eAAe,MAAM,EAAE,EACvB,YAAW,MAAU,KACpB,OAAO,CAAC,OAAO,CAAC,CAgEjB;IAEK,aAAa,GAClB,YAAY,MAAM,EAClB,cAAc,MAAM,EACpB,WAAW,MAAM,EAAE,EACnB,YAAW,MAAU,KACpB,OAAO,CAAC,OAAO,CAAC,CA6DjB;CACH"}
|
package/dist/lib/constants.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export declare const SDK_TITLE = "Appwrite";
|
|
2
2
|
export declare const SDK_TITLE_LOWER = "appwrite";
|
|
3
|
-
export declare const SDK_VERSION = "
|
|
3
|
+
export declare const SDK_VERSION = "14.0.0";
|
|
4
4
|
export declare const SDK_NAME = "Command Line";
|
|
5
5
|
export declare const SDK_PLATFORM = "console";
|
|
6
6
|
export declare const SDK_LANGUAGE = "cli";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/emulation/docker.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"docker.d.ts","sourceRoot":"","sources":["../../../lib/emulation/docker.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAC;AAE1D,wBAAsB,UAAU,CAAC,EAAE,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAY1D;AAED,wBAAsB,UAAU,CAAC,IAAI,EAAE,YAAY,GAAG,OAAO,CAAC,IAAI,CAAC,CAmBlE;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAChC,OAAO,CAAC,IAAI,CAAC,CA+If;AAED,wBAAsB,WAAW,CAC/B,IAAI,EAAE,YAAY,EAClB,SAAS,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EACjC,IAAI,EAAE,MAAM,GACX,OAAO,CAAC,IAAI,CAAC,CAgEf;AAED,wBAAsB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAqBrE"}
|
package/dist/lib/json.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export declare const JSONBig: {
|
|
2
|
-
parse: (text: string) =>
|
|
2
|
+
parse: <T = unknown>(text: string) => T;
|
|
3
3
|
stringify: {
|
|
4
4
|
(value: any, replacer?: (this: any, key: string, value: any) => any, space?: string | number): string;
|
|
5
5
|
(value: any, replacer?: (number | string)[] | null, space?: string | number): string;
|
package/dist/lib/json.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../lib/json.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"json.d.ts","sourceRoot":"","sources":["../../lib/json.ts"],"names":[],"mappings":"AA8CA,eAAO,MAAM,OAAO;YACV,CAAC,kBAAkB,MAAM,KAAG,CAAC;;;;;CAGtC,CAAC"}
|
package/dist/lib/paginate.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
}
|
|
4
|
-
export declare function paginate<T = any>(action: (args: PaginateArgs) => Promise<any>, args: PaginateArgs, limit: number, wrapper: "", queries?: string[]): Promise<T[]>;
|
|
5
|
-
export declare function paginate<T = any, K extends string = string>(action: (args: PaginateArgs) => Promise<any>, args: PaginateArgs, limit: number, wrapper: K, queries?: string[]): Promise<Record<K, T[]> & {
|
|
1
|
+
type PaginateArgs = Record<string, unknown>;
|
|
2
|
+
type WrappedPaginateResponse<T, K extends string = string> = Record<K, T[]> & {
|
|
6
3
|
total: number;
|
|
7
|
-
}
|
|
4
|
+
};
|
|
5
|
+
export declare function paginate<T = unknown>(action: (args: PaginateArgs) => Promise<T[]>, args: PaginateArgs, limit: number, wrapper: "", queries?: string[]): Promise<T[]>;
|
|
6
|
+
export declare function paginate<T = unknown, K extends string = string>(action: (args: PaginateArgs) => Promise<WrappedPaginateResponse<T, K>>, args: PaginateArgs, limit: number, wrapper: K, queries?: string[]): Promise<WrappedPaginateResponse<T, K>>;
|
|
8
7
|
export {};
|
|
9
8
|
//# sourceMappingURL=paginate.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"paginate.d.ts","sourceRoot":"","sources":["../../lib/paginate.ts"],"names":[],"mappings":"AAAA,
|
|
1
|
+
{"version":3,"file":"paginate.d.ts","sourceRoot":"","sources":["../../lib/paginate.ts"],"names":[],"mappings":"AAAA,KAAK,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAE5C,KAAK,uBAAuB,CAAC,CAAC,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,IAAI,MAAM,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,GAAG;IAC5E,KAAK,EAAE,MAAM,CAAC;CACf,CAAC;AAGF,wBAAgB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAClC,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,CAAC,EAAE,CAAC,EAC5C,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,EAAE,EACX,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,CAAC,EAAE,CAAC,CAAC;AAGhB,wBAAgB,QAAQ,CAAC,CAAC,GAAG,OAAO,EAAE,CAAC,SAAS,MAAM,GAAG,MAAM,EAC7D,MAAM,EAAE,CAAC,IAAI,EAAE,YAAY,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EACtE,IAAI,EAAE,YAAY,EAClB,KAAK,EAAE,MAAM,EACb,OAAO,EAAE,CAAC,EACV,OAAO,CAAC,EAAE,MAAM,EAAE,GACjB,OAAO,CAAC,uBAAuB,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC"}
|
package/dist/lib/parser.d.ts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import type { CliConfig } from "./types.js";
|
|
2
2
|
declare const cliConfig: CliConfig;
|
|
3
|
-
|
|
4
|
-
export declare const
|
|
5
|
-
export declare const
|
|
3
|
+
type JsonObject = Record<string, unknown>;
|
|
4
|
+
export declare const parse: (data: JsonObject) => void;
|
|
5
|
+
export declare const drawTable: (data: Array<JsonObject | null | undefined>) => void;
|
|
6
|
+
export declare const drawJSON: (data: unknown) => void;
|
|
6
7
|
export declare const parseError: (err: Error) => void;
|
|
7
|
-
export declare const actionRunner: <T extends (...args:
|
|
8
|
+
export declare const actionRunner: <T extends (...args: unknown[]) => Promise<unknown>>(fn: T) => ((...args: Parameters<T>) => Promise<void>);
|
|
8
9
|
export declare const parseInteger: (value: string) => number;
|
|
9
10
|
export declare const parseBool: (value: string) => boolean;
|
|
10
11
|
export declare const log: (message?: string) => void;
|
package/dist/lib/parser.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../lib/parser.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAQ5C,QAAA,MAAM,SAAS,EAAE,SAQhB,CAAC;AAEF,
|
|
1
|
+
{"version":3,"file":"parser.d.ts","sourceRoot":"","sources":["../../lib/parser.ts"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,YAAY,CAAC;AAQ5C,QAAA,MAAM,SAAS,EAAE,SAQhB,CAAC;AAEF,KAAK,UAAU,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AA6B1C,eAAO,MAAM,KAAK,GAAI,MAAM,UAAU,KAAG,IA4BxC,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,MAAM,KAAK,CAAC,UAAU,GAAG,IAAI,GAAG,SAAS,CAAC,KAAG,IA+DtE,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,MAAM,OAAO,KAAG,IAExC,CAAC;AAEF,eAAO,MAAM,UAAU,GAAI,KAAK,KAAK,KAAG,IA4DvC,CAAC;AAEF,eAAO,MAAM,YAAY,GACvB,CAAC,SAAS,CAAC,GAAG,IAAI,EAAE,OAAO,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,EAElD,IAAI,CAAC,KACJ,CAAC,CAAC,GAAG,IAAI,EAAE,UAAU,CAAC,CAAC,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,CAc5C,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,MAM5C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,KAAG,OAIzC,CAAC;AAEF,eAAO,MAAM,GAAG,GAAI,UAAU,MAAM,KAAG,IAEtC,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,UAAU,MAAM,KAAG,IAIvC,CAAC;AAEF,eAAO,MAAM,IAAI,GAAI,UAAU,MAAM,KAAG,IAEvC,CAAC;AAEF,eAAO,MAAM,OAAO,GAAI,UAAU,MAAM,KAAG,IAI1C,CAAC;AAEF,eAAO,MAAM,KAAK,GAAI,UAAU,MAAM,KAAG,IAExC,CAAC;AAEF,eAAO,MAAM,IAAI,wXAAW,CAAC;AAE7B,eAAO,MAAM,mBAAmB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CA+BtD,CAAC;AAEF,OAAO,EAAE,SAAS,EAAE,CAAC"}
|
package/dist/lib/spinner.d.ts
CHANGED
|
@@ -15,7 +15,7 @@ declare class Spinner {
|
|
|
15
15
|
private spinnerInterval?;
|
|
16
16
|
static start(clearOnComplete?: boolean, hideCursor?: boolean): void;
|
|
17
17
|
static stop(): void;
|
|
18
|
-
static formatter(
|
|
18
|
+
static formatter(_options: unknown, _params: unknown, payload: SpinnerPayload): string;
|
|
19
19
|
static line(prefix: string, start: string, middle: string, end: string, separator?: string): string;
|
|
20
20
|
constructor(payload: SpinnerPayload, total?: number, startValue?: number);
|
|
21
21
|
update(payload: Partial<SpinnerPayload>): this;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../lib/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,cAAc,CAAC;AAGpC,QAAA,MAAM,WAAW,QAAQ,CAAC;AAC1B,QAAA,MAAM,YAAY,SAAS,CAAC;AAO5B,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAaD,cAAM,OAAO;IACX,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACrC,OAAO,CAAC,GAAG,CAAqB;IAChC,OAAO,CAAC,eAAe,CAAC,CAAiB;IAEzC,MAAM,CAAC,KAAK,CACV,eAAe,GAAE,OAAc,EAC/B,UAAU,GAAE,OAAc,GACzB,IAAI;IAWP,MAAM,CAAC,IAAI,IAAI,IAAI;IAInB,MAAM,CAAC,SAAS,
|
|
1
|
+
{"version":3,"file":"spinner.d.ts","sourceRoot":"","sources":["../../lib/spinner.ts"],"names":[],"mappings":"AAAA,OAAO,QAAQ,MAAM,cAAc,CAAC;AAGpC,QAAA,MAAM,WAAW,QAAQ,CAAC;AAC1B,QAAA,MAAM,YAAY,SAAS,CAAC;AAO5B,UAAU,cAAc;IACtB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,EAAE,MAAM,CAAC;IACjB,EAAE,EAAE,MAAM,CAAC;IACX,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB;AAaD,cAAM,OAAO;IACX,MAAM,CAAC,UAAU,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACrC,OAAO,CAAC,GAAG,CAAqB;IAChC,OAAO,CAAC,eAAe,CAAC,CAAiB;IAEzC,MAAM,CAAC,KAAK,CACV,eAAe,GAAE,OAAc,EAC/B,UAAU,GAAE,OAAc,GACzB,IAAI;IAWP,MAAM,CAAC,IAAI,IAAI,IAAI;IAInB,MAAM,CAAC,SAAS,CACd,QAAQ,EAAE,OAAO,EACjB,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,cAAc,GACtB,MAAM;IA0BT,MAAM,CAAC,IAAI,CACT,MAAM,EAAE,MAAM,EACd,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,MAAM,EACd,GAAG,EAAE,MAAM,EACX,SAAS,GAAE,MAAY,GACtB,MAAM;gBAKP,OAAO,EAAE,cAAc,EACvB,KAAK,GAAE,MAAY,EACnB,UAAU,GAAE,MAAU;IAKxB,MAAM,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI;IAK9C,IAAI,CAAC,OAAO,EAAE,OAAO,CAAC,cAAc,CAAC,GAAG,IAAI;IAK5C,YAAY,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAUhC,WAAW,IAAI,IAAI;IAMnB,cAAc,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;CAInC;AAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,CAAC"}
|
package/dist/lib/utils.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import type { Models } from "@appwrite.io/console";
|
|
|
2
2
|
import { z } from "zod";
|
|
3
3
|
import type { SettingsType } from "./commands/config.js";
|
|
4
4
|
export declare const createSettingsObject: (project: Models.Project) => SettingsType;
|
|
5
|
+
export declare const getErrorMessage: (error: unknown) => string;
|
|
5
6
|
/**
|
|
6
7
|
* Get the latest version from npm registry
|
|
7
8
|
*/
|
|
@@ -13,7 +14,10 @@ export declare function compareVersions(current: string, latest: string): number
|
|
|
13
14
|
export declare function getAllFiles(folder: string): string[];
|
|
14
15
|
export declare function isPortTaken(port: number): Promise<boolean>;
|
|
15
16
|
export declare function systemHasCommand(command: string): boolean;
|
|
16
|
-
|
|
17
|
+
type DeployLocalConfig = {
|
|
18
|
+
keys: () => string[];
|
|
19
|
+
};
|
|
20
|
+
export declare const checkDeployConditions: (localConfig: DeployLocalConfig) => void;
|
|
17
21
|
export declare function isCloud(): boolean;
|
|
18
22
|
export declare function arrayEqualsUnordered(left: unknown, right: unknown): boolean;
|
|
19
23
|
/**
|
|
@@ -25,4 +29,5 @@ export declare function arrayEqualsUnordered(left: unknown, right: unknown): boo
|
|
|
25
29
|
* @returns The filtered data with only schema-defined fields
|
|
26
30
|
*/
|
|
27
31
|
export declare function filterBySchema<T extends z.ZodObject<z.ZodRawShape>>(data: Record<string, unknown>, schema: T): z.infer<T>;
|
|
32
|
+
export {};
|
|
28
33
|
//# sourceMappingURL=utils.d.ts.map
|
package/dist/lib/utils.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../lib/utils.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAGzD,eAAO,MAAM,oBAAoB,GAAI,SAAS,MAAM,CAAC,OAAO,KAAG,YAsC9D,CAAC;AAEF;;GAEG;AACH,wBAAsB,gBAAgB,IAAI,OAAO,CAAC,MAAM,CAAC,CAWxD;AAED;;GAEG;AACH,wBAAgB,eAAe,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,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AED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAa3E;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,CAAC,CAAC,SAAS,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC,EACjE,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EAC7B,MAAM,EAAE,CAAC,GACR,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CAWZ"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const validateRequired: (resource: string, value:
|
|
1
|
+
export declare const validateRequired: (resource: string, value: unknown) => string | true;
|
|
2
2
|
//# sourceMappingURL=validations.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"validations.d.ts","sourceRoot":"","sources":["../../lib/validations.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,OAAO,
|
|
1
|
+
{"version":3,"file":"validations.d.ts","sourceRoot":"","sources":["../../lib/validations.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,gBAAgB,GAC3B,UAAU,MAAM,EAChB,OAAO,OAAO,KACb,MAAM,GAAG,IAgBX,CAAC"}
|
package/eslint.config.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import unusedImports from "eslint-plugin-unused-imports";
|
|
2
|
+
import tseslint from "typescript-eslint";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* @type {import('eslint').Linter.Config}
|
|
6
|
+
*/
|
|
7
|
+
export default tseslint.config(
|
|
8
|
+
{
|
|
9
|
+
ignores: [
|
|
10
|
+
"dist/**",
|
|
11
|
+
"node_modules/**",
|
|
12
|
+
"build/**",
|
|
13
|
+
"generated/**",
|
|
14
|
+
"scripts/**",
|
|
15
|
+
"eslint.config.js",
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
...tseslint.configs.recommended,
|
|
19
|
+
{
|
|
20
|
+
languageOptions: {
|
|
21
|
+
parserOptions: {
|
|
22
|
+
projectService: true,
|
|
23
|
+
tsconfigRootDir: import.meta.dirname,
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
plugins: {
|
|
27
|
+
"unused-imports": unusedImports,
|
|
28
|
+
},
|
|
29
|
+
rules: {
|
|
30
|
+
"@typescript-eslint/no-unused-vars": [
|
|
31
|
+
"error",
|
|
32
|
+
{
|
|
33
|
+
varsIgnorePattern: "^_",
|
|
34
|
+
argsIgnorePattern: "^_",
|
|
35
|
+
caughtErrorsIgnorePattern: "^_",
|
|
36
|
+
},
|
|
37
|
+
],
|
|
38
|
+
"@typescript-eslint/no-floating-promises": "error",
|
|
39
|
+
"@typescript-eslint/no-misused-promises": "off",
|
|
40
|
+
"unused-imports/no-unused-imports": "error",
|
|
41
|
+
"@typescript-eslint/require-await": "off",
|
|
42
|
+
"@typescript-eslint/only-throw-error": "off",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
);
|
package/install.ps1
CHANGED
|
@@ -13,8 +13,8 @@
|
|
|
13
13
|
# You can use "View source" of this page to see the full script.
|
|
14
14
|
|
|
15
15
|
# REPO
|
|
16
|
-
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/
|
|
17
|
-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/
|
|
16
|
+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/14.0.0/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/14.0.0/appwrite-cli-win-arm64.exe"
|
|
18
18
|
|
|
19
19
|
$APPWRITE_BINARY_NAME = "appwrite.exe"
|
|
20
20
|
|
package/install.sh
CHANGED
|
@@ -96,7 +96,7 @@ printSuccess() {
|
|
|
96
96
|
downloadBinary() {
|
|
97
97
|
echo "[2/4] Downloading executable for $OS ($ARCH) ..."
|
|
98
98
|
|
|
99
|
-
GITHUB_LATEST_VERSION="
|
|
99
|
+
GITHUB_LATEST_VERSION="14.0.0"
|
|
100
100
|
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
|
|
101
101
|
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
|
|
102
102
|
|
package/lib/client.ts
CHANGED
|
@@ -189,7 +189,7 @@ class Client {
|
|
|
189
189
|
value.type === "file"
|
|
190
190
|
) {
|
|
191
191
|
const fileUpload = value as FileUpload;
|
|
192
|
-
formData.append(key, fileUpload.file as
|
|
192
|
+
formData.append(key, fileUpload.file as Blob, fileUpload.filename);
|
|
193
193
|
} else {
|
|
194
194
|
formData.append(key, value as string);
|
|
195
195
|
}
|
|
@@ -222,7 +222,7 @@ class Client {
|
|
|
222
222
|
undefined;
|
|
223
223
|
try {
|
|
224
224
|
json = JSON.parse(text);
|
|
225
|
-
} catch (
|
|
225
|
+
} catch (_error) {
|
|
226
226
|
throw new AppwriteException(text, response.status, "", text);
|
|
227
227
|
}
|
|
228
228
|
|
|
@@ -265,7 +265,7 @@ class Client {
|
|
|
265
265
|
let json: T | undefined = undefined;
|
|
266
266
|
try {
|
|
267
267
|
json = JSONBig.parse(text);
|
|
268
|
-
} catch (
|
|
268
|
+
} catch (_error) {
|
|
269
269
|
return text as T;
|
|
270
270
|
}
|
|
271
271
|
return json as T;
|
package/lib/commands/config.ts
CHANGED
|
@@ -25,7 +25,7 @@ const int64Schema = z.preprocess(
|
|
|
25
25
|
const valueOfResult = val.valueOf();
|
|
26
26
|
const bigIntVal = BigInt(valueOfResult as string | number | bigint);
|
|
27
27
|
return bigIntVal;
|
|
28
|
-
} catch (
|
|
28
|
+
} catch (_e) {
|
|
29
29
|
return undefined;
|
|
30
30
|
}
|
|
31
31
|
}
|
|
@@ -37,7 +37,7 @@ const int64Schema = z.preprocess(
|
|
|
37
37
|
if (typeof val === "string") {
|
|
38
38
|
try {
|
|
39
39
|
return BigInt(val);
|
|
40
|
-
} catch (
|
|
40
|
+
} catch (_e) {
|
|
41
41
|
return undefined;
|
|
42
42
|
}
|
|
43
43
|
}
|
package/lib/commands/errors.ts
CHANGED