contensis-cli 1.5.1-beta.6 → 1.5.1-beta.7

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/dist/version.js CHANGED
@@ -21,7 +21,7 @@ __export(version_exports, {
21
21
  LIB_VERSION: () => LIB_VERSION
22
22
  });
23
23
  module.exports = __toCommonJS(version_exports);
24
- const LIB_VERSION = "1.5.1-beta.6";
24
+ const LIB_VERSION = "1.5.1-beta.7";
25
25
  // Annotate the CommonJS export names for ESM import in node:
26
26
  0 && (module.exports = {
27
27
  LIB_VERSION
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../src/version.ts"],
4
- "sourcesContent": ["export const LIB_VERSION = \"1.5.1-beta.6\";\n"],
4
+ "sourcesContent": ["export const LIB_VERSION = \"1.5.1-beta.7\";\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAO,MAAM,cAAc;",
6
6
  "names": []
7
7
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "contensis-cli",
3
- "version": "1.5.1-beta.6",
3
+ "version": "1.5.1-beta.7",
4
4
  "description": "A fully featured Contensis command line interface with a shell UI provides simple and intuitive ways to manage or profile your content in any NodeJS terminal.",
5
5
  "repository": "https://github.com/contensis/cli",
6
6
  "homepage": "https://github.com/contensis/cli/tree/main/packages/contensis-cli#readme",
@@ -39,7 +39,7 @@
39
39
  "inquirer-command-prompt": "^0.1.0",
40
40
  "keytar": "^7.9.0",
41
41
  "lodash": "^4.17.21",
42
- "migratortron": "^1.0.0-beta.77",
42
+ "migratortron": "^1.0.0-beta.78",
43
43
  "nanospinner": "^1.2.0",
44
44
  "node-fetch": "^2.6.7",
45
45
  "parse-git-config": "^3.0.0",
@@ -315,9 +315,16 @@ Example call:
315
315
  'get entries with the search phrase, use quotes for multiple words'
316
316
  )
317
317
  .addOption(contentTypes)
318
- .option(
319
- '-d --dependents',
320
- 'find and return any dependencies of all found entries'
318
+ .addOption(
319
+ new Option(
320
+ '-d --dependents [depth]',
321
+ 'find and return any dependencies of all found entries (optionally limit the number of dependency levels)'
322
+ ).argParser(value => {
323
+ // If value is undefined, treat as boolean true
324
+ if (value === undefined) return true;
325
+ const num = Number(value);
326
+ return isNaN(num) ? true : num;
327
+ })
321
328
  )
322
329
  )
323
330
  .addOption(
@@ -52,6 +52,12 @@ export const mapContensisOpts = (opts: any = {}): MigrateRequest => ({
52
52
  concurrency: opts.concurrency ? Number(opts.concurrency) : undefined,
53
53
  noPublish: !opts.publish, // arg is inverted automatically from `--no-publish` to `publish: false`
54
54
  outputLogs: opts.logLevel,
55
+ stopLevel:
56
+ typeof opts.stopLevel === 'number'
57
+ ? Number(opts.stopLevel)
58
+ : typeof opts.dependents === 'number'
59
+ ? Number(opts.dependents)
60
+ : undefined,
55
61
  });
56
62
 
57
63
  /* Output options */
@@ -195,6 +201,11 @@ export const noPublish = new Option(
195
201
  "don't publish created or updated entries"
196
202
  );
197
203
 
204
+ export const stopLevel = new Option(
205
+ '-d --stop-level <stopLevel>',
206
+ 'the level at which to stop resolving dependent entries (may result in incomplete entries)'
207
+ ).argParser(parseInt);
208
+
198
209
  export const addConnectOptions = (program: Command) =>
199
210
  program.addOption(alias.hideHelp()).addOption(project.hideHelp());
200
211
 
@@ -13,6 +13,7 @@ import {
13
13
  noPublish,
14
14
  outputDetail,
15
15
  saveEntries,
16
+ stopLevel,
16
17
  versionStatus,
17
18
  zenql,
18
19
  } from './globalOptions';
@@ -39,6 +40,7 @@ export const makeImportCommand = () => {
39
40
  '-preserve --preserve-guids',
40
41
  'import any default entries or nodes using the same id as the source'
41
42
  )
43
+ .addOption(ignoreErrors)
42
44
  .addHelpText(
43
45
  'after',
44
46
  `
@@ -131,6 +133,7 @@ Example call:
131
133
  .addOption(assetTypes)
132
134
  .addOption(latest)
133
135
  .addOption(versionStatus)
136
+ .addOption(stopLevel)
134
137
  .addOption(commit)
135
138
  .option(
136
139
  '-preserve --preserve-guids',
@@ -275,7 +278,7 @@ Example call:
275
278
  > import tags --from-file myImportData.json --preserve-guids
276
279
  `
277
280
  )
278
- .action(async (opts) => {
281
+ .action(async opts => {
279
282
  await cliCommand(
280
283
  ['import', 'tags'],
281
284
  opts,
@@ -1857,7 +1857,7 @@ class ContensisCli {
1857
1857
 
1858
1858
  const contensis = await this.ConnectContensisImport({
1859
1859
  commit,
1860
- mixedData,
1860
+ mixedData: mixedData.models.length ? mixedData : undefined,
1861
1861
  });
1862
1862
 
1863
1863
  if (contensis) {
@@ -2036,6 +2036,7 @@ class ContensisCli {
2036
2036
  );
2037
2037
  // print the results to console
2038
2038
  await this.HandleFormattingAndOutput(result, log.object);
2039
+ if (!commit) log.help(messages.migrate.commitTip());
2039
2040
  }
2040
2041
  }
2041
2042
  };
@@ -2097,6 +2098,7 @@ class ContensisCli {
2097
2098
  );
2098
2099
  await this.HandleFormattingAndOutput(result, log.object);
2099
2100
  }
2101
+ if (!commit) log.help(messages.migrate.commitTip());
2100
2102
  }
2101
2103
  };
2102
2104
 
@@ -2227,6 +2229,8 @@ class ContensisCli {
2227
2229
  );
2228
2230
  // print the results to console
2229
2231
  await this.HandleFormattingAndOutput(result, log.object);
2232
+
2233
+ if (!commit) log.help(messages.migrate.commitTip());
2230
2234
  }
2231
2235
  }
2232
2236
  };
@@ -2288,6 +2292,7 @@ class ContensisCli {
2288
2292
  );
2289
2293
  await this.HandleFormattingAndOutput(result, log.object);
2290
2294
  }
2295
+ if (!commit) log.help(messages.migrate.commitTip());
2291
2296
  }
2292
2297
  };
2293
2298
 
package/src/version.ts CHANGED
@@ -1 +1 @@
1
- export const LIB_VERSION = "1.5.1-beta.6";
1
+ export const LIB_VERSION = "1.5.1-beta.7";