appwrite-cli 0.18.5 → 1.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/npm-publish.yml +8 -1
- package/LICENSE.md +1 -1
- package/README.md +4 -4
- package/appwrite.json +4 -0
- package/docs/examples/account/create-phone-session.md +1 -1
- package/docs/examples/account/get-logs.md +0 -1
- package/docs/examples/account/list-logs.md +2 -0
- package/docs/examples/account/list-sessions.md +1 -0
- package/docs/examples/account/update-phone.md +1 -1
- package/docs/examples/avatars/get-initials.md +0 -1
- package/docs/examples/databases/create-collection.md +2 -3
- package/docs/examples/databases/create-datetime-attribute.md +7 -0
- package/docs/examples/databases/create-document.md +0 -1
- package/docs/examples/databases/list-collection-logs.md +0 -1
- package/docs/examples/databases/list-collections.md +0 -4
- package/docs/examples/databases/list-document-logs.md +0 -1
- package/docs/examples/databases/list-documents.md +0 -6
- package/docs/examples/databases/list-logs.md +0 -1
- package/docs/examples/databases/list.md +0 -4
- package/docs/examples/databases/update-collection.md +0 -1
- package/docs/examples/databases/update-document.md +0 -1
- package/docs/examples/functions/create-variable.md +4 -0
- package/docs/examples/functions/create.md +1 -1
- package/docs/examples/functions/delete-variable.md +3 -0
- package/docs/examples/functions/get-function-usage.md +3 -0
- package/docs/examples/functions/get-usage.md +0 -1
- package/docs/examples/functions/get-variable.md +3 -0
- package/docs/examples/functions/list-deployments.md +0 -4
- package/docs/examples/functions/list-executions.md +0 -3
- package/docs/examples/functions/list-variables.md +2 -0
- package/docs/examples/functions/list.md +0 -4
- package/docs/examples/functions/update-variable.md +5 -0
- package/docs/examples/functions/update.md +1 -1
- package/docs/examples/locale/list-continents.md +1 -0
- package/docs/examples/locale/list-countries-e-u.md +1 -0
- package/docs/examples/locale/list-countries-phones.md +1 -0
- package/docs/examples/locale/list-countries.md +1 -0
- package/docs/examples/locale/list-currencies.md +1 -0
- package/docs/examples/locale/list-languages.md +1 -0
- package/docs/examples/projects/list.md +0 -4
- package/docs/examples/storage/create-bucket.md +1 -1
- package/docs/examples/storage/create-file.md +0 -1
- package/docs/examples/storage/list-buckets.md +0 -4
- package/docs/examples/storage/list-files.md +0 -4
- package/docs/examples/storage/update-bucket.md +1 -1
- package/docs/examples/storage/update-file.md +0 -1
- package/docs/examples/teams/get-memberships.md +0 -4
- package/docs/examples/teams/list-logs.md +0 -1
- package/docs/examples/teams/list-memberships.md +4 -0
- package/docs/examples/teams/list.md +0 -4
- package/docs/examples/users/create-argon2user.md +5 -0
- package/docs/examples/users/create-bcrypt-user.md +5 -0
- package/docs/examples/users/create-m-d5user.md +5 -0
- package/docs/examples/users/create-p-h-pass-user.md +5 -0
- package/docs/examples/users/create-s-h-a-user.md +6 -0
- package/docs/examples/users/create-scrypt-modified-user.md +8 -0
- package/docs/examples/users/create-scrypt-user.md +10 -0
- package/docs/examples/users/create.md +3 -2
- package/docs/examples/users/get-logs.md +0 -1
- package/docs/examples/users/list-logs.md +3 -0
- package/docs/examples/users/list-memberships.md +2 -0
- package/docs/examples/users/list-sessions.md +2 -0
- package/docs/examples/users/list.md +0 -4
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +7 -3
- package/lib/commands/account.js +24 -29
- package/lib/commands/avatars.js +2 -7
- package/lib/commands/databases.js +154 -210
- package/lib/commands/deploy.js +12 -3
- package/lib/commands/functions.js +227 -93
- package/lib/commands/generic.js +3 -3
- package/lib/commands/locale.js +24 -24
- package/lib/commands/projects.js +10 -30
- package/lib/commands/storage.js +53 -105
- package/lib/commands/teams.js +20 -65
- package/lib/commands/users.js +425 -47
- package/lib/questions.js +1 -1
- package/package.json +1 -1
|
@@ -31,7 +31,14 @@ jobs:
|
|
|
31
31
|
npm run mac-x64
|
|
32
32
|
npm run mac-arm64
|
|
33
33
|
- name: Publish NPM library
|
|
34
|
-
run:
|
|
34
|
+
run: |
|
|
35
|
+
if ${{ contains(github.event.release.tag_name, '-RC') }}; then
|
|
36
|
+
echo "Publishing Release Candidate ${{ github.event.release.tag_name}} to NPM"
|
|
37
|
+
npm publish --tag next
|
|
38
|
+
else
|
|
39
|
+
echo "Publishing ${{ github.event.release.tag_name}} to NPM"
|
|
40
|
+
npm publish
|
|
41
|
+
fi
|
|
35
42
|
env:
|
|
36
43
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
|
37
44
|
- uses: fnkr/github-action-ghr@v1
|
package/LICENSE.md
CHANGED
|
@@ -9,4 +9,4 @@ Redistribution and use in source and binary forms, with or without modification,
|
|
|
9
9
|
|
|
10
10
|
3. Neither the name Appwrite nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
|
11
11
|
|
|
12
|
-
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
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 0.
|
|
9
|
+
**This SDK is compatible with Appwrite server version 1.0.0. 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
|
-
0.
|
|
32
|
+
1.0.0
|
|
33
33
|
```
|
|
34
34
|
|
|
35
35
|
### Install using prebuilt binaries
|
|
@@ -58,7 +58,7 @@ $ iwr -useb https://appwrite.io/cli/install.ps1 | iex
|
|
|
58
58
|
Once the installation completes, you can verify your install using
|
|
59
59
|
```
|
|
60
60
|
$ appwrite -v
|
|
61
|
-
0.
|
|
61
|
+
1.0.0
|
|
62
62
|
```
|
|
63
63
|
|
|
64
64
|
## Getting Started
|
package/appwrite.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite account listSessions
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite locale listContinents
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite locale listCountriesEU
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite locale listCountriesPhones
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite locale listCountries
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite locale listCurrencies
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
appwrite locale listLanguages
|
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/0.
|
|
17
|
-
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/0.
|
|
16
|
+
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/1.0.0/appwrite-cli-win-x64.exe"
|
|
17
|
+
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/1.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="0.
|
|
100
|
+
GITHUB_LATEST_VERSION="1.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
|
@@ -12,9 +12,12 @@ class Client {
|
|
|
12
12
|
this.endpoint = 'https://HOSTNAME/v1';
|
|
13
13
|
this.headers = {
|
|
14
14
|
'content-type': '',
|
|
15
|
-
'x-sdk-
|
|
16
|
-
'
|
|
17
|
-
'
|
|
15
|
+
'x-sdk-name': 'Command Line',
|
|
16
|
+
'x-sdk-platform': 'console',
|
|
17
|
+
'x-sdk-language': 'cli',
|
|
18
|
+
'x-sdk-version': '1.0.0',
|
|
19
|
+
'user-agent' : `AppwriteCLI/1.0.0 (${os.type()} ${os.version()}; ${os.arch()})`,
|
|
20
|
+
'X-Appwrite-Response-Format' : '1.0.0',
|
|
18
21
|
};
|
|
19
22
|
}
|
|
20
23
|
|
|
@@ -184,6 +187,7 @@ class Client {
|
|
|
184
187
|
method.toUpperCase() === "GET" || contentType.startsWith("multipart/form-data") ? formData : params,
|
|
185
188
|
json: contentType.startsWith("application/json"),
|
|
186
189
|
transformRequest: method.toUpperCase() === "GET" || contentType.startsWith("multipart/form-data") ? undefined : (data) => JSONbig.stringify(data),
|
|
190
|
+
transformResponse: [ (data) => data ? JSONbig.parse(data) : data ],
|
|
187
191
|
responseType: responseType,
|
|
188
192
|
};
|
|
189
193
|
try {
|