@contentstack/cli-cm-import- setup (中文(简体) )
Contack 的 CLI 插件导入堆栈中的内容 。 为了了解如何在Contack中出口和进口内容,请参考 移徙指南。 。 。 .
使用 csdx config:set:region 设置您的区域。 运行 csdx config:set:region --help 用于现有区域.
使用量
$ npm install -g @contentstack/cli-cm-import-setup
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-import-setup/2.0.2 linux-x64 node-v22.23.3
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
...
图标
csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--module <value,value>]
帮助生成用于导入(覆盖)特定模块的映射器和备份文件夹
USAGE
$ csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--module <value,value>]
FLAGS
-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=<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.
--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
EXAMPLES
$ csdx cm:stacks:import-setup --stack-api-key <target_stack_api_key> --data-dir <path/of/export/destination/dir> --module <module_name, module_name> --branch <branch_name>