appwrite-cli 12.0.0 → 12.0.1

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 CHANGED
@@ -1,5 +1,9 @@
1
1
  # Change Log
2
2
 
3
+ ## 12.0.1
4
+
5
+ Fix type generation for `point`, `lineString` and `polygon` columns
6
+
3
7
  ## 12.0.0
4
8
 
5
9
  * Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0`
package/README.md CHANGED
@@ -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
- 12.0.0
32
+ 12.0.1
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
- 12.0.0
63
+ 12.0.1
64
64
  ```
65
65
 
66
66
  ## Getting Started
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/12.0.0/appwrite-cli-win-x64.exe"
17
- $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.0/appwrite-cli-win-arm64.exe"
16
+ $GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-x64.exe"
17
+ $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/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="12.0.0"
100
+ GITHUB_LATEST_VERSION="12.0.1"
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,8 +16,8 @@ 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': '12.0.0',
20
- 'user-agent' : `AppwriteCLI/12.0.0 (${os.type()} ${os.version()}; ${os.arch()})`,
19
+ 'x-sdk-version': '12.0.1',
20
+ 'user-agent' : `AppwriteCLI/12.0.1 (${os.type()} ${os.version()}; ${os.arch()})`,
21
21
  'X-Appwrite-Response-Format' : '1.8.0',
22
22
  };
23
23
  }
@@ -454,7 +454,7 @@ const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideF
454
454
  const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
455
455
  let client = !sdk ? await sdkForProject() :
456
456
  sdk;
457
- let apiPath = '/account/mfa/challenge';
457
+ let apiPath = '/account/mfa/challenges';
458
458
  let payload = {};
