contensis-cli 1.0.0-beta.68 → 1.0.0-beta.70
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/execute.js +2 -0
- package/dist/commands/execute.js.map +2 -2
- package/dist/commands/get.js +1 -0
- package/dist/commands/get.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/execute.ts +3 -0
- package/src/commands/get.ts +4 -1
- package/src/version.ts +1 -1
package/dist/commands/execute.js
CHANGED
|
@@ -23,6 +23,7 @@ __export(execute_exports, {
|
|
|
23
23
|
module.exports = __toCommonJS(execute_exports);
|
|
24
24
|
var import_commander = require("commander");
|
|
25
25
|
var import_ContensisCliService = require("../services/ContensisCliService");
|
|
26
|
+
var import_globalOptions = require("./globalOptions");
|
|
26
27
|
const makeExecuteCommand = () => {
|
|
27
28
|
const execute = new import_commander.Command().command("execute").description("execute block actions").addHelpText("after", `
|
|
28
29
|
`).showHelpAfterError(true).exitOverride();
|
|
@@ -92,6 +93,7 @@ Note: block actions are executed on blocks deployed from a "main" or "master" br
|
|
|
92
93
|
opts
|
|
93
94
|
).ExecuteBlockAction("markAsBroken", blockId, version);
|
|
94
95
|
});
|
|
96
|
+
(0, import_globalOptions.addGlobalOptions)(action);
|
|
95
97
|
return execute;
|
|
96
98
|
};
|
|
97
99
|
// 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/execute.ts"],
|
|
4
|
-
"sourcesContent": ["import { Argument, Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\n\nexport const makeExecuteCommand = () => {\n const execute = new Command()\n .command('execute')\n .description('execute block actions')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n const block = execute\n .command('block')\n .description('execute block command to invoke block actions');\n\n const action = block\n .command('action')\n .description('execute block action command to invoke block actions');\n\n const blockIdArg = new Argument(\n '<block-id>',\n 'the name of the block to perform action with'\n );\n const blockVersionArg = new Argument(\n '<version>',\n 'the block version to perform action with'\n );\n\n action\n .command('release')\n .description('release a block version')\n .addArgument(blockIdArg)\n .argument('[version]', blockVersionArg.description, 'latest')\n .usage('[block-id> <version]')\n .addHelpText(\n 'after',\n `\nExample call:\n > execute block action release contensis-app\n\nNote: block actions are executed on blocks deployed from a \"main\" or \"master\" branch\\n`\n )\n .action(async (blockId: string, version: string, opts) => {\n await cliCommand(\n ['execute', 'block', 'action', 'release', blockId],\n opts\n ).ExecuteBlockAction('release', blockId, version);\n });\n\n action\n .command('makelive')\n .description('make a block version live')\n .addArgument(blockIdArg)\n .addArgument(blockVersionArg)\n .usage('<block-id> <version>')\n .addHelpText(\n 'after',\n `\nExample call:\n > execute block action makelive contensis-app 3\n\nNote: block actions are executed on blocks deployed from a \"main\" or \"master\" branch\\n`\n )\n .action(async (blockId: string, version: string, opts) => {\n await cliCommand(\n ['execute', 'block', 'action', 'makelive', blockId],\n opts\n ).ExecuteBlockAction('makeLive', blockId, version);\n });\n\n action\n .command('rollback')\n .description('rollback a live block version to last live version')\n .addArgument(blockIdArg)\n .addArgument(blockVersionArg)\n .usage('<block-id> <version>')\n .addHelpText(\n 'after',\n `\nExample call:\n > execute block action rollback contensis-app 3\n\nNote: block actions are executed on blocks deployed from a \"main\" or \"master\" branch\\n`\n )\n .action(async (blockId: string, version: string, opts) => {\n await cliCommand(\n ['execute', 'block', 'action', 'rollback', blockId],\n opts\n ).ExecuteBlockAction('rollback', blockId, version);\n });\n\n action\n .command('markasbroken')\n .description('mark a block version as broken')\n .addArgument(blockIdArg)\n .addArgument(blockVersionArg)\n .usage('<block-id> <version>')\n .addHelpText(\n 'after',\n `\nExample call:\n > execute block action markasbroken contensis-app 3\n\nNote: block actions are executed on blocks deployed from a \"main\" or \"master\" branch\\n`\n )\n .action(async (blockId: string, version: string, opts) => {\n await cliCommand(\n ['execute', 'block', 'action', 'markasbroken', blockId],\n opts\n ).ExecuteBlockAction('markAsBroken', blockId, version);\n });\n\n return execute;\n};\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAkC;AAClC,iCAA2B;
|
|
4
|
+
"sourcesContent": ["import { Argument, Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { addGlobalOptions } from './globalOptions';\n\nexport const makeExecuteCommand = () => {\n const execute = new Command()\n .command('execute')\n .description('execute block actions')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n const block = execute\n .command('block')\n .description('execute block command to invoke block actions');\n\n const action = block\n .command('action')\n .description('execute block action command to invoke block actions');\n\n const blockIdArg = new Argument(\n '<block-id>',\n 'the name of the block to perform action with'\n );\n const blockVersionArg = new Argument(\n '<version>',\n 'the block version to perform action with'\n );\n\n action\n .command('release')\n .description('release a block version')\n .addArgument(blockIdArg)\n .argument('[version]', blockVersionArg.description, 'latest')\n .usage('[block-id> <version]')\n .addHelpText(\n 'after',\n `\nExample call:\n > execute block action release contensis-app\n\nNote: block actions are executed on blocks deployed from a \"main\" or \"master\" branch\\n`\n )\n .action(async (blockId: string, version: string, opts) => {\n await cliCommand(\n ['execute', 'block', 'action', 'release', blockId],\n opts\n ).ExecuteBlockAction('release', blockId, version);\n });\n\n action\n .command('makelive')\n .description('make a block version live')\n .addArgument(blockIdArg)\n .addArgument(blockVersionArg)\n .usage('<block-id> <version>')\n .addHelpText(\n 'after',\n `\nExample call:\n > execute block action makelive contensis-app 3\n\nNote: block actions are executed on blocks deployed from a \"main\" or \"master\" branch\\n`\n )\n .action(async (blockId: string, version: string, opts) => {\n await cliCommand(\n ['execute', 'block', 'action', 'makelive', blockId],\n opts\n ).ExecuteBlockAction('makeLive', blockId, version);\n });\n\n action\n .command('rollback')\n .description('rollback a live block version to last live version')\n .addArgument(blockIdArg)\n .addArgument(blockVersionArg)\n .usage('<block-id> <version>')\n .addHelpText(\n 'after',\n `\nExample call:\n > execute block action rollback contensis-app 3\n\nNote: block actions are executed on blocks deployed from a \"main\" or \"master\" branch\\n`\n )\n .action(async (blockId: string, version: string, opts) => {\n await cliCommand(\n ['execute', 'block', 'action', 'rollback', blockId],\n opts\n ).ExecuteBlockAction('rollback', blockId, version);\n });\n\n action\n .command('markasbroken')\n .description('mark a block version as broken')\n .addArgument(blockIdArg)\n .addArgument(blockVersionArg)\n .usage('<block-id> <version>')\n .addHelpText(\n 'after',\n `\nExample call:\n > execute block action markasbroken contensis-app 3\n\nNote: block actions are executed on blocks deployed from a \"main\" or \"master\" branch\\n`\n )\n .action(async (blockId: string, version: string, opts) => {\n await cliCommand(\n ['execute', 'block', 'action', 'markasbroken', blockId],\n opts\n ).ExecuteBlockAction('markAsBroken', blockId, version);\n });\n\n // Add global opts for inner sub-commands\n addGlobalOptions(action);\n return execute;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAkC;AAClC,iCAA2B;AAC3B,2BAAiC;AAE1B,MAAM,qBAAqB,MAAM;AACtC,QAAM,UAAU,IAAI,yBAAQ,EACzB,QAAQ,SAAS,EACjB,YAAY,uBAAuB,EACnC,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,QAAM,QAAQ,QACX,QAAQ,OAAO,EACf,YAAY,+CAA+C;AAE9D,QAAM,SAAS,MACZ,QAAQ,QAAQ,EAChB,YAAY,sDAAsD;AAErE,QAAM,aAAa,IAAI;AAAA,IACrB;AAAA,IACA;AAAA,EACF;AACA,QAAM,kBAAkB,IAAI;AAAA,IAC1B;AAAA,IACA;AAAA,EACF;AAEA,SACG,QAAQ,SAAS,EACjB,YAAY,yBAAyB,EACrC,YAAY,UAAU,EACtB,SAAS,aAAa,gBAAgB,aAAa,QAAQ,EAC3D,MAAM,sBAAsB,EAC5B;A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,gBAAgB,SAAS,OAAO;AAAA,EACvD,CAAC;AAGH,6CAAiB,MAAM;AACvB,SAAO;AACT;",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
package/dist/commands/get.js
CHANGED
package/dist/commands/get.js.map
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../../src/commands/get.ts"],
|
|
4
|
-
"sourcesContent": ["import { Argument, Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { mapContensisOpts } from './globalOptions';\n\nexport const makeGetCommand = () => {\n const program = new Command()\n .command('get')\n .description('get command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n program\n .command('version')\n .description('get current Contensis version')\n .addHelpText(\n 'after',\n `\nExample call:\n > version\n`\n )\n .action(async opts => {\n await cliCommand(['get', 'version'], opts).PrintContensisVersion();\n });\n\n program\n .command('project')\n .description('get a project')\n .argument('[projectId]', 'id of the project to get (default: current)')\n .addHelpText(\n 'after',\n `\nExample call:\n > get project website\n`\n )\n .action(async (projectId: string, opts) => {\n await cliCommand(['get', 'project', projectId], opts).PrintProject(\n projectId\n );\n });\n\n program\n .command('role')\n .description('get a role')\n .argument('<roleNameOrId>', 'id or name of the role to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get role \"entry admin\"\n`\n )\n .action(async (roleNameOrId: string, opts) => {\n await cliCommand(['get', 'role', roleNameOrId], opts).PrintRole(\n roleNameOrId\n );\n });\n\n program\n .command('webhook')\n .description('get a webhook')\n .argument('<webhookNameOrId...>', 'id or name of the webhook(s) to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get webhook \"Slack notification\"\n`\n )\n .action(async (webhookNameOrId: string[], opts) => {\n await cliCommand(\n ['get', 'webhook', webhookNameOrId.join(' ')],\n opts\n ).PrintWebhookSubscriptions(webhookNameOrId);\n });\n\n program\n .command('model')\n .description('get a content model')\n .argument('<contentTypeId...>', 'ids of the content models to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get model podcast podcastLinks\n`\n )\n .action(async (modelIds: string[], opts) => {\n await cliCommand(\n ['get', 'model', modelIds.join(' ')],\n opts\n ).PrintContentModels(modelIds);\n });\n\n program\n .command('contenttype')\n .description('get a content type')\n .argument('<contentTypeId>', 'the API id of the content type to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get contenttype {contentTypeId} -o content-type-backup.json\n`\n )\n .action(async (contentTypeId: string, opts) => {\n await cliCommand(\n ['get', 'contenttype', contentTypeId],\n opts\n ).PrintContentType(contentTypeId);\n });\n\n program\n .command('component')\n .description('get a component')\n .argument('<componentId>', 'the API id of the component to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get component {componentId} -o component-backup.json\n`\n )\n .action(async (componentId: string, opts) => {\n await cliCommand(['get', 'component', componentId], opts).PrintComponent(\n componentId\n );\n });\n\n program\n .command('entries')\n .description('get entries')\n .argument(\n '[search phrase]',\n 'get entries with the search phrase, use quotes for multiple words'\n )\n .option('-i --id <id...>', 'the entry id(s) to get')\n .option(\n '-d, --dependents',\n 'find and return any dependencies of all found entries'\n )\n .option(\n '-fi, --fields <fields...>',\n 'limit the output fields on returned entries'\n )\n .option(\n '-q, --zenql <zenql>',\n 'get entries with a supplied ZenQL statement'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > get entries --zenql \"sys.contentTypeId = blog\" --fields entryTitle entryDescription sys.id --output ./blog-posts.csv --format csv\n`\n )\n .action(async (phrase: string, opts, cmd) => {\n // console.log('phrase: ', phrase, '\\nopts:', JSON.stringify(opts, null, 2));\n // console.log('opts:', JSON.stringify(opts, null, 2));\n await cliCommand(\n ['get', 'entries'],\n opts,\n mapContensisOpts({ phrase, ...opts })\n ).GetEntries({\n withDependents: opts.dependents,\n });\n });\n\n const block = program\n .command('block')\n .description('get a block or block version')\n .argument('[blockId]', 'the block to get version details for')\n .argument(\n '[branch]',\n 'the branch of the block to get version details for',\n 'main'\n )\n .argument(\n '[version]',\n 'get a specific version of the block pushed to the specified branch'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > get block contensis-website master latest\n`\n )\n .action(async (blockId: string, branch: string, version: string, opts) => {\n await cliCommand(['get', 'block', blockId], opts).PrintBlockVersions(\n blockId,\n branch,\n version\n );\n });\n\n const dataCenter = new Argument(\n '[dataCenter]',\n 'the datacentre of the block to get logs for'\n )\n .choices(['hq', 'london', 'manchester'])\n .default('hq');\n\n block\n .command('logs')\n .description('get logs for a block')\n .argument('[blockId]', 'the block to get version logs for')\n .argument(\n '[branch]',\n 'the branch of the block to get version details for',\n 'main'\n )\n .argument(\n '[version]',\n 'the version of the block pushed to the branch to get logs for',\n 'latest'\n )\n .addArgument(dataCenter)\n .usage('get block logs [blockId] [branch] [version] [dataCenter]')\n .addHelpText(\n 'after',\n `\nExample call:\n > get block logs contensis-website master\n > get block logs contensis-website master latest london\n`\n )\n .action(\n async (\n blockId: string,\n branch: string,\n version: string,\n dataCenter: 'hq' | 'manchester' | 'london',\n opts\n ) => {\n await cliCommand(['get', 'block', 'logs'], opts).PrintBlockLogs(\n blockId,\n branch,\n version,\n dataCenter\n );\n }\n );\n\n return program;\n};\n\nexport const get = makeGetCommand();\n"],
|
|
5
|
-
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAkC;AAClC,iCAA2B;AAC3B,
|
|
4
|
+
"sourcesContent": ["import { Argument, Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { addGlobalOptions, mapContensisOpts } from './globalOptions';\n\nexport const makeGetCommand = () => {\n const program = new Command()\n .command('get')\n .description('get command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n program\n .command('version')\n .description('get current Contensis version')\n .addHelpText(\n 'after',\n `\nExample call:\n > version\n`\n )\n .action(async opts => {\n await cliCommand(['get', 'version'], opts).PrintContensisVersion();\n });\n\n program\n .command('project')\n .description('get a project')\n .argument('[projectId]', 'id of the project to get (default: current)')\n .addHelpText(\n 'after',\n `\nExample call:\n > get project website\n`\n )\n .action(async (projectId: string, opts) => {\n await cliCommand(['get', 'project', projectId], opts).PrintProject(\n projectId\n );\n });\n\n program\n .command('role')\n .description('get a role')\n .argument('<roleNameOrId>', 'id or name of the role to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get role \"entry admin\"\n`\n )\n .action(async (roleNameOrId: string, opts) => {\n await cliCommand(['get', 'role', roleNameOrId], opts).PrintRole(\n roleNameOrId\n );\n });\n\n program\n .command('webhook')\n .description('get a webhook')\n .argument('<webhookNameOrId...>', 'id or name of the webhook(s) to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get webhook \"Slack notification\"\n`\n )\n .action(async (webhookNameOrId: string[], opts) => {\n await cliCommand(\n ['get', 'webhook', webhookNameOrId.join(' ')],\n opts\n ).PrintWebhookSubscriptions(webhookNameOrId);\n });\n\n program\n .command('model')\n .description('get a content model')\n .argument('<contentTypeId...>', 'ids of the content models to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get model podcast podcastLinks\n`\n )\n .action(async (modelIds: string[], opts) => {\n await cliCommand(\n ['get', 'model', modelIds.join(' ')],\n opts\n ).PrintContentModels(modelIds);\n });\n\n program\n .command('contenttype')\n .description('get a content type')\n .argument('<contentTypeId>', 'the API id of the content type to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get contenttype {contentTypeId} -o content-type-backup.json\n`\n )\n .action(async (contentTypeId: string, opts) => {\n await cliCommand(\n ['get', 'contenttype', contentTypeId],\n opts\n ).PrintContentType(contentTypeId);\n });\n\n program\n .command('component')\n .description('get a component')\n .argument('<componentId>', 'the API id of the component to get')\n .addHelpText(\n 'after',\n `\nExample call:\n > get component {componentId} -o component-backup.json\n`\n )\n .action(async (componentId: string, opts) => {\n await cliCommand(['get', 'component', componentId], opts).PrintComponent(\n componentId\n );\n });\n\n program\n .command('entries')\n .description('get entries')\n .argument(\n '[search phrase]',\n 'get entries with the search phrase, use quotes for multiple words'\n )\n .option('-i --id <id...>', 'the entry id(s) to get')\n .option(\n '-d, --dependents',\n 'find and return any dependencies of all found entries'\n )\n .option(\n '-fi, --fields <fields...>',\n 'limit the output fields on returned entries'\n )\n .option(\n '-q, --zenql <zenql>',\n 'get entries with a supplied ZenQL statement'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > get entries --zenql \"sys.contentTypeId = blog\" --fields entryTitle entryDescription sys.id --output ./blog-posts.csv --format csv\n`\n )\n .action(async (phrase: string, opts, cmd) => {\n // console.log('phrase: ', phrase, '\\nopts:', JSON.stringify(opts, null, 2));\n // console.log('opts:', JSON.stringify(opts, null, 2));\n await cliCommand(\n ['get', 'entries'],\n opts,\n mapContensisOpts({ phrase, ...opts })\n ).GetEntries({\n withDependents: opts.dependents,\n });\n });\n\n const block = program\n .command('block')\n .description('get a block or block version')\n .argument('[blockId]', 'the block to get version details for')\n .argument(\n '[branch]',\n 'the branch of the block to get version details for',\n 'main'\n )\n .argument(\n '[version]',\n 'get a specific version of the block pushed to the specified branch'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > get block contensis-website master latest\n`\n )\n .action(async (blockId: string, branch: string, version: string, opts) => {\n await cliCommand(['get', 'block', blockId], opts).PrintBlockVersions(\n blockId,\n branch,\n version\n );\n });\n\n const dataCenter = new Argument(\n '[dataCenter]',\n 'the datacentre of the block to get logs for'\n )\n .choices(['hq', 'london', 'manchester'])\n .default('hq');\n\n block\n .command('logs')\n .description('get logs for a block')\n .argument('[blockId]', 'the block to get version logs for')\n .argument(\n '[branch]',\n 'the branch of the block to get version details for',\n 'main'\n )\n .argument(\n '[version]',\n 'the version of the block pushed to the branch to get logs for',\n 'latest'\n )\n .addArgument(dataCenter)\n .usage('get block logs [blockId] [branch] [version] [dataCenter]')\n .addHelpText(\n 'after',\n `\nExample call:\n > get block logs contensis-website master\n > get block logs contensis-website master latest london\n`\n )\n .action(\n async (\n blockId: string,\n branch: string,\n version: string,\n dataCenter: 'hq' | 'manchester' | 'london',\n opts\n ) => {\n await cliCommand(['get', 'block', 'logs'], opts).PrintBlockLogs(\n blockId,\n branch,\n version,\n dataCenter\n );\n }\n );\n\n // Add global opts for inner sub-commands\n addGlobalOptions(block);\n\n return program;\n};\n\nexport const get = makeGetCommand();\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAkC;AAClC,iCAA2B;AAC3B,2BAAmD;AAE5C,MAAM,iBAAiB,MAAM;AAClC,QAAM,UAAU,IAAI,yBAAQ,EACzB,QAAQ,KAAK,EACb,YAAY,aAAa,EACzB,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,UACG,QAAQ,SAAS,EACjB,YAAY,+BAA+B,EAC3C;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAM,SAAQ;AACpB,cAAM,uCAAW,CAAC,OAAO,SAAS,GAAG,IAAI,EAAE,sBAAsB;AAAA,EACnE,CAAC;AAEH,UACG,QAAQ,SAAS,EACjB,YAAY,eAAe,EAC3B,SAAS,eAAe,6CAA6C,EACrE;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,WAAmB,SAAS;AACzC,cAAM,uCAAW,CAAC,OAAO,WAAW,SAAS,GAAG,IAAI,EAAE;AAAA,MACpD;AAAA,IACF;AAAA,EACF,CAAC;AAEH,UACG,QAAQ,MAAM,EACd,YAAY,YAAY,EACxB,SAAS,kBAAkB,+BAA+B,EAC1D;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,cAAsB,SAAS;AAC5C,cAAM,uCAAW,CAAC,OAAO,QAAQ,YAAY,GAAG,IAAI,EAAE;AAAA,MACpD;AAAA,IACF;AAAA,EACF,CAAC;AAEH,UACG,QAAQ,SAAS,EACjB,YAAY,eAAe,E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AAI,EAAE;AAAA,QAC/C;AAAA,QACA;AAAA,QACA;AAAA,QACAA;AAAA,MACF;AAAA,IACF;AAAA,EACF;AAGF,6CAAiB,KAAK;AAEtB,SAAO;AACT;AAEO,MAAM,MAAM,eAAe;",
|
|
6
6
|
"names": ["dataCenter"]
|
|
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.0.0-beta.
|
|
24
|
+
const LIB_VERSION = "1.0.0-beta.70";
|
|
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.0.0-beta.
|
|
4
|
+
"sourcesContent": ["export const LIB_VERSION = \"1.0.0-beta.70\";\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.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.70",
|
|
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/node-cli",
|
|
6
6
|
"homepage": "https://github.com/contensis/node-cli/tree/main/packages/contensis-cli#readme",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"jsonpath-mapper": "^1.1.0",
|
|
36
36
|
"keytar": "^7.9.0",
|
|
37
37
|
"lodash": "^4.17.21",
|
|
38
|
-
"migratortron": "^1.0.0-beta.
|
|
38
|
+
"migratortron": "^1.0.0-beta.27",
|
|
39
39
|
"node-fetch": "^2.6.7",
|
|
40
40
|
"patch-package": "^6.4.7",
|
|
41
41
|
"xml2js": "^0.4.23"
|
package/src/commands/execute.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Argument, Command } from 'commander';
|
|
2
2
|
import { cliCommand } from '~/services/ContensisCliService';
|
|
3
|
+
import { addGlobalOptions } from './globalOptions';
|
|
3
4
|
|
|
4
5
|
export const makeExecuteCommand = () => {
|
|
5
6
|
const execute = new Command()
|
|
@@ -110,5 +111,7 @@ Note: block actions are executed on blocks deployed from a "main" or "master" br
|
|
|
110
111
|
).ExecuteBlockAction('markAsBroken', blockId, version);
|
|
111
112
|
});
|
|
112
113
|
|
|
114
|
+
// Add global opts for inner sub-commands
|
|
115
|
+
addGlobalOptions(action);
|
|
113
116
|
return execute;
|
|
114
117
|
};
|
package/src/commands/get.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Argument, Command } from 'commander';
|
|
2
2
|
import { cliCommand } from '~/services/ContensisCliService';
|
|
3
|
-
import { mapContensisOpts } from './globalOptions';
|
|
3
|
+
import { addGlobalOptions, mapContensisOpts } from './globalOptions';
|
|
4
4
|
|
|
5
5
|
export const makeGetCommand = () => {
|
|
6
6
|
const program = new Command()
|
|
@@ -244,6 +244,9 @@ Example call:
|
|
|
244
244
|
}
|
|
245
245
|
);
|
|
246
246
|
|
|
247
|
+
// Add global opts for inner sub-commands
|
|
248
|
+
addGlobalOptions(block);
|
|
249
|
+
|
|
247
250
|
return program;
|
|
248
251
|
};
|
|
249
252
|
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const LIB_VERSION = "1.0.0-beta.
|
|
1
|
+
export const LIB_VERSION = "1.0.0-beta.70";
|