contensis-cli 1.5.1-beta.8 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,40 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.6.0](https://github.com/contensis/cli/compare/contensis-cli-v1.5.0...contensis-cli-v1.6.0) (2025-12-11)
4
+
5
+
6
+ ### Features
7
+
8
+ * `--dependents` option accepts a number to stop fetching entry dependencies at the specified depth in `get entries` ([209fe7d](https://github.com/contensis/cli/commit/209fe7d87acba1b5fc419a19179ca698e8993a64))
9
+ * add `--log-level` global option to increase logging verbosity in many commands ([8538b15](https://github.com/contensis/cli/commit/8538b15e0ed9a3524418416fa656876319d0a887))
10
+ * add `--no-validations` option to import models with all field validations removed ([0f9a4c0](https://github.com/contensis/cli/commit/0f9a4c03300f01de6ff441e271fe592b81105c16))
11
+ * add `--stop-level` option to stop resolving entry dependencies at the specified level in `import entries` ([4e0b9c6](https://github.com/contensis/cli/commit/4e0b9c6bf826503c9ed4a040c523092d8b3179b6))
12
+ * prune unreferenced dependencies from built entries with error status or where a field has not been mapped to a target entry in `import entries` ([6bbe628](https://github.com/contensis/cli/commit/6bbe628586d525447a8ad0a2fcc920cb159ee3cf))
13
+ * taxonomy fields excluded when importing models ([06fe2f6](https://github.com/contensis/cli/commit/06fe2f68c14c9c53da28ee4e486dd686f3482cd1))
14
+
15
+
16
+ ### Bug Fixes
17
+
18
+ * added field validation checks for entry, image and list fields when building entries for migration ([30f7235](https://github.com/contensis/cli/commit/30f72350645ad04ad5bd11f5ee8524619d2c6a95))
19
+ * asset uploads incompatible with Node.js native fetch ([b98e786](https://github.com/contensis/cli/commit/b98e786530973448d18e715bb4501a7943b01978))
20
+ * avoid 409 conflict errors when deleting nested components ([06fe2f6](https://github.com/contensis/cli/commit/06fe2f68c14c9c53da28ee4e486dd686f3482cd1))
21
+ * avoid duplicate error logging in import commands ([0ec27a5](https://github.com/contensis/cli/commit/0ec27a5d13f3e7179c9825480b19920028744e49))
22
+ * entries incorrectly being fetched from Delivery API causing tag fields to fail with `import entries` ([df38de5](https://github.com/contensis/cli/commit/df38de592c88e6a5e0940de1f1da10104e4f7df2))
23
+ * export dependency tags and tag groups along with dependency nodes when using `--save-entries` option with `import entries` ([0c8029d](https://github.com/contensis/cli/commit/0c8029d67fbb16c33c2b26119836c6461fa398f8))
24
+ * handle mix of entity types when importing data from JSON file so we can import entries containing nodes or import models containing default entries and tag groups ([621da46](https://github.com/contensis/cli/commit/621da4635539b0b141f20af43c9076cfae70e137))
25
+ * implement rate limiting when deleting entries ([06fe2f6](https://github.com/contensis/cli/commit/06fe2f68c14c9c53da28ee4e486dd686f3482cd1))
26
+ * import tag groups mixed with content models when using `--from-file` in `import models` ([bcd6c11](https://github.com/contensis/cli/commit/bcd6c11e4da1e0807156048f4088ddc73a0b0ac4))
27
+ * improve console output when importing entries with dependent tags ([84af771](https://github.com/contensis/cli/commit/84af7719a304fa9759f359c558396986ce8d668e))
28
+ * improve console output when there are no changes to make in `import tags` and `import entries` ([7a4ad75](https://github.com/contensis/cli/commit/7a4ad753b1acfa91fd43d203927500aee68f8efd))
29
+ * include tag groups in `list models` output ([759f8a2](https://github.com/contensis/cli/commit/759f8a24615e1c916c717e00f51c7c284e7fc9dd))
30
+ * null check console output with `import tags` and `import entries` ([58bf59f](https://github.com/contensis/cli/commit/58bf59f8a45e251109a58e86d8e5e7ad50a3a096))
31
+ * null check for `versionNo` when building entries fetched from the Delivery API in entries commands ([afa524b](https://github.com/contensis/cli/commit/afa524bd6e593fb7d2c2454cbd2a2c62f59b219d))
32
+ * resolve tags correctly when building entries with `copy field` and `update field` ([4ad5446](https://github.com/contensis/cli/commit/4ad5446f09006d2a497b4aeed908ec3f1a2ea177))
33
+ * supplying absolute file path when using `--output` option ([78e4e87](https://github.com/contensis/cli/commit/78e4e87254c916b916ed3837d6411456b439e238))
34
+ * unresolved tags no longer trigger an error when building entries in migration or copy commands ([f1dd397](https://github.com/contensis/cli/commit/f1dd39776e81be909970c46bdbd334c12135a0bb))
35
+ * use Contensis Image API when downloading assets from a source CMS ([06fe2f6](https://github.com/contensis/cli/commit/06fe2f68c14c9c53da28ee4e486dd686f3482cd1))
36
+ * use correct grammar in console output when migrating different content entites ([5726941](https://github.com/contensis/cli/commit/5726941959a0ea24ade785d9f13c77f7b1fc3d53))
37
+
3
38
  ## [1.5.0](https://github.com/contensis/cli/compare/contensis-cli-v1.4.1...contensis-cli-v1.5.0) (2025-09-09)
4
39
 
5
40
 
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  Use Contensis from your favourite terminal
4
4
 
5
+ - [Windows Terminal](https://github.com/microsoft/terminal?tab=readme-ov-file#installing-and-running-windows-terminal) is strongly recommended over classic PowerShell for Windows users
6
+
5
7
  Download the executable for your operating system from the [Releases page](https://github.com/contensis/cli/releases) and add it to a folder in your local `PATH`
6
8
 
7
9
  or use your preferred installation method below
@@ -40,12 +42,27 @@ brew install contensis-cli-linux
40
42
  Install the package via [`npm`](https://www.npmjs.com/package/contensis-cli) as a global module (requires [Node.js](https://nodejs.org/en/download/))
41
43
 
42
44
  ```shell
43
- npm i --global contensis-cli@prerelease
45
+ npm i --global contensis-cli
44
46
  ```
45
47
 
46
48
  If you use `nvm` and are frequently switching your local `node` version it will also switch your global `node_modules` each time, it is recommended use one of the binary installations instead.
47
49
 
48
- ## Install from source
50
+ ## Try out a prerelease version
51
+
52
+ You can check the change logs for any upcoming release, there will be an [open pull request](https://github.com/contensis/cli/pulls)
53
+
54
+ ### Executable from build Artifacts
55
+
56
+ - Click on the latest build pipeline from the [Actions page](https://github.com/contensis/cli/actions)
57
+ - At the bottom there will be Artifacts - download and unzip the correct version for your platform.
58
+ - Run the unzipped executable, you will need to bypass any security warnings or prompts you might encounter.
59
+
60
+ ### Prerelease version from NPM
61
+
62
+ - `npx contensis-cli@prerelease`
63
+ - Note: your local Node.js version must be a compatible version, today we recommend Node.js v22
64
+
65
+ ## Run from source
49
66
 
50
67
  Clone the [repository](https://github.com/contensis/cli) and follow the instructions in the [`README`](https://github.com/contensis/cli#readme)
51
68
 
@@ -1002,17 +1019,17 @@ website t.durden@example-dev> create tags in topics Books Faces History Places S
1002
1019
  -------------------------------------
1003
1020
  [cli] ✅ 🔍 IMPORT PREVIEW 🔭
1004
1021
  [25/06 16:41:41] [INFO] Fetching tags in all groups from target environment example-dev website
1005
-
1006
- No tag group to migrate into website
1007
1022
 
1008
- status total
1023
+ No tag group to migrate into website
1024
+
1025
+ status total
1009
1026
  -----------------------
1010
1027
  no change 1
1011
1028
  -----------------------
1012
1029
 
1013
- No tags to migrate into website
1030
+ No tags to migrate into website
1014
1031
 
1015
- status total
1032
+ status total
1016
1033
  -----------------------
1017
1034
  no change 5
1018
1035
  -----------------------
@@ -1055,7 +1072,7 @@ website t.durden@example-dev> remove tags 109eb3e9-98c9-5ab2-b9df-f1c80af3ac5c d
1055
1072
 
1056
1073
  [cli] ⏩ Add --commit flag to commit the previewed changes
1057
1074
 
1058
- website t.durden@example-dev>
1075
+ website t.durden@example-dev>
1059
1076
  ```
1060
1077
 
1061
1078
  ### Remove tags in group
@@ -1837,6 +1854,7 @@ The output will be the same as the `import models` examples above
1837
1854
  <sup><sub>Add the `--commit` option to make the changes, be very careful using this! There is no going back</sub></sup>
1838
1855
 
1839
1856
  ## Import tags and groups
1857
+
1840
1858
  ### Import from another Contensis environment
1841
1859
 
1842
1860
  Connect to your "source" environment, ensure you can fetch the tags from this environment first and that these are the right tags you plan on importing to your "target" environment.
@@ -1853,36 +1871,36 @@ website t.durden@example-dev> import tags --source-alias example-dev --source-pr
1853
1871
  [cli] ✅ 🔍 IMPORT PREVIEW 🔭
1854
1872
  [25/06 15:26:37] [INFO] Fetching tags in all groups from example-dev leif
1855
1873
  [25/06 15:26:37] [INFO] Fetching tags in all groups from target environment example-dev website
1856
-
1857
- 1/2 tag groups to migrate into website
1858
1874
 
1859
- status total
1875
+ 1/2 tag groups to migrate into website
1876
+
1877
+ status total
1860
1878
  -----------------------
1861
1879
  create 1
1862
1880
  no change 1
1863
1881
  -----------------------
1864
1882
 
1865
- id status name description
1883
+ id status name description
1866
1884
  ------------------------------------------------------------------------------------------------
1867
1885
  newGroup create New group
1868
1886
  ------------------------------------------------------------------------------------------------
1869
1887
 
1870
-
1871
- 5/7 tags to migrate into website
1872
1888
 
1873
- status total
1889
+ 5/7 tags to migrate into website
1890
+
1891
+ status total
1874
1892
  -----------------------
1875
1893
  create 5
1876
1894
  no change 2
1877
1895
  -----------------------
1878
1896
 
1879
- id value status groupId label
1897
+ id value status groupId label
1880
1898
  ------------------------------------------------------------------------------------------------
1881
- 02bcb977-1196-4c3f-a921-d2dfce3ca32b new1 create newGroup {"en-GB":"New 1"}
1882
- f48eb862-7b73-4a77-a2af-09492a88a8f0 new2 create newGroup {"en-GB":"New 2"}
1883
- 8673e419-55c9-4ba0-bcd7-28c7c6fa46cc new3 create newGroup {"en-GB":"New 3"}
1884
- 90a11d09-3727-45c2-a0df-86f1865828ab tag3 create newGroup {"en-GB":"Tag 3"}
1885
- d4267b35-0d25-41ae-bce9-eeb490c793f4 tag3 create resourcesTagGroup {"en-GB":"Tag 3"}
1899
+ 02bcb977-1196-4c3f-a921-d2dfce3ca32b new1 create newGroup {"en-GB":"New 1"}
1900
+ f48eb862-7b73-4a77-a2af-09492a88a8f0 new2 create newGroup {"en-GB":"New 2"}
1901
+ 8673e419-55c9-4ba0-bcd7-28c7c6fa46cc new3 create newGroup {"en-GB":"New 3"}
1902
+ 90a11d09-3727-45c2-a0df-86f1865828ab tag3 create newGroup {"en-GB":"Tag 3"}
1903
+ d4267b35-0d25-41ae-bce9-eeb490c793f4 tag3 create resourcesTagGroup {"en-GB":"Tag 3"}
1886
1904
  ------------------------------------------------------------------------------------------------
1887
1905
 
1888
1906
  [25/06 15:26:38] [OK] Tags migration preview ready
@@ -1901,9 +1919,11 @@ Import resources directly from a JSON file. The path can be relative or absolute
1901
1919
  ```shell
1902
1920
  website t.durden@example-dev> import tags --from-file ./tags.json
1903
1921
  ```
1922
+
1904
1923
  ```shell
1905
1924
  website t.durden@example-dev> import taggroups --from-file ./taggroups.json
1906
1925
  ```
1926
+
1907
1927
  ```shell
1908
1928
  website t.durden@example-dev> import tags --from-file ./tags-and-groups.json
1909
1929
  ```
package/cli.js CHANGED
@@ -16,6 +16,26 @@ if (!globalThis.crypto) {
16
16
  globalThis.crypto = crypto.webcrypto;
17
17
  }
18
18
 
19
+ /** enterprise-fetch v2 uses the native node fetch if available which
20
+ * does not work with Management API file uploads correctly,
21
+ * so we force it to fallback to use the older `node-fetch` implementation
22
+ * which the Management API is deisgned to work with.
23
+ * Native fetch shows this when uploading an asset:
24
+
25
+ content-length: 17
26
+
27
+ [object FormData]
28
+ * where node-fetch show this
29
+ Content-Length: 53427
30
+
31
+ ----------------------------220769149404052112875897
32
+ Content-Disposition: form-data; name="file"; filename="default-meta1.jpg"
33
+ Content-Type: image/jpeg
34
+
35
+ ...binary data...
36
+ */
37
+ globalThis.fallbackFetch = true;
38
+
19
39
  /**
20
40
  * Run cli command or launch shell
21
41
  */
@@ -78,6 +78,8 @@ const mapContensisOpts = (opts = {}) => ({
78
78
  // arg is inverted automatically from `--no-cache` to `cache: false`
79
79
  includeDefaults: opts.defaults,
80
80
  // arg is inverted automatically from `--no-defaults` to `defaults: false`
81
+ includeValidations: opts.validations,
82
+ // arg is inverted automatically from `--no-validations` to `validations: false`
81
83
  concurrency: opts.concurrency ? Number(opts.concurrency) : void 0,
82
84
  noPublish: !opts.publish,
83
85
  // arg is inverted automatically from `--no-publish` to `publish: false`
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/globalOptions.ts"],
4
- "sourcesContent": ["import { Command, Option } from 'commander';\nimport { MigrateRequest } from 'migratortron';\nimport { url } from '~/util';\n\n// Map various input options into a request to be processed\n// by Migratortron / Contensis import library\nexport const mapContensisOpts = (opts: any = {}): MigrateRequest => ({\n source:\n opts.sourceAlias || opts.sourceProjectId\n ? {\n url: opts.sourceAlias\n ? url(opts.sourceAlias, 'website').cms\n : (undefined as any),\n project: opts.sourceProjectId || (undefined as any),\n }\n : undefined,\n models: opts.modelIds,\n copyField: opts.copyField,\n updateField: opts.updateField,\n // convert various cli options into MigrateRequest.query format\n query:\n opts.id ||\n opts.entryIds ||\n opts.search ||\n opts.fields ||\n opts.orderBy ||\n opts.paths ||\n opts.assetType ||\n opts.contentType ||\n opts.dataFormat ||\n opts.deliveryApi ||\n opts.latest ||\n opts.versionStatus\n ? {\n assetTypes: opts.assetType,\n contentTypeIds: opts.contentType,\n dataFormats: opts.dataFormat ? [opts.dataFormat] : undefined,\n fields: opts.fields,\n includeIds: opts.id || opts.entryIds,\n includePaths: opts.paths,\n orderBy: opts.orderBy,\n searchTerm: opts.search,\n useDelivery: opts.deliveryApi,\n versionStatus: opts.latest ? 'latest' : opts.versionStatus,\n }\n : undefined,\n zenQL: opts.zenql,\n transformGuids: !opts.preserveGuids,\n ignoreErrors: opts.ignoreErrors,\n noCache: !opts.cache, // arg is inverted automatically from `--no-cache` to `cache: false`\n includeDefaults: opts.defaults, // arg is inverted automatically from `--no-defaults` to `defaults: false`\n concurrency: opts.concurrency ? Number(opts.concurrency) : undefined,\n noPublish: !opts.publish, // arg is inverted automatically from `--no-publish` to `publish: false`\n outputLogs: opts.logLevel,\n stopLevel:\n typeof opts.stopLevel === 'number'\n ? Number(opts.stopLevel)\n : typeof opts.dependents === 'number'\n ? Number(opts.dependents)\n : undefined,\n});\n\n/* Output options */\nconst output = new Option(\n '-o --output <output>',\n 'save output to a file e.g. --output ./output.txt'\n);\n\nconst format = new Option(\n '-f --format <format>',\n 'format output as csv, json, html, xml or default'\n).choices(['csv', 'json', 'html', 'xml', 'table']);\n\n/* Connect options */\nconst alias = new Option(\n '-a --alias <alias>',\n 'the cloud CMS alias to connect your request with'\n);\n\nexport const project = new Option(\n '-p --project-id <projectId>',\n 'the projectId to make your request with'\n);\n\n/* Authentication options */\nconst user = new Option(\n '-u --user <user>',\n 'the username to authenticate your request with'\n);\nconst password = new Option(\n '-pw --password <password>',\n 'the password to use to login with (optional/insecure)'\n);\nconst clientId = new Option(\n '-id --client-id <clientId>',\n 'the clientId to authenticate your request with'\n);\nconst sharedSecret = new Option(\n '-s --shared-secret <sharedSecret>',\n 'the shared secret to use when logging in with a client id'\n);\n\n/* Model get options */\nexport const requiredBy = new Option(\n '--required-by',\n 'shows the id(s) that created each dependency'\n);\nexport const exportOption = new Option(\n '--export',\n 'export the raw resources that make up the content model(s) (used with --output)'\n);\n\n/* Entry get options */\nexport const delivery = new Option(\n '-delivery --delivery-api',\n 'use delivery api to get the entries'\n);\nexport const search = new Option(\n '--search <phrase>',\n 'get entries with the search phrase, use quotes for multiple words'\n);\nexport const zenql = new Option(\n '-q --zenql <zenql>',\n 'get entries with a supplied ZenQL statement'\n);\n\nexport const entryId = new Option('-i --id <id...>', 'the entry id(s) to get');\nexport const contentTypes = new Option(\n '-c --content-type <contentType...>',\n 'get entries of these content type(s)'\n);\nexport const assetTypes = new Option(\n '-at --asset-type <assetType...>',\n 'get assets of given content type(s) e.g. image word pdf'\n);\nexport const versionStatus = new Option(\n '-vs --version-status <versionStatus>',\n 'the entry versions to get'\n)\n .choices(['latest', 'published'])\n .default('published');\n\nexport const latest = new Option('--latest', 'get the latest entry versions');\n\n/* Import options */\nexport const fromFile = new Option(\n '-file --from-file <fromFile>',\n 'file path to import asset(s) from'\n);\n\nexport const fromCms = new Option(\n '-source --source-alias <fromCms>',\n 'the cloud CMS alias to import asset(s) from'\n);\nexport const fromProject = new Option(\n '-sp --source-project-id <fromProject>',\n 'the id of the Contensis project to import asset(s) from (Default: [last connected project])'\n);\n\nexport const commit = new Option(\n '--commit',\n 'add this flag only after you have run a preview of the import and agree with the analysis'\n).default(false);\n\nexport const ignoreErrors = new Option(\n '-ignore --ignore-errors',\n 'commit the import ignoring any reported errors'\n).default(false);\n\nexport const logLevel = new Option(\n '-ll --log-level <logLevel>',\n 'set the logging level to output more detailed logs'\n)\n .choices(['debug', 'info', 'warning', 'error', 'none'])\n .default('warning');\n\nexport const outputDetail = new Option(\n '-od --output-detail <outputDetail>',\n 'how much detail to output from the import'\n)\n .choices(['errors', 'changes', 'all'])\n .default('errors');\n\nexport const saveEntries = new Option(\n '-save --save-entries',\n \"save the entries we're migrating instead of the migration preview (used with --output)\"\n);\n\nexport const concurrency = new Option(\n '-conc --concurrency <concurrency>',\n 'the number of entries to load in parallel'\n).default(2);\n\nexport const noCache = new Option(\n '--no-cache',\n 'ignore internal cache and rebuild all resources from scratch'\n);\n\nexport const noPublish = new Option(\n '--no-publish',\n \"don't publish created or updated entries\"\n);\n\nexport const stopLevel = new Option(\n '-d --stop-level <stopLevel>',\n 'the level at which to stop resolving dependent entries (may result in incomplete entries)'\n).argParser(parseInt);\n\nexport const addConnectOptions = (program: Command) =>\n program.addOption(alias.hideHelp()).addOption(project.hideHelp());\n\nexport const addAuthenticationOptions = (program: Command) =>\n program\n .addOption(user.hideHelp())\n .addOption(password.hideHelp())\n .addOption(clientId.hideHelp())\n .addOption(sharedSecret.hideHelp());\n\nconst addOutputAndFormatOptions = (program: Command) =>\n program.addOption(output).addOption(format);\n\nexport const addImportOptions = (program: Command) => {\n for (const command of program.commands) {\n command.addOption(fromCms).addOption(fromProject).addOption(fromFile);\n }\n return program;\n};\n\nexport const addGlobalOptions = (program: Command) => {\n for (const command of program.commands) {\n command.addOption(logLevel.hideHelp());\n addOutputAndFormatOptions(command);\n addConnectOptions(command);\n addAuthenticationOptions(command);\n }\n return program;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uB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AACT;",
4
+ "sourcesContent": ["import { Command, Option } from 'commander';\nimport { MigrateRequest } from 'migratortron';\nimport { url } from '~/util';\n\n// Map various input options into a request to be processed\n// by Migratortron / Contensis import library\nexport const mapContensisOpts = (opts: any = {}): MigrateRequest => ({\n source:\n opts.sourceAlias || opts.sourceProjectId\n ? {\n url: opts.sourceAlias\n ? url(opts.sourceAlias, 'website').cms\n : (undefined as any),\n project: opts.sourceProjectId || (undefined as any),\n }\n : undefined,\n models: opts.modelIds,\n copyField: opts.copyField,\n updateField: opts.updateField,\n // convert various cli options into MigrateRequest.query format\n query:\n opts.id ||\n opts.entryIds ||\n opts.search ||\n opts.fields ||\n opts.orderBy ||\n opts.paths ||\n opts.assetType ||\n opts.contentType ||\n opts.dataFormat ||\n opts.deliveryApi ||\n opts.latest ||\n opts.versionStatus\n ? {\n assetTypes: opts.assetType,\n contentTypeIds: opts.contentType,\n dataFormats: opts.dataFormat ? [opts.dataFormat] : undefined,\n fields: opts.fields,\n includeIds: opts.id || opts.entryIds,\n includePaths: opts.paths,\n orderBy: opts.orderBy,\n searchTerm: opts.search,\n useDelivery: opts.deliveryApi,\n versionStatus: opts.latest ? 'latest' : opts.versionStatus,\n }\n : undefined,\n zenQL: opts.zenql,\n transformGuids: !opts.preserveGuids,\n ignoreErrors: opts.ignoreErrors,\n noCache: !opts.cache, // arg is inverted automatically from `--no-cache` to `cache: false`\n includeDefaults: opts.defaults, // arg is inverted automatically from `--no-defaults` to `defaults: false`\n includeValidations: opts.validations, // arg is inverted automatically from `--no-validations` to `validations: false`\n concurrency: opts.concurrency ? Number(opts.concurrency) : undefined,\n noPublish: !opts.publish, // arg is inverted automatically from `--no-publish` to `publish: false`\n outputLogs: opts.logLevel,\n stopLevel:\n typeof opts.stopLevel === 'number'\n ? Number(opts.stopLevel)\n : typeof opts.dependents === 'number'\n ? Number(opts.dependents)\n : undefined,\n});\n\n/* Output options */\nconst output = new Option(\n '-o --output <output>',\n 'save output to a file e.g. --output ./output.txt'\n);\n\nconst format = new Option(\n '-f --format <format>',\n 'format output as csv, json, html, xml or default'\n).choices(['csv', 'json', 'html', 'xml', 'table']);\n\n/* Connect options */\nconst alias = new Option(\n '-a --alias <alias>',\n 'the cloud CMS alias to connect your request with'\n);\n\nexport const project = new Option(\n '-p --project-id <projectId>',\n 'the projectId to make your request with'\n);\n\n/* Authentication options */\nconst user = new Option(\n '-u --user <user>',\n 'the username to authenticate your request with'\n);\nconst password = new Option(\n '-pw --password <password>',\n 'the password to use to login with (optional/insecure)'\n);\nconst clientId = new Option(\n '-id --client-id <clientId>',\n 'the clientId to authenticate your request with'\n);\nconst sharedSecret = new Option(\n '-s --shared-secret <sharedSecret>',\n 'the shared secret to use when logging in with a client id'\n);\n\n/* Model get options */\nexport const requiredBy = new Option(\n '--required-by',\n 'shows the id(s) that created each dependency'\n);\nexport const exportOption = new Option(\n '--export',\n 'export the raw resources that make up the content model(s) (used with --output)'\n);\n\n/* Entry get options */\nexport const delivery = new Option(\n '-delivery --delivery-api',\n 'use delivery api to get the entries'\n);\nexport const search = new Option(\n '--search <phrase>',\n 'get entries with the search phrase, use quotes for multiple words'\n);\nexport const zenql = new Option(\n '-q --zenql <zenql>',\n 'get entries with a supplied ZenQL statement'\n);\n\nexport const entryId = new Option('-i --id <id...>', 'the entry id(s) to get');\nexport const contentTypes = new Option(\n '-c --content-type <contentType...>',\n 'get entries of these content type(s)'\n);\nexport const assetTypes = new Option(\n '-at --asset-type <assetType...>',\n 'get assets of given content type(s) e.g. image word pdf'\n);\nexport const versionStatus = new Option(\n '-vs --version-status <versionStatus>',\n 'the entry versions to get'\n)\n .choices(['latest', 'published'])\n .default('published');\n\nexport const latest = new Option('--latest', 'get the latest entry versions');\n\n/* Import options */\nexport const fromFile = new Option(\n '-file --from-file <fromFile>',\n 'file path to import asset(s) from'\n);\n\nexport const fromCms = new Option(\n '-source --source-alias <fromCms>',\n 'the cloud CMS alias to import asset(s) from'\n);\nexport const fromProject = new Option(\n '-sp --source-project-id <fromProject>',\n 'the id of the Contensis project to import asset(s) from (Default: [last connected project])'\n);\n\nexport const commit = new Option(\n '--commit',\n 'add this flag only after you have run a preview of the import and agree with the analysis'\n).default(false);\n\nexport const ignoreErrors = new Option(\n '-ignore --ignore-errors',\n 'commit the import ignoring any reported errors'\n).default(false);\n\nexport const logLevel = new Option(\n '-ll --log-level <logLevel>',\n 'set the logging level to output more detailed logs'\n)\n .choices(['debug', 'info', 'warning', 'error', 'none'])\n .default('warning');\n\nexport const outputDetail = new Option(\n '-od --output-detail <outputDetail>',\n 'how much detail to output from the import'\n)\n .choices(['errors', 'changes', 'all'])\n .default('errors');\n\nexport const saveEntries = new Option(\n '-save --save-entries',\n \"save the entries we're migrating instead of the migration preview (used with --output)\"\n);\n\nexport const concurrency = new Option(\n '-conc --concurrency <concurrency>',\n 'the number of entries to load in parallel'\n).default(2);\n\nexport const noCache = new Option(\n '--no-cache',\n 'ignore internal cache and rebuild all resources from scratch'\n);\n\nexport const noPublish = new Option(\n '--no-publish',\n \"don't publish created or updated entries\"\n);\n\nexport const stopLevel = new Option(\n '-d --stop-level <stopLevel>',\n 'the level at which to stop resolving dependent entries (may result in incomplete entries)'\n).argParser(parseInt);\n\nexport const addConnectOptions = (program: Command) =>\n program.addOption(alias.hideHelp()).addOption(project.hideHelp());\n\nexport const addAuthenticationOptions = (program: Command) =>\n program\n .addOption(user.hideHelp())\n .addOption(password.hideHelp())\n .addOption(clientId.hideHelp())\n .addOption(sharedSecret.hideHelp());\n\nconst addOutputAndFormatOptions = (program: Command) =>\n program.addOption(output).addOption(format);\n\nexport const addImportOptions = (program: Command) => {\n for (const command of program.commands) {\n command.addOption(fromCms).addOption(fromProject).addOption(fromFile);\n }\n return program;\n};\n\nexport const addGlobalOptions = (program: Command) => {\n for (const command of program.commands) {\n command.addOption(logLevel.hideHelp());\n addOutputAndFormatOptions(command);\n addConnectOptions(command);\n addAuthenticationOptions(command);\n }\n return program;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;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W,EAAE,UAAU,QAAQ;AAAA,EACtE;AACA,SAAO;AACT;AAEO,MAAM,mBAAmB,CAAC,YAAqB;AACpD,aAAW,WAAW,QAAQ,UAAU;AACtC,YAAQ,UAAU,SAAS,SAAS,CAAC;AACrC,8BAA0B,OAAO;AACjC,sBAAkB,OAAO;AACzB,6BAAyB,OAAO;AAAA,EAClC;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -31,6 +31,9 @@ const makeImportCommand = () => {
31
31
  program.command("models").description("import complete content models").argument("[modelIds...]", "ids of the content models to import (optional)").addOption(import_globalOptions.noCache).addOption(import_globalOptions.commit).option(
32
32
  "-nod --no-defaults",
33
33
  "ignore any default entries or nodes attached to content types or fields"
34
+ ).option(
35
+ "-nov --no-validations",
36
+ "import fields with validations removed"
34
37
  ).option(
35
38
  "-preserve --preserve-guids",
36
39
  "import any default entries or nodes using the same id as the source"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/import.ts"],
4
- "sourcesContent": ["import { Command, Option } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport {\n assetTypes,\n commit,\n concurrency,\n contentTypes,\n entryId,\n ignoreErrors,\n latest,\n mapContensisOpts,\n noCache,\n noPublish,\n outputDetail,\n saveEntries,\n stopLevel,\n versionStatus,\n zenql,\n} from './globalOptions';\n\nexport const makeImportCommand = () => {\n const program = new Command()\n .command('import')\n .description('import command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n program\n .command('models')\n .description('import complete content models')\n .argument('[modelIds...]', 'ids of the content models to import (optional)')\n .addOption(noCache)\n .addOption(commit)\n .option(\n '-nod --no-defaults',\n 'ignore any default entries or nodes attached to content types or fields'\n )\n .option(\n '-preserve --preserve-guids',\n 'import any default entries or nodes using the same id as the source'\n )\n .addOption(ignoreErrors)\n .addHelpText(\n 'after',\n `\nExample call:\n > import models blogPost --from-file contentmodels-backup.json\n > import models --source-alias example-dev\n`\n )\n .action(async (modelIds: string[], opts) => {\n await cliCommand(\n ['import', 'models', modelIds.join(' ')],\n opts,\n mapContensisOpts({ modelIds, ...opts })\n ).ImportContentModels({\n fromFile: opts.fromFile,\n commit: opts.commit,\n });\n });\n\n program\n .command('contenttypes')\n .description('import content types')\n .argument(\n '[contentTypeIds...]',\n 'Optional list of API id(s) of the content type(s) to import'\n )\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > import contenttypes {contentTypeIds} --from-file contenttypes-backup.json\n > import contenttypes {contentTypeIds} --source-alias example-dev\n`\n )\n .action(async (contentTypeIds: string[], opts) => {\n await cliCommand(\n ['import', 'contenttypes'],\n opts,\n mapContensisOpts({ contentTypeIds, ...opts })\n ).ImportContentTypes(\n {\n fromFile: opts.fromFile,\n commit: opts.commit,\n },\n contentTypeIds\n );\n });\n\n program\n .command('components')\n .description('import components')\n .argument(\n '[componentIds...]',\n 'Optional list of API id(s) of the component(s) to import'\n )\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > import components {componentIds} --from-file component-backup.json\n > import components {componentIds} --source-alias example-dev\n`\n )\n .action(async (componentIds: string[], opts) => {\n await cliCommand(\n ['import', 'component'],\n opts,\n mapContensisOpts({ componentIds, ...opts })\n ).ImportComponents(\n {\n fromFile: opts.fromFile,\n commit: opts.commit,\n },\n componentIds\n );\n });\n\n program\n .command('entries')\n .description('import entries')\n .argument(\n '[search phrase]',\n 'get entries with the search phrase, use quotes for multiple words'\n )\n .addOption(entryId)\n .addOption(zenql)\n .addOption(contentTypes)\n .addOption(assetTypes)\n .addOption(latest)\n .addOption(versionStatus)\n .addOption(stopLevel)\n .addOption(commit)\n .option(\n '-preserve --preserve-guids',\n 'include this flag when you are importing entries that you have previously exported and wish to update'\n )\n .addOption(concurrency)\n .addOption(outputDetail)\n .addOption(ignoreErrors)\n .addOption(noCache)\n .addOption(noPublish)\n .addOption(saveEntries)\n .addHelpText(\n 'after',\n `\nExample call:\n > import entries --source-cms example-dev --source-project-id microsite --zenql \"sys.contentTypeId = blog\"\n > import entries --from-file myImportData.json --preserve-guids\n`\n )\n .action(async (search: string, opts, cmd) => {\n await cliCommand(\n ['import', 'entries'],\n opts,\n mapContensisOpts({ search, ...opts })\n ).ImportEntries({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputDetail,\n saveEntries: opts.saveEntries,\n });\n });\n\n // TODO: add options to import one an array of nodes? nodeIds: string[]\n program\n .command('nodes')\n .description('import nodes')\n .argument('[root]', 'import nodes from the specified path e.g. /blog', '/')\n .option(\n '-preserve --preserve-guids',\n 'include this flag when you are importing nodes that you have previously exported and wish to update'\n )\n .addOption(ignoreErrors)\n .addOption(commit)\n .addOption(\n new Option(\n '-od --output-detail <outputDetail>',\n 'how much detail to output from the import'\n )\n .choices(['errors', 'changes', 'all'])\n .default('errors')\n )\n .option(\n '-ol --output-limit <outputLimit>',\n 'expand or limit the number of records output to the console',\n '200'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > import nodes /blog --source-alias example-alias --source-project-id example-project\n > import nodes --from-file site-backup.json --preserve-guids\n`\n )\n .action(async (root: string, opts) => {\n await cliCommand(\n ['import', 'nodes'],\n opts,\n mapContensisOpts({ paths: root.split(' '), ...opts })\n ).ImportNodes({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputDetail,\n logLimit: Number(opts.outputLimit),\n });\n });\n\n program\n .command('taggroups')\n .description('import taggroups')\n .argument('[query]', 'apply a filter')\n .option('-i --id <ids...>', 'limit to the supplied tag group id(s)')\n .addOption(commit)\n .option(\n '-preserve --preserve-guids',\n 'include this flag when you are importing tags that you have previously exported and wish to update'\n )\n .addOption(concurrency)\n .addOption(ignoreErrors)\n .option(\n '--save',\n \"save the tag groups we're migrating instead of the migration preview (used with --output)\"\n )\n .addHelpText(\n 'after',\n `\n Example call:\n > import taggroups --source-cms example-dev --source-project-id microsite --zenql \"sys.contentTypeId = blog\"\n > import taggroups --from-file myImportData.json --preserve-guids\n `\n )\n .action(async (query: string, opts) => {\n await cliCommand(\n ['import', 'taggroups'],\n opts,\n mapContensisOpts(opts)\n ).ImportTagGroups({\n commit: opts.commit,\n fromFile: opts.fromFile,\n getBy: {\n id: opts.id?.length === 1 ? opts.id[0] : undefined,\n ids: opts.id?.length > 1 ? opts.id : undefined,\n q: query,\n },\n save: opts.save,\n });\n });\n\n program\n .command('tags')\n .description('import tags')\n .option('-in --group <groupId>', 'id of the tag group containing tags')\n .option('--label <label>', 'filter by tags that match this label')\n .option('-l --language <language>', 'find tags in the supplied language')\n .option('-i --id <ids...>', 'limit to the supplied tag group id(s)')\n .addOption(commit)\n .option(\n '-preserve --preserve-guids',\n 'include this flag when you are importing tags that you have previously exported and wish to update'\n )\n .addOption(concurrency)\n .addOption(ignoreErrors)\n .option(\n '--save',\n \"save the tags we're migrating instead of the migration preview (used with --output)\"\n )\n .addHelpText(\n 'after',\n `\n Example call:\n > import tags --source-cms example-dev --source-project-id microsite --group example\n > import tags --from-file myImportData.json --preserve-guids\n `\n )\n .action(async opts => {\n await cliCommand(\n ['import', 'tags'],\n opts,\n mapContensisOpts(opts)\n ).ImportTags({\n commit: opts.commit,\n fromFile: opts.fromFile,\n getBy: {\n groupId: opts.group,\n id: opts.id?.length === 1 ? opts.id[0] : undefined,\n ids: opts.id?.length > 1 ? opts.id : undefined,\n label: opts.label,\n language: opts.language,\n },\n save: opts.save,\n });\n });\n\n return program;\n};\n\nexport const get = makeImportCommand();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC;AAChC,iCAA2B;AAC3B,2BAgBO;AAEA,MAAM,oBAAoB,MAAM;AACrC,QAAM,UAAU,IAAI,yBAAQ,EACzB,QAAQ,QAAQ,EAChB,YAAY,gBAAgB,EAC5B,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,UACG,QAAQ,QAAQ,EAChB,YAAY,gCAAg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EAClE,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,gCAAW,EACrB,UAAU,iCAAY,EACtB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAM,SAAQ;AAxR1B;AAyRM,cAAM;AAAA,MACJ,CAAC,UAAU,MAAM;AAAA,MACjB;AAAA,UACA,uCAAiB,IAAI;AAAA,IACvB,EAAE,WAAW;AAAA,MACX,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,OAAO;AAAA,QACL,SAAS,KAAK;AAAA,QACd,MAAI,UAAK,OAAL,mBAAS,YAAW,IAAI,KAAK,GAAG,CAAC,IAAI;AAAA,QACzC,OAAK,UAAK,OAAL,mBAAS,UAAS,IAAI,KAAK,KAAK;AAAA,QACrC,OAAO,KAAK;AAAA,QACZ,UAAU,KAAK;AAAA,MACjB;AAAA,MACA,MAAM,KAAK;AAAA,IACb,CAAC;AAAA,EACH,CAAC;AAEH,SAAO;AACT;AAEO,MAAM,MAAM,kBAAkB;",
4
+ "sourcesContent": ["import { Command, Option } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport {\n assetTypes,\n commit,\n concurrency,\n contentTypes,\n entryId,\n ignoreErrors,\n latest,\n mapContensisOpts,\n noCache,\n noPublish,\n outputDetail,\n saveEntries,\n stopLevel,\n versionStatus,\n zenql,\n} from './globalOptions';\n\nexport const makeImportCommand = () => {\n const program = new Command()\n .command('import')\n .description('import command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n program\n .command('models')\n .description('import complete content models')\n .argument('[modelIds...]', 'ids of the content models to import (optional)')\n .addOption(noCache)\n .addOption(commit)\n .option(\n '-nod --no-defaults',\n 'ignore any default entries or nodes attached to content types or fields'\n )\n .option(\n '-nov --no-validations',\n 'import fields with validations removed'\n )\n .option(\n '-preserve --preserve-guids',\n 'import any default entries or nodes using the same id as the source'\n )\n .addOption(ignoreErrors)\n .addHelpText(\n 'after',\n `\nExample call:\n > import models blogPost --from-file contentmodels-backup.json\n > import models --source-alias example-dev\n`\n )\n .action(async (modelIds: string[], opts) => {\n await cliCommand(\n ['import', 'models', modelIds.join(' ')],\n opts,\n mapContensisOpts({ modelIds, ...opts })\n ).ImportContentModels({\n fromFile: opts.fromFile,\n commit: opts.commit,\n });\n });\n\n program\n .command('contenttypes')\n .description('import content types')\n .argument(\n '[contentTypeIds...]',\n 'Optional list of API id(s) of the content type(s) to import'\n )\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > import contenttypes {contentTypeIds} --from-file contenttypes-backup.json\n > import contenttypes {contentTypeIds} --source-alias example-dev\n`\n )\n .action(async (contentTypeIds: string[], opts) => {\n await cliCommand(\n ['import', 'contenttypes'],\n opts,\n mapContensisOpts({ contentTypeIds, ...opts })\n ).ImportContentTypes(\n {\n fromFile: opts.fromFile,\n commit: opts.commit,\n },\n contentTypeIds\n );\n });\n\n program\n .command('components')\n .description('import components')\n .argument(\n '[componentIds...]',\n 'Optional list of API id(s) of the component(s) to import'\n )\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > import components {componentIds} --from-file component-backup.json\n > import components {componentIds} --source-alias example-dev\n`\n )\n .action(async (componentIds: string[], opts) => {\n await cliCommand(\n ['import', 'component'],\n opts,\n mapContensisOpts({ componentIds, ...opts })\n ).ImportComponents(\n {\n fromFile: opts.fromFile,\n commit: opts.commit,\n },\n componentIds\n );\n });\n\n program\n .command('entries')\n .description('import entries')\n .argument(\n '[search phrase]',\n 'get entries with the search phrase, use quotes for multiple words'\n )\n .addOption(entryId)\n .addOption(zenql)\n .addOption(contentTypes)\n .addOption(assetTypes)\n .addOption(latest)\n .addOption(versionStatus)\n .addOption(stopLevel)\n .addOption(commit)\n .option(\n '-preserve --preserve-guids',\n 'include this flag when you are importing entries that you have previously exported and wish to update'\n )\n .addOption(concurrency)\n .addOption(outputDetail)\n .addOption(ignoreErrors)\n .addOption(noCache)\n .addOption(noPublish)\n .addOption(saveEntries)\n .addHelpText(\n 'after',\n `\nExample call:\n > import entries --source-cms example-dev --source-project-id microsite --zenql \"sys.contentTypeId = blog\"\n > import entries --from-file myImportData.json --preserve-guids\n`\n )\n .action(async (search: string, opts, cmd) => {\n await cliCommand(\n ['import', 'entries'],\n opts,\n mapContensisOpts({ search, ...opts })\n ).ImportEntries({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputDetail,\n saveEntries: opts.saveEntries,\n });\n });\n\n // TODO: add options to import one an array of nodes? nodeIds: string[]\n program\n .command('nodes')\n .description('import nodes')\n .argument('[root]', 'import nodes from the specified path e.g. /blog', '/')\n .option(\n '-preserve --preserve-guids',\n 'include this flag when you are importing nodes that you have previously exported and wish to update'\n )\n .addOption(ignoreErrors)\n .addOption(commit)\n .addOption(\n new Option(\n '-od --output-detail <outputDetail>',\n 'how much detail to output from the import'\n )\n .choices(['errors', 'changes', 'all'])\n .default('errors')\n )\n .option(\n '-ol --output-limit <outputLimit>',\n 'expand or limit the number of records output to the console',\n '200'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > import nodes /blog --source-alias example-alias --source-project-id example-project\n > import nodes --from-file site-backup.json --preserve-guids\n`\n )\n .action(async (root: string, opts) => {\n await cliCommand(\n ['import', 'nodes'],\n opts,\n mapContensisOpts({ paths: root.split(' '), ...opts })\n ).ImportNodes({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputDetail,\n logLimit: Number(opts.outputLimit),\n });\n });\n\n program\n .command('taggroups')\n .description('import taggroups')\n .argument('[query]', 'apply a filter')\n .option('-i --id <ids...>', 'limit to the supplied tag group id(s)')\n .addOption(commit)\n .option(\n '-preserve --preserve-guids',\n 'include this flag when you are importing tags that you have previously exported and wish to update'\n )\n .addOption(concurrency)\n .addOption(ignoreErrors)\n .option(\n '--save',\n \"save the tag groups we're migrating instead of the migration preview (used with --output)\"\n )\n .addHelpText(\n 'after',\n `\n Example call:\n > import taggroups --source-cms example-dev --source-project-id microsite --zenql \"sys.contentTypeId = blog\"\n > import taggroups --from-file myImportData.json --preserve-guids\n `\n )\n .action(async (query: string, opts) => {\n await cliCommand(\n ['import', 'taggroups'],\n opts,\n mapContensisOpts(opts)\n ).ImportTagGroups({\n commit: opts.commit,\n fromFile: opts.fromFile,\n getBy: {\n id: opts.id?.length === 1 ? opts.id[0] : undefined,\n ids: opts.id?.length > 1 ? opts.id : undefined,\n q: query,\n },\n save: opts.save,\n });\n });\n\n program\n .command('tags')\n .description('import tags')\n .option('-in --group <groupId>', 'id of the tag group containing tags')\n .option('--label <label>', 'filter by tags that match this label')\n .option('-l --language <language>', 'find tags in the supplied language')\n .option('-i --id <ids...>', 'limit to the supplied tag group id(s)')\n .addOption(commit)\n .option(\n '-preserve --preserve-guids',\n 'include this flag when you are importing tags that you have previously exported and wish to update'\n )\n .addOption(concurrency)\n .addOption(ignoreErrors)\n .option(\n '--save',\n \"save the tags we're migrating instead of the migration preview (used with --output)\"\n )\n .addHelpText(\n 'after',\n `\n Example call:\n > import tags --source-cms example-dev --source-project-id microsite --group example\n > import tags --from-file myImportData.json --preserve-guids\n `\n )\n .action(async opts => {\n await cliCommand(\n ['import', 'tags'],\n opts,\n mapContensisOpts(opts)\n ).ImportTags({\n commit: opts.commit,\n fromFile: opts.fromFile,\n getBy: {\n groupId: opts.group,\n id: opts.id?.length === 1 ? opts.id[0] : undefined,\n ids: opts.id?.length > 1 ? opts.id : undefined,\n label: opts.label,\n language: opts.language,\n },\n save: opts.save,\n });\n });\n\n return program;\n};\n\nexport const get = makeImportCommand();\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC;AAChC,iCAA2B;AAC3B,2BAgBO;AAEA,MAAM,oBAAoB,MAAM;AACrC,QAAM,UAAU,IAAI,yBAAQ,EACzB,QAAQ,QAAQ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EACH,CAAC;AAEH,UACG,QAAQ,MAAM,EACd,YAAY,aAAa,EACzB,OAAO,yBAAyB,qCAAqC,EACrE,OAAO,mBAAmB,sCAAsC,EAChE,OAAO,4BAA4B,oCAAoC,EACvE,OAAO,oBAAoB,uCAAuC,EAClE,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,gCAAW,EACrB,UAAU,iCAAY,EACtB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAM,SAAQ;AA5R1B;AA6RM,cAAM;AAAA,MACJ,CAAC,UAAU,MAAM;AAAA,MACjB;AAAA,UACA,uCAAiB,IAAI;AAAA,IACvB,EAAE,WAAW;AAAA,MACX,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,OAAO;AAAA,QACL,SAAS,KAAK;AAAA,QACd,MAAI,UAAK,OAAL,mBAAS,YAAW,IAAI,KAAK,GAAG,CAAC,IAAI;AAAA,QACzC,OAAK,UAAK,OAAL,mBAAS,UAAS,IAAI,KAAK,KAAK;AAAA,QACrC,OAAO,KAAK;AAAA,QACZ,UAAU,KAAK;AAAA,MACjB;AAAA,MACA,MAAM,KAAK;AAAA,IACb,CAAC;AAAA,EACH,CAAC;AAEH,SAAO;AACT;AAEO,MAAM,MAAM,kBAAkB;",
6
6
  "names": []
7
7
  }
@@ -131,7 +131,9 @@ ${import_logger.Logger.errorText(">>")} Available commands:`,
131
131
  commitTip: () => `Add --commit flag to commit the previewed changes`,
132
132
  preview: (verb = "IMPORT") => `\u{1F50D} ${verb} PREVIEW \u{1F52D}`,
133
133
  commit: (verb = "IMPORT") => `COMMITTING ${verb} \u2728\u2604\uFE0F `,
134
- imported: (env, commit, entities) => `${commit ? `Imported` : `Will import`} ${Object.entries(entities).map(([noun, count]) => (0, import_pluralize.default)(noun, count, true)).join(" and ")} into ${env} environment`,
134
+ imported: (env, commit, entities) => `${commit ? `Imported` : `Will import`} ${Object.entries(entities).map(
135
+ ([noun, count], i, arr) => `${i > 0 ? i === arr.length - 1 ? " and " : ", " : ""}${(0, import_pluralize.default)(noun, count, true)}`
136
+ ).join("")} into ${env} environment`,
135
137
  models: {
136
138
  result: (status) => {
137
139
  switch (status) {
@@ -202,14 +204,15 @@ ${import_logger.Logger.errorText(">>")} Available commands:`,
202
204
  noEnv: () => `No Contensis environment set, connect to your Contensis cloud instance using "contensis connect {cms alias}"`
203
205
  },
204
206
  entries: {
205
- imported: (env, commit, entries, nodes = 0) => LogMessages.migrate.imported(env, commit, {
207
+ imported: (env, commit, entries, nodes = 0, tags = 0) => LogMessages.migrate.imported(env, commit, {
206
208
  entry: entries,
207
- node: nodes
209
+ node: nodes,
210
+ tag: tags
208
211
  }),
209
212
  failedImport: (env) => `[${env}] Unable to import entries`,
210
213
  update: {
211
214
  preview: () => LogMessages.migrate.preview("UPDATE FIELD"),
212
- commit: () => LogMessages.migrate.preview("FIELD UPDATES"),
215
+ commit: () => LogMessages.migrate.commit("FIELD UPDATES"),
213
216
  success: (env, commit, entries, nodes = 0) => `${commit ? `Updated` : `Will update`} ${(0, import_pluralize.default)("entry", entries, true)}${nodes > 0 ? ` and ${(0, import_pluralize.default)("node", nodes, true)}` : ""} in ${env} environment`,
214
217
  failed: (env) => `[${env}] Unable to update any entries`
215
218
  },