Skip to content

Commit bc16866

Browse files
authored
Merge pull request #221 from appwrite/dev
feat: Command Line SDK update for version 12.0.1
2 parents 03a1e15 + 6242974 commit bc16866

File tree

19 files changed

+95
-15
lines changed

19 files changed

+95
-15
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## 12.0.1
4+
5+
Fix type generation for `point`, `lineString` and `polygon` columns
6+
37
## 12.0.0
48

59
* Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0`

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using
2929

3030
```sh
3131
$ appwrite -v
32-
12.0.0
32+
12.0.1
3333
```
3434

3535
### Install using prebuilt binaries
@@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
6060
Once the installation completes, you can verify your install using
6161
```
6262
$ appwrite -v
63-
12.0.0
63+
12.0.1
6464
```
6565

6666
## Getting Started

install.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@
1313
# You can use "View source" of this page to see the full script.
1414

1515
# 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"
1818

1919
$APPWRITE_BINARY_NAME = "appwrite.exe"
2020

install.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ printSuccess() {
9797
downloadBinary() {
9898
echo "[2/4] Downloading executable for $OS ($ARCH) ..."
9999

100-
GITHUB_LATEST_VERSION="12.0.0"
100+
GITHUB_LATEST_VERSION="12.0.1"
101101
GITHUB_FILE="appwrite-cli-${OS}-${ARCH}"
102102
GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE"
103103

lib/client.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ class Client {
1616
'x-sdk-name': 'Command Line',
1717
'x-sdk-platform': 'console',
1818
'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()})`,
2121
'X-Appwrite-Response-Format' : '1.8.0',
2222
};
2323
}

lib/commands/account.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -454,7 +454,7 @@ const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideF
454454
const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
455455
let client = !sdk ? await sdkForProject() :
456456
sdk;
457-
let apiPath = '/account/mfa/challenge';
457+
let apiPath = '/account/mfa/challenges';
458458
let payload = {};
459459
if (typeof factor !== 'undefined') {
460460
payload['factor'] = factor;
@@ -488,7 +488,7 @@ const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideFor
488488
const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
489489
let client = !sdk ? await sdkForProject() :
490490
sdk;
491-
let apiPath = '/account/mfa/challenge';
491+
let apiPath = '/account/mfa/challenges';
492492
let payload = {};
493493
if (typeof challengeId !== 'undefined') {
494494
payload['challengeId'] = challengeId;

lib/commands/vcs.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
8686
* @property {string} installationId Installation Id
8787
* @property {VCSDetectionType} type Detector type. Must be one of the following: runtime, framework
8888
* @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
8990
* @property {boolean} overrideForCli
9091
* @property {boolean} parseOutput
9192
* @property {libClient | undefined} sdk
@@ -94,7 +95,7 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
9495
/**
9596
* @param {VcsListRepositoriesRequestParams} params
9697
*/
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}) => {
9899
let client = !sdk ? await sdkForProject() :
99100
sdk;
100101
let apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
@@ -105,6 +106,9 @@ const vcsListRepositories = async ({installationId,type,search,parseOutput = tru
105106
if (typeof search !== 'undefined') {
106107
payload['search'] = search;
107108
}
109+
if (typeof queries !== 'undefined') {
110+
payload['queries'] = queries;
111+
}
108112

109113
let response = undefined;
110114

@@ -403,6 +407,7 @@ vcs
403407
.requiredOption(`--installation-id <installation-id>`, `Installation Id`)
404408
.requiredOption(`--type <type>`, `Detector type. Must be one of the following: runtime, framework`)
405409
.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`)
406411
.action(actionRunner(vcsListRepositories))
407412

408413
vcs

lib/parser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ const parseError = (err) => {
122122
} catch {
123123
}
124124

125-
const version = '12.0.0';
125+
const version = '12.0.1';
126126
const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``;
127127
const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud()}`;
128128

lib/type-generation/attribute.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ const AttributeType = {
99
URL: "url",
1010
ENUM: "enum",
1111
RELATIONSHIP: "relationship",
12+
POINT: "point",
13+
LINESTRING: "linestring",
14+
POLYGON: "polygon",
1215
};
1316

1417
module.exports = {

lib/type-generation/languages/csharp.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,15 @@ class CSharp extends LanguageMeta {
3333
type = `List<${type}>`;
3434
}
3535
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;
3645
default:
3746
throw new Error(`Unknown attribute type: ${attribute.type}`);
3847
}

0 commit comments

Comments
 (0)