appwrite-cli 10.1.0 → 10.2.2
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 +10 -0
- package/README.md +2 -2
- package/docs/examples/databases/create-operations.md +2 -0
- package/docs/examples/databases/create-transaction.md +1 -0
- package/docs/examples/databases/delete-transaction.md +2 -0
- package/docs/examples/databases/get-transaction.md +2 -0
- package/docs/examples/databases/list-transactions.md +1 -0
- package/docs/examples/databases/update-transaction.md +2 -0
- package/docs/examples/migrations/create-csv-migration.md +1 -1
- package/docs/examples/tablesdb/create-operations.md +2 -0
- package/docs/examples/tablesdb/create-transaction.md +1 -0
- package/docs/examples/tablesdb/delete-transaction.md +2 -0
- package/docs/examples/tablesdb/get-transaction.md +2 -0
- package/docs/examples/tablesdb/list-transactions.md +1 -0
- package/docs/examples/tablesdb/update-transaction.md +2 -0
- package/install.ps1 +2 -2
- package/install.sh +1 -1
- package/lib/client.js +2 -2
- package/lib/commands/databases.js +325 -13
- package/lib/commands/generic.js +5 -3
- package/lib/commands/push.js +164 -34
- package/lib/commands/tables-db.js +324 -12
- package/lib/config.js +17 -7
- package/lib/parser.js +1 -1
- package/package.json +1 -1
- package/scoop/appwrite.config.json +3 -3
package/lib/config.js
CHANGED
|
@@ -681,15 +681,25 @@ class Global extends Config {
|
|
|
681
681
|
|
|
682
682
|
getSessions() {
|
|
683
683
|
const sessions = Object.keys(this.data).filter((key) => !Global.IGNORE_ATTRIBUTES.includes(key))
|
|
684
|
+
const current = this.getCurrentSession();
|
|
684
685
|
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
686
|
+
const sessionMap = new Map();
|
|
687
|
+
|
|
688
|
+
sessions.forEach((sessionId) => {
|
|
689
|
+
const email = this.data[sessionId][Global.PREFERENCE_EMAIL];
|
|
690
|
+
const endpoint = this.data[sessionId][Global.PREFERENCE_ENDPOINT];
|
|
691
|
+
const key = `${email}|${endpoint}`;
|
|
692
|
+
|
|
693
|
+
if (sessionId === current || !sessionMap.has(key)) {
|
|
694
|
+
sessionMap.set(key, {
|
|
695
|
+
id: sessionId,
|
|
696
|
+
endpoint: this.data[sessionId][Global.PREFERENCE_ENDPOINT],
|
|
697
|
+
email: this.data[sessionId][Global.PREFERENCE_EMAIL]
|
|
698
|
+
});
|
|
691
699
|
}
|
|
692
|
-
})
|
|
700
|
+
});
|
|
701
|
+
|
|
702
|
+
return Array.from(sessionMap.values());
|
|
693
703
|
}
|
|
694
704
|
|
|
695
705
|
addSession(session, data) {
|
package/lib/parser.js
CHANGED
|
@@ -122,7 +122,7 @@ const parseError = (err) => {
|
|
|
122
122
|
} catch {
|
|
123
123
|
}
|
|
124
124
|
|
|
125
|
-
const version = '10.
|
|
125
|
+
const version = '10.2.2';
|
|
126
126
|
const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``;
|
|
127
127
|
const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud()}`;
|
|
128
128
|
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "appwrite-cli",
|
|
3
3
|
"homepage": "https://appwrite.io/support",
|
|
4
4
|
"description": "Appwrite is an open-source self-hosted backend server that abstract and simplify complex and repetitive development tasks behind a very simple REST API",
|
|
5
|
-
"version": "10.
|
|
5
|
+
"version": "10.2.2",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
7
7
|
"main": "index.js",
|
|
8
8
|
"bin": {
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
|
|
3
|
-
"version": "10.
|
|
3
|
+
"version": "10.2.2",
|
|
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/10.
|
|
9
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/10.2.2/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/10.
|
|
18
|
+
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/10.2.2/appwrite-cli-win-arm64.exe",
|
|
19
19
|
"bin": [
|
|
20
20
|
[
|
|
21
21
|
"appwrite-cli-win-arm64.exe",
|