Skip to content

Commit

Permalink
log level update
Browse files Browse the repository at this point in the history
shafeeqd959 committed Dec 6, 2024
1 parent 483e788 commit ef6fc05
Showing 5 changed files with 88 additions and 52 deletions.
69 changes: 42 additions & 27 deletions package-lock.json

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

17 changes: 6 additions & 11 deletions packages/contentstack-import-setup/README.md
Original file line number Diff line number Diff line change
@@ -5,9 +5,8 @@ It is Contentstack’s CLI plugin to import content in the stack. To learn how t
[![License](https://img.shields.io/npm/l/@contentstack/cli)](https://github.com/contentstack/cli/blob/main/LICENSE)it -m

<!-- toc -->

- [Usage](#usage)
- [Commands](#commands)
* [Usage](#usage)
* [Commands](#commands)
<!-- tocstop -->

For switching to EU region update the hosts at config/default.js
@@ -43,7 +42,6 @@ For switching to AZURE-EU region update the hosts at config/default.js
# Usage

<!-- usage -->

```sh-session
$ npm install -g @contentstack/cli-cm-import-setup
$ csdx COMMAND
@@ -55,15 +53,13 @@ USAGE
$ csdx COMMAND
...
```

<!-- usagestop -->

# Commands

<!-- commands -->

- [`csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport--k-value--d-value--a-value---modules-valuevalue)
- [`csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport--k-value--d-value--a-value---modules-valuevalue-1)
* [`csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport-setup--k-value--d-value--a-value---modules-valuevalue)
* [`csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport-setup--k-value--d-value--a-value---modules-valuevalue-1)

## `csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`

@@ -84,7 +80,7 @@ DESCRIPTION
Import content from a stack
ALIASES
$ csdx cm:import
$ csdx cm:import-setup
EXAMPLES
$ csdx cm:stacks:import-setup --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>
@@ -109,12 +105,11 @@ DESCRIPTION
Import content from a stack
ALIASES
$ csdx cm:import
$ csdx cm:import-setup
EXAMPLES
$ csdx cm:stacks:import-setup --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>
```

_See code: [src/commands/cm/stacks/import-setup.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-import-setup/src/commands/cm/stacks/import-setup.ts)_

<!-- commandsstop -->
Original file line number Diff line number Diff line change
@@ -72,9 +72,9 @@ export default class AssetImportSetup extends BaseImportSetup {
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}'`, 'error');
log(this.config, `Multiple assets found with title '${title}'`, 'info');
} else {
log(this.config, `Asset with title '${title}' not found in the stack!`, 'error');
log(this.config, `Asset with title '${title}' not found in the stack!`, 'info');
}
};
const onReject = ({ error, apiData: { title } = undefined }: any) => {
@@ -116,6 +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');
}
}
}
1 change: 0 additions & 1 deletion packages/contentstack-import-setup/src/utils/index.ts
Original file line number Diff line number Diff line change
@@ -5,4 +5,3 @@ export { fsUtil } from './file-helper';
export { default as backupHandler } from './backup-handler';
export { log, unlinkFileLogger } from './logger';
export * from './log';
export * from './common-helper';
48 changes: 37 additions & 11 deletions packages/contentstack/README.md
Original file line number Diff line number Diff line change
@@ -67,6 +67,7 @@ USAGE
* [`csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport--c-value--k-value--d-value--a-value---module-value---content-types-value---branch-value---secured-assets)
* [`csdx cm:export-to-csv`](#csdx-cmexport-to-csv)
* [`csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`](#csdx-cmstacksimport--c-value--k-value--d-value--a-value---module-value---backup-dir-value---branch-value---import-webhook-status-disablecurrent)
* [`csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport-setup--k-value--d-value--a-value---modules-valuevalue)
* [`csdx cm:migrate-rte`](#csdx-cmmigrate-rte)
* [`csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`](#csdx-cmstacksmigration--k-value--a-value---file-path-value---branch-value---config-file-value---config-value---multiple)
* [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>] [--locale <value>]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y-value--s-value---locale-value)
@@ -76,7 +77,7 @@ USAGE
* [`csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>] [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>] [--destination-stack-api-key <value>] [--import-webhook-status disable|current]`](#csdx-cmstacksclone---source-branch-value---target-branch-value---source-management-token-alias-value---destination-management-token-alias-value--n-value---type-ab---source-stack-api-key-value---destination-stack-api-key-value---import-webhook-status-disablecurrent-1)
* [`csdx cm:stacks:export [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport--c-value--k-value--d-value--a-value---module-value---content-types-value---branch-value---secured-assets-1)
* [`csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`](#csdx-cmstacksimport--c-value--k-value--d-value--a-value---module-value---backup-dir-value---branch-value---import-webhook-status-disablecurrent-1)
* [`csdx cm:stacks:import [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport--k-value--d-value--a-value---modules-valuevalue)
* [`csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport-setup--k-value--d-value--a-value---modules-valuevalue-1)
* [`csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`](#csdx-cmstacksmigration--k-value--a-value---file-path-value---branch-value---config-file-value---config-value---multiple-1)
* [`csdx cm:stacks:publish`](#csdx-cmstackspublish)
* [`csdx cm:stacks:publish-clear-logs`](#csdx-cmstackspublish-clear-logs)
@@ -2370,6 +2371,31 @@ EXAMPLES
$ csdx cm:stacks:import --branch <branch name> --yes --skip-audit
```

## `csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`

Import content from a stack

```
USAGE
$ csdx cm:import-setup cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]
FLAGS
-a, --alias=<value> alias of the management token
-d, --data-dir=<value> path and location where data is stored
-k, --stack-api-key=<value> API key of the target stack
--modules=<option> [optional] specific module name
<options: content-types|entries|both>
DESCRIPTION
Import content from a stack
ALIASES
$ csdx cm:import-setup
EXAMPLES
$ csdx cm:stacks:import-setup --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>
```

## `csdx cm:migrate-rte`

Migration script to migrate content from HTML RTE to JSON RTE
@@ -2827,13 +2853,13 @@ EXAMPLES

_See code: [@contentstack/cli-cm-import](https://github.com/contentstack/cli/blob/main/packages/contentstack-import/src/commands/cm/stacks/import.ts)_

## `csdx cm:stacks:import [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`
## `csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`

Import content from a stack

```
USAGE
$ csdx cm:stacks:import-setup cm:stacks:import [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]
$ csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]
FLAGS
-a, --alias=<value> alias of the management token
@@ -2846,7 +2872,7 @@ DESCRIPTION
Import content from a stack
ALIASES
$ csdx cm:import
$ csdx cm:import-setup
EXAMPLES
$ csdx cm:stacks:import-setup --stack-api-key <stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>
@@ -3840,7 +3866,7 @@ EXAMPLES
$ csdx plugins
```

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

## `csdx plugins:add PLUGIN`

@@ -3914,7 +3940,7 @@ EXAMPLES
$ csdx plugins:inspect myplugin
```

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

## `csdx plugins:install PLUGIN`

@@ -3963,7 +3989,7 @@ EXAMPLES
$ csdx plugins:install someuser/someplugin
```

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

## `csdx plugins:link PATH`

@@ -3994,7 +4020,7 @@ EXAMPLES
$ csdx plugins:link myplugin
```

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

## `csdx plugins:remove [PLUGIN]`

@@ -4035,7 +4061,7 @@ FLAGS
--reinstall Reinstall all plugins after uninstalling.
```

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

## `csdx plugins:uninstall [PLUGIN]`

@@ -4063,7 +4089,7 @@ EXAMPLES
$ csdx plugins:uninstall myplugin
```

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

## `csdx plugins:unlink [PLUGIN]`

@@ -4107,7 +4133,7 @@ DESCRIPTION
Update installed plugins.
```

_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.17/src/commands/plugins/update.ts)_
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.19/src/commands/plugins/update.ts)_

## `csdx tokens`

0 comments on commit ef6fc05

Please sign in to comment.