appwrite-cli 6.2.3 → 7.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/README.md +4 -4
- package/docs/examples/console/get-resource.md +3 -0
- package/docs/examples/databases/create-documents.md +4 -0
- package/docs/examples/databases/create-index.md +1 -0
- package/docs/examples/databases/delete-documents.md +4 -0
- package/docs/examples/databases/update-documents.md +5 -0
- package/docs/examples/databases/upsert-document.md +6 -0
- package/docs/examples/databases/upsert-documents.md +4 -0
- package/docs/examples/functions/{create-build.md → create-duplicate-deployment.md} +1 -1
- package/docs/examples/functions/create-template-deployment.md +7 -0
- package/docs/examples/functions/create-variable.md +2 -1
- package/docs/examples/functions/create-vcs-deployment.md +5 -0
- package/docs/examples/functions/create.md +0 -4
- package/docs/examples/functions/get-deployment-download.md +2 -1
- package/docs/examples/functions/get-usage.md +1 -0
- package/docs/examples/functions/list-executions.md +0 -1
- package/docs/examples/functions/list-usage.md +2 -0
- package/docs/examples/functions/{update-deployment-build.md → update-deployment-status.md} +1 -1
- package/docs/examples/functions/{update-deployment.md → update-function-deployment.md} +1 -1
- package/docs/examples/functions/update-variable.md +1 -0
- package/docs/examples/migrations/create-csv-migration.md +4 -0
- package/docs/examples/project/create-variable.md +2 -1
- package/docs/examples/project/update-variable.md +1 -0
- package/docs/examples/projects/create-dev-key.md +4 -0
- package/docs/examples/projects/delete-dev-key.md +3 -0
- package/docs/examples/projects/get-dev-key.md +3 -0
- package/docs/examples/projects/list-dev-keys.md +3 -0
- package/docs/examples/projects/update-dev-key.md +5 -0
- package/docs/examples/proxy/create-a-p-i-rule.md +2 -0
- package/docs/examples/proxy/create-function-rule.md +4 -0
- package/docs/examples/proxy/create-redirect-rule.md +4 -0
- package/docs/examples/proxy/create-site-rule.md +4 -0
- package/docs/examples/sites/create-deployment.md +7 -0
- package/docs/examples/sites/create-duplicate-deployment.md +3 -0
- package/docs/examples/sites/create-template-deployment.md +7 -0
- package/docs/examples/sites/create-variable.md +5 -0
- package/docs/examples/sites/create-vcs-deployment.md +5 -0
- package/docs/examples/sites/create.md +19 -0
- package/docs/examples/sites/delete-deployment.md +3 -0
- package/docs/examples/sites/delete-log.md +3 -0
- package/docs/examples/sites/delete-variable.md +3 -0
- package/docs/examples/sites/delete.md +2 -0
- package/docs/examples/sites/get-deployment-download.md +4 -0
- package/docs/examples/sites/get-deployment.md +3 -0
- package/docs/examples/sites/get-log.md +3 -0
- package/docs/examples/sites/get-template.md +2 -0
- package/docs/examples/sites/get-usage.md +3 -0
- package/docs/examples/sites/get-variable.md +3 -0
- package/docs/examples/sites/get.md +2 -0
- package/docs/examples/sites/list-deployments.md +4 -0
- package/docs/examples/sites/list-frameworks.md +1 -0
- package/docs/examples/sites/list-logs.md +3 -0
- package/docs/examples/sites/list-specifications.md +1 -0
- package/docs/examples/sites/list-templates.md +5 -0
- package/docs/examples/sites/list-usage.md +2 -0
- package/docs/examples/sites/list-variables.md +2 -0
- package/docs/examples/sites/list.md +3 -0
- package/docs/examples/sites/update-deployment-status.md +3 -0
- package/docs/examples/sites/update-site-deployment.md +3 -0
- package/docs/examples/sites/update-variable.md +6 -0
- package/docs/examples/sites/update.md +19 -0
- package/docs/examples/storage/get-file-download.md +2 -1
- package/docs/examples/storage/get-file-preview.md +1 -0
- package/docs/examples/storage/get-file-view.md +2 -1
- package/docs/examples/tokens/create-file-token.md +4 -0
- package/docs/examples/tokens/delete.md +2 -0
- package/docs/examples/tokens/get.md +2 -0
- package/docs/examples/tokens/list.md +4 -0
- package/docs/examples/tokens/update.md +3 -0
- package/docs/examples/users/list-memberships.md +3 -1
- package/docs/examples/vcs/create-repository-detection.md +1 -0
- package/docs/examples/vcs/list-repositories.md +1 -0
- package/index.js +4 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +8 -4
- package/lib/commands/account.js +7 -17
- package/lib/commands/avatars.js +7 -14
- package/lib/commands/console.js +50 -1
- package/lib/commands/databases.js +287 -55
- package/lib/commands/functions.js +244 -146
- package/lib/commands/generic.js +1 -1
- package/lib/commands/health.js +0 -63
- package/lib/commands/init.js +191 -0
- package/lib/commands/locale.js +0 -8
- package/lib/commands/messaging.js +38 -51
- package/lib/commands/migrations.js +50 -5
- package/lib/commands/project.js +12 -5
- package/lib/commands/projects.js +246 -27
- package/lib/commands/proxy.js +160 -19
- package/lib/commands/pull.js +124 -1
- package/lib/commands/push.js +338 -5
- package/lib/commands/sites.js +1663 -0
- package/lib/commands/storage.js +28 -22
- package/lib/commands/teams.js +2 -8
- package/lib/commands/tokens.js +261 -0
- package/lib/commands/users.js +15 -17
- package/lib/commands/vcs.js +60 -53
- package/lib/config.js +50 -0
- package/lib/parser.js +2 -1
- package/lib/questions.js +110 -1
- package/package.json +1 -1
- package/scoop/appwrite.json +3 -3
- package/docs/examples/functions/get-function-usage.md +0 -3
- package/docs/examples/health/get-queue-stats-usage-dump.md +0 -2
- package/docs/examples/proxy/create-rule.md +0 -4
package/README.md
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# Appwrite Command Line SDK
|
|
2
2
|
|
|
3
3
|

