From b4e724d42ea9815b1c6cc7f91b2c58c2bab3ffef Mon Sep 17 00:00:00 2001 From: root Date: Sat, 17 Aug 2024 08:49:11 +0000 Subject: [PATCH] chore: release rc --- README.md | 4 ++-- install.ps1 | 4 ++-- install.sh | 2 +- lib/client.js | 4 ++-- lib/commands/functions.js | 33 +++++++++++---------------------- lib/parser.js | 2 +- package.json | 2 +- scoop/appwrite.json | 6 +++--- 8 files changed, 23 insertions(+), 34 deletions(-) diff --git a/README.md b/README.md index 8c1f9d6..1d7c7f5 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ Once the installation is complete, you can verify the install using ```sh $ appwrite -v -6.0.0-rc.7 +6.0.0-rc.8 ``` ### Install using prebuilt binaries @@ -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 -6.0.0-rc.7 +6.0.0-rc.8 ``` ## Getting Started diff --git a/install.ps1 b/install.ps1 index e251235..53112c9 100644 --- a/install.ps1 +++ b/install.ps1 @@ -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/6.0.0-rc.7/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0-rc.7/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0-rc.8/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0-rc.8/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index e6a452b..89c37a3 100644 --- a/install.sh +++ b/install.sh @@ -97,7 +97,7 @@ printSuccess() { downloadBinary() { echo "[2/4] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="6.0.0-rc.7" + GITHUB_LATEST_VERSION="6.0.0-rc.8" GITHUB_FILE="appwrite-cli-${OS}-${ARCH}" GITHUB_URL="https://github.com/$GITHUB_REPOSITORY_NAME/releases/download/$GITHUB_LATEST_VERSION/$GITHUB_FILE" diff --git a/lib/client.js b/lib/client.js index 87b7329..6d0865d 100644 --- a/lib/client.js +++ b/lib/client.js @@ -16,8 +16,8 @@ class Client { 'x-sdk-name': 'Command Line', 'x-sdk-platform': 'console', 'x-sdk-language': 'cli', - 'x-sdk-version': '6.0.0-rc.7', - 'user-agent' : `AppwriteCLI/6.0.0-rc.7 (${os.type()} ${os.version()}; ${os.arch()})`, + 'x-sdk-version': '6.0.0-rc.8', + 'user-agent' : `AppwriteCLI/6.0.0-rc.8 (${os.type()} ${os.version()}; ${os.arch()})`, 'X-Appwrite-Response-Format' : '1.6.0', }; } diff --git a/lib/commands/functions.js b/lib/commands/functions.js index f44b979..7ff07b2 100644 --- a/lib/commands/functions.js +++ b/lib/commands/functions.js @@ -103,7 +103,7 @@ const functionsList = async ({queries,search,parseOutput = true, overrideForCli * @property {string} templateRepository Repository name of the template. * @property {string} templateOwner The name of the owner of the template. * @property {string} templateRootDirectory Path to function code in the template repo. - * @property {string} templateBranch Production branch for the repo linked to the function template. + * @property {string} templateVersion Version (tag) for the repo linked to the function template. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk @@ -112,7 +112,7 @@ const functionsList = async ({queries,search,parseOutput = true, overrideForCli /** * @param {FunctionsCreateRequestParams} params */ -const functionsCreate = async ({functionId,name,runtime,execute,events,schedule,timeout,enabled,logging,entrypoint,commands,scopes,installationId,providerRepositoryId,providerBranch,providerSilentMode,providerRootDirectory,templateRepository,templateOwner,templateRootDirectory,templateBranch,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const functionsCreate = async ({functionId,name,runtime,execute,events,schedule,timeout,enabled,logging,entrypoint,commands,scopes,installationId,providerRepositoryId,providerBranch,providerSilentMode,providerRootDirectory,templateRepository,templateOwner,templateRootDirectory,templateVersion,parseOutput = true, overrideForCli = false, sdk = undefined}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/functions'; @@ -180,8 +180,8 @@ const functionsCreate = async ({functionId,name,runtime,execute,events,schedule, if (typeof templateRootDirectory !== 'undefined') { payload['templateRootDirectory'] = templateRootDirectory; } - if (typeof templateBranch !== 'undefined') { - payload['templateBranch'] = templateBranch; + if (typeof templateVersion !== 'undefined') { + payload['templateVersion'] = templateVersion; } let response = undefined; @@ -514,7 +514,7 @@ const functionsDelete = async ({functionId,parseOutput = true, overrideForCli = /** * @typedef {Object} FunctionsListDeploymentsRequestParams * @property {string} functionId Function ID. - * @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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands + * @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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size * @property {string} search Search term to filter your list results. Max length: 256 chars. * @property {boolean} overrideForCli * @property {boolean} parseOutput @@ -985,16 +985,17 @@ const functionsListExecutions = async ({functionId,queries,search,parseOutput = * @property {string} xpath HTTP path of execution. Path can include query params. Default value is / * @property {ExecutionMethod} method HTTP method of execution. Default value is GET. * @property {object} headers HTTP headers of execution. Defaults to empty. - * @property {string} scheduledAt Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future. + * @property {string} scheduledAt Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes. * @property {boolean} overrideForCli * @property {boolean} parseOutput * @property {libClient | undefined} sdk + * @property {CallableFunction} onProgress */ /** * @param {FunctionsCreateExecutionRequestParams} params */ -const functionsCreateExecution = async ({functionId,body,async,xpath,method,headers,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined}) => { +const functionsCreateExecution = async ({functionId,body,async,xpath,method,headers,scheduledAt,parseOutput = true, overrideForCli = false, sdk = undefined,onProgress = () => {}}) => { let client = !sdk ? await sdkForProject() : sdk; let apiPath = '/functions/{functionId}/executions'.replace('{functionId}', functionId); @@ -1018,18 +1019,6 @@ const functionsCreateExecution = async ({functionId,body,async,xpath,method,head payload['scheduledAt'] = scheduledAt; } - let response = undefined; - - response = await client.call('post', apiPath, { - 'content-type': 'application/json', - }, payload); - - if (parseOutput) { - parse(response) - } - - return response; - } /** @@ -1344,7 +1333,7 @@ functions .option(`--template-repository `, `Repository name of the template.`) .option(`--template-owner `, `The name of the owner of the template.`) .option(`--template-root-directory `, `Path to function code in the template repo.`) - .option(`--template-branch `, `Production branch for the repo linked to the function template.`) + .option(`--template-version `, `Version (tag) for the repo linked to the function template.`) .action(actionRunner(functionsCreate)) functions @@ -1414,7 +1403,7 @@ functions .command(`list-deployments`) .description(`Get a list of all the project's code deployments. You can use the query params to filter your results.`) .requiredOption(`--function-id `, `Function ID.`) - .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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands`) + .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). Maximum of 100 queries are allowed, each 4096 characters long. You may filter on the following attributes: size, buildId, activate, entrypoint, commands, type, size`) .option(`--search `, `Search term to filter your list results. Max length: 256 chars.`) .option(`--console`, `Get the resource console url`) .action(actionRunner(functionsListDeployments)) @@ -1493,7 +1482,7 @@ functions .option(`--xpath `, `HTTP path of execution. Path can include query params. Default value is /`) .option(`--method `, `HTTP method of execution. Default value is GET.`) .option(`--headers `, `HTTP headers of execution. Defaults to empty.`) - .option(`--scheduled-at `, `Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future.`) + .option(`--scheduled-at `, `Scheduled execution time in [ISO 8601](https://www.iso.org/iso-8601-date-and-time-format.html) format. DateTime value must be in future with precision in minutes.`) .action(actionRunner(functionsCreateExecution)) functions diff --git a/lib/parser.js b/lib/parser.js index 8a459bd..b14ff0b 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -120,7 +120,7 @@ const parseError = (err) => { } catch { } - const version = '6.0.0-rc.7'; + const version = '6.0.0-rc.8'; const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``; const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud}`; diff --git a/package.json b/package.json index 3ca648f..48a9982 100644 --- a/package.json +++ b/package.json @@ -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": "6.0.0-rc.7", + "version": "6.0.0-rc.8", "license": "BSD-3-Clause", "main": "index.js", "bin": { diff --git a/scoop/appwrite.json b/scoop/appwrite.json index 79b2b78..f8d93c7 100644 --- a/scoop/appwrite.json +++ b/scoop/appwrite.json @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json", - "version": "6.0.0-rc.7", + "version": "6.0.0-rc.8", "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/6.0.0-rc.7/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0-rc.8/appwrite-cli-win-x64.exe", "bin": [ [ "appwrite-cli-win-x64.exe", @@ -15,7 +15,7 @@ ] }, "arm64": { - "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0-rc.7/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0-rc.8/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe",