appwrite-cli 5.0.0 → 5.0.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/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # Appwrite Command Line SDK
2
2
 
3
3
  ![License](https://img.shields.io/github/license/appwrite/sdk-for-cli.svg?style=flat-square)
4
- ![Version](https://img.shields.io/badge/api%20version-1.5.0-blue.svg?style=flat-square)
4
+ ![Version](https://img.shields.io/badge/api%20version-1.5.4-blue.svg?style=flat-square)
5
5
  [![Build Status](https://img.shields.io/travis/com/appwrite/sdk-generator?style=flat-square)](https://travis-ci.com/appwrite/sdk-generator)
6
6
  [![Twitter Account](https://img.shields.io/twitter/follow/appwrite?color=00acee&label=twitter&style=flat-square)](https://twitter.com/appwrite)
7
7
  [![Discord](https://img.shields.io/discord/564160730845151244?label=discord&style=flat-square)](https://appwrite.io/discord)
@@ -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
- 5.0.0
32
+ 5.0.2
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
- 5.0.0
63
+ 5.0.2
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/5.0.0/appwrite-cli-win-x64.exe"
17
- $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.0/appwrite-cli-win-arm64.exe"
16
+ $GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.2/appwrite-cli-win-x64.exe"
17
+ $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.2/appwrite-cli-win-arm64.exe"
18
18
 
19
19
  $APPWRITE_BINARY_NAME = "appwrite.exe"
20
20
 
@@ -30,11 +30,11 @@ $USER_PATH_ENV_VAR = [Environment]::GetEnvironmentVariable("PATH", "User")
30
30
  function Greeting {
31
31
  Write-Host @"
32
32
 
33
- _ _ _ ___ __ _____
33
+ _ _ _ ___ __ _____
34
34
  /_\ _ __ _ ____ ___ __(_) |_ ___ / __\ / / \_ \
35
35
  //_\\| '_ \| '_ \ \ /\ / / '__| | __/ _ \ / / / / / /\/
36
- / _ \ |_) | |_) \ V V /| | | | || __/ / /___/ /___/\/ /_
37
- \_/ \_/ .__/| .__/ \_/\_/ |_| |_|\__\___| \____/\____/\____/
36
+ / _ \ |_) | |_) \ V V /| | | | || __/ / /___/ /___/\/ /_
37
+ \_/ \_/ .__/| .__/ \_/\_/ |_| |_|\__\___| \____/\____/\____/
38
38
  |_| |_|
39
39
 
40
40
  "@ -ForegroundColor red
package/install.sh CHANGED
@@ -44,11 +44,11 @@ greeting() {
44
44
  echo -e "${RED}"
45
45
  cat << "EOF"
46
46
 
47
- _ _ _ ___ __ _____
47
+ _ _ _ ___ __ _____
48
48
  /_\ _ __ _ ____ ___ __(_) |_ ___ / __\ / / \_ \
49
49
  //_\\| '_ \| '_ \ \ /\ / / '__| | __/ _ \ / / / / / /\/
50
- / _ \ |_) | |_) \ V V /| | | | || __/ / /___/ /___/\/ /_
51
- \_/ \_/ .__/| .__/ \_/\_/ |_| |_|\__\___| \____/\____/\____/
50
+ / _ \ |_) | |_) \ V V /| | | | || __/ / /___/ /___/\/ /_
51
+ \_/ \_/ .__/| .__/ \_/\_/ |_| |_|\__\___| \____/\____/\____/
52
52
  |_| |_|
53
53
  EOF
54
54
  echo -e "${NC}\n"
@@ -97,7 +97,7 @@ printSuccess() {
97
97
  downloadBinary() {
98
98
  echo "[2/4] Downloading executable for $OS ($ARCH) ..."
99
99
 
100
- GITHUB_LATEST_VERSION="5.0.0"
100
+ GITHUB_LATEST_VERSION="5.0.2"
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
@@ -15,8 +15,8 @@ class Client {
15
15
  'x-sdk-name': 'Command Line',
16
16
  'x-sdk-platform': 'console',
17
17
  'x-sdk-language': 'cli',
18
- 'x-sdk-version': '5.0.0',
19
- 'user-agent' : `AppwriteCLI/5.0.0 (${os.type()} ${os.version()}; ${os.arch()})`,
18
+ 'x-sdk-version': '5.0.2',
19
+ 'user-agent' : `AppwriteCLI/5.0.2 (${os.type()} ${os.version()}; ${os.arch()})`,
20
20
  'X-Appwrite-Response-Format' : '1.5.0',
21
21
  };
22
22
  }
@@ -5,7 +5,7 @@ const { sdkForConsole } = require("../sdks");
5
5
  const { globalConfig, localConfig } = require("../config");
6
6
  const { actionRunner, success, parseBool, commandDescriptions, log, parse } = require("../parser");
7
7
  const { questionsLogin } = require("../questions");
8
- const { accountCreateEmailSession, accountDeleteSession } = require("./account");
8
+ const { accountCreateEmailPasswordSession, accountDeleteSession } = require("./account");
9
9
 
10
10
  const login = new Command("login")
11
11
  .description(commandDescriptions['login'])
@@ -17,7 +17,7 @@ const login = new Command("login")
17
17
 
18
18
  let client = await sdkForConsole(false);
19
19
 
20
- await accountCreateEmailSession({
20
+ await accountCreateEmailPasswordSession({
21
21
  email: answers.email,
22
22
  password: answers.password,
23
23
  parseOutput: false,
@@ -1032,9 +1032,9 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
1032
1032
  * @typedef {Object} MessagingCreateMsg91ProviderRequestParams
1033
1033
  * @property {string} providerId Provider ID. Choose a custom ID or generate a random ID with &#039;ID.unique()&#039;. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can&#039;t start with a special char. Max length is 36 chars.
1034
1034
  * @property {string} name Provider name.
1035
- * @property {string} from Sender Phone number. Format this number with a leading &#039;+&#039; and a country code, e.g., +16175551212.
1036
- * @property {string} senderId Msg91 Sender ID.
1037
- * @property {string} authKey Msg91 Auth Key.
1035
+ * @property {string} templateId Msg91 template ID
1036
+ * @property {string} senderId Msg91 sender ID.
1037
+ * @property {string} authKey Msg91 auth key.
1038
1038
  * @property {boolean} enabled Set as enabled.
1039
1039
  * @property {boolean} parseOutput
1040
1040
  * @property {libClient | undefined} sdk
@@ -1043,7 +1043,7 @@ const messagingUpdateMailgunProvider = async ({ providerId, name, apiKey, domain
1043
1043
  /**
1044
1044
  * @param {MessagingCreateMsg91ProviderRequestParams} params
1045
1045
  */
1046
- const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId, authKey, enabled, parseOutput = true, sdk = undefined}) => {
1046
+ const messagingCreateMsg91Provider = async ({ providerId, name, templateId, senderId, authKey, enabled, parseOutput = true, sdk = undefined}) => {
1047
1047
  let client = !sdk ? await sdkForProject() : sdk;
1048
1048
  let apiPath = '/messaging/providers/msg91';
1049
1049
  let payload = {};
@@ -1053,8 +1053,8 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
1053
1053
  if (typeof name !== 'undefined') {
1054
1054
  payload['name'] = name;
1055
1055
  }
1056
- if (typeof from !== 'undefined') {
1057
- payload['from'] = from;
1056
+ if (typeof templateId !== 'undefined') {
1057
+ payload['templateId'] = templateId;
1058
1058
  }
1059
1059
  if (typeof senderId !== 'undefined') {
1060
1060
  payload['senderId'] = senderId;
@@ -1085,9 +1085,9 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
1085
1085
  * @property {string} providerId Provider ID.
1086
1086
  * @property {string} name Provider name.
1087
1087
  * @property {boolean} enabled Set as enabled.
1088
- * @property {string} senderId Msg91 Sender ID.
1089
- * @property {string} authKey Msg91 Auth Key.
1090
- * @property {string} from Sender number.
1088
+ * @property {string} templateId Msg91 template ID.
1089
+ * @property {string} senderId Msg91 sender ID.
1090
+ * @property {string} authKey Msg91 auth key.
1091
1091
  * @property {boolean} parseOutput
1092
1092
  * @property {libClient | undefined} sdk
1093
1093
  */
@@ -1095,7 +1095,7 @@ const messagingCreateMsg91Provider = async ({ providerId, name, from, senderId,
1095
1095
  /**
1096
1096
  * @param {MessagingUpdateMsg91ProviderRequestParams} params
1097
1097
  */
1098
- const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, senderId, authKey, from, parseOutput = true, sdk = undefined}) => {
1098
+ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, templateId, senderId, authKey, parseOutput = true, sdk = undefined}) => {
1099
1099
  let client = !sdk ? await sdkForProject() : sdk;
1100
1100
  let apiPath = '/messaging/providers/msg91/{providerId}'.replace('{providerId}', providerId);
1101
1101
  let payload = {};
@@ -1105,15 +1105,15 @@ const messagingUpdateMsg91Provider = async ({ providerId, name, enabled, senderI
1105
1105
  if (typeof enabled !== 'undefined') {
1106
1106
  payload['enabled'] = enabled;
1107
1107
  }
1108
+ if (typeof templateId !== 'undefined') {
1109
+ payload['templateId'] = templateId;
1110
+ }
1108
1111
  if (typeof senderId !== 'undefined') {
1109
1112
  payload['senderId'] = senderId;
1110
1113
  }
1111
1114
  if (typeof authKey !== 'undefined') {
1112
1115
  payload['authKey'] = authKey;
1113
1116
  }
1114
- if (typeof from !== 'undefined') {
1115
- payload['from'] = from;
1116
- }
1117
1117
 
1118
1118
  let response = undefined;
1119
1119
 
@@ -2497,9 +2497,9 @@ messaging
2497
2497
  .description(`Create a new MSG91 provider.`)
2498
2498
  .requiredOption(`--providerId <providerId>`, `Provider ID. Choose a custom ID or generate a random ID with 'ID.unique()'. Valid chars are a-z, A-Z, 0-9, period, hyphen, and underscore. Can't start with a special char. Max length is 36 chars.`)
2499
2499
  .requiredOption(`--name <name>`, `Provider name.`)
2500
- .option(`--from <from>`, `Sender Phone number. Format this number with a leading '+' and a country code, e.g., +16175551212.`)
2501
- .option(`--senderId <senderId>`, `Msg91 Sender ID.`)
2502
- .option(`--authKey <authKey>`, `Msg91 Auth Key.`)
2500
+ .option(`--templateId <templateId>`, `Msg91 template ID`)
2501
+ .option(`--senderId <senderId>`, `Msg91 sender ID.`)
2502
+ .option(`--authKey <authKey>`, `Msg91 auth key.`)
2503
2503
  .option(`--enabled <enabled>`, `Set as enabled.`, parseBool)
2504
2504
  .action(actionRunner(messagingCreateMsg91Provider))
2505
2505
 
@@ -2509,9 +2509,9 @@ messaging
2509
2509
  .requiredOption(`--providerId <providerId>`, `Provider ID.`)
2510
2510
  .option(`--name <name>`, `Provider name.`)
2511
2511
  .option(`--enabled <enabled>`, `Set as enabled.`, parseBool)
2512
- .option(`--senderId <senderId>`, `Msg91 Sender ID.`)
2513
- .option(`--authKey <authKey>`, `Msg91 Auth Key.`)
2514
- .option(`--from <from>`, `Sender number.`)
2512
+ .option(`--templateId <templateId>`, `Msg91 template ID.`)
2513
+ .option(`--senderId <senderId>`, `Msg91 sender ID.`)
2514
+ .option(`--authKey <authKey>`, `Msg91 auth key.`)
2515
2515
  .action(actionRunner(messagingUpdateMsg91Provider))
2516
2516
 
2517
2517
  messaging
package/lib/parser.js CHANGED
@@ -149,7 +149,7 @@ const error = (message) => {
149
149
  console.error(`${chalk.red.bold("✗ Error")} ${chalk.red(message ?? "")}`);
150
150
  }
151
151
 
152
- const logo = "\n _ _ _ ___ __ _____ \n \/_\\ _ __ _ ____ ___ __(_) |_ ___ \/ __\\ \/ \/ \\_ \\\n \/\/_\\\\| '_ \\| '_ \\ \\ \/\\ \/ \/ '__| | __\/ _ \\ \/ \/ \/ \/ \/ \/\\\/\n \/ _ \\ |_) | |_) \\ V V \/| | | | || __\/ \/ \/___\/ \/___\/\\\/ \/_ \n \\_\/ \\_\/ .__\/| .__\/ \\_\/\\_\/ |_| |_|\\__\\___| \\____\/\\____\/\\____\/ \n |_| |_| \n\n";
152
+ const logo = "\n _ _ _ ___ __ _____\n \/_\\ _ __ _ ____ ___ __(_) |_ ___ \/ __\\ \/ \/ \\_ \\\n \/\/_\\\\| '_ \\| '_ \\ \\ \/\\ \/ \/ '__| | __\/ _ \\ \/ \/ \/ \/ \/ \/\\\/\n \/ _ \\ |_) | |_) \\ V V \/| | | | || __\/ \/ \/___\/ \/___\/\\\/ \/_\n \\_\/ \\_\/ .__\/| .__\/ \\_\/\\_\/ |_| |_|\\__\\___| \\____\/\\____\/\\____\/\n |_| |_|\n\n";
153
153
 
154
154
  const commandDescriptions = {
155
155
  "account": `The account command allows you to authenticate and manage a user account.`,
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": "5.0.0",
5
+ "version": "5.0.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": "5.0.0",
3
+ "version": "5.0.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/5.0.0/appwrite-cli-win-x64.exe",
9
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.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/5.0.0/appwrite-cli-win-arm64.exe",
18
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/5.0.2/appwrite-cli-win-arm64.exe",
19
19
  "bin": [
20
20
  [
21
21
  "appwrite-cli-win-arm64.exe",