Skip to content

Commit

Permalink
updated ui texts
Browse files Browse the repository at this point in the history
  • Loading branch information
shafeeqd959 committed Jan 23, 2025
1 parent bd92c6a commit 0a7b7d2
Show file tree
Hide file tree
Showing 16 changed files with 680 additions and 2,538 deletions.
3,128 changes: 633 additions & 2,495 deletions package-lock.json

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions packages/contentstack-audit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,7 @@ EXAMPLES
$ csdx plugins
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.22/src/commands/plugins/index.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.26/src/commands/plugins/index.ts)_

## `csdx plugins:add PLUGIN`

Expand Down Expand Up @@ -343,7 +343,7 @@ EXAMPLES
$ csdx plugins:inspect myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.22/src/commands/plugins/inspect.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.26/src/commands/plugins/inspect.ts)_

## `csdx plugins:install PLUGIN`

Expand Down Expand Up @@ -392,7 +392,7 @@ EXAMPLES
$ csdx plugins:install someuser/someplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.22/src/commands/plugins/install.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.26/src/commands/plugins/install.ts)_

## `csdx plugins:link PATH`

Expand Down Expand Up @@ -423,7 +423,7 @@ EXAMPLES
$ csdx plugins:link myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.22/src/commands/plugins/link.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.26/src/commands/plugins/link.ts)_

## `csdx plugins:remove [PLUGIN]`

Expand Down Expand Up @@ -464,7 +464,7 @@ FLAGS
--reinstall Reinstall all plugins after uninstalling.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.22/src/commands/plugins/reset.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.26/src/commands/plugins/reset.ts)_

## `csdx plugins:uninstall [PLUGIN]`

Expand Down Expand Up @@ -492,7 +492,7 @@ EXAMPLES
$ csdx plugins:uninstall myplugin
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.22/src/commands/plugins/uninstall.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.26/src/commands/plugins/uninstall.ts)_

## `csdx plugins:unlink [PLUGIN]`

Expand Down Expand Up @@ -536,5 +536,5 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.22/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.26/src/commands/plugins/update.ts)_
<!-- commandsstop -->
2 changes: 1 addition & 1 deletion packages/contentstack-import-setup/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-cm-import-setup",
"description": "Contentstack CLI plugin to setup the mappers and configurations for the import command",
"version": "1.0.0-beta.2",
"version": "1.0.0",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,9 @@ import { setupImportConfig, log } from '../../../utils';
import { ImportSetup } from '../../../import';

