diff --git a/CHANGELOG.md b/CHANGELOG.md index 000a7e0..5af193d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## 10.0.1 + +* Fix CLI Dart model generation issues +* Fix row permissions and security sync +* Fix error when pushing columns with relationships +* Fix resource name from attributes to columns for TablesDB indexes + ## 10.0.0 * **Breaking:** Removed Avatars CLI command and all related subcommands; corresponding examples deleted diff --git a/README.md b/README.md index c2f4661..b806d39 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 -10.0.0 +10.0.1 ``` ### 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 -10.0.0 +10.0.1 ``` ## Getting Started diff --git a/install.ps1 b/install.ps1 index edd74f2..19b1cad 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/10.0.0/appwrite-cli-win-x64.exe" -$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/10.0.0/appwrite-cli-win-arm64.exe" +$GITHUB_x64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/10.0.1/appwrite-cli-win-x64.exe" +$GITHUB_arm64_URL = "https://github.com/appwrite/sdk-for-cli/releases/download/10.0.1/appwrite-cli-win-arm64.exe" $APPWRITE_BINARY_NAME = "appwrite.exe" diff --git a/install.sh b/install.sh index b225ca3..39487a9 100644 --- a/install.sh +++ b/install.sh @@ -97,7 +97,7 @@ printSuccess() { downloadBinary() { echo "[2/4] Downloading executable for $OS ($ARCH) ..." - GITHUB_LATEST_VERSION="10.0.0" + GITHUB_LATEST_VERSION="10.0.1" 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 76607b7..6ec8c32 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': '10.0.0', - 'user-agent' : `AppwriteCLI/10.0.0 (${os.type()} ${os.version()}; ${os.arch()})`, + 'x-sdk-version': '10.0.1', + 'user-agent' : `AppwriteCLI/10.0.1 (${os.type()} ${os.version()}; ${os.arch()})`, 'X-Appwrite-Response-Format' : '1.8.0', }; } diff --git a/lib/commands/projects.js b/lib/commands/projects.js index bda0165..3ffc20a 100644 --- a/lib/commands/projects.js +++ b/lib/commands/projects.js @@ -1234,7 +1234,7 @@ const projectsListPlatforms = async ({projectId,parseOutput = true, overrideForC /** * @typedef {Object} ProjectsCreatePlatformRequestParams * @property {string} projectId Project unique ID. - * @property {PlatformType} type Platform type. + * @property {PlatformType} type Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android. * @property {string} name Platform name. Max length: 128 chars. * @property {string} key Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars. * @property {string} store App store or Google Play store ID. Max length: 256 chars. @@ -2354,7 +2354,7 @@ projects .command(`create-platform`) .description(`Create a new platform for your project. Use this endpoint to register a new platform where your users will run your application which will interact with the Appwrite API.`) .requiredOption(`--project-id `, `Project unique ID.`) - .requiredOption(`--type `, `Platform type.`) + .requiredOption(`--type `, `Platform type. Possible values are: web, flutter-web, flutter-ios, flutter-android, flutter-linux, flutter-macos, flutter-windows, apple-ios, apple-macos, apple-watchos, apple-tvos, android, unity, react-native-ios, react-native-android.`) .requiredOption(`--name `, `Platform name. Max length: 128 chars.`) .option(`--key `, `Package name for Android or bundle ID for iOS or macOS. Max length: 256 chars.`) .option(`--store `, `App store or Google Play store ID. Max length: 256 chars.`) diff --git a/lib/commands/pull.js b/lib/commands/pull.js index 4544464..8e43f13 100644 --- a/lib/commands/pull.js +++ b/lib/commands/pull.js @@ -358,7 +358,7 @@ const pullTable = async () => { }); if (fetchResponse["databases"].length <= 0) { log("No tables found."); - success(`Successfully pulled ${chalk.bold(totalTables)} tables from ${chalk.bold(totalTablesDBs)} tables databases.`); + success(`Successfully pulled ${chalk.bold(totalTables)} tables from ${chalk.bold(totalTablesDBs)} tableDBs.`); return; } @@ -398,7 +398,7 @@ const pullTable = async () => { } } - success(`Successfully pulled ${chalk.bold(totalTables)} tables from ${chalk.bold(totalTablesDBs)} tables databases.`); + success(`Successfully pulled ${chalk.bold(totalTables)} tables from ${chalk.bold(totalTablesDBs)} tableDBs.`); } const pullBucket = async () => { diff --git a/lib/commands/push.js b/lib/commands/push.js index 899d537..1655e73 100644 --- a/lib/commands/push.js +++ b/lib/commands/push.js @@ -50,10 +50,12 @@ const { databasesUpdateCollection } = require("./databases"); const { + tablesDBCreate, tablesDBGet, + tablesDBUpdate, + tablesDBCreateTable, tablesDBGetTable, - tablesDBUpdateTable, - tablesDBCreateTable + tablesDBUpdateTable } = require("./tables-db"); const { storageGetBucket, storageUpdateBucket, storageCreateBucket @@ -548,7 +550,7 @@ const createAttribute = (databaseId, collectionId, attribute) => { return databasesCreateRelationshipAttribute({ databaseId, collectionId, - relatedCollectionId: attribute.relatedCollection, + relatedCollectionId: attribute.relatedTable ?? attribute.relatedCollection, type: attribute.relationType, twoWay: attribute.twoWay, key: attribute.key, @@ -667,7 +669,7 @@ const updateAttribute = (databaseId, collectionId, attribute) => { return databasesUpdateRelationshipAttribute({ databaseId, collectionId, - relatedCollectionId: attribute.relatedCollection, + relatedCollectionId: attribute.relatedTable ?? attribute.relatedCollection, type: attribute.relationType, twoWay: attribute.twoWay, key: attribute.key, @@ -881,7 +883,7 @@ const createIndexes = async (indexes, collection) => { collectionId: collection['$id'], key: index.key, type: index.type, - attributes: index.attributes, + attributes: index.columns ?? index.attributes, orders: index.orders, parseOutput: false }); @@ -1730,7 +1732,7 @@ const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) = const databases = Array.from(new Set(tables.map(table => table['databaseId']))); - // Parallel db actions + // Parallel tablesDB actions await Promise.all(databases.map(async (databaseId) => { const localDatabase = localConfig.getTablesDB(databaseId); @@ -1741,7 +1743,7 @@ const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) = }); if (database.name !== (localDatabase.name ?? databaseId)) { - await databasesUpdate({ + await tablesDBUpdate({ databaseId: databaseId, name: localDatabase.name ?? databaseId, parseOutput: false @@ -1752,7 +1754,7 @@ const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) = } catch (err) { log(`Database ${databaseId} not found. Creating it now ...`); - await databasesCreate({ + await tablesDBCreate({ databaseId: databaseId, name: localDatabase.name ?? databaseId, parseOutput: false, @@ -1761,10 +1763,12 @@ const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) = })); - if (!(await approveChanges(tables, tablesDBGetTable, KeysTable, 'tableId', 'tables', ['columns', 'indexes'], 'databaseId', 'databaseId',))) { + if (!(await approveChanges(tables, tablesDBGetTable, KeysTable, 'tableId', 'tables', ['columns', 'indexes'], 'databaseId', 'databaseId'))) { return; } - // Parallel collection actions + let tablesChanged = new Set(); + + // Parallel tables actions await Promise.all(tables.map(async (table) => { try { const remoteTable = await tablesDBGetTable({ @@ -1773,15 +1777,23 @@ const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) = parseOutput: false, }); - if (remoteTable.name !== table.name) { + const changes = []; + if (remoteTable.name !== table.name) changes.push('name'); + if (remoteTable.rowSecurity !== table.rowSecurity) changes.push('rowSecurity'); + if (JSON.stringify(remoteTable['$permissions']) !== JSON.stringify(table['$permissions'])) changes.push('permissions'); + + if (changes.length > 0) { await tablesDBUpdateTable({ databaseId: table['databaseId'], tableId: table['$id'], name: table.name, - parseOutput: false + parseOutput: false, + rowSecurity: table.rowSecurity, + permissions: table['$permissions'] }) - success(`Updated ${table.name} ( ${table['$id']} ) name`); + success(`Updated ${table.name} ( ${table['$id']} ) - ${changes.join(', ')}`); + tablesChanged.add(table['$id']); } table.remoteVersion = remoteTable; @@ -1794,16 +1806,19 @@ const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) = databaseId: table['databaseId'], tableId: table['$id'], name: table.name, - documentSecurity: table.documentSecurity, + rowSecurity: table.rowSecurity, permissions: table['$permissions'], parseOutput: false }) + + success(`Created ${table.name} ( ${table['$id']} )`); + tablesChanged.add(table['$id']); } else { throw e; } } })) - let numberOfTables = 0; + // Serialize attribute actions for (let table of tables) { let columns = table.columns; @@ -1831,11 +1846,11 @@ const pushTable = async ({ returnOnZero, attempts } = { returnOnZero: false }) = } catch (e) { throw e; } - numberOfTables++; + tablesChanged.add(table['$id']); success(`Successfully pushed ${table.name} ( ${table['$id']} )`); } - success(`Successfully pushed ${numberOfTables} tables`); + success(`Successfully pushed ${tablesChanged.size} tables`); } const pushCollection = async ({ returnOnZero, attempts } = { returnOnZero: false }) => { diff --git a/lib/config.js b/lib/config.js index 4dbb397..8756b55 100644 --- a/lib/config.js +++ b/lib/config.js @@ -9,7 +9,7 @@ const KeysSite = new Set(["path", "$id", "name", "enabled", "logging", "timeout" const KeysFunction = new Set(["path", "$id", "execute", "name", "enabled", "logging", "runtime", "specification", "scopes", "events", "schedule", "timeout", "entrypoint", "commands", "vars"]); const KeysDatabase = new Set(["$id", "name", "enabled"]); const KeysCollection = new Set(["$id", "$permissions", "databaseId", "name", "enabled", "documentSecurity", "attributes", "indexes"]); -const KeysTable = new Set(["$id", "$permissions", "databaseId", "name", "enabled", "documentSecurity", "columns", "indexes"]); +const KeysTable = new Set(["$id", "$permissions", "databaseId", "name", "enabled", "rowSecurity", "columns", "indexes"]); const KeysStorage = new Set(["$id", "$permissions", "fileSecurity", "name", "enabled", "maximumFileSize", "allowedFileExtensions", "compression", "encryption", "antivirus"]); const KeysTopics = new Set(["$id", "name", "subscribe"]); const KeysTeams = new Set(["$id", "name"]); @@ -62,12 +62,13 @@ const KeysColumns = new Set([ "onDelete", "side", // Indexes - "attributes", + "columns", "orders", // Strings "encrypt", ]); const KeyIndexes = new Set(["key", "type", "status", "attributes", "orders"]); +const KeyIndexesColumns = new Set(["key", "type", "status", "columns", "orders"]); function whitelistKeys(value, keys, nestedKeys = {}) { if (Array.isArray(value)) { @@ -404,7 +405,7 @@ class Local extends Config { addTable(props) { props = whitelistKeys(props, KeysTable, { columns: KeysColumns, - indexes: KeyIndexes + indexes: KeyIndexesColumns }); if (!this.has("tables")) { diff --git a/lib/parser.js b/lib/parser.js index 1d5191e..53eb0ca 100644 --- a/lib/parser.js +++ b/lib/parser.js @@ -122,7 +122,7 @@ const parseError = (err) => { } catch { } - const version = '10.0.0'; + const version = '10.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()}`; diff --git a/lib/type-generation/languages/dart.js b/lib/type-generation/languages/dart.js index 5161a18..73ea972 100644 --- a/lib/type-generation/languages/dart.js +++ b/lib/type-generation/languages/dart.js @@ -83,104 +83,101 @@ class Dart extends LanguageMeta { } getTemplate() { - return `<% for (const attribute of collection.attributes) { -%> -<% if (attribute.type === 'relationship') { -%> -import '<%- toSnakeCase(collections.find(c => c.$id === attribute.relatedCollection).name) %>.dart'; - -<% } -%> -<% } -%> -/// This file is auto-generated by the Appwrite CLI. -/// You can regenerate it by running \`appwrite ${process.argv.slice(2).join(' ')}\`. - -<% for (const attribute of collection.attributes) { -%> -<% if (attribute.format === 'enum') { -%> + return `// This file is auto-generated by the Appwrite CLI. +// You can regenerate it by running \`appwrite ${process.argv.slice(2).join(' ')}\`. +<% const __relatedImportsSeen = new Set(); + const sortedAttributes = collection.attributes.slice().sort((a, b) => { + if (a.required === b.required) return 0; + return a.required ? -1 : 1; + }); -%> +<% const __attrs = sortedAttributes; -%> +<% for (const attribute of __attrs) { -%> +<% if (attribute.type === '${AttributeType.RELATIONSHIP}') { -%> +<% const related = collections.find(c => c.$id === attribute.relatedCollection); -%> +<% if (related && !__relatedImportsSeen.has(toSnakeCase(related.name))) { -%> +import '<%- toSnakeCase(related.name) %>.dart'; +<% __relatedImportsSeen.add(toSnakeCase(related.name)); -%> +<% } -%> +<% } -%> +<% } -%> + +<% for (const attribute of __attrs) { -%> +<% if (attribute.format === '${AttributeType.ENUM}') { -%> enum <%- toPascalCase(attribute.key) %> { <% for (const [index, element] of Object.entries(attribute.elements)) { -%> - <%- strict ? toCamelCase(element) : element %><% if (index < attribute.elements.length - 1) { %>,<% } %> + <%- strict ? toCamelCase(element) : element %><% if (index < attribute.elements.length - 1) { -%>,<% } %> <% } -%> } <% } -%> <% } -%> class <%= toPascalCase(collection.name) %> { -<% for (const [index, attribute] of Object.entries(collection.attributes)) { -%> +<% for (const [index, attribute] of Object.entries(__attrs)) { -%> <%- getType(attribute, collections) %> <%= strict ? toCamelCase(attribute.key) : attribute.key %>; <% } -%> <%= toPascalCase(collection.name) %>({ - <% for (const [index, attribute] of Object.entries(collection.attributes)) { -%> - <% if (attribute.required) { %>required <% } %>this.<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (index < collection.attributes.length - 1) { %>,<% } %> + <% for (const [index, attribute] of Object.entries(__attrs)) { -%> + <% if (attribute.required) { %>required <% } %>this.<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (index < __attrs.length - 1) { -%>,<% } %> <% } -%> }); factory <%= toPascalCase(collection.name) %>.fromMap(Map map) { return <%= toPascalCase(collection.name) %>( -<% for (const [index, attribute] of Object.entries(collection.attributes)) { -%> - <%= strict ? toCamelCase(attribute.key) : attribute.key %>: <% if (attribute.type === 'string' || attribute.type === 'email' || attribute.type === 'datetime') { -%> -<% if (attribute.format === 'enum') { -%> +<% for (const [index, attribute] of Object.entries(__attrs)) { -%> + <%= strict ? toCamelCase(attribute.key) : attribute.key %>: <% if (attribute.type === '${AttributeType.STRING}' || attribute.type === '${AttributeType.EMAIL}' || attribute.type === '${AttributeType.DATETIME}') { -%> +<% if (attribute.format === '${AttributeType.ENUM}') { -%> <% if (attribute.array) { -%> -(map['<%= attribute.key %>'] as List?)?.map((e) => <%- toPascalCase(attribute.key) %>.values.firstWhere((element) => element.name == e)).toList()<% if (!attribute.required) { %> ?? []<% } -%> -<% } else { -%> +(map['<%= attribute.key %>'] as List?)?.map((e) => <%- toPascalCase(attribute.key) %>.values.firstWhere((element) => element.name == e)).toList()<% } else { -%> <% if (!attribute.required) { -%> map['<%= attribute.key %>'] != null ? <%- toPascalCase(attribute.key) %>.values.where((e) => e.name == map['<%= attribute.key %>']).firstOrNull : null<% } else { -%> <%- toPascalCase(attribute.key) %>.values.firstWhere((e) => e.name == map['<%= attribute.key %>'])<% } -%> <% } -%> <% } else { -%> <% if (attribute.array) { -%> -List.from(map['<%= attribute.key %>'] ?? [])<% if (!attribute.required) { %> ?? []<% } -%> -<% } else { -%> -map['<%= attribute.key %>']<% if (!attribute.required) { %>?<% } %>.toString()<% if (!attribute.required) { %> ?? null<% } -%> +List.from(map['<%= attribute.key %>'] ?? [])<% } else { -%> +map['<%= attribute.key %>']<% if (!attribute.required) { %>?<% } %>.toString()<% } -%> <% } -%> -<% } -%> -<% } else if (attribute.type === 'integer') { -%> +<% } else if (attribute.type === '${AttributeType.INTEGER}') { -%> <% if (attribute.array) { -%> -List.from(map['<%= attribute.key %>'] ?? [])<% if (!attribute.required) { %> ?? []<% } -%> -<% } else { -%> -map['<%= attribute.key %>']<% if (!attribute.required) { %> ?? null<% } -%> -<% } -%> -<% } else if (attribute.type === 'float') { -%> +List.from(map['<%= attribute.key %>'] ?? [])<% } else { -%> +map['<%= attribute.key %>']<% } -%> +<% } else if (attribute.type === '${AttributeType.FLOAT}') { -%> <% if (attribute.array) { -%> -List.from(map['<%= attribute.key %>'] ?? [])<% if (!attribute.required) { %> ?? []<% } -%> -<% } else { -%> -map['<%= attribute.key %>']<% if (!attribute.required) { %> ?? null<% } -%> -<% } -%> -<% } else if (attribute.type === 'boolean') { -%> +List.from(map['<%= attribute.key %>'] ?? [])<% } else { -%> +map['<%= attribute.key %>']<% } -%> +<% } else if (attribute.type === '${AttributeType.BOOLEAN}') { -%> <% if (attribute.array) { -%> -List.from(map['<%= attribute.key %>'] ?? [])<% if (!attribute.required) { %> ?? []<% } -%> -<% } else { -%> -map['<%= attribute.key %>']<% if (!attribute.required) { %> ?? null<% } -%> -<% } -%> -<% } else if (attribute.type === 'relationship') { -%> +List.from(map['<%= attribute.key %>'] ?? [])<% } else { -%> +map['<%= attribute.key %>']<% } -%> +<% } else if (attribute.type === '${AttributeType.RELATIONSHIP}') { -%> <% if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') { -%> -(map['<%= attribute.key %>'] as List?)?.map((e) => <%- toPascalCase(collections.find(c => c.$id === attribute.relatedCollection).name) %>.fromMap(e)).toList()<% if (!attribute.required) { %> ?? []<% } -%> +(map['<%= attribute.key %>'] as List?)?.map((e) => <%- toPascalCase(collections.find(c => c.$id === attribute.relatedCollection).name) %>.fromMap(e)).toList() <% } else { -%> <% if (!attribute.required) { -%> map['<%= attribute.key %>'] != null ? <%- toPascalCase(collections.find(c => c.$id === attribute.relatedCollection).name) %>.fromMap(map['<%= attribute.key %>']) : null<% } else { -%> <%- toPascalCase(collections.find(c => c.$id === attribute.relatedCollection).name) %>.fromMap(map['<%= attribute.key %>'])<% } -%> <% } -%> -<% } -%><% if (index < collection.attributes.length - 1) { %>,<% } %> +<% } -%><% if (index < __attrs.length - 1) { -%>,<% } %> <% } -%> ); } Map toMap() { return { -<% for (const [index, attribute] of Object.entries(collection.attributes)) { -%> - "<%= attribute.key %>": <% if (attribute.type === 'relationship') { -%> +<% for (const [index, attribute] of Object.entries(__attrs)) { -%> + '<%= attribute.key %>': <% if (attribute.type === '${AttributeType.RELATIONSHIP}') { -%> <% if ((attribute.relationType === 'oneToMany' && attribute.side === 'parent') || (attribute.relationType === 'manyToOne' && attribute.side === 'child') || attribute.relationType === 'manyToMany') { -%> -<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (!attribute.required) { %>?<% } %>.map((e) => e.toMap()).toList()<% if (!attribute.required) { %> ?? []<% } -%> +<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (!attribute.required) { %>?<% } %>.map((e) => e.toMap()).toList() <% } else { -%> -<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (!attribute.required) { %>?<% } %>.toMap()<% if (!attribute.required) { %> ?? {}<% } -%> -<% } -%> -<% } else if (attribute.format === 'enum') { -%> +<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (!attribute.required) { %>?<% } %>.toMap()<% } -%> +<% } else if (attribute.format === '${AttributeType.ENUM}') { -%> <% if (attribute.array) { -%> -<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (!attribute.required) { %>?<% } %>.map((e) => e.name).toList()<% if (!attribute.required) { %> ?? []<% } -%> -<% } else { -%> -<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (!attribute.required) { %>?<% } %>.name<% if (!attribute.required) { %> ?? null<% } -%> -<% } -%> +<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (!attribute.required) { %>?<% } %>.map((e) => e.name).toList()<% } else { -%> +<%= strict ? toCamelCase(attribute.key) : attribute.key %><% if (!attribute.required) { %>?<% } %>.name<% } -%> <% } else { -%> <%= strict ? toCamelCase(attribute.key) : attribute.key -%> -<% } -%><% if (index < collection.attributes.length - 1) { %>,<% } %> +<% } -%><% if (index < __attrs.length - 1) { -%>,<% } %> <% } -%> }; } diff --git a/lib/type-generation/languages/typescript.js b/lib/type-generation/languages/typescript.js index d189d23..c5bd044 100644 --- a/lib/type-generation/languages/typescript.js +++ b/lib/type-generation/languages/typescript.js @@ -69,7 +69,7 @@ class TypeScript extends LanguageMeta { } getTemplate() { - return `import { type Models } from '${this._getAppwriteDependency()}'; + return `import type { Models } from '${this._getAppwriteDependency()}'; // This file is auto-generated by the Appwrite CLI. // You can regenerate it by running \`appwrite ${process.argv.slice(2).join(' ')}\`. diff --git a/package.json b/package.json index 95cfc44..fa65d93 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": "10.0.0", + "version": "10.0.1", "license": "BSD-3-Clause", "main": "index.js", "bin": { diff --git a/scoop/appwrite.config.json b/scoop/appwrite.config.json index 8987c5b..3c61060 100644 --- a/scoop/appwrite.config.json +++ b/scoop/appwrite.config.json @@ -1,12 +1,12 @@ { "$schema": "https://raw.githubusercontent.com/ScoopInstaller/Scoop/master/schema.json", - "version": "10.0.0", + "version": "10.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/10.0.0/appwrite-cli-win-x64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/10.0.1/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/10.0.0/appwrite-cli-win-arm64.exe", + "url": "https://github.com/appwrite/sdk-for-cli/releases/download/10.0.1/appwrite-cli-win-arm64.exe", "bin": [ [ "appwrite-cli-win-arm64.exe",