459
459
  if (typeof factor !== 'undefined') {
460
460
  payload['factor'] = factor;
@@ -488,7 +488,7 @@ const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideFor
488
488
  const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
489
489
  let client = !sdk ? await sdkForProject() :
490
490
  sdk;
491
- let apiPath = '/account/mfa/challenge';
491
+ let apiPath = '/account/mfa/challenges';
492
492
  let payload = {};
493
493
  if (typeof challengeId !== 'undefined') {
494
494
  payload['challengeId'] = challengeId;
@@ -86,6 +86,7 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
86
86
  * @property {string} installationId Installation Id
87
87
  * @property {VCSDetectionType} type Detector type. Must be one of the following: runtime, framework
88
88
  * @property {string} search Search term to filter your list results. Max length: 256 chars.
89
+ * @property {string[]} queries Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset
89
90
  * @property {boolean} overrideForCli
90
91
  * @property {boolean} parseOutput
91
92
  * @property {libClient | undefined} sdk
@@ -94,7 +95,7 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
94
95
  /**
95
96
  * @param {VcsListRepositoriesRequestParams} params
96
97
  */
97
- const vcsListRepositories = async ({installationId,type,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
98
+ const vcsListRepositories = async ({installationId,type,search,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
98
99
  let client = !sdk ? await sdkForProject() :
99
100
  sdk;
100
101
  let apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
@@ -105,6 +106,9 @@ const vcsListRepositories = async ({installationId,type,search,parseOutput = tru
105
106
  if (typeof search !== 'undefined') {
106
107
  payload['search'] = search;
107
108
  }
109
+ if (typeof queries !== 'undefined') {
110
+ payload['queries'] = queries;
111
+ }
108
112
 
109
113
  let response = undefined;
110
114
 
@@ -403,6 +407,7 @@ vcs
403
407
  .requiredOption(`--installation-id <installation-id>`, `Installation Id`)
404
408
  .requiredOption(`--type <type>`, `Detector type. Must be one of the following: runtime, framework`)
405
409
  .option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
410
+ .option(`--queries [queries...]`, `Array of query strings generated using the Query class provided by the SDK. [Learn more about queries](https://appwrite.io/docs/queries). Only supported methods are limit and offset`)
406
411
  .action(actionRunner(vcsListRepositories))
407
412
 
408
413
  vcs
package/lib/parser.js CHANGED
@@ -122,7 +122,7 @@ const parseError = (err) => {
122
122
  } catch {
123
123
  }
124
124
 
125
- const version = '12.0.0';
125
+ const version = '12.0.1';
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
 
@@ -9,6 +9,9 @@ const AttributeType = {
9
9
  URL: "url",
10
10
  ENUM: "enum",
11
11
  RELATIONSHIP: "relationship",
12
+ POINT: "point",
13
+ LINESTRING: "linestring",
14
+ POLYGON: "polygon",
12
15
  };
13
16
 
14
17
  module.exports = {
@@ -33,6 +33,15 @@ class CSharp extends LanguageMeta {
33
33
  type = `List<${type}>`;
34
34
  }
35
35
  break;
36
+ case AttributeType.POINT:
37
+ type = "List<double>";
38
+ break;
39
+ case AttributeType.LINESTRING:
40
+ type = "List<List<double>>";
41
+ break;
42
+ case AttributeType.POLYGON:
43
+ type = "List<List<List<double>>>";
44
+ break;
36
45
  default:
37
46
  throw new Error(`Unknown attribute type: ${attribute.type}`);
38
47
  }
@@ -70,6 +70,15 @@ class Dart extends LanguageMeta {
70
70
  type = `List<${type}>`;
71
71
  }
72
72
  break;
73
+ case AttributeType.POINT:
74
+ type = "List<double>";
75
+ break;
76
+ case AttributeType.LINESTRING:
77
+ type = "List<List<double>>";
78
+ break;
79
+ case AttributeType.POLYGON:
80
+ type = "List<List<List<double>>>";
81
+ break;
73
82
  default:
74
83
  throw new Error(`Unknown attribute type: ${attribute.type}`);
75
84
  }
@@ -33,6 +33,15 @@ class Java extends LanguageMeta {
33
33
  type = "List<" + type + ">";
34
34
  }
35
35
  break;
36
+ case AttributeType.POINT:
37
+ type = "List<Double>";
38
+ break;
39
+ case AttributeType.LINESTRING:
40
+ type = "List<List<Double>>";
41
+ break;
42
+ case AttributeType.POLYGON:
43
+ type = "List<List<List<Double>>>";
44
+ break;
36
45
  default:
37
46
  throw new Error(`Unknown attribute type: ${attribute.type}`);
38
47
  }
@@ -38,6 +38,15 @@ class JavaScript extends LanguageMeta {
38
38
  type = `${type}[]`;
39
39
  }
40
40
  break;
41
+ case AttributeType.POINT:
42
+ type = "number[]";
43
+ break;
44
+ case AttributeType.LINESTRING:
45
+ type = "number[][]";
46
+ break;
47
+ case AttributeType.POLYGON:
48
+ type = "number[][][]";
49
+ break;
41
50
  default:
42
51
  throw new Error(`Unknown attribute type: ${attribute.type}`);
43
52
  }
@@ -33,6 +33,15 @@ class Kotlin extends LanguageMeta {
33
33
  type = `List<${type}>`;
34
34
  }
35
35
  break;
36
+ case AttributeType.POINT:
37
+ type = "List<Double>";
38
+ break;
39
+ case AttributeType.LINESTRING:
40
+ type = "List<List<Double>>";
41
+ break;
42
+ case AttributeType.POLYGON:
43
+ type = "List<List<List<Double>>>";
44
+ break;
36
45
  default:
37
46
  throw new Error(`Unknown attribute type: ${attribute.type}`);
38
47
  }
@@ -36,6 +36,11 @@ class PHP extends LanguageMeta {
36
36
  type = "array";
37
37
  }
38
38
  break;
39
+ case AttributeType.POINT:
40
+ case AttributeType.LINESTRING:
41
+ case AttributeType.POLYGON:
42
+ type = "array";
43
+ break;
39
44
  default:
40
45
  throw new Error(`Unknown attribute type: ${attribute.type}`);
41
46
  }
@@ -33,6 +33,15 @@ class Swift extends LanguageMeta {
33
33
  type = `[${type}]`;
34
34
  }
35
35
  break;
36
+ case AttributeType.POINT:
37
+ type = "[Double]";
38
+ break;
39
+ case AttributeType.LINESTRING:
40
+ type = "[[Double]]";
41
+ break;
42
+ case AttributeType.POLYGON:
43
+ type = "[[[Double]]]";
44
+ break;
36
45
  default:
37
46
  throw new Error(`Unknown attribute type: ${attribute.type}`);
38
47
  }
@@ -38,6 +38,15 @@ class TypeScript extends LanguageMeta {
38
38
  type = `${type}[]`;
39
39
  }
40
40
  break;
41
+ case AttributeType.POINT:
42
+ type = "Array<number>";
43
+ break;
44
+ case AttributeType.LINESTRING:
45
+ type = "Array<Array<number>>";
46
+ break;
47
+ case AttributeType.POLYGON:
48
+ type = "Array<Array<Array<number>>>";
49
+ break;
41
50
  default:
42
51
  throw new Error(`Unknown attribute type: ${attribute.type}`);
43
52
  }
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": "12.0.0",
5
+ "version": "12.0.1",
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": "12.0.0",
3
+ "version": "12.0.1",
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/12.0.0/appwrite-cli-win-x64.exe",
9
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/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/12.0.0/appwrite-cli-win-arm64.exe",
18
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-arm64.exe",
19
19
  "bin": [
20
20
  [
21
21
  "appwrite-cli-win-arm64.exe",