export default class ImportSetupCommand extends Command {
static description = messageHandler.parse('Import content from a stack');
static description = messageHandler.parse(
'Helps to generate mappers and backup folder for importing (overwriting) specific modules',
);

static examples: string[] = [
`csdx cm:stacks:import-setup --stack-api-key <target_stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>`,
Expand All @@ -31,20 +33,22 @@ export default class ImportSetupCommand extends Command {
}),
'data-dir': flags.string({
char: 'd',
description: 'path and location where data is stored',
description: `The path or the location in your file system where the content, you intend to import, is stored. For example, -d "C:\\Users\\Name\\Desktop\\cli\\content". If the export folder has branches involved, then the path should point till the particular branch. For example, “-d "C:\\Users\\Name\\Desktop\\cli\\content\\branch_name"`,
}),
alias: flags.string({
char: 'a',
description: 'alias of the management token',
description: 'The management token of the destination stack where you will import the content.',
}),
modules: flags.string({
module: flags.string({
options: ['global-fields', 'content-types', 'entries'], // only allow the value to be from a discrete set
description: '[optional] specific module name',
description:
'[optional] Specify the modules/module to import into the target stack. currently options are global-fields, content-types, entries',
multiple: true,
}),
branch: flags.string({
char: 'B',
description: "The name of the target stack's branch",
description:
"The name of the branch where you want to import your content. If you don't mention the branch name, then by default the content will be imported to the main branch.",
parse: printFlagDeprecation(['-B'], ['--branch']),
}),
};
Expand All @@ -66,18 +70,18 @@ export default class ImportSetupCommand extends Command {
await importSetup.start();
log(
importSetupConfig,
`Successfully created backup folder and mapper files for the stack with the API key ${importSetupConfig.apiKey}.`,
`Backup folder and mapper files have been successfully created for the stack using the API key ${importSetupConfig.apiKey}.`,
'success',
);
log(
importSetupConfig,
`The backup folder created at '${pathValidator(path.join(importSetupConfig.backupDir))}'`,
`The backup folder has been created at '${pathValidator(path.join(importSetupConfig.backupDir))}'.`,
'success',
);
} catch (error) {
log(
{ data: '' } as ImportConfig,
`Failed to create backup folder and mapper files - ${formatError(error)}`,
`Failed to create the backup folder and mapper files: ${formatError(error)}`,
'error',
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export default class ImportSetup {
const moduleInstance = new ModuleClass(modulePayload);
await moduleInstance.start();
} catch (error) {
log(this.config, `Error importing '${moduleName}': ${formatError(error)}`, 'error');
log(this.config, `Error occurred while importing '${moduleName}'`, 'error');
throw error;
}
}
Expand Down
12 changes: 6 additions & 6 deletions packages/contentstack-import-setup/src/import/modules/assets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ export default class AssetImportSetup extends BaseImportSetup {
try {
fsUtil.makeDirectory(this.mapperDirPath);
await this.fetchAndMapAssets();
log(this.config, `Generated required setup files for asset`, 'success');
log(this.config, `The required setup files for the asset have been generated successfully.`, 'success');
} catch (error) {
log(this.config, `Error generating asset mapper: ${formatError(error)}`, 'error');
log(this.config, `Error occurred while generating the asset mapper: ${formatError(error)}.`, 'error');
}
}

Expand All @@ -67,18 +67,18 @@ export default class AssetImportSetup extends BaseImportSetup {
if (items.length === 1) {
this.assetUidMapper[uid] = items[0].uid;
this.assetUrlMapper[url] = items[0].url;
log(this.config, `Mapped asset: '${title}'`, 'info');
log(this.config, `Mapped asset successfully: '${title}'`, 'info');
} else if (items.length > 1) {
this.duplicateAssets[uid] = items.map((asset: any) => {
return { uid: asset.uid, title: asset.title, url: asset.url };
});
log(this.config, `Multiple assets found with title '${title}'`, 'info');
log(this.config, `Multiple assets found with the title '${title}'.`, 'info');
} else {
log(this.config, `Asset with title '${title}' not found in the stack!`, 'info');
}
};
const onReject = ({ error, apiData: { title } = undefined }: any) => {
log(this.config, `${title} asset mapping failed.!`, 'error');
log(this.config, `Failed to map the asset '${title}'.`, 'error');
log(this.config, formatError(error), 'error');
};

Expand Down Expand Up @@ -116,7 +116,7 @@ export default class AssetImportSetup extends BaseImportSetup {
}
if (!isEmpty(this.duplicateAssets)) {
fsUtil.writeFile(this.duplicateAssetPath, this.duplicateAssets);
log(this.config, `Duplicate asset files store here ${this.duplicateAssetPath}`, 'info');
log(this.config, `Duplicate asset files are stored at: ${this.duplicateAssetPath}.`, 'info');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,9 @@ export default class ContentTypesImportSetup extends BaseImportSetup {
async start() {
try {
await this.setupDependencies();
log(this.config, `Generate required setup files for content types`, 'success');
log(this.config, `The required setup files for content types have been generated successfully.`, 'success');
} catch (error) {
log(this.config, `Error generating ${error.message}`, 'error');
log(this.config, `Error occurred while generating the content type mapper: ${error.message}. 'error');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ export default class EntriesImportSetup extends BaseImportSetup {
async start() {
try {
await this.setupDependencies();
log(this.config, `Generate required setup files for entries`, 'success');
log(this.config, `The required setup files for entries have been generated successfully.`, 'success');
} catch (error) {
log(this.config, `Error generating ${error.message}`, 'error');
log(this.config, `Error occurred while generating the entry mapper: ${error.message}.`, 'error');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -41,20 +41,20 @@ export default class ExtensionImportSetup {
for (const extension of Object.values(extensions) as any) {
const targetExtension: any = await this.getExtension(extension);
if (!targetExtension) {
log(this.config, `Extension with title '${extension.title}' not found in the stack!`, 'info');
log(this.config, `Extension with the title '${extension.title}' not found in the stack.`, 'info');
continue;
}
this.extensionMapper[extension.uid] = targetExtension.uid;
}

await fsUtil.writeFile(this.extUidMapperPath, this.extensionMapper);

log(this.config, `Generated required setup files for extension`, 'success');
log(this.config, `The required setup files for extensions have been generated successfully.`, 'success');
} else {
log(this.config, 'No extensions found in the content folder!', 'error');
log(this.config, 'No extensions found in the content folder.', 'error');
}
} catch (error) {
log(this.config, `Error generating extension mapper: ${formatError(error)}`, 'error');
log(this.config, `Error occurred while generating the extension mapper: ${formatError(error)}.`, 'error');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ export default class GlobalFieldsImportSetup extends BaseImportSetup {
async start() {
try {
await this.setupDependencies();
log(this.config, `Generate required setup files for global fields`, 'success');
log(this.config, `The required setup files for global fields have been generated successfully.`, 'success');
} catch (error) {
log(this.config, `Error generating ${error.message}`, 'error');
log(this.config, `Error occurred while generating the global field mapper: ${error.message}.`, 'error');
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -58,12 +58,12 @@ export default class marketplaceAppImportSetup {
this.createMapper(sourceMarketplaceApps, targetMarketplaceApps);
await fsUtil.writeFile(join(this.marketplaceAppsUidMapperPath, 'uid-mapping.json'), this.marketplaceAppMapper);

log(this.config, `Generated required setup files for marketplaceApp`, 'success');
log(this.config, `The required setup files for Marketplace apps have been generated successfully.`, 'success');
} else {
log(this.config, 'No marketplaceApps found in the content folder!', 'info');
log(this.config, 'No Marketplace apps found in the content folder.', 'info');
}
} catch (error) {
log(this.config, `Error generating marketplaceApp mapper: ${formatError(error)}`, 'error');
log(this.config, `Error occurred while generating the Marketplace app mapper: ${error.message}.`, 'error');
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ export default class TaxonomiesImportSetup {
fsUtil.writeFile(this.termsSuccessPath, this.termsMapper);
}

log(this.config, `Generated required setup files for taxonomies`, 'success');
log(this.config, `The required setup files for taxonomies have been generated successfully.`, 'success');
} else {
log(this.config, 'No taxonomies found in the content folder!', 'info');
log(this.config, 'No taxonomies found in the content folder.', 'info');
}
} catch (error) {
log(this.config, `Error generating taxonomies mapper: ${error.message}`, 'error');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ const setupConfig = async (importCmdFlags: any): Promise<ImportConfig> => {
config.branchName = importCmdFlags['branch'];
}

config.selectedModules = importCmdFlags['modules'] || [await askSelectedModules()];
config.selectedModules = importCmdFlags['module'] || [await askSelectedModules()];
if (importCmdFlags['backup-dir']) {
config.useBackedupDir = importCmdFlags['backup-dir'];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export const askSelectedModules = async (): Promise<string> => {
return cliux.inquire<string>({
type: 'list',
name: 'selectedModule',
message: 'Please select a module to generate the mapper files',
message: 'Please select a module to generate the mapper files.',
choices: [
{ name: 'Global Fields', value: 'global-fields' },
{ name: 'Content types', value: 'content-types' },
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"@contentstack/cli-cm-export": "~1.14.1",
"@contentstack/cli-cm-export-to-csv": "~1.7.3",
"@contentstack/cli-cm-import": "~1.19.3",
"@contentstack/cli-cm-import-setup": "1.0.0-beta.2",
"@contentstack/cli-cm-import-setup": "1.0.0",
"@contentstack/cli-cm-migrate-rte": "~1.4.20",
"@contentstack/cli-cm-seed": "~1.10.0",
"@contentstack/cli-command": "~1.3.2",
Expand Down
2 changes: 1 addition & 1 deletion pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 0a7b7d2

Please sign in to comment.