Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 0 additions & 12 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,12 +0,0 @@
fileignoreconfig:
- filename: package-lock.json
checksum: dbb4e0ec893dd445678e47864d3f3a0b14c3c0eff933fb50ef5ba6b300c1cba2
- filename: packages/contentstack-migration/test/unit/utils/map.test.js
checksum: 7d570280b2f379531dde84946b06171d50f92489ff0de6336f7fbd81c336ee89
- filename: packages/contentstack-migration/test/unit/modules/parser.test.js
checksum: 243fa1c45875675f719f660c0c988e2ba9266c562a37aaeb09b0db93a0cb037d
- filename: packages/contentstack-migration/test/unit/validators/create-content-type-validator.test.js
checksum: f92e39a542cd2d561c441d23395515cadc24c9514de55c3edb038f70bd2458b3
- filename: packages/contentstack-migration/test/unit/validators/edit-content-type-validator.test.js
checksum: bde4bc6b2a90e7ce5872e6fbbabef9f2db352705be4d2f8d28d71d84209a714e
version: '1.0'
59 changes: 0 additions & 59 deletions packages/contentstack-clone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,62 +38,6 @@ USAGE

<!-- commands -->
* [`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)
* [`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)

## `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]`

Clone data (structure/content or both) of a stack into another stack

```
USAGE
$ csdx cm:stack-clone 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]

FLAGS
-c, --config=<value> Path for the external configuration
-n, --stack-name=<value> Provide a name for the new stack to store the cloned content.
-y, --yes Force override all Marketplace prompts.
--destination-management-token-alias=<value> Destination management token alias.
--destination-stack-api-key=<value> Destination stack API key
--import-webhook-status=<option> [default: disable] [default: disable] (optional) The status of the
import webhook. <options: disable|current>
<options: disable|current>
--skip-audit (optional) Skips the audit fix that occurs during an import
operation.
--source-branch=<value> Branch of the source stack.
--source-branch-alias=<value> Alias of Branch of the source stack.
--source-management-token-alias=<value> Source management token alias.
--source-stack-api-key=<value> Source stack API key
--target-branch=<value> Branch of the target stack.
--target-branch-alias=<value> Alias of Branch of the target stack.
--type=<option> Type of data to clone. You can select option a or b.
a) Structure (all modules except entries & assets).
b) Structure with content (all modules including entries & assets).

<options: a|b>

DESCRIPTION
Clone data (structure/content or both) of a stack into another stack
Use this plugin to automate the process of cloning a stack in few steps.


ALIASES
$ csdx cm:stack-clone

EXAMPLES
$ csdx cm:stacks:clone

$ csdx cm:stacks:clone --source-branch <source-branch-name> --target-branch <target-branch-name> --yes

$ csdx cm:stacks:clone --source-stack-api-key <apiKey> --destination-stack-api-key <apiKey>

$ csdx cm:stacks:clone --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>

$ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias>

$ csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias> --type <value a or b>
```

## `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]`

Expand Down Expand Up @@ -133,9 +77,6 @@ DESCRIPTION
Use this plugin to automate the process of cloning a stack in few steps.


ALIASES
$ csdx cm:stack-clone

EXAMPLES
$ csdx cm:stacks:clone

