Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Change Log

## 12.0.1

Fix type generation for `point`, `lineString` and `polygon` columns

## 12.0.0

* Change `create-deployment-template`'s `version` parameter to `type` and `reference`. eg. usage - `create-deployment-template --type tag --reference 1.0.0`
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using

```sh
$ appwrite -v
12.0.0
12.0.1
```

### Install using prebuilt binaries
Expand Down Expand Up @@ -60,7 +60,7 @@ $ scoop install https://raw.githubusercontent.com/appwrite/sdk-for-cli/master/sc
Once the installation completes, you can verify your install using
```
$ appwrite -v
12.0.0
12.0.1
```

## Getting Started
Expand Down
4 changes: 2 additions & 2 deletions install.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
# You can use "View source" of this page to see the full script.

# REPO
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.0/appwrite-cli-win-x64.exe"
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.0/appwrite-cli-win-arm64.exe"
$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-x64.exe"
$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-arm64.exe"

$APPWRITE_BINARY_NAME = "appwrite.exe"

Expand Down
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ printSuccess() {
downloadBinary() {
echo "[2/4] Downloading executable for $OS ($ARCH) ..."

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

Expand Down
4 changes: 2 additions & 2 deletions lib/client.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ class Client {
'x-sdk-name': 'Command Line',
'x-sdk-platform': 'console',
'x-sdk-language': 'cli',
'x-sdk-version': '12.0.0',
'user-agent' : `AppwriteCLI/12.0.0 (${os.type()} ${os.version()}; ${os.arch()})`,
'x-sdk-version': '12.0.1',
'user-agent' : `AppwriteCLI/12.0.1 (${os.type()} ${os.version()}; ${os.arch()})`,
'X-Appwrite-Response-Format' : '1.8.0',
};
}
Expand Down
4 changes: 2 additions & 2 deletions lib/commands/account.js
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ const accountDeleteMFAAuthenticator = async ({type,parseOutput = true, overrideF
const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
let client = !sdk ? await sdkForProject() :
sdk;
let apiPath = '/account/mfa/challenge';
let apiPath = '/account/mfa/challenges';
let payload = {};
if (typeof factor !== 'undefined') {
payload['factor'] = factor;
Expand Down Expand Up @@ -488,7 +488,7 @@ const accountCreateMFAChallenge = async ({factor,parseOutput = true, overrideFor
const accountUpdateMFAChallenge = async ({challengeId,otp,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
let client = !sdk ? await sdkForProject() :
sdk;
let apiPath = '/account/mfa/challenge';
let apiPath = '/account/mfa/challenges';
let payload = {};
if (typeof challengeId !== 'undefined') {
payload['challengeId'] = challengeId;
Expand Down
7 changes: 6 additions & 1 deletion lib/commands/vcs.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
* @property {string} installationId Installation Id
* @property {VCSDetectionType} type Detector type. Must be one of the following: runtime, framework
* @property {string} search Search term to filter your list results. Max length: 256 chars.
* @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
* @property {boolean} overrideForCli
* @property {boolean} parseOutput
* @property {libClient | undefined} sdk
Expand All @@ -94,7 +95,7 @@ const vcsCreateRepositoryDetection = async ({installationId,providerRepositoryId
/**
* @param {VcsListRepositoriesRequestParams} params
*/
const vcsListRepositories = async ({installationId,type,search,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
const vcsListRepositories = async ({installationId,type,search,queries,parseOutput = true, overrideForCli = false, sdk = undefined}) => {
let client = !sdk ? await sdkForProject() :
sdk;
let apiPath = '/vcs/github/installations/{installationId}/providerRepositories'.replace('{installationId}', installationId);
Expand All @@ -105,6 +106,9 @@ const vcsListRepositories = async ({installationId,type,search,parseOutput = tru
if (typeof search !== 'undefined') {
payload['search'] = search;
}
if (typeof queries !== 'undefined') {
payload['queries'] = queries;
}

let response = undefined;

Expand Down Expand Up @@ -403,6 +407,7 @@ vcs
.requiredOption(`--installation-id <installation-id>`, `Installation Id`)
.requiredOption(`--type <type>`, `Detector type. Must be one of the following: runtime, framework`)
.option(`--search <search>`, `Search term to filter your list results. Max length: 256 chars.`)
.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`)
.action(actionRunner(vcsListRepositories))

vcs
Expand Down
2 changes: 1 addition & 1 deletion lib/parser.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ const parseError = (err) => {
} catch {
}

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

Expand Down
3 changes: 3 additions & 0 deletions lib/type-generation/attribute.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ const AttributeType = {
URL: "url",
ENUM: "enum",
RELATIONSHIP: "relationship",
POINT: "point",
LINESTRING: "linestring",
POLYGON: "polygon",
};

module.exports = {
Expand Down
9 changes: 9 additions & 0 deletions lib/type-generation/languages/csharp.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ class CSharp extends LanguageMeta {
type = `List<${type}>`;
}
break;
case AttributeType.POINT:
type = "List<double>";
break;
case AttributeType.LINESTRING:
type = "List<List<double>>";
break;
case AttributeType.POLYGON:
type = "List<List<List<double>>>";
break;
default:
throw new Error(`Unknown attribute type: ${attribute.type}`);
}
Expand Down
9 changes: 9 additions & 0 deletions lib/type-generation/languages/dart.js
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,15 @@ class Dart extends LanguageMeta {
type = `List<${type}>`;
}
break;
case AttributeType.POINT:
type = "List<double>";
break;
case AttributeType.LINESTRING:
type = "List<List<double>>";
break;
case AttributeType.POLYGON:
type = "List<List<List<double>>>";
break;
default:
throw new Error(`Unknown attribute type: ${attribute.type}`);
}
Expand Down
9 changes: 9 additions & 0 deletions lib/type-generation/languages/java.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ class Java extends LanguageMeta {
type = "List<" + type + ">";
}
break;
case AttributeType.POINT:
type = "List<Double>";
break;
case AttributeType.LINESTRING:
type = "List<List<Double>>";
break;
case AttributeType.POLYGON:
type = "List<List<List<Double>>>";
break;
default:
throw new Error(`Unknown attribute type: ${attribute.type}`);
}
Expand Down
9 changes: 9 additions & 0 deletions lib/type-generation/languages/javascript.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ class JavaScript extends LanguageMeta {
type = `${type}[]`;
}
break;
case AttributeType.POINT:
type = "number[]";
break;
case AttributeType.LINESTRING:
type = "number[][]";
break;
case AttributeType.POLYGON:
type = "number[][][]";
break;
default:
throw new Error(`Unknown attribute type: ${attribute.type}`);
}
Expand Down
9 changes: 9 additions & 0 deletions lib/type-generation/languages/kotlin.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ class Kotlin extends LanguageMeta {
type = `List<${type}>`;
}
break;
case AttributeType.POINT:
type = "List<Double>";
break;
case AttributeType.LINESTRING:
type = "List<List<Double>>";
break;
case AttributeType.POLYGON:
type = "List<List<List<Double>>>";
break;
default:
throw new Error(`Unknown attribute type: ${attribute.type}`);
}
Expand Down
5 changes: 5 additions & 0 deletions lib/type-generation/languages/php.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,11 @@ class PHP extends LanguageMeta {
type = "array";
}
break;
case AttributeType.POINT:
case AttributeType.LINESTRING:
case AttributeType.POLYGON:
type = "array";
break;
default:
throw new Error(`Unknown attribute type: ${attribute.type}`);
}
Expand Down
9 changes: 9 additions & 0 deletions lib/type-generation/languages/swift.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ class Swift extends LanguageMeta {
type = `[${type}]`;
}
break;
case AttributeType.POINT:
type = "[Double]";
break;
case AttributeType.LINESTRING:
type = "[[Double]]";
break;
case AttributeType.POLYGON:
type = "[[[Double]]]";
break;
default:
throw new Error(`Unknown attribute type: ${attribute.type}`);
}
Expand Down
9 changes: 9 additions & 0 deletions lib/type-generation/languages/typescript.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,15 @@ class TypeScript extends LanguageMeta {
type = `${type}[]`;
}
break;
case AttributeType.POINT:
type = "Array<number>";
break;
case AttributeType.LINESTRING:
type = "Array<Array<number>>";
break;
case AttributeType.POLYGON:
type = "Array<Array<Array<number>>>";
break;
default:
throw new Error(`Unknown attribute type: ${attribute.type}`);
}
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "appwrite-cli",
"homepage": "https://appwrite.io/support",
"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",
"version": "12.0.0",
"version": "12.0.1",
"license": "BSD-3-Clause",
"main": "index.js",
"bin": {
Expand Down
6 changes: 3 additions & 3 deletions scoop/appwrite.config.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json",
"version": "12.0.0",
"version": "12.0.1",
"description": "The Appwrite CLI is a command-line application that allows you to interact with Appwrite and perform server-side tasks using your terminal.",
"homepage": "https://github.com/appwrite/sdk-for-cli",
"license": "BSD-3-Clause",
"architecture": {
"64bit": {
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.0/appwrite-cli-win-x64.exe",
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-x64.exe",
"bin": [
[
"appwrite-cli-win-x64.exe",
Expand All @@ -15,7 +15,7 @@
]
},
"arm64": {
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.0/appwrite-cli-win-arm64.exe",
"url": "https://github.com/appwrite/sdk-for-cli/releases/download/12.0.1/appwrite-cli-win-arm64.exe",
"bin": [
[
"appwrite-cli-win-arm64.exe",
Expand Down