contensis-cli 1.0.12-beta.7 → 1.0.12-beta.9

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.
@@ -137,8 +137,8 @@ Example call:
137
137
  "after",
138
138
  `
139
139
  Example call:
140
- > import nodes --from-file site-backup.json
141
- > import nodes --source-alias example-alias --source-project-id example-project
140
+ > import nodes /blog --source-alias example-alias --source-project-id example-project
141
+ > import nodes --from-file site-backup.json --preserve-guids
142
142
  `
143
143
  ).action(async (root, opts) => {
144
144
  await (0, import_ContensisCliService.cliCommand)(
@@ -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 commit,\n getEntryOptions,\n ignoreErrors,\n mapContensisOpts,\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(commit)\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 getEntryOptions(\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 )\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(\n new Option(\n '-oe --output-entries <outputEntries>',\n 'which details of the entries included in the import to output'\n )\n .choices(['errors', 'changes', 'all'])\n .default('errors')\n )\n .addOption(ignoreErrors)\n .addHelpText(\n 'after',\n `\nExample call:\n > import entries --source-cms example-dev --source-project-id microsite --zenql \"sys.contentTypeId = blog\"\n`\n )\n .action(async (phrase: string, opts, cmd) => {\n await cliCommand(\n ['import', 'entries'],\n opts,\n mapContensisOpts({ phrase, ...opts })\n ).ImportEntries({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputEntries,\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 --from-file site-backup.json\n > import nodes --source-alias example-alias --source-project-id example-project\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 return program;\n};\n\nexport const get = makeImportCommand();\n"],
4
+ "sourcesContent": ["import { Command, Option } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport {\n commit,\n getEntryOptions,\n ignoreErrors,\n mapContensisOpts,\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(commit)\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 getEntryOptions(\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 )\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(\n new Option(\n '-oe --output-entries <outputEntries>',\n 'which details of the entries included in the import to output'\n )\n .choices(['errors', 'changes', 'all'])\n .default('errors')\n )\n .addOption(ignoreErrors)\n .addHelpText(\n 'after',\n `\nExample call:\n > import entries --source-cms example-dev --source-project-id microsite --zenql \"sys.contentTypeId = blog\"\n`\n )\n .action(async (phrase: string, opts, cmd) => {\n await cliCommand(\n ['import', 'entries'],\n opts,\n mapContensisOpts({ phrase, ...opts })\n ).ImportEntries({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputEntries,\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 return program;\n};\n\nexport const get = makeImportCommand();\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC;AAChC,iCAA2B;AAC3B,2BAKO;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,gCAAgC,EAC5C,SAAS,iBAAiB,gDAAgD,EAC1E,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAO,UAAoB,SAAS;AAC1C,cAAM;AAAA,MACJ,CAAC,UAAU,UAAU,SAAS,KAAK,GAAG,CAAC;AAAA,MACvC;AAAA,UACA,uCAAiB,EAAE,UAAU,GAAG,KAAK,CAAC;AAAA,IACxC,EAAE,oBAAoB;AAAA,MACpB,UAAU,KAAK;AAAA,MACf,QAAQ,KAAK;AAAA,IACf,CAAC;AAAA,EACH,CAAC;AAEH,UACG,QAAQ,cAAc,EACtB,YAAY,sBAAsB,EAClC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAO,gBAA0B,SAAS;AAChD,cAAM;AAA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MACf,WAAW,KAAK;AAAA,IAClB,CAAC;AAAA,EACH,CAAC;AAGH,UACG,QAAQ,OAAO,EACf,YAAY,cAAc,EAC1B,SAAS,UAAU,mDAAmD,GAAG,EACzE;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,iCAAY,EACtB,UAAU,2BAAM,EAChB;AAAA,IACC,IAAI;AAAA,MACF;AAAA,MACA;AAAA,IACF,EACG,QAAQ,CAAC,UAAU,WAAW,KAAK,CAAC,EACpC,QAAQ,QAAQ;AAAA,EACrB,EACC;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAO,MAAc,SAAS;AACpC,cAAM;AAAA,MACJ,CAAC,UAAU,OAAO;AAAA,MAClB;AAAA,UACA,uCAAiB,EAAE,OAAO,KAAK,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC;AAAA,IACtD,EAAE,YAAY;AAAA,MACZ,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,WAAW,KAAK;AAAA,MAChB,UAAU,OAAO,KAAK,WAAW;AAAA,IACnC,CAAC;AAAA,EACH,CAAC;AAEH,SAAO;AACT;AAEO,MAAM,MAAM,kBAAkB;",
6
6
  "names": []
7
7
  }
@@ -111,6 +111,19 @@ ${removeEntries.helpInformation()}`
111
111
  ).RemoveEntries(opts.commit);
112
112
  }
113
113
  });
114
+ remove.command("nodes").description("delete nodes from the site view tree").argument("<root>", "remove nodes from the specified path e.g. /blog or /").addOption(import_globalOptions.commit).addHelpText(
115
+ "after",
116
+ `
117
+ Example call:
118
+ > remove nodes /blog
119
+ `
120
+ ).action(async (root, opts) => {
121
+ await (0, import_ContensisCliService.cliCommand)(
122
+ ["remove", "nodes", root],
123
+ opts,
124
+ (0, import_globalOptions.mapContensisOpts)({ paths: root.split(" "), ...opts })
125
+ ).RemoveNodes(opts.commit);
126
+ });
114
127
  return remove;
115
128
  };
116
129
  // Annotate the CommonJS export names for ESM import in node:
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/remove.ts"],
4
- "sourcesContent": ["import { Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { shell } from '~/shell';\nimport { Logger } from '~/util/logger';\nimport { commit, mapContensisOpts, zenql } from './globalOptions';\n\nexport const makeRemoveCommand = () => {\n const remove = new Command()\n .command('remove')\n .description('remove command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n remove\n .command('project')\n .description('remove an entire project')\n .argument('<projectId>', 'the project id to delete')\n .usage('<projectId>')\n .addHelpText('after', `\\n`)\n .action(async (projectId, opts) => {\n const project = await cliCommand(\n ['remove', 'project', projectId],\n opts\n ).SetProject(projectId);\n if (project) await shell().restart();\n });\n\n remove\n .command('key')\n .description('remove api key')\n .argument('<id>', 'the id of the API key to delete')\n .usage('<id>')\n .addHelpText(\n 'after',\n `\nExample call:\n > remove key 4ceb9575-28d3-4d5b-a77b-5e5221e603dd\n`\n )\n .action(async (id, opts) => {\n await cliCommand(['remove', 'key', id], opts).RemoveApiKey(id);\n });\n\n remove\n .command('role')\n .description('remove a role')\n .argument('<\"Role name\" or id>', 'the existing role name or id to delete')\n .addHelpText(\n 'after',\n `\nExample call:\n > remove role \"My role\"\\n`\n )\n .action(async (roleNameOrId: string, opts) => {\n await cliCommand(['remove', 'role', roleNameOrId], opts).RemoveRole(\n roleNameOrId\n );\n });\n\n remove\n .command('components')\n .description('delete components')\n .argument('<id...>', 'the id(s) of the components to delete')\n .addOption(commit)\n .usage('<id> [--commit]')\n .addHelpText(\n 'after',\n `\nExample call:\n > remove components addressComponent\n`\n )\n .action(async (id: string[], opts) => {\n await cliCommand(\n ['remove', 'components', id.join(' ')],\n opts\n ).RemoveComponents(id, opts.commit);\n });\n\n remove\n .command('contenttypes')\n .description('delete content types')\n .argument('<id...>', 'the id(s) of the content types to delete')\n .addOption(commit)\n .usage('<id> [--commit]')\n .addHelpText(\n 'after',\n `\nExample call:\n > remove contenttypes blogPost\n`\n )\n .action(async (id: string[], opts) => {\n await cliCommand(\n ['remove', 'contenttypes', id.join(' ')],\n opts\n ).RemoveContentTypes(id, opts.commit);\n });\n\n const removeEntries = remove\n .command('entries')\n .description('delete entries')\n .argument(\n '[ids...]',\n 'the entry id(s) to delete ...or add *** if you wish to delete all entries in all content types'\n )\n .addOption(zenql)\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > remove entries a1c25591-8c9b-50e2-96d8-f6c774fcf023 8df914cc-1da1-59d6-86e0-8ea4ebd99aaa\n > remove entries --zenql \"sys.contentTypeId = test\"\n`\n )\n .action(async (entryIds: string[], opts) => {\n const removeAll = entryIds?.[0] === '***';\n\n // Remove all asterisks from args\n if (entryIds?.[0] && !entryIds[0].replace(/\\*/g, '')) entryIds.pop();\n\n const hasArgs = !!(entryIds?.length || opts.zenql || removeAll);\n if (!hasArgs) {\n Logger.help(\n `Not enough arguments supplied\\n\\n${removeEntries.helpInformation()}`\n );\n } else {\n await cliCommand(\n ['remove', 'entries', entryIds.join(' ')],\n opts,\n mapContensisOpts({ entryIds, ...opts })\n ).RemoveEntries(opts.commit);\n }\n });\n\n return remove;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAC3B,mBAAsB;AACtB,oBAAuB;AACvB,2BAAgD;AAEzC,MAAM,oBAAoB,MAAM;AACrC,QAAM,SAAS,IAAI,yBAAQ,EACxB,QAAQ,QAAQ,EAChB,YAAY,gBAAgB,EAC5B,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,SACG,QAAQ,SAAS,EACjB,YAAY,0BAA0B,EACtC,SAAS,eAAe,0BAA0B,EAClD,MAAM,aAAa,EACnB,YAAY,SAAS;AAAA,CAAI,EACzB,OA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C,OAAO,OAAO,IAAc,SAAS;AACpC,cAAM;AAAA,MACJ,CAAC,UAAU,gBAAgB,GAAG,KAAK,GAAG,CAAC;AAAA,MACvC;AAAA,IACF,EAAE,mBAAmB,IAAI,KAAK,MAAM;AAAA,EACtC,CAAC;AAEH,QAAM,gBAAgB,OACnB,QAAQ,SAAS,EACjB,YAAY,gBAAgB,EAC5B;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,0BAAK,EACf,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAO,UAAoB,SAAS;AAC1C,UAAM,aAAY,qCAAW,QAAO;AAGpC,SAAI,qCAAW,OAAM,CAAC,SAAS,GAAG,QAAQ,OAAO,EAAE;AAAG,eAAS,IAAI;AAEnE,UAAM,UAAU,CAAC,GAAE,qCAAU,WAAU,KAAK,SAAS;AACrD,QAAI,CAAC,SAAS;AACZ,2BAAO;AAAA,QACL;AAAA;AAAA,EAAoC,cAAc,gBAAgB;AAAA,MACpE;AAAA,IACF,OAAO;AACL,gBAAM;AAAA,QACJ,CAAC,UAAU,WAAW,SAAS,KAAK,GAAG,CAAC;AAAA,QACxC;AAAA,YACA,uCAAiB,EAAE,UAAU,GAAG,KAAK,CAAC;AAAA,MACxC,EAAE,cAAc,KAAK,MAAM;AAAA,IAC7B;AAAA,EACF,CAAC;AAEH,SAAO;AACT;",
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { shell } from '~/shell';\nimport { Logger } from '~/util/logger';\nimport { commit, mapContensisOpts, zenql } from './globalOptions';\n\nexport const makeRemoveCommand = () => {\n const remove = new Command()\n .command('remove')\n .description('remove command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n remove\n .command('project')\n .description('remove an entire project')\n .argument('<projectId>', 'the project id to delete')\n .usage('<projectId>')\n .addHelpText('after', `\\n`)\n .action(async (projectId, opts) => {\n const project = await cliCommand(\n ['remove', 'project', projectId],\n opts\n ).SetProject(projectId);\n if (project) await shell().restart();\n });\n\n remove\n .command('key')\n .description('remove api key')\n .argument('<id>', 'the id of the API key to delete')\n .usage('<id>')\n .addHelpText(\n 'after',\n `\nExample call:\n > remove key 4ceb9575-28d3-4d5b-a77b-5e5221e603dd\n`\n )\n .action(async (id, opts) => {\n await cliCommand(['remove', 'key', id], opts).RemoveApiKey(id);\n });\n\n remove\n .command('role')\n .description('remove a role')\n .argument('<\"Role name\" or id>', 'the existing role name or id to delete')\n .addHelpText(\n 'after',\n `\nExample call:\n > remove role \"My role\"\\n`\n )\n .action(async (roleNameOrId: string, opts) => {\n await cliCommand(['remove', 'role', roleNameOrId], opts).RemoveRole(\n roleNameOrId\n );\n });\n\n remove\n .command('components')\n .description('delete components')\n .argument('<id...>', 'the id(s) of the components to delete')\n .addOption(commit)\n .usage('<id> [--commit]')\n .addHelpText(\n 'after',\n `\nExample call:\n > remove components addressComponent\n`\n )\n .action(async (id: string[], opts) => {\n await cliCommand(\n ['remove', 'components', id.join(' ')],\n opts\n ).RemoveComponents(id, opts.commit);\n });\n\n remove\n .command('contenttypes')\n .description('delete content types')\n .argument('<id...>', 'the id(s) of the content types to delete')\n .addOption(commit)\n .usage('<id> [--commit]')\n .addHelpText(\n 'after',\n `\nExample call:\n > remove contenttypes blogPost\n`\n )\n .action(async (id: string[], opts) => {\n await cliCommand(\n ['remove', 'contenttypes', id.join(' ')],\n opts\n ).RemoveContentTypes(id, opts.commit);\n });\n\n const removeEntries = remove\n .command('entries')\n .description('delete entries')\n .argument(\n '[ids...]',\n 'the entry id(s) to delete ...or add *** if you wish to delete all entries in all content types'\n )\n .addOption(zenql)\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > remove entries a1c25591-8c9b-50e2-96d8-f6c774fcf023 8df914cc-1da1-59d6-86e0-8ea4ebd99aaa\n > remove entries --zenql \"sys.contentTypeId = test\"\n`\n )\n .action(async (entryIds: string[], opts) => {\n const removeAll = entryIds?.[0] === '***';\n\n // Remove all asterisks from args\n if (entryIds?.[0] && !entryIds[0].replace(/\\*/g, '')) entryIds.pop();\n\n const hasArgs = !!(entryIds?.length || opts.zenql || removeAll);\n if (!hasArgs) {\n Logger.help(\n `Not enough arguments supplied\\n\\n${removeEntries.helpInformation()}`\n );\n } else {\n await cliCommand(\n ['remove', 'entries', entryIds.join(' ')],\n opts,\n mapContensisOpts({ entryIds, ...opts })\n ).RemoveEntries(opts.commit);\n }\n });\n\n remove\n .command('nodes')\n .description('delete nodes from the site view tree')\n .argument('<root>', 'remove nodes from the specified path e.g. /blog or /')\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > remove nodes /blog\n`\n )\n .action(async (root: string, opts) => {\n await cliCommand(\n ['remove', 'nodes', root],\n opts,\n mapContensisOpts({ paths: root.split(' '), ...opts })\n ).RemoveNodes(opts.commit);\n });\n\n return remove;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAC3B,mBAAsB;AACtB,oBAAuB;AACvB,2BAAgD;AAEzC,MAAM,oBAAoB,MAAM;AACrC,QAAM,SAAS,IAAI,yBAAQ,EACxB,QAAQ,QAAQ,EAChB,YAAY,gBAAgB,EAC5B,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,SACG,QAAQ,SAAS,EACjB,YAAY,0BAA0B,EACtC,SAAS,eAAe,0BAA0B,EAClD,MAAM,aAAa,EACnB,YAAY,SAAS;AAAA,CAAI,EACzB,OAAO,OAAO,WAAW,SAAS;AACjC,UAAM,UAAU,UAAM;AAAA,MACpB,CAAC,UAAU,WAAW,SAAS;AAAA,MAC/B;AAAA,IACF,EAAE,WAAW,SAAS;AACtB,QAAI;AAAS,gBAAM,oBAAM,EAAE,QAAQ;AAAA,EACrC,CAAC;AAEH,SACG,QAAQ,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S,EACjB,YAAY,gBAAgB,EAC5B;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,0BAAK,EACf,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAO,UAAoB,SAAS;AAC1C,UAAM,aAAY,qCAAW,QAAO;AAGpC,SAAI,qCAAW,OAAM,CAAC,SAAS,GAAG,QAAQ,OAAO,EAAE;AAAG,eAAS,IAAI;AAEnE,UAAM,UAAU,CAAC,GAAE,qCAAU,WAAU,KAAK,SAAS;AACrD,QAAI,CAAC,SAAS;AACZ,2BAAO;AAAA,QACL;AAAA;AAAA,EAAoC,cAAc,gBAAgB;AAAA,MACpE;AAAA,IACF,OAAO;AACL,gBAAM;AAAA,QACJ,CAAC,UAAU,WAAW,SAAS,KAAK,GAAG,CAAC;AAAA,QACxC;AAAA,YACA,uCAAiB,EAAE,UAAU,GAAG,KAAK,CAAC;AAAA,MACxC,EAAE,cAAc,KAAK,MAAM;AAAA,IAC7B;AAAA,EACF,CAAC;AAEH,SACG,QAAQ,OAAO,EACf,YAAY,sCAAsC,EAClD,SAAS,UAAU,sDAAsD,EACzE,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,MAAc,SAAS;AACpC,cAAM;AAAA,MACJ,CAAC,UAAU,SAAS,IAAI;AAAA,MACxB;AAAA,UACA,uCAAiB,EAAE,OAAO,KAAK,MAAM,GAAG,GAAG,GAAG,KAAK,CAAC;AAAA,IACtD,EAAE,YAAY,KAAK,MAAM;AAAA,EAC3B,CAAC;AAEH,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -154,7 +154,7 @@ ${import_logger.Logger.errorText(">>")} Available commands:`,
154
154
  nodes: {
155
155
  imported: (env, commit, count) => `[${env}] ${commit ? `Imported` : `Will import`} ${count} nodes`,
156
156
  failedImport: (env) => `[${env}] Unable to import nodes`,
157
- removed: (env, commit) => `[${env}] ${commit ? `Deleted` : `Will delete`} nodes`,
157
+ removed: (env, commit, root) => `[${env}] ${commit ? `Deleted` : `Will delete`} nodes at ${root}`,
158
158
  failedRemove: (env) => `[${env}] Unable to delete nodes`,
159
159
  notFound: (env) => `[${env}] Nodes were not found `,
160
160
  commitTip: () => `Add --commit flag to commit the previewed changes`,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/localisation/en-GB.ts"],
4
- "sourcesContent": ["import {\n BlockActionType,\n BlockRunningStatus,\n MigrateModelsResult,\n MigrateStatus,\n} from 'migratortron';\nimport { GitHelper } from '~/util/git';\nimport { Logger } from '~/util/logger';\nimport { winSlash } from '~/util/os';\n\nexport const LogMessages = {\n app: {\n contensis: () => 'Contensis',\n quit: () => `Goodbye \uD83D\uDC4B\\n`,\n startup: (version: string) =>\n `v${version} \u00A9 2001-${new Date().getFullYear()} Zengenti \uD83C\uDDEC\uD83C\uDDE7. \\n - Creators of Contensis and purveyors of other fine software\\n\\n\uD83D\uDC4B Welcome to the contensis-cli\\n`,\n help: () =>\n 'Press [CTRL]+[C] or type \"quit\" to return to your system shell\\nPress [TAB] for suggestions\\n',\n suggestions: () =>\n `\\n${Logger.errorText('>>')} Press [TAB] for suggestions\\n`,\n autocomplete: () => `\\n${Logger.errorText('>>')} Available commands:`,\n unknownError: () => `Something went wrong...`,\n fileOutput: (format = 'json', path?: string) =>\n `Output ${format} file: ${Logger.infoText(path)}\\n`,\n noFileOutput: () => `No output written\\n`,\n },\n command: {\n notKnown: (command: string) => `${command} is not known`,\n },\n envs: {\n found: (num: number) =>\n `environments store found containing ${num} environment${\n num === 1 ? '' : 's'\n }`,\n tip: () =>\n `Connect to a Contensis cloud instance using \"contensis connect {cms alias}\"`,\n },\n connect: {\n command: {\n name: () => 'connect',\n example: () => `Example call:\\n > connect example-dev`,\n },\n args: {\n alias: {\n name: () => '<alias>',\n description: () => 'the Contensis Cloud alias to connect with',\n },\n },\n noEnv: () => `Cannot connect - no environment alias specified`,\n unreachable: (url: string, status: number) =>\n `Cannot reach ${url}${status ? ` - status ${status}` : ''}`,\n connected: (env: string) => `Current environment set to \"${env}\"`,\n help: () =>\n `Connect to a Contensis cloud instance using \"contensis connect {cms alias}\"`,\n projects: () => `Available projects:`,\n noProjects: () => `Cannot retrieve projects list`,\n tip: () =>\n `Introduce yourself with \"login {username}\" or \"login {clientId} -s {secret}\" or by passing credentials as options with your command`,\n },\n login: {\n command: {\n name: () => 'login',\n usage: () => `<user/clientId> [password] [-s <sharedSecret>]`,\n example: () =>\n `Example call:\\n > login myuserid\\n -- or --\\n > login {clientId} -s {sharedSecret}`,\n },\n args: {\n user: {\n name: () => '<user/clientId>',\n description: () => 'the username to login with',\n },\n password: {\n name: () => '[password]',\n description: () =>\n 'the password to use to login with (optional/insecure)',\n },\n secret: {\n name: () => '-s --sharedSecret <sharedSecret>',\n description: () =>\n 'the shared secret to use when logging in with a client id',\n },\n },\n passwordPrompt: (env?: string, userId?: string) =>\n userId\n ? `Enter password for ${userId}@${env}:`\n : `Please enter a password`,\n failed: (env: string, userId: string) =>\n `Unable to login to ${env} as ${userId}`,\n success: (env: string, userId: string) =>\n `User ${userId} connected to ${env} successfully\\n`,\n insecurePassword: () =>\n `Could not connect to local keystore - your password could be stored unencrypted!`,\n noEnv: () => `No environment set, use \"contensis connect {alias}\" first`,\n noUserId: () => `No user id specified`,\n },\n projects: {\n list: () => `Available projects:`,\n noList: () => `Cannot retrieve projects list`,\n set: (projectId: string) =>\n `Current project is set to ${Logger.highlightText(projectId)}`,\n failedSet: (projectId: string) =>\n `Project ${Logger.highlightText(projectId)} not found`,\n tip: () =>\n `You need to set your current working project with \"set project {projectId}\"`,\n created: (env: string, id: string) =>\n `[${env}] Created project ${Logger.highlightText(id)}`,\n failedCreate: (env: string, id: string) =>\n `[${env}] Unable to create project ${Logger.highlightText(id)}`,\n updated: (env: string, id: string) =>\n `[${env}] Updated project ${Logger.highlightText(id)}`,\n failedUpdate: (env: string, id: string) =>\n `[${env}] Unable to update project ${Logger.highlightText(id)}`,\n },\n migrate: {\n models: {\n result: (\n status: keyof MigrateModelsResult['project']['contentTypes']\n ) => {\n switch (status) {\n case 'created':\n case 'updated':\n return Logger.successText;\n case 'errors':\n return Logger.errorText;\n default:\n return Logger.infoText;\n }\n },\n },\n status: (status: MigrateStatus) => {\n switch (status) {\n case 'no change':\n return Logger.successText;\n case 'create':\n case 'two-pass':\n case 'update':\n case 'delete':\n return Logger.warningText;\n case 'error':\n case 'not found':\n return Logger.errorText;\n default:\n return Logger.infoText;\n }\n },\n },\n models: {\n list: (projectId: string) =>\n `Content models in ${Logger.highlightText(projectId)}:`,\n noList: (projectId: string) =>\n `[${projectId}] Cannot retrieve content models`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Content models ${Logger.infoText(`[ ${id} ]`)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get content models ${Logger.highlightText(id)}`,\n },\n nodes: {\n imported: (env: string, commit: boolean, count: number) =>\n `[${env}] ${commit ? `Imported` : `Will import`} ${count} nodes`,\n failedImport: (env: string) => `[${env}] Unable to import nodes`,\n removed: (env: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} nodes`,\n failedRemove: (env: string) => `[${env}] Unable to delete nodes`,\n notFound: (env: string) => `[${env}] Nodes were not found `,\n commitTip: () => `Add --commit flag to commit the previewed changes`,\n failedGet: (projectId: string) =>\n `[${projectId}] Cannot retrieve nodes from Site view`,\n get: (projectId: string, root: string, depth: number) =>\n `[${projectId}] Site view nodes at: ${Logger.highlightText(root)}${\n depth ? ` to a depth of ${depth}` : ``\n }\\n`,\n noChange: (env: string) => `[${env}] No changes to be made`,\n },\n contenttypes: {\n list: (projectId: string) =>\n `Content types in ${Logger.highlightText(projectId)}:`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Content type ${Logger.highlightText(id)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get content type ${Logger.highlightText(id)}`,\n created: (projectId: string, id: string, status?: string) =>\n `[${projectId}] Content type ${status}d ${Logger.highlightText(id)}`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${\n commit ? `Deleted` : `Will delete`\n } content type ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete content type ${Logger.highlightText(id)}`,\n },\n components: {\n list: (projectId: string) =>\n `Components in ${Logger.highlightText(projectId)}:`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Component ${Logger.highlightText(id)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get component ${Logger.highlightText(id)}`,\n created: (projectId: string, id: string, status?: string) =>\n `[${projectId}] Component ${status}d ${Logger.highlightText(id)}`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${\n commit ? `Deleted` : `Will delete`\n } component ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete component ${Logger.highlightText(id)}`,\n },\n version: {\n set: (env: string, versionStatus: string) =>\n `[${env}] Content version status set to \"${versionStatus}\"`,\n invalid: (versionStatus: string) =>\n `Content version status \"${versionStatus}\" is not valid, allowed values are \"published\" or \"latest\".`,\n noEnv: () =>\n `No Contensis environment set, connect to your Contensis cloud instance using \"contensis connect {cms alias}\"`,\n },\n entries: {\n imported: (env: string, commit: boolean, count: number) =>\n `[${env}] ${commit ? `Imported` : `Will import`} ${count} entries`,\n failedImport: (env: string) => `[${env}] Unable to import entries`,\n removed: (env: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} entries`,\n failedRemove: (env: string) => `[${env}] Unable to delete entries`,\n notFound: (env: string) => `[${env}] Entries were not found`,\n commitTip: () => `Add --commit flag to commit the previewed changes`,\n },\n keys: {\n list: (env: string) => `[${env}] API keys:`,\n noList: (env: string) => `[${env}] Cannot retrieve API keys`,\n created: (env: string, name: string) =>\n `[${env}] Created API key ${Logger.highlightText(name)}`,\n tip: () =>\n `Assign your new key to a role with \"set role assignments\", or create a new role with \"create role\"`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create API key ${Logger.highlightText(name)}`,\n failedUpdate: (env: string, name: string) =>\n `[${env}] Unable to update API key ${Logger.highlightText(name)}`,\n removed: (env: string, id: string) =>\n `[${env}] Deleted API key ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete API key ${Logger.highlightText(id)}`,\n },\n proxies: {\n list: (env: string, projectId: string | undefined) =>\n `[${env}] Retrieved proxies in project ${projectId}:`,\n noList: (env: string, projectId: string | undefined) =>\n `[${env}] Cannot retrieve proxies in project ${projectId}`,\n // noneExist: () => `Create a role with \"create renderer\"`,\n failedGet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to find proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n created: (env: string, name: string, projectId: string) =>\n `[${env}] Created proxy ${Logger.highlightText(\n name\n )} in project ${projectId}\\n`,\n failedCreate: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to create proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n setPayload: () => `Updating proxy with details\\n`,\n set: () => `Succesfully updated proxy\\n`,\n failedSet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to update proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n removed: (env: string, id: string, projectId: string) =>\n `[${env}] Deleted proxy ${Logger.highlightText(\n id\n )} in project ${projectId}\\n`,\n failedRemove: (env: string, id: string, projectId: string) =>\n `[${env}] Unable to delete proxy ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n renderers: {\n list: (env: string, projectId: string | undefined) =>\n `[${env}] Retrieved renderers in project ${projectId}:`,\n noList: (env: string, projectId: string | undefined) =>\n `[${env}] Cannot retrieve renderers in project ${projectId}`,\n // noneExist: () => `Create a role with \"create renderer\"`,\n failedGet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to find renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n created: (env: string, name: string, projectId: string) =>\n `[${env}] Created renderer ${Logger.highlightText(\n name\n )} in project ${projectId}\\n`,\n failedCreate: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to create renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n setPayload: () => `Updating renderer with details\\n`,\n set: () => `Succesfully updated renderer\\n`,\n failedSet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to update renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n removed: (env: string, id: string, projectId: string) =>\n `[${env}] Deleted renderer ${Logger.highlightText(\n id\n )} in project ${projectId}\\n`,\n failedRemove: (env: string, id: string, projectId: string) =>\n `[${env}] Unable to delete renderer ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n roles: {\n list: (env: string) => `[${env}] Retrieved roles`,\n noList: (env: string) => `[${env}] Cannot retrieve roles`,\n noneExist: () => `Create a role with \"create role\"`,\n failedGet: (env: string, name: string) =>\n `[${env}] Unable to find role ${Logger.highlightText(name)}`,\n created: (env: string, name: string) =>\n `[${env}] Created role ${Logger.highlightText(name)}\\n`,\n tip: () =>\n `Give access to your role with \"set role assignments\", allow your role to do things with \"set role permissions\"`,\n failedCreate: (env: string, name?: string) =>\n `[${env}] Unable to create role ${Logger.highlightText(name)}`,\n setPayload: () => `Updating role with details\\n`,\n set: () => `Succesfully updated role\\n`,\n failedSet: (env: string, name?: string) =>\n `[${env}] Unable to update role ${Logger.highlightText(name)}`,\n removed: (env: string, id: string) =>\n `[${env}] Deleted role ${Logger.highlightText(id)}\\n`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete role ${Logger.highlightText(id)}`,\n },\n blocks: {\n runningStatus: (status: BlockRunningStatus | 'broken') => {\n switch (status) {\n case 'available':\n return Logger.successText(status);\n case 'pending':\n case 'starting':\n case 'stopped':\n return Logger.warningText(status);\n case 'degraded':\n case 'faulted':\n case 'broken':\n return Logger.errorText(status);\n default:\n return Logger.infoText(status);\n }\n },\n get: (id: string, env: string, projectId?: string) =>\n `[${env}] Block ${id} in project ${projectId}:`,\n list: (env: string, projectId?: string) =>\n `[${env}] Blocks in project ${projectId}:`,\n noList: (env: string, projectId?: string) =>\n `[${env}] Cannot retrieve blocks in project ${projectId}`,\n getLogs: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Requesting logs from block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n failedGetLogs: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to fetch block logs for ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n tryPush: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Request to push block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n pushed: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Pushed block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n failedPush: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to push block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n latestVersion: (\n version: string,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Found latest block version ${Logger.highlightText(\n id\n )} in project ${projectId} ${Logger.highlightText(version)}`,\n failedParsingVersion: () =>\n `Did not find a \"version.versionNo\" in response`,\n actionComplete: (\n action: BlockActionType,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Action ${Logger.highlightText(\n action\n )} on ${Logger.highlightText(\n id\n )} in project ${projectId} requested successfully`,\n actionFailed: (\n action: BlockActionType,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Problem executing ${action} on block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n deleted: (id: string, env: string, projectId?: string) =>\n `[${env}] Deleted block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n failedDelete: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to delete block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n stopFollow: (id: string, env: string, projectId?: string) =>\n `[${env}]\\n\\n \uD83D\uDC4C stop fetching new ${Logger.highlightText(\n id\n )} logs in project ${projectId}`,\n timeoutFollow: (id: string, env: string, projectId?: string) =>\n `[${env}]\\n\\n \uD83E\uDD0F pausing fetching new ${Logger.highlightText(\n id\n )} logs in project ${projectId} due to too many requests`,\n },\n webhooks: {\n list: (env: string) => `[${env}] Webhook subscriptions:`,\n noList: (env: string) => `[${env}] Cannot retrieve webhook subscriptions`,\n noneExist: () => `No webhook subscriptions exist`,\n created: (env: string, name: string) =>\n `[${env}] Created Webhook subscription ${Logger.highlightText(name)}`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create Webhook subscription ${Logger.highlightText(\n name\n )}`,\n deleted: (env: string, id: string) =>\n `[${env}] Deleted Webhook subscription ${Logger.highlightText(id)}`,\n failedDelete: (env: string, id: string) =>\n `[${env}] Unable to delete Webhook subscription ${Logger.highlightText(\n id\n )}`,\n },\n workflows: {\n list: (env: string) => `[${env}] Retrieved workflows`,\n noList: (env: string) => `[${env}] Cannot retrieve workflows`,\n noneExist: () => `No workflows found`,\n failedGet: (env: string, name: string) =>\n `[${env}] Unable to find workflow ${Logger.highlightText(name)}`,\n },\n devinit: {\n intro: () => `Contensis developer environment initialisation`,\n //`This will initialise your local working directory to develop with the current connected Contensis project`,\n projectDetails: (\n name: string,\n env: string,\n projectId: string,\n blockId: string,\n git: GitHelper\n ) =>\n `\n Project: ${Logger.standardText(name)}\n - Home: ${Logger.standardText(process.cwd())}\n - Repository: ${Logger.standardText(git.home)} \n - Block id: ${Logger.highlightText(blockId)}\n \n Connect to Contensis instance: ${Logger.standardText(env)}\n - Project id: ${Logger.standardText(projectId)}\n `,\n developmentKey: (name: string, existing: boolean) =>\n ` - ${\n !existing ? 'Create development API key' : 'Development API key found'\n }: ${Logger[!existing ? 'highlightText' : 'standardText'](name)}`,\n deploymentKey: (name: string, existing: boolean) =>\n ` - ${\n !existing ? 'Create deployment API key' : 'Deployment API key found'\n }: ${Logger[!existing ? 'highlightText' : 'standardText'](name)}`,\n ciIntro: (git: GitHelper, location: 'git' | 'env') =>\n `We will create API keys with permissions to use this project with Contensis, and add a job to your CI that will deploy a container build.\n ${\n location === 'git'\n ? `We will ask you to add secrets/variables to your git repository to give your workflow permission to push a Block to Contensis.\n ${Logger.infoText(`You could visit ${git.secretsUri} to check that you can see repository settings, \n a page not found generally indicates you need to ask the repo owner for permission to add repository secrets, \n or ask the repo owner to add these secrets for you.`)}`\n : ''\n }`,\n ciDetails: (filename: string) =>\n `Add push-block job to CI file: ${Logger.highlightText(filename)}\\n`,\n ciMultipleChoices: () =>\n `Multiple GitHub workflow files found\\n${Logger.infoText(\n `Tell us which GitHub workflow builds a container image after each push:`\n )}`,\n ciMultipleBuildJobChoices: () =>\n `Multiple build jobs found in workflow\\n${Logger.infoText(\n `Choose the build job that produces a fresh container image to push to a block:`\n )}`,\n ciMultipleJobChoices: () =>\n `Other jobs found in workflow\\n${Logger.infoText(\n `Choose the job that produces a fresh container image we can push to a block:`\n )}`,\n ciMultipleAppImageVarChoices: () =>\n `Do one of these variables point to your tagged app image?\\n${Logger.infoText(\n `we have included a default choice - ensure your build image is tagged exactly the same as this`\n )}`,\n ciEnterOwnAppImagePrompt: (git: GitHelper) =>\n `Tell us the registry uri your app image is tagged and pushed with (\u23CE accept default) \\n${Logger.infoText(\n `Tip: ${\n git.type === 'github'\n ? `GitHub context variables available\\nhttps://docs.github.com/en/actions/learn-github-actions/variables#using-contexts-to-access-variable-values`\n : `GitLab CI/CD variables available\\nhttps://docs.gitlab.com/ee/ci/variables/`\n }`\n )}\\n`,\n confirm: () =>\n `Confirm these details are correct so we can make changes to your project`,\n createDevKey: (keyName: string, existing: boolean) =>\n `${\n !existing ? 'Created' : 'Checked permissions for'\n } development API key ${Logger.standardText(keyName)}`,\n createDeployKey: (keyName: string, existing: boolean) =>\n `${\n !existing ? 'Created' : 'Checked permissions for'\n } deployment API key ${Logger.standardText(keyName)}`,\n createKeyFail: (keyName: string, existing: boolean) =>\n `Failed to ${\n !existing ? 'create' : 'update'\n } API key ${Logger.highlightText(keyName)}`,\n writeEnvFile: () => `Written .env file to project home directory`,\n useEnvFileTip: () =>\n `You should alter existing project code that connects a Contensis client to use the variables from this file`,\n writeCiFile: (ciFilePath: string) =>\n `Updated CI file ${Logger.standardText(winSlash(ciFilePath))}`,\n ciFileNoChanges: (ciFilePath: string) =>\n `No updates needed for CI file ${Logger.standardText(\n winSlash(ciFilePath)\n )}`,\n ciBlockTip: (blockId: string, env: string, projectId: string) =>\n `A job is included to deploy your built container image to ${Logger.standardText(\n projectId\n )} at ${Logger.standardText(env)} in a block called ${Logger.standardText(\n blockId\n )}`,\n addGitSecretsIntro: () =>\n `We have created an API key that allows you to deploy your app image to a Contensis Block but we need you to add these details to your GitLab repository.`,\n addGitSecretsHelp: (git: GitHelper, id?: string, secret?: string) =>\n `Add secrets or variables in your repository's settings page\\n\\nGo to ${Logger.highlightText(\n git.secretsUri\n )}\\n\\n${\n git.type === 'github'\n ? `Add a \"New repository secret\"`\n : `Expand \"Variables\" and hit \"Add variable\"`\n }\\n\\n ${\n git.type === 'github' ? `Secret name:` : `Key:`\n } ${Logger.highlightText(`CONTENSIS_CLIENT_ID`)}\\n ${\n git.type === 'github' ? `Secret:` : `Value:`\n } ${Logger.standardText(\n id\n )}\\n\\n ${`Add one more secret/variable to the repository`}\\n\\n ${\n git.type === 'github' ? `Secret name:` : `Key:`\n } ${Logger.highlightText(`CONTENSIS_SHARED_SECRET`)}\\n ${\n git.type === 'github' ? `Secret:` : `Value:`\n } ${Logger.standardText(secret)}`,\n accessTokenFetch: () => `Please wait, fecthing Delivery API token \u23F3`,\n accessTokenSuccess: (token: string) =>\n `Successfully fetched Delivery API token \uD83D\uDC49 ${Logger.infoText(token)}`,\n accessTokenFailed: () =>\n `Something went wrong! If the problem persists, please contact our support team \uD83D\uDEDF`,\n accessTokenPermission: () =>\n `We need permission to fetch your Delivery API token, please try again \u26A0\uFE0F`,\n clientDetailsLocation: () =>\n `Which option would you like to use for storing your client ID and secret`,\n clientDetailsInGit: (git: GitHelper) =>\n `${\n git.type === 'github' ? 'GitHub' : 'GitLab'\n } variables (recommended for public repositories)`,\n clientDetailsInEnv: () =>\n `Env variables (recommended for private repositories)`,\n success: () => `Contensis developer environment initialisation complete`,\n partialSuccess: () =>\n `Contensis developer environment initialisation completed with errors`,\n failed: () => `Contensis developer environment initialisation failed`,\n dryRun: () =>\n `Contensis developer environment initialisation dry run completed`,\n noChanges: () =>\n `No changes were made to your project, run the command again without the ${Logger.highlightText(\n '--dry-run'\n )} flag to update your project with these changes`,\n startProjectTip: () =>\n `Start up your project in the normal way for development`,\n blockIdQuestion: () =>\n `Please enter your block id, this should be unquie and in kebab case e.g ${Logger.highlightText(\n 'my-awesome-website'\n )}`,\n },\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,oBAAuB;AACvB,gBAAyB;AAElB,MAAM,cAAc;AAAA,EACzB,KAAK;AAAA,IACH,WAAW,MAAM;AAAA,IACjB,MAAM,MAAM;AAAA;AAAA,IACZ,SAAS,CAAC,YACR,IAAI,qBAAkB,IAAI,KAAK,EAAE,YAAY;AAAA;AAAA;AAAA;AAAA;AAAA,IAC/C,MAAM,MACJ;AAAA,IACF,aAAa,MACX;AAAA,EAAK,qBAAO,UAAU,IAAI;AAAA;AAAA,IAC5B,cAAc,MAAM;AAAA,EAAK,qBAAO,UAAU,IAAI;AAAA,IAC9C,cAAc,MAAM;AAAA,IACpB,YAAY,CAAC,SAAS,QAAQ,SAC5B,UAAU,gBAAgB,qBAAO,SAAS,IAAI;AAAA;AAAA,IAChD,cAAc,MAAM;AAAA;AAAA,EACtB;AAAA,EACA,SAAS;AAAA,IACP,UAAU,CAAC,YAAoB,GAAG;AAAA,EACpC;AAAA,EACA,MAAM;AAAA,IACJ,OAAO,CAAC,QACN,uCAAuC,kBACrC,QAAQ,IAAI,KAAK;AAAA,IAErB,KAAK,MACH;AAAA,EACJ;AAAA,EACA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,WAC/C;AAAA;AAAA,QAAwE,qBAAO;AAAA,MAC7E,IAAI;AAAA,IACN;AAAA;AAAA,EACE,IAAI,SAAS,WACT,kCACA;AAAA;AAAA,MAEJ,IAAI,SAAS,WAAW,iBAAiB,UACvC,qBAAO,cAAc,qBAAqB;AAAA,MAC5C,IAAI,SAAS,WAAW,YAAY,YAClC,qBAAO;AAAA,MACT;AAAA,IACF;AAAA;AAAA,GAAS;AAAA;AAAA,MACP,IAAI,SAAS,WAAW,iBAAiB,UACvC,qBAAO,cAAc,yBAAyB;AAAA,MAChD,IAAI,SAAS,WAAW,YAAY,YAClC,qBAAO,aAAa,MAAM;AAAA,IAChC,kBAAkB,MAAM;AAAA,IACxB,oBAAoB,CAAC,UACnB,qDAA8C,qBAAO,SAAS,KAAK;AAAA,IACrE,mBAAmB,MACjB;AAAA,IACF,uBAAuB,MACrB;AAAA,IACF,uBAAuB,MACrB;AAAA,IACF,oBAAoB,CAAC,QACnB,GACE,IAAI,SAAS,WAAW,WAAW;AAAA,IAEvC,oBAAoB,MAClB;AAAA,IACF,SAAS,MAAM;AAAA,IACf,gBAAgB,MACd;AAAA,IACF,QAAQ,MAAM;AAAA,IACd,QAAQ,MACN;AAAA,IACF,WAAW,MACT,2EAA2E,qBAAO;AAAA,MAChF;AAAA,IACF;AAAA,IACF,iBAAiB,MACf;AAAA,IACF,iBAAiB,MACf,2EAA2E,qBAAO;AAAA,MAChF;AAAA,IACF;AAAA,EACJ;AACF;",
4
+ "sourcesContent": ["import {\n BlockActionType,\n BlockRunningStatus,\n MigrateModelsResult,\n MigrateStatus,\n} from 'migratortron';\nimport { GitHelper } from '~/util/git';\nimport { Logger } from '~/util/logger';\nimport { winSlash } from '~/util/os';\n\nexport const LogMessages = {\n app: {\n contensis: () => 'Contensis',\n quit: () => `Goodbye \uD83D\uDC4B\\n`,\n startup: (version: string) =>\n `v${version} \u00A9 2001-${new Date().getFullYear()} Zengenti \uD83C\uDDEC\uD83C\uDDE7. \\n - Creators of Contensis and purveyors of other fine software\\n\\n\uD83D\uDC4B Welcome to the contensis-cli\\n`,\n help: () =>\n 'Press [CTRL]+[C] or type \"quit\" to return to your system shell\\nPress [TAB] for suggestions\\n',\n suggestions: () =>\n `\\n${Logger.errorText('>>')} Press [TAB] for suggestions\\n`,\n autocomplete: () => `\\n${Logger.errorText('>>')} Available commands:`,\n unknownError: () => `Something went wrong...`,\n fileOutput: (format = 'json', path?: string) =>\n `Output ${format} file: ${Logger.infoText(path)}\\n`,\n noFileOutput: () => `No output written\\n`,\n },\n command: {\n notKnown: (command: string) => `${command} is not known`,\n },\n envs: {\n found: (num: number) =>\n `environments store found containing ${num} environment${\n num === 1 ? '' : 's'\n }`,\n tip: () =>\n `Connect to a Contensis cloud instance using \"contensis connect {cms alias}\"`,\n },\n connect: {\n command: {\n name: () => 'connect',\n example: () => `Example call:\\n > connect example-dev`,\n },\n args: {\n alias: {\n name: () => '<alias>',\n description: () => 'the Contensis Cloud alias to connect with',\n },\n },\n noEnv: () => `Cannot connect - no environment alias specified`,\n unreachable: (url: string, status: number) =>\n `Cannot reach ${url}${status ? ` - status ${status}` : ''}`,\n connected: (env: string) => `Current environment set to \"${env}\"`,\n help: () =>\n `Connect to a Contensis cloud instance using \"contensis connect {cms alias}\"`,\n projects: () => `Available projects:`,\n noProjects: () => `Cannot retrieve projects list`,\n tip: () =>\n `Introduce yourself with \"login {username}\" or \"login {clientId} -s {secret}\" or by passing credentials as options with your command`,\n },\n login: {\n command: {\n name: () => 'login',\n usage: () => `<user/clientId> [password] [-s <sharedSecret>]`,\n example: () =>\n `Example call:\\n > login myuserid\\n -- or --\\n > login {clientId} -s {sharedSecret}`,\n },\n args: {\n user: {\n name: () => '<user/clientId>',\n description: () => 'the username to login with',\n },\n password: {\n name: () => '[password]',\n description: () =>\n 'the password to use to login with (optional/insecure)',\n },\n secret: {\n name: () => '-s --sharedSecret <sharedSecret>',\n description: () =>\n 'the shared secret to use when logging in with a client id',\n },\n },\n passwordPrompt: (env?: string, userId?: string) =>\n userId\n ? `Enter password for ${userId}@${env}:`\n : `Please enter a password`,\n failed: (env: string, userId: string) =>\n `Unable to login to ${env} as ${userId}`,\n success: (env: string, userId: string) =>\n `User ${userId} connected to ${env} successfully\\n`,\n insecurePassword: () =>\n `Could not connect to local keystore - your password could be stored unencrypted!`,\n noEnv: () => `No environment set, use \"contensis connect {alias}\" first`,\n noUserId: () => `No user id specified`,\n },\n projects: {\n list: () => `Available projects:`,\n noList: () => `Cannot retrieve projects list`,\n set: (projectId: string) =>\n `Current project is set to ${Logger.highlightText(projectId)}`,\n failedSet: (projectId: string) =>\n `Project ${Logger.highlightText(projectId)} not found`,\n tip: () =>\n `You need to set your current working project with \"set project {projectId}\"`,\n created: (env: string, id: string) =>\n `[${env}] Created project ${Logger.highlightText(id)}`,\n failedCreate: (env: string, id: string) =>\n `[${env}] Unable to create project ${Logger.highlightText(id)}`,\n updated: (env: string, id: string) =>\n `[${env}] Updated project ${Logger.highlightText(id)}`,\n failedUpdate: (env: string, id: string) =>\n `[${env}] Unable to update project ${Logger.highlightText(id)}`,\n },\n migrate: {\n models: {\n result: (\n status: keyof MigrateModelsResult['project']['contentTypes']\n ) => {\n switch (status) {\n case 'created':\n case 'updated':\n return Logger.successText;\n case 'errors':\n return Logger.errorText;\n default:\n return Logger.infoText;\n }\n },\n },\n status: (status: MigrateStatus) => {\n switch (status) {\n case 'no change':\n return Logger.successText;\n case 'create':\n case 'two-pass':\n case 'update':\n case 'delete':\n return Logger.warningText;\n case 'error':\n case 'not found':\n return Logger.errorText;\n default:\n return Logger.infoText;\n }\n },\n },\n models: {\n list: (projectId: string) =>\n `Content models in ${Logger.highlightText(projectId)}:`,\n noList: (projectId: string) =>\n `[${projectId}] Cannot retrieve content models`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Content models ${Logger.infoText(`[ ${id} ]`)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get content models ${Logger.highlightText(id)}`,\n },\n nodes: {\n imported: (env: string, commit: boolean, count: number) =>\n `[${env}] ${commit ? `Imported` : `Will import`} ${count} nodes`,\n failedImport: (env: string) => `[${env}] Unable to import nodes`,\n removed: (env: string, commit: boolean, root: string) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} nodes at ${root}`,\n failedRemove: (env: string) => `[${env}] Unable to delete nodes`,\n notFound: (env: string) => `[${env}] Nodes were not found `,\n commitTip: () => `Add --commit flag to commit the previewed changes`,\n failedGet: (projectId: string) =>\n `[${projectId}] Cannot retrieve nodes from Site view`,\n get: (projectId: string, root: string, depth: number) =>\n `[${projectId}] Site view nodes at: ${Logger.highlightText(root)}${\n depth ? ` to a depth of ${depth}` : ``\n }\\n`,\n noChange: (env: string) => `[${env}] No changes to be made`,\n },\n contenttypes: {\n list: (projectId: string) =>\n `Content types in ${Logger.highlightText(projectId)}:`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Content type ${Logger.highlightText(id)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get content type ${Logger.highlightText(id)}`,\n created: (projectId: string, id: string, status?: string) =>\n `[${projectId}] Content type ${status}d ${Logger.highlightText(id)}`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${\n commit ? `Deleted` : `Will delete`\n } content type ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete content type ${Logger.highlightText(id)}`,\n },\n components: {\n list: (projectId: string) =>\n `Components in ${Logger.highlightText(projectId)}:`,\n get: (projectId: string, id: string) =>\n `[${projectId}] Component ${Logger.highlightText(id)}`,\n failedGet: (projectId: string, id: string) =>\n `[${projectId}] Unable to get component ${Logger.highlightText(id)}`,\n created: (projectId: string, id: string, status?: string) =>\n `[${projectId}] Component ${status}d ${Logger.highlightText(id)}`,\n removed: (env: string, id: string, commit: boolean) =>\n `[${env}] ${\n commit ? `Deleted` : `Will delete`\n } component ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete component ${Logger.highlightText(id)}`,\n },\n version: {\n set: (env: string, versionStatus: string) =>\n `[${env}] Content version status set to \"${versionStatus}\"`,\n invalid: (versionStatus: string) =>\n `Content version status \"${versionStatus}\" is not valid, allowed values are \"published\" or \"latest\".`,\n noEnv: () =>\n `No Contensis environment set, connect to your Contensis cloud instance using \"contensis connect {cms alias}\"`,\n },\n entries: {\n imported: (env: string, commit: boolean, count: number) =>\n `[${env}] ${commit ? `Imported` : `Will import`} ${count} entries`,\n failedImport: (env: string) => `[${env}] Unable to import entries`,\n removed: (env: string, commit: boolean) =>\n `[${env}] ${commit ? `Deleted` : `Will delete`} entries`,\n failedRemove: (env: string) => `[${env}] Unable to delete entries`,\n notFound: (env: string) => `[${env}] Entries were not found`,\n commitTip: () => `Add --commit flag to commit the previewed changes`,\n },\n keys: {\n list: (env: string) => `[${env}] API keys:`,\n noList: (env: string) => `[${env}] Cannot retrieve API keys`,\n created: (env: string, name: string) =>\n `[${env}] Created API key ${Logger.highlightText(name)}`,\n tip: () =>\n `Assign your new key to a role with \"set role assignments\", or create a new role with \"create role\"`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create API key ${Logger.highlightText(name)}`,\n failedUpdate: (env: string, name: string) =>\n `[${env}] Unable to update API key ${Logger.highlightText(name)}`,\n removed: (env: string, id: string) =>\n `[${env}] Deleted API key ${Logger.highlightText(id)}`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete API key ${Logger.highlightText(id)}`,\n },\n proxies: {\n list: (env: string, projectId: string | undefined) =>\n `[${env}] Retrieved proxies in project ${projectId}:`,\n noList: (env: string, projectId: string | undefined) =>\n `[${env}] Cannot retrieve proxies in project ${projectId}`,\n // noneExist: () => `Create a role with \"create renderer\"`,\n failedGet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to find proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n created: (env: string, name: string, projectId: string) =>\n `[${env}] Created proxy ${Logger.highlightText(\n name\n )} in project ${projectId}\\n`,\n failedCreate: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to create proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n setPayload: () => `Updating proxy with details\\n`,\n set: () => `Succesfully updated proxy\\n`,\n failedSet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to update proxy ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n removed: (env: string, id: string, projectId: string) =>\n `[${env}] Deleted proxy ${Logger.highlightText(\n id\n )} in project ${projectId}\\n`,\n failedRemove: (env: string, id: string, projectId: string) =>\n `[${env}] Unable to delete proxy ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n renderers: {\n list: (env: string, projectId: string | undefined) =>\n `[${env}] Retrieved renderers in project ${projectId}:`,\n noList: (env: string, projectId: string | undefined) =>\n `[${env}] Cannot retrieve renderers in project ${projectId}`,\n // noneExist: () => `Create a role with \"create renderer\"`,\n failedGet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to find renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n created: (env: string, name: string, projectId: string) =>\n `[${env}] Created renderer ${Logger.highlightText(\n name\n )} in project ${projectId}\\n`,\n failedCreate: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to create renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n setPayload: () => `Updating renderer with details\\n`,\n set: () => `Succesfully updated renderer\\n`,\n failedSet: (env: string, name: string, projectId: string) =>\n `[${env}] Unable to update renderer ${Logger.highlightText(\n name\n )} in project ${projectId}`,\n removed: (env: string, id: string, projectId: string) =>\n `[${env}] Deleted renderer ${Logger.highlightText(\n id\n )} in project ${projectId}\\n`,\n failedRemove: (env: string, id: string, projectId: string) =>\n `[${env}] Unable to delete renderer ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n },\n roles: {\n list: (env: string) => `[${env}] Retrieved roles`,\n noList: (env: string) => `[${env}] Cannot retrieve roles`,\n noneExist: () => `Create a role with \"create role\"`,\n failedGet: (env: string, name: string) =>\n `[${env}] Unable to find role ${Logger.highlightText(name)}`,\n created: (env: string, name: string) =>\n `[${env}] Created role ${Logger.highlightText(name)}\\n`,\n tip: () =>\n `Give access to your role with \"set role assignments\", allow your role to do things with \"set role permissions\"`,\n failedCreate: (env: string, name?: string) =>\n `[${env}] Unable to create role ${Logger.highlightText(name)}`,\n setPayload: () => `Updating role with details\\n`,\n set: () => `Succesfully updated role\\n`,\n failedSet: (env: string, name?: string) =>\n `[${env}] Unable to update role ${Logger.highlightText(name)}`,\n removed: (env: string, id: string) =>\n `[${env}] Deleted role ${Logger.highlightText(id)}\\n`,\n failedRemove: (env: string, id: string) =>\n `[${env}] Unable to delete role ${Logger.highlightText(id)}`,\n },\n blocks: {\n runningStatus: (status: BlockRunningStatus | 'broken') => {\n switch (status) {\n case 'available':\n return Logger.successText(status);\n case 'pending':\n case 'starting':\n case 'stopped':\n return Logger.warningText(status);\n case 'degraded':\n case 'faulted':\n case 'broken':\n return Logger.errorText(status);\n default:\n return Logger.infoText(status);\n }\n },\n get: (id: string, env: string, projectId?: string) =>\n `[${env}] Block ${id} in project ${projectId}:`,\n list: (env: string, projectId?: string) =>\n `[${env}] Blocks in project ${projectId}:`,\n noList: (env: string, projectId?: string) =>\n `[${env}] Cannot retrieve blocks in project ${projectId}`,\n getLogs: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Requesting logs from block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n failedGetLogs: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to fetch block logs for ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n tryPush: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Request to push block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n pushed: (id: string, branch: string, env: string, projectId?: string) =>\n `[${env}] Pushed block ${Logger.highlightText(\n id\n )} in branch ${branch} in project ${projectId}`,\n failedPush: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to push block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n latestVersion: (\n version: string,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Found latest block version ${Logger.highlightText(\n id\n )} in project ${projectId} ${Logger.highlightText(version)}`,\n failedParsingVersion: () =>\n `Did not find a \"version.versionNo\" in response`,\n actionComplete: (\n action: BlockActionType,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Action ${Logger.highlightText(\n action\n )} on ${Logger.highlightText(\n id\n )} in project ${projectId} requested successfully`,\n actionFailed: (\n action: BlockActionType,\n id: string,\n env: string,\n projectId?: string\n ) =>\n `[${env}] Problem executing ${action} on block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n deleted: (id: string, env: string, projectId?: string) =>\n `[${env}] Deleted block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n failedDelete: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to delete block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n stopFollow: (id: string, env: string, projectId?: string) =>\n `[${env}]\\n\\n \uD83D\uDC4C stop fetching new ${Logger.highlightText(\n id\n )} logs in project ${projectId}`,\n timeoutFollow: (id: string, env: string, projectId?: string) =>\n `[${env}]\\n\\n \uD83E\uDD0F pausing fetching new ${Logger.highlightText(\n id\n )} logs in project ${projectId} due to too many requests`,\n },\n webhooks: {\n list: (env: string) => `[${env}] Webhook subscriptions:`,\n noList: (env: string) => `[${env}] Cannot retrieve webhook subscriptions`,\n noneExist: () => `No webhook subscriptions exist`,\n created: (env: string, name: string) =>\n `[${env}] Created Webhook subscription ${Logger.highlightText(name)}`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create Webhook subscription ${Logger.highlightText(\n name\n )}`,\n deleted: (env: string, id: string) =>\n `[${env}] Deleted Webhook subscription ${Logger.highlightText(id)}`,\n failedDelete: (env: string, id: string) =>\n `[${env}] Unable to delete Webhook subscription ${Logger.highlightText(\n id\n )}`,\n },\n workflows: {\n list: (env: string) => `[${env}] Retrieved workflows`,\n noList: (env: string) => `[${env}] Cannot retrieve workflows`,\n noneExist: () => `No workflows found`,\n failedGet: (env: string, name: string) =>\n `[${env}] Unable to find workflow ${Logger.highlightText(name)}`,\n },\n devinit: {\n intro: () => `Contensis developer environment initialisation`,\n //`This will initialise your local working directory to develop with the current connected Contensis project`,\n projectDetails: (\n name: string,\n env: string,\n projectId: string,\n blockId: string,\n git: GitHelper\n ) =>\n `\n Project: ${Logger.standardText(name)}\n - Home: ${Logger.standardText(process.cwd())}\n - Repository: ${Logger.standardText(git.home)} \n - Block id: ${Logger.highlightText(blockId)}\n \n Connect to Contensis instance: ${Logger.standardText(env)}\n - Project id: ${Logger.standardText(projectId)}\n `,\n developmentKey: (name: string, existing: boolean) =>\n ` - ${\n !existing ? 'Create development API key' : 'Development API key found'\n }: ${Logger[!existing ? 'highlightText' : 'standardText'](name)}`,\n deploymentKey: (name: string, existing: boolean) =>\n ` - ${\n !existing ? 'Create deployment API key' : 'Deployment API key found'\n }: ${Logger[!existing ? 'highlightText' : 'standardText'](name)}`,\n ciIntro: (git: GitHelper, location: 'git' | 'env') =>\n `We will create API keys with permissions to use this project with Contensis, and add a job to your CI that will deploy a container build.\n ${\n location === 'git'\n ? `We will ask you to add secrets/variables to your git repository to give your workflow permission to push a Block to Contensis.\n ${Logger.infoText(`You could visit ${git.secretsUri} to check that you can see repository settings, \n a page not found generally indicates you need to ask the repo owner for permission to add repository secrets, \n or ask the repo owner to add these secrets for you.`)}`\n : ''\n }`,\n ciDetails: (filename: string) =>\n `Add push-block job to CI file: ${Logger.highlightText(filename)}\\n`,\n ciMultipleChoices: () =>\n `Multiple GitHub workflow files found\\n${Logger.infoText(\n `Tell us which GitHub workflow builds a container image after each push:`\n )}`,\n ciMultipleBuildJobChoices: () =>\n `Multiple build jobs found in workflow\\n${Logger.infoText(\n `Choose the build job that produces a fresh container image to push to a block:`\n )}`,\n ciMultipleJobChoices: () =>\n `Other jobs found in workflow\\n${Logger.infoText(\n `Choose the job that produces a fresh container image we can push to a block:`\n )}`,\n ciMultipleAppImageVarChoices: () =>\n `Do one of these variables point to your tagged app image?\\n${Logger.infoText(\n `we have included a default choice - ensure your build image is tagged exactly the same as this`\n )}`,\n ciEnterOwnAppImagePrompt: (git: GitHelper) =>\n `Tell us the registry uri your app image is tagged and pushed with (\u23CE accept default) \\n${Logger.infoText(\n `Tip: ${\n git.type === 'github'\n ? `GitHub context variables available\\nhttps://docs.github.com/en/actions/learn-github-actions/variables#using-contexts-to-access-variable-values`\n : `GitLab CI/CD variables available\\nhttps://docs.gitlab.com/ee/ci/variables/`\n }`\n )}\\n`,\n confirm: () =>\n `Confirm these details are correct so we can make changes to your project`,\n createDevKey: (keyName: string, existing: boolean) =>\n `${\n !existing ? 'Created' : 'Checked permissions for'\n } development API key ${Logger.standardText(keyName)}`,\n createDeployKey: (keyName: string, existing: boolean) =>\n `${\n !existing ? 'Created' : 'Checked permissions for'\n } deployment API key ${Logger.standardText(keyName)}`,\n createKeyFail: (keyName: string, existing: boolean) =>\n `Failed to ${\n !existing ? 'create' : 'update'\n } API key ${Logger.highlightText(keyName)}`,\n writeEnvFile: () => `Written .env file to project home directory`,\n useEnvFileTip: () =>\n `You should alter existing project code that connects a Contensis client to use the variables from this file`,\n writeCiFile: (ciFilePath: string) =>\n `Updated CI file ${Logger.standardText(winSlash(ciFilePath))}`,\n ciFileNoChanges: (ciFilePath: string) =>\n `No updates needed for CI file ${Logger.standardText(\n winSlash(ciFilePath)\n )}`,\n ciBlockTip: (blockId: string, env: string, projectId: string) =>\n `A job is included to deploy your built container image to ${Logger.standardText(\n projectId\n )} at ${Logger.standardText(env)} in a block called ${Logger.standardText(\n blockId\n )}`,\n addGitSecretsIntro: () =>\n `We have created an API key that allows you to deploy your app image to a Contensis Block but we need you to add these details to your GitLab repository.`,\n addGitSecretsHelp: (git: GitHelper, id?: string, secret?: string) =>\n `Add secrets or variables in your repository's settings page\\n\\nGo to ${Logger.highlightText(\n git.secretsUri\n )}\\n\\n${\n git.type === 'github'\n ? `Add a \"New repository secret\"`\n : `Expand \"Variables\" and hit \"Add variable\"`\n }\\n\\n ${\n git.type === 'github' ? `Secret name:` : `Key:`\n } ${Logger.highlightText(`CONTENSIS_CLIENT_ID`)}\\n ${\n git.type === 'github' ? `Secret:` : `Value:`\n } ${Logger.standardText(\n id\n )}\\n\\n ${`Add one more secret/variable to the repository`}\\n\\n ${\n git.type === 'github' ? `Secret name:` : `Key:`\n } ${Logger.highlightText(`CONTENSIS_SHARED_SECRET`)}\\n ${\n git.type === 'github' ? `Secret:` : `Value:`\n } ${Logger.standardText(secret)}`,\n accessTokenFetch: () => `Please wait, fecthing Delivery API token \u23F3`,\n accessTokenSuccess: (token: string) =>\n `Successfully fetched Delivery API token \uD83D\uDC49 ${Logger.infoText(token)}`,\n accessTokenFailed: () =>\n `Something went wrong! If the problem persists, please contact our support team \uD83D\uDEDF`,\n accessTokenPermission: () =>\n `We need permission to fetch your Delivery API token, please try again \u26A0\uFE0F`,\n clientDetailsLocation: () =>\n `Which option would you like to use for storing your client ID and secret`,\n clientDetailsInGit: (git: GitHelper) =>\n `${\n git.type === 'github' ? 'GitHub' : 'GitLab'\n } variables (recommended for public repositories)`,\n clientDetailsInEnv: () =>\n `Env variables (recommended for private repositories)`,\n success: () => `Contensis developer environment initialisation complete`,\n partialSuccess: () =>\n `Contensis developer environment initialisation completed with errors`,\n failed: () => `Contensis developer environment initialisation failed`,\n dryRun: () =>\n `Contensis developer environment initialisation dry run completed`,\n noChanges: () =>\n `No changes were made to your project, run the command again without the ${Logger.highlightText(\n '--dry-run'\n )} flag to update your project with these changes`,\n startProjectTip: () =>\n `Start up your project in the normal way for development`,\n blockIdQuestion: () =>\n `Please enter your block id, this should be unquie and in kebab case e.g ${Logger.highlightText(\n 'my-awesome-website'\n )}`,\n },\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAOA,oBAAuB;AACvB,gBAAyB;AAElB,MAAM,cAAc;AAAA,EACzB,KAAK;AAAA,IACH,WA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AAI,SAAS,WAAW,WAAW;AAAA,IAEvC,oBAAoB,MAClB;AAAA,IACF,SAAS,MAAM;AAAA,IACf,gBAAgB,MACd;AAAA,IACF,QAAQ,MAAM;AAAA,IACd,QAAQ,MACN;AAAA,IACF,WAAW,MACT,2EAA2E,qBAAO;AAAA,MAChF;AAAA,IACF;AAAA,IACF,iBAAiB,MACf;AAAA,IACF,iBAAiB,MACf,2EAA2E,qBAAO;AAAA,MAChF;AAAA,IACF;AAAA,EACJ;AACF;",
6
6
  "names": []
7
7
  }
@@ -123,7 +123,12 @@ class ContensisCli {
123
123
  if (outputOpts == null ? void 0 : outputOpts.clientId)
124
124
  env.lastUserId = outputOpts.clientId;
125
125
  if (outputOpts == null ? void 0 : outputOpts.sharedSecret)
126
- env.passwordFallback = outputOpts.sharedSecret;
126
+ if (outputOpts.sharedSecret.startsWith("-"))
127
+ throw new Error(
128
+ `Shared secret option provided a value of ${outputOpts.sharedSecret}`
129
+ );
130
+ else
131
+ env.passwordFallback = outputOpts.sharedSecret;
127
132
  this.currentProject = (env == null ? void 0 : env.currentProject) || "null";
128
133
  this.sourceAlias = (outputOpts == null ? void 0 : outputOpts.sourceAlias) || currentEnvironment;
129
134
  if (currentEnvironment) {
@@ -324,7 +329,10 @@ class ContensisCli {
324
329
  password
325
330
  ).Init();
326
331
  if (credentialError && !credentials.current) {
327
- log.error(credentialError);
332
+ log.error(
333
+ `Unable to find credentials for user ${userId} at ${currentEnv}`,
334
+ credentialError
335
+ );
328
336
  return;
329
337
  }
330
338
  if (credentials.remarks.secure !== true) {
@@ -1459,7 +1467,7 @@ Components:`));
1459
1467
  const nodesMigrateCount = (_a = result == null ? void 0 : result.nodesToMigrate) == null ? void 0 : _a[currentProject].totalCount;
1460
1468
  const nodesCreated = ((_b = result == null ? void 0 : result.nodesResult) == null ? void 0 : _b["created"]) || 0;
1461
1469
  const nodesUpdated = ((_c = result == null ? void 0 : result.nodesResult) == null ? void 0 : _c["updated"]) || 0;
1462
- const nodesErrored = ((_d = result == null ? void 0 : result.nodesResult) == null ? void 0 : _d["errored"]) || 0;
1470
+ const nodesErrored = ((_d = result == null ? void 0 : result.nodesResult) == null ? void 0 : _d["errors"]) || 0;
1463
1471
  const noChanges = ((_e = result == null ? void 0 : result.nodesToMigrate) == null ? void 0 : _e[currentProject]["no change"]) && nodesMigrateCount === 0;
1464
1472
  if (!err && (!((_f = result.errors) == null ? void 0 : _f.length) || this.contensisOpts.ignoreErrors) && (!commit && nodesMigrateCount || commit && (nodesCreated || nodesUpdated || ((_g = result.errors) == null ? void 0 : _g.length)))) {
1465
1473
  let totalCount;
@@ -1489,6 +1497,43 @@ Components:`));
1489
1497
  log.help(messages.connect.tip());
1490
1498
  }
1491
1499
  };
1500
+ RemoveNodes = async (commit = false) => {
1501
+ var _a, _b, _c;
1502
+ const { currentEnv, currentProject, log, messages } = this;
1503
+ const contensis = await this.ConnectContensisImport({
1504
+ commit,
1505
+ importDataType: "user-input"
1506
+ });
1507
+ if (contensis) {
1508
+ if (contensis.isPreview) {
1509
+ console.log(log.successText(` -- PREVIEW -- `));
1510
+ } else {
1511
+ console.log(log.warningText(` *** COMMITTING DELETE *** `));
1512
+ }
1513
+ const [err, result] = await contensis.DeleteNodes();
1514
+ if (result) {
1515
+ this.HandleFormattingAndOutput(result, () => {
1516
+ (0, import_console.printNodeTreeOutput)(
1517
+ this,
1518
+ contensis.nodes.targetRepos[currentProject].nodes.migrateNodesTreeView
1519
+ );
1520
+ });
1521
+ }
1522
+ if (!err && (!commit && result.nodesToMigrate[currentProject].totalCount || commit && ((_a = result.nodesResult) == null ? void 0 : _a.deleted))) {
1523
+ log.success(
1524
+ messages.nodes.removed(currentEnv, commit, contensis.nodes.rootPath)
1525
+ );
1526
+ log.raw(``);
1527
+ if (!commit) {
1528
+ log.help(messages.nodes.commitTip());
1529
+ }
1530
+ } else {
1531
+ log.error(messages.nodes.failedRemove(currentEnv), err);
1532
+ if (!((_c = (_b = result == null ? void 0 : result.nodesToMigrate) == null ? void 0 : _b[currentProject]) == null ? void 0 : _c.totalCount))
1533
+ log.help(messages.nodes.notFound(currentEnv));
1534
+ }
1535
+ }
1536
+ };
1492
1537
  PrintWebhookSubscriptions = async (subscriptionIdsOrNames) => {
1493
1538
  const { currentEnv, log, messages } = this;
1494
1539
  const contensis = await this.ConnectContensis();