Expand Down
14 changes: 6 additions & 8 deletions packages/contentstack-clone/src/commands/cm/stacks/clone.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class StackCloneCommand extends Command {
if (targetStackBranch) {
config.targetStackBranch = targetStackBranch;
}
if (targetStackBranchAlias) {
if (targetStackBranchAlias) {
config.targetStackBranchAlias = targetStackBranchAlias;
}
if (sourceStackApiKey) {
Expand Down Expand Up @@ -124,8 +124,6 @@ class StackCloneCommand extends Command {
}
}



async removeContentDirIfNotEmptyBeforeClone(dir) {
try {
const dirNotEmpty = readdirSync(dir).length;
Expand Down Expand Up @@ -206,32 +204,32 @@ StackCloneCommand.examples = [
'csdx cm:stacks:clone --source-branch --target-branch --source-management-token-alias <management token alias> --destination-management-token-alias <management token alias> --type <value a or b>',
];

StackCloneCommand.aliases = ['cm:stack-clone'];
StackCloneCommand.aliases = [];

StackCloneCommand.flags = {
'source-branch': flags.string({
required: false,
multiple: false,
description: 'Branch of the source stack.',
exclusive: ['source-branch-alias']
exclusive: ['source-branch-alias'],
}),
'source-branch-alias': flags.string({
required: false,
multiple: false,
description: 'Alias of Branch of the source stack.',
exclusive: ['source-branch']
exclusive: ['source-branch'],
}),
'target-branch': flags.string({
required: false,
multiple: false,
description: 'Branch of the target stack.',
exclusive: ['target-branch-alias']
exclusive: ['target-branch-alias'],
}),
'target-branch-alias': flags.string({
required: false,
multiple: false,
description: 'Alias of Branch of the target stack.',
exclusive: ['target-branch']
exclusive: ['target-branch'],
}),
'source-management-token-alias': flags.string({
required: false,
Expand Down
41 changes: 0 additions & 41 deletions packages/contentstack-import-setup/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -59,44 +59,6 @@ USAGE

<!-- commands -->
* [`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)

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

Helps to generate mappers and backup folder for importing (overwriting) specific modules

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

FLAGS
-B, --branch=<value> 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.
-a, --alias=<value> The management token of the destination stack where you will import the content.
-d, --data-dir=<value> 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"
-k, --stack-api-key=<value> API key of the target stack
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
content is imported into the main branch by default.
--module=<option>... [optional] Specify the modules/module to import into the target stack. currently options
are global-fields, content-types, entries
<options: global-fields|content-types|entries>

DESCRIPTION
Helps to generate mappers and backup folder for importing (overwriting) specific modules

ALIASES
$ csdx cm:import-setup

EXAMPLES
$ csdx cm:stacks:import-setup --stack-api-key <target_stack_api_key> --data-dir <path/of/export/destination/dir> --modules <module_name, module_name>

$ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name>

$ csdx cm:stacks:import-setup -k <target_stack_api_key> -d <path/of/export/destination/dir> --modules <module_name, module_name> -b <branch_name>
```

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

Expand Down Expand Up @@ -124,9 +86,6 @@ FLAGS
DESCRIPTION
Helps to generate mappers and backup folder for importing (overwriting) specific modules

ALIASES
$ csdx cm:import-setup

EXAMPLES
$ 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 Down
65 changes: 0 additions & 65 deletions packages/contentstack-migrate-rte/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@ USAGE

<!-- commands -->
* [`csdx cm:entries:migrate-html-rte`](#csdx-cmentriesmigrate-html-rte)
* [`csdx cm:migrate-rte`](#csdx-cmmigrate-rte)

## `csdx cm:entries:migrate-html-rte`

Expand Down Expand Up @@ -60,9 +59,6 @@ FLAGS
DESCRIPTION
Migration script to migrate content from HTML RTE to JSON RTE

ALIASES
$ csdx cm:migrate-rte

EXAMPLES
General Usage

Expand Down Expand Up @@ -92,65 +88,4 @@ EXAMPLES
```

_See code: [src/commands/cm/entries/migrate-html-rte.js](https://github.com/contentstack/cli/blob/main/packages/contentstack-migrate-rte/src/commands/cm/entries/migrate-html-rte.js)_

## `csdx cm:migrate-rte`

Migration script to migrate content from HTML RTE to JSON RTE

```
USAGE
$ csdx cm:migrate-rte [-c <value>] [-a <value>] [--stack-api-key <value>] [--content-type <value>]
[--global-field] [-y] [--branch <value>] [--html-path <value> --json-path <value>] [--delay <value>] [--locale
<value>] [--batch-limit <value>]

FLAGS
-a, --alias=<value> Enter the alias name. You must use either the --alias flag or the --stack-api-key flag.
-c, --config-path=<value> Specify the path where your config file is located.
-y, --yes Avoids reconfirmation of your configuration.
--batch-limit=<value> [default: 50] Provide batch limit for updating entries (default: 50).
--branch=<value> The name of the branch to be used.
--content-type=<value> Specify the UID of the content type for which you want to migrate HTML RTE content.
--delay=<value> [default: 1000] To set the interval time between the migration of HTML RTE to JSON RTE in
subsequent entries of a content type. The default value is 1,000 milliseconds.
--global-field Checks whether the specified UID belongs to a content type or a global field. This flag
is set to false by default.
--html-path=<value> Enter the path to the HTML RTE whose content you want to migrate.
--json-path=<value> Enter the path to the JSON RTE to which you want to migrate the HTML RTE content.
--locale=<value> The locale from which entries will be migrated.
--stack-api-key=<value> API key of the source stack. You must use either the --stack-api-key flag or the --alias
flag.

DESCRIPTION
Migration script to migrate content from HTML RTE to JSON RTE

ALIASES
$ csdx cm:migrate-rte

EXAMPLES
General Usage

$ csdx cm:entries:migrate-html-rte --config-path path/to/config.json



Using Flags

$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path html-path --json-path json-path



Nested RTE

$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path modular_block_uid.block_uid.html_rte_uid --json-path modular_block_uid.block_uid.json_rte_uid



$ csdx cm:entries:migrate-html-rte --alias alias --content-type content_type_uid --html-path group_uid.html_rte_uid --json-path group_uid.json_rte_uid



Global Field

$ csdx cm:entries:migrate-html-rte --alias alias --content-type global_field_uid --global-field --html-path html-path --json-path json-path
```
<!-- commandsstop -->
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,6 @@ JsonMigrationCommand.examples = [
'csdx cm:entries:migrate-html-rte --alias alias --content-type global_field_uid --global-field --html-path html-path --json-path json-path',
];

JsonMigrationCommand.aliases = ['cm:migrate-rte'];
JsonMigrationCommand.aliases = [];

module.exports = JsonMigrationCommand;
47 changes: 0 additions & 47 deletions packages/contentstack-migration/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,50 +33,6 @@ USAGE

<!-- commands -->
* [`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: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:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`

Contentstack migration script.

```
USAGE
$ csdx cm:migration cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>]
[--config-file <value>] [--config <value>] [--multiple]

FLAGS
-a, --alias=<value> Use this flag to add the management token alias. You must use either the --alias flag or
the --stack-api-key flag.
-k, --stack-api-key=<value> Use this flag to add the API key of your stack. You must use either the --stack-api-key
flag or the --alias flag.
--branch=<value> Use this flag to add the branch name where you want to perform the migration. (target
branch name)
--config=<value>... [optional] Inline configuration, <key1>:<value1>. Passing an external configuration makes
the script re-usable.
--config-file=<value> [optional] Path of the JSON configuration file.
--file-path=<value> Use this flag to provide the path of the file of the migration script.
--multiple This flag helps you to migrate multiple content files in a single instance. Mention the
folder path where your migration script files are stored.

DESCRIPTION
Contentstack migration script.

ALIASES
$ csdx cm:migration

EXAMPLES
$ csdx cm:migration --file-path <migration/script/file/path> --stack-api-key <stack-api-key>

$ csdx cm:migration --file-path <migration/script/file/path> --stack-api-key <stack-api-key> --branch <target branch name>

$ csdx cm:migration --config <key1>:<value1> <key2>:<value2> ... --file-path <migration/script/file/path>

$ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>

$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>

$ csdx cm:migration --alias <management-token-alias> --file-path <migration/script/file/path>
```

## `csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`

Expand Down Expand Up @@ -104,9 +60,6 @@ FLAGS
DESCRIPTION
Contentstack migration script.

ALIASES
$ csdx cm:migration

EXAMPLES
$ csdx cm:migration --file-path <migration/script/file/path> --stack-api-key <stack-api-key>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ MigrationCommand.flags = {
}),
};

MigrationCommand.aliases = ['cm:migration'];
MigrationCommand.aliases = [];

MigrationCommand.usage =
'cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]';
Expand Down
Loading
Loading