contensis-cli 1.1.2-beta.7 → 1.1.2-beta.8
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/commands/copy.js +3 -1
- package/dist/commands/copy.js.map +2 -2
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +2 -2
- package/src/commands/copy.ts +3 -2
- package/src/version.ts +1 -1
package/dist/commands/copy.js
CHANGED
|
@@ -32,12 +32,14 @@ const makeCopyCommand = () => {
|
|
|
32
32
|
"the api id of the content type containing the fields to copy"
|
|
33
33
|
).argument("<fieldId>", "the id of the field to copy from").argument("<destinationId>", "the id of the field to copy to").option(
|
|
34
34
|
"-t --template <template>",
|
|
35
|
-
"apply a liquidjs template to modify the copied field content"
|
|
35
|
+
"apply a liquidjs template (surrounded by double quotes) to modify the copied field content"
|
|
36
36
|
).addOption(import_globalOptions.commit).addOption(import_globalOptions.concurrency).addOption(import_globalOptions.ignoreErrors).addOption(import_globalOptions.outputEntries).usage("<contentTypeId> <fieldId> <destinationId> (all arguments required)").addHelpText(
|
|
37
37
|
"after",
|
|
38
38
|
`
|
|
39
39
|
Example call:
|
|
40
40
|
> copy field blog authorName contributors
|
|
41
|
+
|
|
42
|
+
> copy field blog description kicker --template "<h2>{{ source_value }}</h2>"
|
|
41
43
|
`
|
|
42
44
|
).action(
|
|
43
45
|
async (contentTypeId, fieldId, destinationId, opts) => {
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/commands/copy.ts"],
|
|
4
|
-
"sourcesContent": ["import { Command } from 'commander';\nimport { CopyField } from 'migratortron';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport {\n commit,\n concurrency,\n ignoreErrors,\n mapContensisOpts,\n outputEntries,\n} from './globalOptions';\n\nexport const makeCopyCommand = () => {\n const copy = new Command()\n .command('copy')\n .description('copy command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n copy\n .command('field')\n .description('copy the contents of one content type field to another')\n .argument(\n '<contentTypeId>',\n 'the api id of the content type containing the fields to copy'\n )\n .argument('<fieldId>', 'the id of the field to copy from')\n .argument('<destinationId>', 'the id of the field to copy to')\n .option(\n '-t --template <template>',\n 'apply a liquidjs template to modify the copied field content'\n )\n .addOption(commit)\n .addOption(concurrency)\n .addOption(ignoreErrors)\n .addOption(outputEntries)\n .usage('<contentTypeId> <fieldId> <destinationId> (all arguments required)')\n .addHelpText(\n 'after',\n `\nExample call:\n > copy field blog authorName contributors\\n`\n )\n .action(\n async (\n contentTypeId: string,\n fieldId: string,\n destinationId: string,\n opts: any\n ) => {\n const copyField: CopyField = {\n contentTypeId,\n fieldId,\n destinationId,\n template: opts.template,\n };\n\n return await cliCommand(\n ['copy', 'project', contentTypeId, fieldId, destinationId],\n opts,\n mapContensisOpts({ copyField })\n ).CopyEntryField({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputEntries,\n });\n }\n );\n\n return copy;\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AAExB,iCAA2B;AAC3B,2BAMO;AAEA,MAAM,kBAAkB,MAAM;AACnC,QAAM,OAAO,IAAI,yBAAQ,EACtB,QAAQ,MAAM,EACd,YAAY,cAAc,EAC1B,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,OACG,QAAQ,OAAO,EACf,YAAY,wDAAwD,EACpE;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,SAAS,aAAa,kCAAkC,EACxD,SAAS,mBAAmB,gCAAgC,EAC5D;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,2BAAM,EAChB,UAAU,gCAAW,EACrB,UAAU,iCAAY,EACtB,UAAU,kCAAa,EACvB,MAAM,oEAAoE,EAC1E;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,
|
|
4
|
+
"sourcesContent": ["import { Command } from 'commander';\nimport { CopyField } from 'migratortron';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport {\n commit,\n concurrency,\n ignoreErrors,\n mapContensisOpts,\n outputEntries,\n} from './globalOptions';\n\nexport const makeCopyCommand = () => {\n const copy = new Command()\n .command('copy')\n .description('copy command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n copy\n .command('field')\n .description('copy the contents of one content type field to another')\n .argument(\n '<contentTypeId>',\n 'the api id of the content type containing the fields to copy'\n )\n .argument('<fieldId>', 'the id of the field to copy from')\n .argument('<destinationId>', 'the id of the field to copy to')\n .option(\n '-t --template <template>',\n 'apply a liquidjs template (surrounded by double quotes) to modify the copied field content'\n )\n .addOption(commit)\n .addOption(concurrency)\n .addOption(ignoreErrors)\n .addOption(outputEntries)\n .usage('<contentTypeId> <fieldId> <destinationId> (all arguments required)')\n .addHelpText(\n 'after',\n `\nExample call:\n > copy field blog authorName contributors\\n\n > copy field blog description kicker --template \"<h2>{{ source_value }}</h2>\"\\n`\n )\n .action(\n async (\n contentTypeId: string,\n fieldId: string,\n destinationId: string,\n opts: any\n ) => {\n const copyField: CopyField = {\n contentTypeId,\n fieldId,\n destinationId,\n template: opts.template,\n };\n\n return await cliCommand(\n ['copy', 'project', contentTypeId, fieldId, destinationId],\n opts,\n mapContensisOpts({ copyField })\n ).CopyEntryField({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputEntries,\n });\n }\n );\n\n return copy;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AAExB,iCAA2B;AAC3B,2BAMO;AAEA,MAAM,kBAAkB,MAAM;AACnC,QAAM,OAAO,IAAI,yBAAQ,EACtB,QAAQ,MAAM,EACd,YAAY,cAAc,EAC1B,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,OACG,QAAQ,OAAO,EACf,YAAY,wDAAwD,EACpE;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,SAAS,aAAa,kCAAkC,EACxD,SAAS,mBAAmB,gCAAgC,EAC5D;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,2BAAM,EAChB,UAAU,gCAAW,EACrB,UAAU,iCAAY,EACtB,UAAU,kCAAa,EACvB,MAAM,oEAAoE,EAC1E;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC;AAAA,IACC,OACE,eACA,SACA,eACA,SACG;AACH,YAAM,YAAuB;AAAA,QAC3B;AAAA,QACA;AAAA,QACA;AAAA,QACA,UAAU,KAAK;AAAA,MACjB;AAEA,aAAO,UAAM;AAAA,QACX,CAAC,QAAQ,WAAW,eAAe,SAAS,aAAa;AAAA,QACzD;AAAA,YACA,uCAAiB,EAAE,UAAU,CAAC;AAAA,MAChC,EAAE,eAAe;AAAA,QACf,QAAQ,KAAK;AAAA,QACb,UAAU,KAAK;AAAA,QACf,WAAW,KAAK;AAAA,MAClB,CAAC;AAAA,IACH;AAAA,EACF;AAEF,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
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.1.2-beta.
|
|
24
|
+
const LIB_VERSION = "1.1.2-beta.8";
|
|
25
25
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
26
|
0 && (module.exports = {
|
|
27
27
|
LIB_VERSION
|
package/dist/version.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../src/version.ts"],
|
|
4
|
-
"sourcesContent": ["export const LIB_VERSION = \"1.1.2-beta.
|
|
4
|
+
"sourcesContent": ["export const LIB_VERSION = \"1.1.2-beta.8\";\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.1.2-beta.
|
|
3
|
+
"version": "1.1.2-beta.8",
|
|
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
|
"jsonpath-mapper": "^1.1.0",
|
|
40
40
|
"keytar": "^7.9.0",
|
|
41
41
|
"lodash": "^4.17.21",
|
|
42
|
-
"migratortron": "^1.0.0-beta.
|
|
42
|
+
"migratortron": "^1.0.0-beta.46",
|
|
43
43
|
"nanospinner": "^1.1.0",
|
|
44
44
|
"node-fetch": "^2.6.7",
|
|
45
45
|
"parse-git-config": "^3.0.0",
|
package/src/commands/copy.ts
CHANGED
|
@@ -28,7 +28,7 @@ export const makeCopyCommand = () => {
|
|
|
28
28
|
.argument('<destinationId>', 'the id of the field to copy to')
|
|
29
29
|
.option(
|
|
30
30
|
'-t --template <template>',
|
|
31
|
-
'apply a liquidjs template to modify the copied field content'
|
|
31
|
+
'apply a liquidjs template (surrounded by double quotes) to modify the copied field content'
|
|
32
32
|
)
|
|
33
33
|
.addOption(commit)
|
|
34
34
|
.addOption(concurrency)
|
|
@@ -39,7 +39,8 @@ export const makeCopyCommand = () => {
|
|
|
39
39
|
'after',
|
|
40
40
|
`
|
|
41
41
|
Example call:
|
|
42
|
-
> copy field blog authorName contributors\n
|
|
42
|
+
> copy field blog authorName contributors\n
|
|
43
|
+
> copy field blog description kicker --template "<h2>{{ source_value }}</h2>"\n`
|
|
43
44
|
)
|
|
44
45
|
.action(
|
|
45
46
|
async (
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "1.1.2-beta.
|
|
1
|
+
export const LIB_VERSION = "1.1.2-beta.8";
|