diff --git a/templates/cli/lib/commands/pull.js.twig b/templates/cli/lib/commands/pull.js.twig index 76a6bc5ce..7d20b5123 100644 --- a/templates/cli/lib/commands/pull.js.twig +++ b/templates/cli/lib/commands/pull.js.twig @@ -295,7 +295,8 @@ const pullSites = async ({ code, withVariables }) => { const pullCollection = async () => { warn("appwrite pull collection has been deprecated. Please consider using 'appwrite pull tables' instead"); log("Fetching collections ..."); - let total = 0; + let totalDatabases = 0; + let totalCollections = 0; const fetchResponse = await databasesList({ queries: [JSON.stringify({ method: 'limit', values: [1] })], @@ -303,7 +304,7 @@ const pullCollection = async () => { }); if (fetchResponse["databases"].length <= 0) { log("No collections found."); - success(`Successfully pulled ${chalk.bold(total)} collections.`); + success(`Successfully pulled ${chalk.bold(totalCollections)} collections from ${chalk.bold(totalDatabases)} databases.`); return; } @@ -323,7 +324,7 @@ const pullCollection = async () => { parseOutput: false }); - total++; + totalDatabases++; log(`Pulling all collections from ${chalk.bold(database['name'])} database ...`); localConfig.addDatabase(database); @@ -334,6 +335,7 @@ const pullCollection = async () => { }, 100, 'collections'); for (const collection of collections) { + totalCollections++; localConfig.addCollection({ ...collection, '$createdAt': undefined, @@ -342,12 +344,13 @@ const pullCollection = async () => { } } - success(`Successfully pulled ${chalk.bold(total)} collections.`); + success(`Successfully pulled ${chalk.bold(totalCollections)} collections from ${chalk.bold(totalDatabases)} databases.`); } const pullTable = async () => { log("Fetching tables ..."); - let total = 0; + let totalTablesDBs = 0; + let totalTables = 0; const fetchResponse = await tablesDBList({ queries: [JSON.stringify({ method: 'limit', values: [1] })], @@ -355,7 +358,7 @@ const pullTable = async () => { }); if (fetchResponse["databases"].length <= 0) { log("No tables found."); - success(`Successfully pulled ${chalk.bold(total)} tables.`); + success(`Successfully pulled ${chalk.bold(totalTables)} tables from ${chalk.bold(totalTablesDBs)} tables databases.`); return; } @@ -375,7 +378,7 @@ const pullTable = async () => { parseOutput: false }); - total++; + totalTablesDBs++; log(`Pulling all tables from ${chalk.bold(database['name'])} database ...`); localConfig.addTablesDB(database); @@ -386,6 +389,7 @@ const pullTable = async () => { }, 100, 'tables'); for (const table of tables) { + totalTables++; localConfig.addTable({ ...table, '$createdAt': undefined, @@ -394,7 +398,7 @@ const pullTable = async () => { } } - success(`Successfully pulled ${chalk.bold(total)} tables.`); + success(`Successfully pulled ${chalk.bold(totalTables)} tables from ${chalk.bold(totalTablesDBs)} tables databases.`); } const pullBucket = async () => { @@ -474,14 +478,16 @@ const pullMessagingTopic = async () => { const pull = new Command("pull") .description(commandDescriptions['pull']) - .action(actionRunner(pullResources)); + .action(actionRunner(() => pullResources({ skipDeprecated: true }))); pull .command("all") .description("Pull all resource.") .action(actionRunner(() => { cliConfig.all = true; - return pullResources(); + return pullResources({ + skipDeprecated: true + }); })); pull diff --git a/templates/cli/lib/parser.js.twig b/templates/cli/lib/parser.js.twig index 14202711e..c05f08933 100644 --- a/templates/cli/lib/parser.js.twig +++ b/templates/cli/lib/parser.js.twig @@ -205,7 +205,8 @@ const commandDescriptions = { "account": `The account command allows you to authenticate and manage a user account.`, "graphql": `The graphql command allows you to query and mutate any resource type on your Appwrite server.`, "avatars": `The avatars command aims to help you complete everyday tasks related to your app image, icons, and avatars.`, - "databases": `The databases command allows you to create structured collections of documents and query and filter lists of documents.`, + "databases": `(Legacy) The databases command allows you to create structured collections of documents and query and filter lists of documents.`, + 'tables-db': `The tables-db command allows you to create structured tables of columns and query and filter lists of rows.`, "init": `The init command provides a convenient wrapper for creating and initializing projects, functions, collections, buckets, teams, and messaging-topics in {{ spec.title|caseUcfirst }}.`, "push": `The push command provides a convenient wrapper for pushing your functions, collections, buckets, teams, and messaging-topics.`, "run": `The run command allows you to run the project locally to allow easy development and quick debugging.`, @@ -218,6 +219,8 @@ const commandDescriptions = { "teams": `The teams command allows you to group users of your project to enable them to share read and write access to your project resources.`, "update": `The update command allows you to update the {{ spec.title|caseUcfirst }} CLI to the latest version.`, "users": `The users command allows you to manage your project users.`, + "projects": `The projects command allows you to manage your projects, add platforms, manage API keys, Dev Keys etc.`, + "project": `The project command allows you to manage project related resources like usage, variables, etc.`, "client": `The client command allows you to configure your CLI`, "login": `The login command allows you to authenticate and manage a user account.`, "logout": `The logout command allows you to log out of your {{ spec.title|caseUcfirst }} account.`,