appwrite-cli 14.0.1 → 15.1.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/CHANGELOG.md +11 -0
- package/README.md +2 -2
- package/dist/bundle-win-arm64.mjs +267 -105
- package/dist/cli.cjs +267 -105
- package/dist/index.cjs +166 -61
- package/dist/index.js +166 -61
- package/dist/lib/client.d.ts.map +1 -1
- package/dist/lib/commands/config.d.ts +14 -4
- package/dist/lib/commands/config.d.ts.map +1 -1
- package/dist/lib/commands/init.d.ts.map +1 -1
- package/dist/lib/commands/pull.d.ts.map +1 -1
- package/dist/lib/commands/push.d.ts.map +1 -1
- package/dist/lib/commands/services/functions.d.ts.map +1 -1
- package/dist/lib/commands/services/sites.d.ts.map +1 -1
- package/dist/lib/commands/services/storage.d.ts.map +1 -1
- package/dist/lib/commands/utils/deployment.d.ts +5 -0
- package/dist/lib/commands/utils/deployment.d.ts.map +1 -1
- package/dist/lib/constants.d.ts +1 -1
- package/dist/lib/questions.d.ts.map +1 -1
- package/dist/lib/sdks.d.ts.map +1 -1
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.ts +17 -0
- package/lib/commands/config.ts +7 -2
- package/lib/commands/init.ts +4 -2
- package/lib/commands/pull.ts +7 -2
- package/lib/commands/push.ts +14 -4
- package/lib/commands/services/account.ts +1 -1
- package/lib/commands/services/functions.ts +12 -7
- package/lib/commands/services/sites.ts +14 -7
- package/lib/commands/services/storage.ts +2 -1
- package/lib/commands/utils/deployment.ts +28 -7
- package/lib/constants.ts +1 -1
- package/lib/questions.ts +38 -4
- package/lib/sdks.ts +2 -0
- package/package.json +2 -2
- package/scoop/appwrite.config.json +3 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/functions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBpC,eAAO,MAAM,SAAS,SAIlB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"sites.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/sites.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBpC,eAAO,MAAM,KAAK,SAId,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../../../../lib/commands/services/storage.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAwBpC,eAAO,MAAM,OAAO,SAIhB,CAAC"}
|
|
@@ -10,6 +10,11 @@ interface DeploymentDetails {
|
|
|
10
10
|
status: string;
|
|
11
11
|
[key: string]: unknown;
|
|
12
12
|
}
|
|
13
|
+
/**
|
|
14
|
+
* Resolve a file path (file or directory) into a File object for upload.
|
|
15
|
+
* Directories are packaged into a tar.gz archive.
|
|
16
|
+
*/
|
|
17
|
+
export declare function resolveFileParam(filePath: string): Promise<File>;
|
|
13
18
|
/**
|
|
14
19
|
* Download and extract deployment code for a resource
|
|
15
20
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"deployment.d.ts","sourceRoot":"","sources":["../../../../lib/commands/utils/deployment.ts"],"names":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AC,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CAC3C;AAED,MAAM,WAAW,oBAAoB;IACnC,UAAU,EAAE,iBAAiB,CAAC;IAC9B,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;;GAGG;AACH,wBAAsB,cAAc,CAClC,MAAM,EAAE,oBAAoB,GAC3B,OAAO,CAAC,oBAAoB,CAAC,CA6C/B"}
|
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 = "15.1.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":"questions.d.ts","sourceRoot":"","sources":["../../lib/questions.ts"],"names":[],"mappings":"AAiBA,UAAU,OAAO;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,CAAC,GAAG,EAAE,MAAM,GAAG,GAAG,CAAC;CACpB;AAED,UAAU,MAAM;IACd,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,GAAG,CAAC;IACX,QAAQ,CAAC,EAAE,OAAO,GAAG,MAAM,CAAC;IAC5B,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,UAAU,QAAQ;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,OA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A+B,EAAE,QAAQ,EAMrD,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,EAmB1C,CAAC;AAEF,eAAO,MAAM,4BAA4B,EAAE,QAAQ,EAkBlD,CAAC;AAEF,eAAO,MAAM,sBAAsB,EAAE,QAAQ,EAY5C,CAAC;AAEF,eAAO,MAAM,kBAAkB,EAAE,QAAQ,EAmBxC,CAAC;AAEF,eAAO,MAAM,oBAAoB,EAAE,QAAQ,EAiC1C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,EAY3C,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,QAAQ,EAsB3C,CAAC;AAEF,eAAO,MAAM,mBAAmB,EAAE,QAAQ,EA+DzC,CAAC"}
|
package/dist/lib/sdks.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"sdks.d.ts","sourceRoot":"","sources":["../../lib/sdks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAS9C,eAAO,MAAM,aAAa,GACxB,eAAc,OAAc,KAC3B,OAAO,CAAC,MAAM,
|
|
1
|
+
{"version":3,"file":"sdks.d.ts","sourceRoot":"","sources":["../../lib/sdks.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAS9C,eAAO,MAAM,aAAa,GACxB,eAAc,OAAc,KAC3B,OAAO,CAAC,MAAM,CA6BhB,CAAC;AAEF,eAAO,MAAM,aAAa,QAAa,OAAO,CAAC,MAAM,CA8CpD,CAAC"}
|
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/15.1.0/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/15.1.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="15.1.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
|
@@ -17,6 +17,7 @@ import {
|
|
|
17
17
|
SDK_LANGUAGE,
|
|
18
18
|
SDK_VERSION,
|
|
19
19
|
SDK_TITLE,
|
|
20
|
+
EXECUTABLE_NAME,
|
|
20
21
|
} from "./constants.js";
|
|
21
22
|
|
|
22
23
|
class Client {
|
|
@@ -239,6 +240,22 @@ class Client {
|
|
|
239
240
|
globalConfig.setCurrentSession("");
|
|
240
241
|
globalConfig.removeSession(current);
|
|
241
242
|
}
|
|
243
|
+
|
|
244
|
+
const isUnauthorized =
|
|
245
|
+
json.code === 401 &&
|
|
246
|
+
json.type === "general_unauthorized_scope" &&
|
|
247
|
+
typeof json.message === "string" &&
|
|
248
|
+
/role:\s*guests/i.test(json.message);
|
|
249
|
+
|
|
250
|
+
if (isUnauthorized) {
|
|
251
|
+
throw new AppwriteException(
|
|
252
|
+
`You are not authenticated. Run '${EXECUTABLE_NAME} login' to authenticate and try again.`,
|
|
253
|
+
json.code,
|
|
254
|
+
json.type,
|
|
255
|
+
text,
|
|
256
|
+
);
|
|
257
|
+
}
|
|
258
|
+
|
|
242
259
|
throw new AppwriteException(
|
|
243
260
|
json.message || text,
|
|
244
261
|
json.code,
|
package/lib/commands/config.ts
CHANGED
|
@@ -146,7 +146,10 @@ const SiteSchema = z
|
|
|
146
146
|
buildCommand: z.string().optional(),
|
|
147
147
|
outputDirectory: z.string().optional(),
|
|
148
148
|
fallbackFile: z.string().optional(),
|
|
149
|
-
|
|
149
|
+
buildSpecification: z.string().optional(),
|
|
150
|
+
runtimeSpecification: z.string().optional(),
|
|
151
|
+
deploymentRetention: z.number().optional(),
|
|
152
|
+
startCommand: z.string().optional(),
|
|
150
153
|
vars: z.record(z.string(), z.string()).optional(),
|
|
151
154
|
ignore: z.string().optional(),
|
|
152
155
|
})
|
|
@@ -161,7 +164,9 @@ const FunctionSchema = z
|
|
|
161
164
|
enabled: z.boolean().optional(),
|
|
162
165
|
logging: z.boolean().optional(),
|
|
163
166
|
runtime: z.string(),
|
|
164
|
-
|
|
167
|
+
buildSpecification: z.string().optional(),
|
|
168
|
+
runtimeSpecification: z.string().optional(),
|
|
169
|
+
deploymentRetention: z.number().optional(),
|
|
165
170
|
scopes: z.array(z.string()).optional(),
|
|
166
171
|
events: z.array(z.string()).optional(),
|
|
167
172
|
schedule: z.string().optional(),
|
package/lib/commands/init.ts
CHANGED
|
@@ -514,7 +514,8 @@ const initFunction = async (): Promise<void> => {
|
|
|
514
514
|
$id: functionId,
|
|
515
515
|
name: answers.name,
|
|
516
516
|
runtime: answers.runtime.id,
|
|
517
|
-
|
|
517
|
+
buildSpecification: answers.buildSpecification,
|
|
518
|
+
runtimeSpecification: answers.runtimeSpecification,
|
|
518
519
|
execute: ["any"],
|
|
519
520
|
events: [],
|
|
520
521
|
scopes: ["users.read"],
|
|
@@ -706,7 +707,8 @@ const initSite = async (): Promise<void> => {
|
|
|
706
707
|
buildCommand: templateDetails.frameworks[0].buildCommand || "",
|
|
707
708
|
outputDirectory: templateDetails.frameworks[0].outputDirectory || "",
|
|
708
709
|
fallbackFile: templateDetails.frameworks[0].fallbackFile || "",
|
|
709
|
-
|
|
710
|
+
buildSpecification: answers.buildSpecification,
|
|
711
|
+
runtimeSpecification: answers.runtimeSpecification,
|
|
710
712
|
enabled: true,
|
|
711
713
|
timeout: 30,
|
|
712
714
|
logging: true,
|
package/lib/commands/pull.ts
CHANGED
|
@@ -297,7 +297,9 @@ export class Pull {
|
|
|
297
297
|
timeout: func.timeout,
|
|
298
298
|
commands: func.commands,
|
|
299
299
|
scopes: func.scopes,
|
|
300
|
-
|
|
300
|
+
buildSpecification: func.buildSpecification,
|
|
301
|
+
runtimeSpecification: func.runtimeSpecification,
|
|
302
|
+
deploymentRetention: func.deploymentRetention,
|
|
301
303
|
};
|
|
302
304
|
|
|
303
305
|
result.push(functionConfig);
|
|
@@ -395,7 +397,10 @@ export class Pull {
|
|
|
395
397
|
buildCommand: site.buildCommand,
|
|
396
398
|
outputDirectory: site.outputDirectory,
|
|
397
399
|
fallbackFile: site.fallbackFile,
|
|
398
|
-
|
|
400
|
+
startCommand: site.startCommand,
|
|
401
|
+
buildSpecification: site.buildSpecification,
|
|
402
|
+
runtimeSpecification: site.runtimeSpecification,
|
|
403
|
+
deploymentRetention: site.deploymentRetention,
|
|
399
404
|
};
|
|
400
405
|
|
|
401
406
|
result.push(siteConfig);
|
package/lib/commands/push.ts
CHANGED
|
@@ -749,7 +749,9 @@ export class Push {
|
|
|
749
749
|
entrypoint: func.entrypoint,
|
|
750
750
|
commands: func.commands,
|
|
751
751
|
scopes: func.scopes,
|
|
752
|
-
|
|
752
|
+
buildSpecification: func.buildSpecification,
|
|
753
|
+
runtimeSpecification: func.runtimeSpecification,
|
|
754
|
+
deploymentRetention: func.deploymentRetention,
|
|
753
755
|
});
|
|
754
756
|
} catch (e: any) {
|
|
755
757
|
if (Number(e.code) === 404) {
|
|
@@ -783,7 +785,9 @@ export class Push {
|
|
|
783
785
|
entrypoint: func.entrypoint,
|
|
784
786
|
commands: func.commands,
|
|
785
787
|
scopes: func.scopes,
|
|
786
|
-
|
|
788
|
+
buildSpecification: func.buildSpecification,
|
|
789
|
+
runtimeSpecification: func.runtimeSpecification,
|
|
790
|
+
deploymentRetention: func.deploymentRetention,
|
|
787
791
|
});
|
|
788
792
|
|
|
789
793
|
let domain = "";
|
|
@@ -1115,7 +1119,10 @@ export class Push {
|
|
|
1115
1119
|
outputDirectory: site.outputDirectory,
|
|
1116
1120
|
buildRuntime: site.buildRuntime,
|
|
1117
1121
|
adapter: site.adapter,
|
|
1118
|
-
|
|
1122
|
+
startCommand: site.startCommand,
|
|
1123
|
+
buildSpecification: site.buildSpecification,
|
|
1124
|
+
runtimeSpecification: site.runtimeSpecification,
|
|
1125
|
+
deploymentRetention: site.deploymentRetention,
|
|
1119
1126
|
});
|
|
1120
1127
|
} catch (e: any) {
|
|
1121
1128
|
if (Number(e.code) === 404) {
|
|
@@ -1148,7 +1155,10 @@ export class Push {
|
|
|
1148
1155
|
outputDirectory: site.outputDirectory,
|
|
1149
1156
|
buildRuntime: site.buildRuntime,
|
|
1150
1157
|
adapter: site.adapter,
|
|
1151
|
-
|
|
1158
|
+
startCommand: site.startCommand,
|
|
1159
|
+
buildSpecification: site.buildSpecification,
|
|
1160
|
+
runtimeSpecification: site.runtimeSpecification,
|
|
1161
|
+
deploymentRetention: site.deploymentRetention,
|
|
1152
1162
|
});
|
|
1153
1163
|
|
|
1154
1164
|
let domain = "";
|
|
@@ -180,7 +180,7 @@ account
|
|
|
180
180
|
account
|
|
181
181
|
.command(`list-invoices`)
|
|
182
182
|
.description(`List all invoices tied to an account.`)
|
|
183
|
-
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, amount, currency, from, to, dueAt, attempts, status, grossAmount`)
|
|
183
|
+
.option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/databases#querying-documents). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: teamId, aggregationId, type, amount, currency, from, to, dueAt, attempts, status, grossAmount`)
|
|
184
184
|
.action(
|
|
185
185
|
actionRunner(
|
|
186
186
|
async ({ queries }) =>
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import fs from "fs";
|
|
3
|
+
import { resolveFileParam } from "../utils/deployment.js";
|
|
3
4
|
import { sdkForProject } from "../../sdks.js";
|
|
4
5
|
import {
|
|
5
6
|
actionRunner,
|
|
@@ -80,11 +81,13 @@ functions
|
|
|
80
81
|
value === undefined ? true : parseBool(value),
|
|
81
82
|
)
|
|
82
83
|
.option(`--provider-root-directory <provider-root-directory>`, `Path to function code in the linked repo.`)
|
|
83
|
-
.option(`--specification <specification>`, `
|
|
84
|
+
.option(`--build-specification <build-specification>`, `Build specification for the function deployments.`)
|
|
85
|
+
.option(`--runtime-specification <runtime-specification>`, `Runtime specification for the function executions.`)
|
|
86
|
+
.option(`--deployment-retention <deployment-retention>`, `Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.`, parseInteger)
|
|
84
87
|
.action(
|
|
85
88
|
actionRunner(
|
|
86
|
-
async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory,
|
|
87
|
-
parse(await (await getFunctionsClient()).create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory,
|
|
89
|
+
async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention }) =>
|
|
90
|
+
parse(await (await getFunctionsClient()).create(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention)),
|
|
88
91
|
),
|
|
89
92
|
);
|
|
90
93
|
|
|
@@ -194,11 +197,13 @@ functions
|
|
|
194
197
|
value === undefined ? true : parseBool(value),
|
|
195
198
|
)
|
|
196
199
|
.option(`--provider-root-directory <provider-root-directory>`, `Path to function code in the linked repo.`)
|
|
197
|
-
.option(`--specification <specification>`, `
|
|
200
|
+
.option(`--build-specification <build-specification>`, `Build specification for the function deployments.`)
|
|
201
|
+
.option(`--runtime-specification <runtime-specification>`, `Runtime specification for the function executions.`)
|
|
202
|
+
.option(`--deployment-retention <deployment-retention>`, `Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.`, parseInteger)
|
|
198
203
|
.action(
|
|
199
204
|
actionRunner(
|
|
200
|
-
async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory,
|
|
201
|
-
parse(await (await getFunctionsClient()).update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory,
|
|
205
|
+
async ({ functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention }) =>
|
|
206
|
+
parse(await (await getFunctionsClient()).update(functionId, name, runtime, execute, events, schedule, timeout, enabled, logging, entrypoint, commands, scopes, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention)),
|
|
202
207
|
),
|
|
203
208
|
);
|
|
204
209
|
|
|
@@ -259,7 +264,7 @@ Use the "command" param to set the entrypoint used to execute your code.`)
|
|
|
259
264
|
.action(
|
|
260
265
|
actionRunner(
|
|
261
266
|
async ({ functionId, code, activate, entrypoint, commands }) =>
|
|
262
|
-
parse(await (await getFunctionsClient()).createDeployment(functionId, code, activate, entrypoint, commands)),
|
|
267
|
+
parse(await (await getFunctionsClient()).createDeployment(functionId, code !== undefined ? await resolveFileParam(code) : undefined, activate, entrypoint, commands)),
|
|
263
268
|
),
|
|
264
269
|
);
|
|
265
270
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import fs from "fs";
|
|
3
|
+
import { resolveFileParam } from "../utils/deployment.js";
|
|
3
4
|
import { sdkForProject } from "../../sdks.js";
|
|
4
5
|
import {
|
|
5
6
|
actionRunner,
|
|
@@ -67,6 +68,7 @@ sites
|
|
|
67
68
|
.option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger)
|
|
68
69
|
.option(`--install-command <install-command>`, `Install Command.`)
|
|
69
70
|
.option(`--build-command <build-command>`, `Build Command.`)
|
|
71
|
+
.option(`--start-command <start-command>`, `Custom start command. Leave empty to use default.`)
|
|
70
72
|
.option(`--output-directory <output-directory>`, `Output Directory for site.`)
|
|
71
73
|
.option(`--adapter <adapter>`, `Framework adapter defining rendering strategy. Allowed values are: static, ssr`)
|
|
72
74
|
.option(`--installation-id <installation-id>`, `Appwrite Installation ID for VCS (Version Control System) deployment.`)
|
|
@@ -80,11 +82,13 @@ sites
|
|
|
80
82
|
value === undefined ? true : parseBool(value),
|
|
81
83
|
)
|
|
82
84
|
.option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`)
|
|
83
|
-
.option(`--specification <specification>`, `
|
|
85
|
+
.option(`--build-specification <build-specification>`, `Build specification for the site deployments.`)
|
|
86
|
+
.option(`--runtime-specification <runtime-specification>`, `Runtime specification for the SSR executions.`)
|
|
87
|
+
.option(`--deployment-retention <deployment-retention>`, `Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.`, parseInteger)
|
|
84
88
|
.action(
|
|
85
89
|
actionRunner(
|
|
86
|
-
async ({ siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory,
|
|
87
|
-
parse(await (await getSitesClient()).create(siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory,
|
|
90
|
+
async ({ siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, startCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention }) =>
|
|
91
|
+
parse(await (await getSitesClient()).create(siteId, name, framework, buildRuntime, enabled, logging, timeout, installCommand, buildCommand, startCommand, outputDirectory, adapter, installationId, fallbackFile, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention)),
|
|
88
92
|
),
|
|
89
93
|
);
|
|
90
94
|
|
|
@@ -174,6 +178,7 @@ sites
|
|
|
174
178
|
.option(`--timeout <timeout>`, `Maximum request time in seconds.`, parseInteger)
|
|
175
179
|
.option(`--install-command <install-command>`, `Install Command.`)
|
|
176
180
|
.option(`--build-command <build-command>`, `Build Command.`)
|
|
181
|
+
.option(`--start-command <start-command>`, `Custom start command. Leave empty to use default.`)
|
|
177
182
|
.option(`--output-directory <output-directory>`, `Output Directory for site.`)
|
|
178
183
|
.option(`--build-runtime <build-runtime>`, `Runtime to use during build step.`)
|
|
179
184
|
.option(`--adapter <adapter>`, `Framework adapter defining rendering strategy. Allowed values are: static, ssr`)
|
|
@@ -188,11 +193,13 @@ sites
|
|
|
188
193
|
value === undefined ? true : parseBool(value),
|
|
189
194
|
)
|
|
190
195
|
.option(`--provider-root-directory <provider-root-directory>`, `Path to site code in the linked repo.`)
|
|
191
|
-
.option(`--specification <specification>`, `
|
|
196
|
+
.option(`--build-specification <build-specification>`, `Build specification for the site deployments.`)
|
|
197
|
+
.option(`--runtime-specification <runtime-specification>`, `Runtime specification for the SSR executions.`)
|
|
198
|
+
.option(`--deployment-retention <deployment-retention>`, `Days to keep non-active deployments before deletion. Value 0 means all deployments will be kept.`, parseInteger)
|
|
192
199
|
.action(
|
|
193
200
|
actionRunner(
|
|
194
|
-
async ({ siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory,
|
|
195
|
-
parse(await (await getSitesClient()).update(siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory,
|
|
201
|
+
async ({ siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, startCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention }) =>
|
|
202
|
+
parse(await (await getSitesClient()).update(siteId, name, framework, enabled, logging, timeout, installCommand, buildCommand, startCommand, outputDirectory, buildRuntime, adapter, fallbackFile, installationId, providerRepositoryId, providerBranch, providerSilentMode, providerRootDirectory, buildSpecification, runtimeSpecification, deploymentRetention)),
|
|
196
203
|
),
|
|
197
204
|
);
|
|
198
205
|
|
|
@@ -255,7 +262,7 @@ sites
|
|
|
255
262
|
.action(
|
|
256
263
|
actionRunner(
|
|
257
264
|
async ({ siteId, code, installCommand, buildCommand, outputDirectory, activate }) =>
|
|
258
|
-
parse(await (await getSitesClient()).createDeployment(siteId, code, installCommand, buildCommand, outputDirectory, activate)),
|
|
265
|
+
parse(await (await getSitesClient()).createDeployment(siteId, code !== undefined ? await resolveFileParam(code) : undefined, installCommand, buildCommand, outputDirectory, activate)),
|
|
259
266
|
),
|
|
260
267
|
);
|
|
261
268
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Command } from "commander";
|
|
2
2
|
import fs from "fs";
|
|
3
|
+
import { resolveFileParam } from "../utils/deployment.js";
|
|
3
4
|
import { sdkForProject } from "../../sdks.js";
|
|
4
5
|
import {
|
|
5
6
|
actionRunner,
|
|
@@ -195,7 +196,7 @@ If you're creating a new file using one of the Appwrite SDKs, all the chunking l
|
|
|
195
196
|
.action(
|
|
196
197
|
actionRunner(
|
|
197
198
|
async ({ bucketId, fileId, file, permissions }) =>
|
|
198
|
-
parse(await (await getStorageClient()).createFile(bucketId, fileId, file, permissions)),
|
|
199
|
+
parse(await (await getStorageClient()).createFile(bucketId, fileId, file !== undefined ? await resolveFileParam(file) : undefined, permissions)),
|
|
199
200
|
),
|
|
200
201
|
);
|
|
201
202
|
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import fs from "fs";
|
|
2
|
+
import os from "os";
|
|
2
3
|
import path from "path";
|
|
3
4
|
import { create, extract } from "tar";
|
|
4
5
|
import { Client, AppwriteException } from "@appwrite.io/console";
|
|
@@ -21,10 +22,9 @@ interface DeploymentDetails {
|
|
|
21
22
|
|
|
22
23
|
/**
|
|
23
24
|
* Package a directory into a tar.gz File object for deployment
|
|
24
|
-
* @private - Only used internally by pushDeployment
|
|
25
25
|
*/
|
|
26
26
|
async function packageDirectory(dirPath: string): Promise<File> {
|
|
27
|
-
const tempFile =
|
|
27
|
+
const tempFile = path.join(os.tmpdir(), `appwrite-deploy-${Date.now()}.tar.gz`);
|
|
28
28
|
|
|
29
29
|
await create(
|
|
30
30
|
{
|
|
@@ -35,12 +35,33 @@ async function packageDirectory(dirPath: string): Promise<File> {
|
|
|
35
35
|
["."],
|
|
36
36
|
);
|
|
37
37
|
|
|
38
|
-
|
|
39
|
-
|
|
38
|
+
try {
|
|
39
|
+
const buffer = fs.readFileSync(tempFile);
|
|
40
|
+
return new File([buffer], path.basename(tempFile), {
|
|
41
|
+
type: "application/gzip",
|
|
42
|
+
});
|
|
43
|
+
} finally {
|
|
44
|
+
if (fs.existsSync(tempFile)) {
|
|
45
|
+
fs.unlinkSync(tempFile);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}
|
|
40
49
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
50
|
+
/**
|
|
51
|
+
* Resolve a file path (file or directory) into a File object for upload.
|
|
52
|
+
* Directories are packaged into a tar.gz archive.
|
|
53
|
+
*/
|
|
54
|
+
export async function resolveFileParam(filePath: string): Promise<File> {
|
|
55
|
+
const resolved = path.resolve(filePath);
|
|
56
|
+
if (!fs.existsSync(resolved)) {
|
|
57
|
+
throw new Error(`File or directory not found: ${resolved}`);
|
|
58
|
+
}
|
|
59
|
+
const stat = fs.statSync(resolved);
|
|
60
|
+
if (stat.isDirectory()) {
|
|
61
|
+
return packageDirectory(resolved);
|
|
62
|
+
}
|
|
63
|
+
const buffer = fs.readFileSync(resolved);
|
|
64
|
+
return new File([buffer], path.basename(resolved));
|
|
44
65
|
}
|
|
45
66
|
|
|
46
67
|
/**
|
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 = '15.1.0';
|
|
5
5
|
export const SDK_NAME = 'Command Line';
|
|
6
6
|
export const SDK_PLATFORM = 'console';
|
|
7
7
|
export const SDK_LANGUAGE = 'cli';
|
package/lib/questions.ts
CHANGED
|
@@ -457,8 +457,25 @@ export const questionsCreateFunction: Question[] = [
|
|
|
457
457
|
},
|
|
458
458
|
{
|
|
459
459
|
type: "list",
|
|
460
|
-
name: "
|
|
461
|
-
message: "What specification would you like to use?",
|
|
460
|
+
name: "buildSpecification",
|
|
461
|
+
message: "What build specification would you like to use?",
|
|
462
|
+
choices: async () => {
|
|
463
|
+
const response = await (await getFunctionsService()).listSpecifications();
|
|
464
|
+
const specifications = response["specifications"];
|
|
465
|
+
const choices = specifications.map((spec: any, _idx: number) => {
|
|
466
|
+
return {
|
|
467
|
+
name: `${spec.cpus} CPU, ${spec.memory}MB RAM`,
|
|
468
|
+
value: spec.slug,
|
|
469
|
+
disabled: spec.enabled === false ? "Upgrade to use" : false,
|
|
470
|
+
};
|
|
471
|
+
});
|
|
472
|
+
return choices;
|
|
473
|
+
},
|
|
474
|
+
},
|
|
475
|
+
{
|
|
476
|
+
type: "list",
|
|
477
|
+
name: "runtimeSpecification",
|
|
478
|
+
message: "What runtime specification would you like to use?",
|
|
462
479
|
choices: async () => {
|
|
463
480
|
const response = await (await getFunctionsService()).listSpecifications();
|
|
464
481
|
const specifications = response["specifications"];
|
|
@@ -1166,8 +1183,25 @@ export const questionsCreateSite: Question[] = [
|
|
|
1166
1183
|
},
|
|
1167
1184
|
{
|
|
1168
1185
|
type: "list",
|
|
1169
|
-
name: "
|
|
1170
|
-
message: "What specification would you like to use?",
|
|
1186
|
+
name: "buildSpecification",
|
|
1187
|
+
message: "What build specification would you like to use?",
|
|
1188
|
+
choices: async () => {
|
|
1189
|
+
const response = await (await getSitesService()).listSpecifications();
|
|
1190
|
+
const specifications = response["specifications"];
|
|
1191
|
+
const choices = specifications.map((spec: any) => {
|
|
1192
|
+
return {
|
|
1193
|
+
name: `${spec.cpus} CPU, ${spec.memory}MB RAM`,
|
|
1194
|
+
value: spec.slug,
|
|
1195
|
+
disabled: spec.enabled === false ? "Upgrade to use" : false,
|
|
1196
|
+
};
|
|
1197
|
+
});
|
|
1198
|
+
return choices;
|
|
1199
|
+
},
|
|
1200
|
+
},
|
|
1201
|
+
{
|
|
1202
|
+
type: "list",
|
|
1203
|
+
name: "runtimeSpecification",
|
|
1204
|
+
message: "What runtime specification would you like to use?",
|
|
1171
1205
|
choices: async () => {
|
|
1172
1206
|
const response = await (await getSitesService()).listSpecifications();
|
|
1173
1207
|
const specifications = response["specifications"];
|
package/lib/sdks.ts
CHANGED
|
@@ -23,6 +23,7 @@ export const sdkForConsole = async (
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
client.headers = {
|
|
26
|
+
...client.headers,
|
|
26
27
|
"x-sdk-name": "Command Line",
|
|
27
28
|
"x-sdk-platform": "console",
|
|
28
29
|
"x-sdk-language": "cli",
|
|
@@ -61,6 +62,7 @@ export const sdkForProject = async (): Promise<Client> => {
|
|
|
61
62
|
}
|
|
62
63
|
|
|
63
64
|
client.headers = {
|
|
65
|
+
...client.headers,
|
|
64
66
|
"x-sdk-name": "Command Line",
|
|
65
67
|
"x-sdk-platform": "console",
|
|
66
68
|
"x-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": "15.1.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": "^5.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": "15.1.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/15.1.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/15.1.0/appwrite-cli-win-arm64.exe",
|
|
19
19
|
"bin": [
|
|
20
20
|
[
|
|
21
21
|
"appwrite-cli-win-arm64.exe",
|