|
|
4
|
-

|
|
5
5
|
[](https://travis-ci.com/appwrite/sdk-generator)
|
|
6
6
|
[](https://twitter.com/appwrite)
|
|
7
7
|
[](https://appwrite.io/discord)
|
|
8
8
|
|
|
9
|
-
**This SDK is compatible with Appwrite server version 1.
|
|
9
|
+
**This SDK is compatible with Appwrite server version 1.7.x. For older versions, please check [previous releases](https://github.com/appwrite/sdk-for-cli/releases).**
|
|
10
10
|
|
|
11
11
|
Appwrite is an open-source backend as a service server that abstract and simplify complex and repetitive development tasks behind a very simple to use REST API. Appwrite aims to help you develop your apps faster and in a more secure way. Use the Command Line SDK to integrate your app with the Appwrite server to easily start interacting with all of Appwrite backend APIs and tools. For full API documentation and tutorials go to [https://appwrite.io/docs](https://appwrite.io/docs)
|
|
12
12
|
|
|
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
|
|
|
29
29
|
|
|
30
30
|
```sh
|
|
31
31
|
$ appwrite -v
|
|
32
|
-
|
|
32
|
+
7.0.0
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Install using prebuilt binaries
|
|
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
|
|
|
60
60
|
Once the installation completes, you can verify your install using
|
|
61
61
|
```
|
|
62
62
|
$ appwrite -v
|
|
63
|
-
|
|
63
|
+
7.0.0
|
|
64
64
|
```
|
|
65
65
|
|
|
66
66
|
## Getting Started
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite sites listFrameworks
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite sites listSpecifications
|
package/index.js
CHANGED
|
@@ -30,8 +30,10 @@ const { migrations } = require("./lib/commands/migrations");
|
|
|
30
30
|
const { project } = require("./lib/commands/project");
|
|
31
31
|
const { projects } = require("./lib/commands/projects");
|
|
32
32
|
const { proxy } = require("./lib/commands/proxy");
|
|
33
|
+
const { sites } = require("./lib/commands/sites");
|
|
33
34
|
const { storage } = require("./lib/commands/storage");
|
|
34
35
|
const { teams } = require("./lib/commands/teams");
|
|
36
|
+
const { tokens } = require("./lib/commands/tokens");
|
|
35
37
|
const { users } = require("./lib/commands/users");
|
|
36
38
|
const { vcs } = require("./lib/commands/vcs");
|
|
37
39
|
|
|
@@ -95,8 +97,10 @@ program
|
|
|
95
97
|
.addCommand(project)
|
|
96
98
|
.addCommand(projects)
|
|
97
99
|
.addCommand(proxy)
|
|
100
|
+
.addCommand(sites)
|
|
98
101
|
.addCommand(storage)
|
|
99
102
|
.addCommand(teams)
|
|
103
|
+
.addCommand(tokens)
|
|
100
104
|
.addCommand(users)
|
|
101
105
|
.addCommand(vcs)
|
|
102
106
|
.addCommand(client)
|
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/7.0.0/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/7.0.0/appwrite-cli-win-arm64.exe"
|
|
18
18
|
|
|
19
19
|
$APPWRITE_BINARY_NAME = "appwrite.exe"
|
|
20
20
|
|
package/install.sh
CHANGED
|
@@ -97,7 +97,7 @@ printSuccess() {
|
|
|
97
97
|
downloadBinary() {
|
|
98
98
|
echo "[2/4] Downloading executable for $OS ($ARCH) ..."
|
|
99
99
|
|
|
100
|
-
GITHUB_LATEST_VERSION="
|
|
100
|
+
GITHUB_LATEST_VERSION="7.0.0"
|
|
101
101
|
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
|
|
102
102
|
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
|
|
103
103
|
|
package/lib/client.js
CHANGED
|
@@ -16,9 +16,9 @@ class Client {
|
|
|
16
16
|
'x-sdk-name': 'Command Line',
|
|
17
17
|
'x-sdk-platform': 'console',
|
|
18
18
|
'x-sdk-language': 'cli',
|
|
19
|
-
'x-sdk-version': '
|
|
20
|
-
'user-agent' : `AppwriteCLI/
|
|
21
|
-
'X-Appwrite-Response-Format' : '1.
|
|
19
|
+
'x-sdk-version': '7.0.0',
|
|
20
|
+
'user-agent' : `AppwriteCLI/7.0.0 (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
21
|
+
'X-Appwrite-Response-Format' : '1.7.0',
|
|
22
22
|
};
|
|
23
23
|
}
|
|
24
24
|
|
|
@@ -221,7 +221,11 @@ class Client {
|
|
|
221
221
|
|
|
222
222
|
let cookies = response.headers.getSetCookie();
|
|
223
223
|
if (cookies && cookies.length > 0) {
|
|
224
|
-
|
|
224
|
+
for (const cookie of cookies) {
|
|
225
|
+
if (cookie.startsWith('a_session_console=')) {
|
|
226
|
+
globalConfig.setCookie(cookie);
|
|
227
|
+
}
|
|
228
|
+
}
|
|
225
229
|
}
|
|
226
230
|
|
|
227
231
|
const text = await response.text();
|