appwrite-cli 6.0.0-rc.9 → 6.0.0

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.
@@ -0,0 +1,11 @@
1
+ name: Auto-close External Pull Requests
2
+
3
+ on:
4
+ pull_request_target:
5
+ types: [opened, reopened]
6
+
7
+ jobs:
8
+ auto_close:
9
+ uses: appwrite/.github/.github/workflows/autoclose.yml@main
10
+ secrets:
11
+ GH_AUTO_CLOSE_PR_TOKEN: ${{ secrets.GH_AUTO_CLOSE_PR_TOKEN }}
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
- 6.0.0-rc.9
32
+ 6.0.0
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
- 6.0.0-rc.9
63
+ 6.0.0
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/6.0.0-rc.9/appwrite-cli-win-x64.exe"
17
- $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0-rc.9/appwrite-cli-win-arm64.exe"
16
+ $GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0/appwrite-cli-win-x64.exe"
17
+ $GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0/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="6.0.0-rc.9"
100
+ GITHUB_LATEST_VERSION="6.0.0"
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': '6.0.0-rc.9',
20
- 'user-agent' : `AppwriteCLI/6.0.0-rc.9 (${os.type()} ${os.version()}; ${os.arch()})`,
19
+ 'x-sdk-version': '6.0.0',
20
+ 'user-agent' : `AppwriteCLI/6.0.0 (${os.type()} ${os.version()}; ${os.arch()})`,
21
21
  'X-Appwrite-Response-Format' : '1.6.0',
22
22
  };
23
23
  }
@@ -12,7 +12,8 @@ const DEFAULT_ENDPOINT = 'https://cloud.appwrite.io/v1';
12
12
 
13
13
  const loginCommand = async ({ email, password, endpoint, mfa, code }) => {
14
14
  const oldCurrent = globalConfig.getCurrentSession();
15
- let configEndpoint = endpoint ?? DEFAULT_ENDPOINT;
15
+
16
+ const configEndpoint = endpoint ?? globalConfig.getEndpoint() ?? DEFAULT_ENDPOINT;
16
17
 
17
18
  if (globalConfig.getCurrentSession() !== '') {
18
19
  log('You are currently signed in as ' + globalConfig.getEmail());
@@ -299,9 +299,9 @@ const initFunction = async () => {
299
299
  $id: functionId,
300
300
  name: answers.name,
301
301
  runtime: answers.runtime.id,
302
- execute: [],
302
+ execute: ["any"],
303
303
  events: [],
304
- scopes: [],
304
+ scopes: ["users.read"],
305
305
  schedule: "",
306
306
  timeout: 15,
307
307
  enabled: true,
@@ -88,9 +88,9 @@ const pullFunctions = async ({ code, withVariables }) => {
88
88
  if (!localFunction['path']) {
89
89
  func['path'] = `functions/${func.name}`;
90
90
  }
91
- if (!withVariables) {
92
- delete func['vars'];
93
- }
91
+ const holdingVars = func['vars'];
92
+ // We don't save var in to the config
93
+ delete func['vars'];
94
94
  localConfig.addFunction(func);
95
95
 
96
96
  if (!fs.existsSync(func['path'])) {
@@ -162,7 +162,7 @@ const pullFunctions = async ({ code, withVariables }) => {
162
162
  } catch {
163
163
  }
164
164
 
165
- fs.writeFileSync(envFileLocation, func['vars'].map(r => `${r.key}=${r.value}\n`).join(''))
165
+ fs.writeFileSync(envFileLocation, holdingVars.map(r => `${r.key}=${r.value}\n`).join(''))
166
166
  }
167
167
  }
168
168
 
@@ -64,6 +64,8 @@ const {
64
64
  projectsUpdateAuthPasswordDictionary,
65
65
  projectsUpdateAuthPasswordHistory,
66
66
  projectsUpdatePersonalDataCheck,
67
+ projectsUpdateSessionAlerts,
68
+ projectsUpdateMockNumbers,
67
69
  } = require("./projects");
68
70
  const { checkDeployConditions } = require('../utils');
69
71
 
@@ -980,6 +982,8 @@ const pushSettings = async () => {
980
982
  await projectsUpdateAuthPasswordDictionary({ projectId, enabled: settings.auth.security.passwordDictionary, parseOutput: false });
981
983
  await projectsUpdateAuthPasswordHistory({ projectId, limit: settings.auth.security.passwordHistory, parseOutput: false });
982
984
  await projectsUpdatePersonalDataCheck({ projectId, enabled: settings.auth.security.personalDataCheck, parseOutput: false });
985
+ await projectsUpdateSessionAlerts({ projectId, alerts: settings.auth.security.sessionAlerts, parseOutput: false });
986
+ await projectsUpdateMockNumbers({ projectId, numbers: settings.auth.security.mockNumbers, parseOutput: false });
983
987
  }
984
988
 
985
989
  if (settings.auth.methods) {
package/lib/config.js CHANGED
@@ -456,8 +456,10 @@ class Local extends Config {
456
456
  sessionsLimit: projectSettings.authSessionsLimit,
457
457
  passwordHistory: projectSettings.authPasswordHistory,
458
458
  passwordDictionary: projectSettings.authPasswordDictionary,
459
- personalDataCheck: projectSettings.authPersonalDataCheck
460
- }
459
+ personalDataCheck: projectSettings.authPersonalDataCheck,
460
+ sessionAlerts: projectSettings.authSessionAlerts,
461
+ mockNumbers: projectSettings.authMockNumbers
462
+ },
461
463
  }
462
464
  };
463
465
  }
package/lib/parser.js CHANGED
@@ -120,7 +120,7 @@ const parseError = (err) => {
120
120
  } catch {
121
121
  }
122
122
 
123
- const version = '6.0.0-rc.9';
123
+ const version = '6.0.0';
124
124
  const stepsToReproduce = `Running \`appwrite ${cliConfig.reportData.data.args.join(' ')}\``;
125
125
  const yourEnvironment = `CLI version: ${version}\nOperation System: ${os.type()}\nAppwrite version: ${appwriteVersion}\nIs Cloud: ${isCloud}`;
126
126
 
package/lib/questions.js CHANGED
@@ -261,7 +261,7 @@ const questionsPullFunctionsCode = [
261
261
  {
262
262
  type: "confirm",
263
263
  name: "override",
264
- message: "Do you want to pull source code of active deployment?"
264
+ message: "Do you want to pull source code of the latest deployment?"
265
265
  },
266
266
  ];
267
267
 
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": "6.0.0-rc.9",
5
+ "version": "6.0.0",
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": "6.0.0-rc.9",
3
+ "version": "6.0.0",
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/6.0.0-rc.9/appwrite-cli-win-x64.exe",
9
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0/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/6.0.0-rc.9/appwrite-cli-win-arm64.exe",
18
+ "url": "https://github.com/appwrite/sdk-for-cli/releases/download/6.0.0/appwrite-cli-win-arm64.exe",
19
19
  "bin": [
20
20
  [
21
21
  "appwrite-cli-win-arm64.exe",