contensis-cli 1.0.0-beta.52 → 1.0.0-beta.54
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/connect.js +44 -0
- package/dist/commands/connect.js.map +7 -0
- package/dist/commands/create.js +75 -0
- package/dist/commands/create.js.map +7 -0
- package/dist/commands/diff.js +57 -0
- package/dist/commands/diff.js.map +7 -0
- package/dist/commands/get.js +170 -0
- package/dist/commands/get.js.map +7 -0
- package/dist/commands/globalOptions.js +144 -0
- package/dist/commands/globalOptions.js.map +7 -0
- package/dist/commands/import.js +121 -0
- package/dist/commands/import.js.map +7 -0
- package/dist/commands/index.js +89 -0
- package/dist/commands/index.js.map +7 -0
- package/dist/commands/list.js +99 -0
- package/dist/commands/list.js.map +7 -0
- package/dist/commands/login.js +56 -0
- package/dist/commands/login.js.map +7 -0
- package/dist/commands/push.js +137 -0
- package/dist/commands/push.js.map +7 -0
- package/dist/commands/release.js +47 -0
- package/dist/commands/release.js.map +7 -0
- package/dist/commands/remove.js +79 -0
- package/dist/commands/remove.js.map +7 -0
- package/dist/commands/set.js +96 -0
- package/dist/commands/set.js.map +7 -0
- package/dist/index.js +32 -0
- package/dist/index.js.map +7 -0
- package/dist/localisation/en-GB.js +253 -0
- package/dist/localisation/en-GB.js.map +7 -0
- package/dist/models/AppError.d.js +2 -0
- package/dist/models/AppError.d.js.map +7 -0
- package/dist/models/Cache.d.js +2 -0
- package/dist/models/Cache.d.js.map +7 -0
- package/dist/models/JsModules.d.js +2 -0
- package/dist/models/JsModules.d.js.map +7 -0
- package/dist/providers/CredentialProvider.js +116 -0
- package/dist/providers/CredentialProvider.js.map +7 -0
- package/dist/providers/SessionCacheProvider.js +111 -0
- package/dist/providers/SessionCacheProvider.js.map +7 -0
- package/dist/providers/file-provider.js +117 -0
- package/dist/providers/file-provider.js.map +7 -0
- package/dist/services/ContensisAuthService.js +75 -0
- package/dist/services/ContensisAuthService.js.map +7 -0
- package/dist/services/ContensisCliService.js +1374 -0
- package/dist/services/ContensisCliService.js.map +7 -0
- package/dist/shell.js +278 -0
- package/dist/shell.js.map +7 -0
- package/dist/util/console.printer.js +317 -0
- package/dist/util/console.printer.js.map +7 -0
- package/dist/util/csv.formatter.js +50 -0
- package/dist/util/csv.formatter.js.map +7 -0
- package/dist/util/index.js +97 -0
- package/dist/util/index.js.map +7 -0
- package/dist/util/json.formatter.js +29 -0
- package/dist/util/json.formatter.js.map +7 -0
- package/dist/util/logger.js +216 -0
- package/dist/util/logger.js.map +7 -0
- package/dist/util/xml.formatter.js +51 -0
- package/dist/util/xml.formatter.js.map +7 -0
- package/dist/version.js +29 -0
- package/dist/version.js.map +7 -0
- package/package.json +1 -1
- package/src/util/console.printer.ts +6 -6
- package/src/version.ts +1 -1
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var remove_exports = {};
|
|
20
|
+
__export(remove_exports, {
|
|
21
|
+
makeRemoveCommand: () => makeRemoveCommand
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(remove_exports);
|
|
24
|
+
var import_commander = require("commander");
|
|
25
|
+
var import_ContensisCliService = require("../services/ContensisCliService");
|
|
26
|
+
var import_shell = require("../shell");
|
|
27
|
+
var import_globalOptions = require("./globalOptions");
|
|
28
|
+
const makeRemoveCommand = () => {
|
|
29
|
+
const remove = new import_commander.Command().command("remove").description("remove command").addHelpText("after", `
|
|
30
|
+
`).showHelpAfterError(true).exitOverride();
|
|
31
|
+
remove.command("project").description("remove an entire project").argument("<projectId>", "the project id to delete").usage("<projectId>").addHelpText("after", `
|
|
32
|
+
`).action(async (projectId, opts) => {
|
|
33
|
+
const project = await (0, import_ContensisCliService.cliCommand)(
|
|
34
|
+
["remove", "project", projectId],
|
|
35
|
+
opts
|
|
36
|
+
).SetProject(projectId);
|
|
37
|
+
if (project)
|
|
38
|
+
await (0, import_shell.shell)().restart();
|
|
39
|
+
});
|
|
40
|
+
remove.command("key").description("remove api key").argument("<id>", "the id of the API key to delete").usage("<id>").addHelpText(
|
|
41
|
+
"after",
|
|
42
|
+
`
|
|
43
|
+
Example call:
|
|
44
|
+
> remove key 4ceb9575-28d3-4d5b-a77b-5e5221e603dd
|
|
45
|
+
`
|
|
46
|
+
).action(async (id, opts) => {
|
|
47
|
+
await (0, import_ContensisCliService.cliCommand)(["remove", "key", id], opts).RemoveApiKey(id);
|
|
48
|
+
});
|
|
49
|
+
remove.command("components").description("delete components").argument("<id...>", "the id(s) of the components to delete").addOption(import_globalOptions.commit).usage("<id> [--commit]").addHelpText(
|
|
50
|
+
"after",
|
|
51
|
+
`
|
|
52
|
+
Example call:
|
|
53
|
+
> remove components addressComponent
|
|
54
|
+
`
|
|
55
|
+
).action(async (id, opts) => {
|
|
56
|
+
await (0, import_ContensisCliService.cliCommand)(
|
|
57
|
+
["remove", "components", id.join(" ")],
|
|
58
|
+
opts
|
|
59
|
+
).RemoveComponents(id, opts.commit);
|
|
60
|
+
});
|
|
61
|
+
remove.command("contenttypes").description("delete content types").argument("<id...>", "the id(s) of the content types to delete").addOption(import_globalOptions.commit).usage("<id> [--commit]").addHelpText(
|
|
62
|
+
"after",
|
|
63
|
+
`
|
|
64
|
+
Example call:
|
|
65
|
+
> remove contenttypes blogPost
|
|
66
|
+
`
|
|
67
|
+
).action(async (id, opts) => {
|
|
68
|
+
await (0, import_ContensisCliService.cliCommand)(
|
|
69
|
+
["remove", "contenttypes", id.join(" ")],
|
|
70
|
+
opts
|
|
71
|
+
).RemoveContentTypes(id, opts.commit);
|
|
72
|
+
});
|
|
73
|
+
return remove;
|
|
74
|
+
};
|
|
75
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
76
|
+
0 && (module.exports = {
|
|
77
|
+
makeRemoveCommand
|
|
78
|
+
});
|
|
79
|
+
//# sourceMappingURL=remove.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/commands/remove.ts"],
|
|
4
|
+
"sourcesContent": ["import { Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { shell } from '~/shell';\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('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 return remove;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAC3B,mBAAsB;AACtB,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,KAAK,EACb,YAAY,gBAAgB,EAC5B,SAAS,QAAQ,iCAAiC,EAClD,MAAM,MAAM,EACZ;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,IAAI,SAAS;AAC1B,cAAM,uCAAW,CAAC,UAAU,OAAO,EAAE,GAAG,IAAI,EAAE,aAAa,EAAE;AAAA,EAC/D,CAAC;AAEH,SACG,QAAQ,YAAY,EACpB,YAAY,mBAAmB,EAC/B,SAAS,WAAW,uCAAuC,EAC3D,UAAU,2BAAM,EAChB,MAAM,iBAAiB,EACvB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,IAAc,SAAS;AACpC,cAAM;AAAA,MACJ,CAAC,UAAU,cAAc,GAAG,KAAK,GAAG,CAAC;AAAA,MACrC;AAAA,IACF,EAAE,iBAAiB,IAAI,KAAK,MAAM;AAAA,EACpC,CAAC;AAEH,SACG,QAAQ,cAAc,EACtB,YAAY,sBAAsB,EAClC,SAAS,WAAW,0CAA0C,EAC9D,UAAU,2BAAM,EAChB,MAAM,iBAAiB,EACvB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,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,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var set_exports = {};
|
|
20
|
+
__export(set_exports, {
|
|
21
|
+
makeSetCommand: () => makeSetCommand
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(set_exports);
|
|
24
|
+
var import_commander = require("commander");
|
|
25
|
+
var import_ContensisCliService = require("../services/ContensisCliService");
|
|
26
|
+
var import_shell = require("../shell");
|
|
27
|
+
const makeSetCommand = () => {
|
|
28
|
+
const set = new import_commander.Command().command("set").description("set command").addHelpText("after", `
|
|
29
|
+
`).showHelpAfterError(true).exitOverride();
|
|
30
|
+
const project = set.command("project").description("set current working project").argument("<projectId>", "the project id to work with").usage("<projectId>").addHelpText(
|
|
31
|
+
"after",
|
|
32
|
+
`
|
|
33
|
+
Example call:
|
|
34
|
+
> set project website
|
|
35
|
+
`
|
|
36
|
+
).action(async (projectId) => {
|
|
37
|
+
const nextProjectId = (0, import_ContensisCliService.cliCommand)([
|
|
38
|
+
"set",
|
|
39
|
+
"project",
|
|
40
|
+
projectId
|
|
41
|
+
]).SetProject(projectId);
|
|
42
|
+
if (nextProjectId)
|
|
43
|
+
await (0, import_shell.shell)().restart();
|
|
44
|
+
});
|
|
45
|
+
project.command("name").description("update project name").argument('<"Project name">', "update the current project name").usage('<"Project name">').addHelpText(
|
|
46
|
+
"after",
|
|
47
|
+
`
|
|
48
|
+
Example call:
|
|
49
|
+
> set project name "Project name"
|
|
50
|
+
`
|
|
51
|
+
).action(async (name, opts) => {
|
|
52
|
+
const success = await (0, import_ContensisCliService.cliCommand)(
|
|
53
|
+
["set", "project", "name"],
|
|
54
|
+
opts
|
|
55
|
+
).UpdateProject({
|
|
56
|
+
name
|
|
57
|
+
});
|
|
58
|
+
if (success)
|
|
59
|
+
await (0, import_shell.shell)().restart();
|
|
60
|
+
});
|
|
61
|
+
project.command("description").description("update project description").argument(
|
|
62
|
+
'<"Project description">',
|
|
63
|
+
"update the current project description"
|
|
64
|
+
).usage('<"Project description">').addHelpText(
|
|
65
|
+
"after",
|
|
66
|
+
`
|
|
67
|
+
Example call:
|
|
68
|
+
> set project description "Description of project"
|
|
69
|
+
`
|
|
70
|
+
).action(async (description, opts) => {
|
|
71
|
+
const success = await (0, import_ContensisCliService.cliCommand)(
|
|
72
|
+
["set", "project", "description"],
|
|
73
|
+
opts
|
|
74
|
+
).UpdateProject({
|
|
75
|
+
description
|
|
76
|
+
});
|
|
77
|
+
if (success)
|
|
78
|
+
await (0, import_shell.shell)().restart();
|
|
79
|
+
});
|
|
80
|
+
set.command("version").description("set content version").addArgument(
|
|
81
|
+
new import_commander.Argument("<versionStatus>", "content version status").choices(["latest", "published"]).default("latest")
|
|
82
|
+
).usage("<latest/published>").addHelpText("after", `
|
|
83
|
+
`).action(async (versionStatus) => {
|
|
84
|
+
const success = (0, import_ContensisCliService.cliCommand)(["set", "version", versionStatus]).SetVersion(
|
|
85
|
+
versionStatus
|
|
86
|
+
);
|
|
87
|
+
if (success)
|
|
88
|
+
await (0, import_shell.shell)().restart();
|
|
89
|
+
});
|
|
90
|
+
return set;
|
|
91
|
+
};
|
|
92
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
93
|
+
0 && (module.exports = {
|
|
94
|
+
makeSetCommand
|
|
95
|
+
});
|
|
96
|
+
//# sourceMappingURL=set.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/commands/set.ts"],
|
|
4
|
+
"sourcesContent": ["import { Argument, Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { shell } from '~/shell';\n\nexport const makeSetCommand = () => {\n const set = new Command()\n .command('set')\n .description('set command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n const project = set\n .command('project')\n .description('set current working project')\n .argument('<projectId>', 'the project id to work with')\n .usage('<projectId>')\n .addHelpText(\n 'after',\n `\nExample call:\n > set project website\\n`\n )\n .action(async projectId => {\n const nextProjectId = cliCommand([\n 'set',\n 'project',\n projectId,\n ]).SetProject(projectId);\n if (nextProjectId) await shell().restart();\n });\n\n project\n .command('name')\n .description('update project name')\n .argument('<\"Project name\">', 'update the current project name')\n .usage('<\"Project name\">')\n .addHelpText(\n 'after',\n `\nExample call:\n > set project name \"Project name\"\\n`\n )\n .action(async (name: string, opts) => {\n const success = await cliCommand(\n ['set', 'project', 'name'],\n opts\n ).UpdateProject({\n name,\n });\n if (success) await shell().restart();\n });\n\n project\n .command('description')\n .description('update project description')\n .argument(\n '<\"Project description\">',\n 'update the current project description'\n )\n .usage('<\"Project description\">')\n .addHelpText(\n 'after',\n `\nExample call:\n > set project description \"Description of project\"\\n`\n )\n .action(async (description: string, opts) => {\n const success = await cliCommand(\n ['set', 'project', 'description'],\n opts\n ).UpdateProject({\n description,\n });\n if (success) await shell().restart();\n });\n\n set\n .command('version')\n .description('set content version')\n .addArgument(\n new Argument('<versionStatus>', 'content version status')\n .choices(['latest', 'published'])\n .default('latest')\n )\n .usage('<latest/published>')\n .addHelpText('after', `\\n`)\n .action(async versionStatus => {\n const success = cliCommand(['set', 'version', versionStatus]).SetVersion(\n versionStatus\n );\n if (success) await shell().restart();\n });\n\n return set;\n};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAkC;AAClC,iCAA2B;AAC3B,mBAAsB;AAEf,MAAM,iBAAiB,MAAM;AAClC,QAAM,MAAM,IAAI,yBAAQ,EACrB,QAAQ,KAAK,EACb,YAAY,aAAa,EACzB,YAAY,SAAS;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AAQ,CAAC,UAAU,WAAW,CAAC,EAC/B,QAAQ,QAAQ;AAAA,EACrB,EACC,MAAM,oBAAoB,EAC1B,YAAY,SAAS;AAAA,CAAI,EACzB,OAAO,OAAM,kBAAiB;AAC7B,UAAM,cAAU,uCAAW,CAAC,OAAO,WAAW,aAAa,CAAC,EAAE;AAAA,MAC5D;AAAA,IACF;AACA,QAAI;AAAS,gBAAM,oBAAM,EAAE,QAAQ;AAAA,EACrC,CAAC;AAEH,SAAO;AACT;",
|
|
6
|
+
"names": []
|
|
7
|
+
}
|
package/dist/index.js
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __create = Object.create;
|
|
3
|
+
var __defProp = Object.defineProperty;
|
|
4
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
+
var __copyProps = (to, from, except, desc) => {
|
|
9
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
+
for (let key of __getOwnPropNames(from))
|
|
11
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
+
}
|
|
14
|
+
return to;
|
|
15
|
+
};
|
|
16
|
+
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
+
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
18
|
+
mod
|
|
19
|
+
));
|
|
20
|
+
var import_commands = __toESM(require("./commands"));
|
|
21
|
+
var import_logger = require("./util/logger");
|
|
22
|
+
var import_ContensisCliService = __toESM(require("./services/ContensisCliService"));
|
|
23
|
+
const program = (0, import_commands.default)();
|
|
24
|
+
program.parseAsync(process.argv).then(() => {
|
|
25
|
+
import_ContensisCliService.default.quit();
|
|
26
|
+
}).catch((err) => {
|
|
27
|
+
var _a;
|
|
28
|
+
if (!((_a = err.name) == null ? void 0 : _a.includes("CommanderError")))
|
|
29
|
+
(0, import_logger.logError)(err, `CLI ${err.toString()}`);
|
|
30
|
+
import_ContensisCliService.default.quit(err);
|
|
31
|
+
});
|
|
32
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/index.ts"],
|
|
4
|
+
"sourcesContent": ["import commands from './commands';\nimport { logError } from './util/logger';\nimport ContensisCli from './services/ContensisCliService';\nimport { jsonFormatter } from './util/json.formatter';\n// new ContensisCli(process.argv).DoCommandTasksAsync();\n\n// This is the CLI part of the app\nconst program = commands();\nprogram\n .parseAsync(process.argv)\n .then(() => {\n ContensisCli.quit();\n })\n .catch((err: any) => {\n if (!err.name?.includes('CommanderError'))\n logError(err, `CLI ${err.toString()}`);\n ContensisCli.quit(err);\n });\n//.exitOverride(() => console.log('exit override!!!'));\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;;AAAA,sBAAqB;AACrB,oBAAyB;AACzB,iCAAyB;AAKzB,MAAM,cAAU,gBAAAA,SAAS;AACzB,QACG,WAAW,QAAQ,IAAI,EACvB,KAAK,MAAM;AACV,6BAAAC,QAAa,KAAK;AACpB,CAAC,EACA,MAAM,CAAC,QAAa;AAbvB;AAcI,MAAI,GAAC,SAAI,SAAJ,mBAAU,SAAS;AACtB,gCAAS,KAAK,OAAO,IAAI,SAAS,GAAG;AACvC,6BAAAA,QAAa,KAAK,GAAG;AACvB,CAAC;",
|
|
6
|
+
"names": ["commands", "ContensisCli"]
|
|
7
|
+
}
|
|
@@ -0,0 +1,253 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var en_GB_exports = {};
|
|
20
|
+
__export(en_GB_exports, {
|
|
21
|
+
LogMessages: () => LogMessages
|
|
22
|
+
});
|
|
23
|
+
module.exports = __toCommonJS(en_GB_exports);
|
|
24
|
+
var import_logger = require("../util/logger");
|
|
25
|
+
const LogMessages = {
|
|
26
|
+
app: {
|
|
27
|
+
contensis: () => "Contensis",
|
|
28
|
+
quit: () => `Goodbye \u{1F44B}
|
|
29
|
+
`,
|
|
30
|
+
startup: (version) => `v${version} \xA9 2001-${new Date().getFullYear()} Zengenti \u{1F1EC}\u{1F1E7}.
|
|
31
|
+
- Creators of Contensis and purveyors of other fine software
|
|
32
|
+
|
|
33
|
+
\u{1F44B} Welcome to the contensis-cli
|
|
34
|
+
`,
|
|
35
|
+
help: () => 'Press [CTRL]+[C] or type "quit" to return to your system shell\nPress [TAB] for suggestions\n',
|
|
36
|
+
suggestions: () => `
|
|
37
|
+
${import_logger.Logger.errorText(">>")} Press [TAB] for suggestions
|
|
38
|
+
`,
|
|
39
|
+
autocomplete: () => `
|
|
40
|
+
${import_logger.Logger.errorText(">>")} Available commands:`,
|
|
41
|
+
unknownError: () => `Something went wrong...`,
|
|
42
|
+
fileOutput: (format = "json", path) => `Output ${format} file: ${import_logger.Logger.infoText(path)}
|
|
43
|
+
`,
|
|
44
|
+
noFileOutput: () => `No output written
|
|
45
|
+
`
|
|
46
|
+
},
|
|
47
|
+
command: {
|
|
48
|
+
notKnown: (command) => `${command} is not known`
|
|
49
|
+
},
|
|
50
|
+
envs: {
|
|
51
|
+
found: (num) => `environments store found containing ${num} environment${num === 1 ? "" : "s"}`,
|
|
52
|
+
tip: () => `Connect to a Contensis cloud instance using "contensis connect {cms alias}"`
|
|
53
|
+
},
|
|
54
|
+
connect: {
|
|
55
|
+
command: {
|
|
56
|
+
name: () => "connect",
|
|
57
|
+
example: () => `Example call:
|
|
58
|
+
> connect example-dev`
|
|
59
|
+
},
|
|
60
|
+
args: {
|
|
61
|
+
alias: {
|
|
62
|
+
name: () => "<alias>",
|
|
63
|
+
description: () => "the Contensis Cloud alias to connect with"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
noEnv: () => `Cannot connect - no environment alias specified`,
|
|
67
|
+
unreachable: (url, status) => `Cannot reach ${url}${status ? ` - status ${status}` : ""}`,
|
|
68
|
+
connected: (env) => `Current environment set to "${env}"`,
|
|
69
|
+
help: () => `Connect to a Contensis cloud instance using "contensis connect {cms alias}"`,
|
|
70
|
+
projects: () => `Available projects:`,
|
|
71
|
+
noProjects: () => `Cannot retrieve projects list`,
|
|
72
|
+
tip: () => `Introduce yourself with "login {username}" or "login {clientId} -s {secret}" or by passing credentials as options with your command`
|
|
73
|
+
},
|
|
74
|
+
login: {
|
|
75
|
+
command: {
|
|
76
|
+
name: () => "login",
|
|
77
|
+
usage: () => `<user/clientId> [password] [-s <sharedSecret>]`,
|
|
78
|
+
example: () => `Example call:
|
|
79
|
+
> login myuserid
|
|
80
|
+
-- or --
|
|
81
|
+
> login {clientId} -s {sharedSecret}`
|
|
82
|
+
},
|
|
83
|
+
args: {
|
|
84
|
+
user: {
|
|
85
|
+
name: () => "<user/clientId>",
|
|
86
|
+
description: () => "the username to login with"
|
|
87
|
+
},
|
|
88
|
+
password: {
|
|
89
|
+
name: () => "[password]",
|
|
90
|
+
description: () => "the password to use to login with (optional/insecure)"
|
|
91
|
+
},
|
|
92
|
+
secret: {
|
|
93
|
+
name: () => "-s --sharedSecret <sharedSecret>",
|
|
94
|
+
description: () => "the shared secret to use when logging in with a client id"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
passwordPrompt: (env, userId) => userId ? `Enter password for ${userId}@${env}:` : `Please enter a password`,
|
|
98
|
+
failed: (env, userId) => `Unable to login to ${env} as ${userId}`,
|
|
99
|
+
success: (env, userId) => `User ${userId} connected to ${env} successfully
|
|
100
|
+
`,
|
|
101
|
+
insecurePassword: () => `Could not connect to local keystore - your password could be stored unencrypted!`,
|
|
102
|
+
noEnv: () => `No environment set, use "contensis connect {alias}" first`,
|
|
103
|
+
noUserId: () => `No user id specified`
|
|
104
|
+
},
|
|
105
|
+
projects: {
|
|
106
|
+
list: () => `Available projects:`,
|
|
107
|
+
noList: () => `Cannot retrieve projects list`,
|
|
108
|
+
set: (projectId) => `Current project is set to ${import_logger.Logger.highlightText(projectId)}`,
|
|
109
|
+
failedSet: (projectId) => `Project ${import_logger.Logger.highlightText(projectId)} not found`,
|
|
110
|
+
tip: () => `You need to set your current working project with "set project {projectId}"`,
|
|
111
|
+
created: (env, id) => `[${env}] Created project ${import_logger.Logger.highlightText(id)}`,
|
|
112
|
+
failedCreate: (env, id) => `[${env}] Unable to create project ${import_logger.Logger.highlightText(id)}`,
|
|
113
|
+
updated: (env, id) => `[${env}] Updated project ${import_logger.Logger.highlightText(id)}`,
|
|
114
|
+
failedUpdate: (env, id) => `[${env}] Unable to update project ${import_logger.Logger.highlightText(id)}`
|
|
115
|
+
},
|
|
116
|
+
migrate: {
|
|
117
|
+
models: {
|
|
118
|
+
result: (status) => {
|
|
119
|
+
switch (status) {
|
|
120
|
+
case "created":
|
|
121
|
+
case "updated":
|
|
122
|
+
return import_logger.Logger.successText;
|
|
123
|
+
case "errors":
|
|
124
|
+
return import_logger.Logger.errorText;
|
|
125
|
+
default:
|
|
126
|
+
return import_logger.Logger.infoText;
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
},
|
|
130
|
+
status: (status) => {
|
|
131
|
+
switch (status) {
|
|
132
|
+
case "no change":
|
|
133
|
+
return import_logger.Logger.successText;
|
|
134
|
+
case "create":
|
|
135
|
+
case "two-pass":
|
|
136
|
+
case "update":
|
|
137
|
+
case "delete":
|
|
138
|
+
return import_logger.Logger.warningText;
|
|
139
|
+
case "error":
|
|
140
|
+
case "not found":
|
|
141
|
+
return import_logger.Logger.errorText;
|
|
142
|
+
default:
|
|
143
|
+
return import_logger.Logger.infoText;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
},
|
|
147
|
+
models: {
|
|
148
|
+
list: (projectId) => `Content models in ${import_logger.Logger.highlightText(projectId)}:`,
|
|
149
|
+
noList: (projectId) => `[${projectId}] Cannot retrieve content models`,
|
|
150
|
+
get: (projectId, id) => `[${projectId}] Content models ${import_logger.Logger.infoText(`[ ${id} ]`)}`,
|
|
151
|
+
failedGet: (projectId, id) => `[${projectId}] Unable to get content models ${import_logger.Logger.highlightText(id)}`
|
|
152
|
+
},
|
|
153
|
+
contenttypes: {
|
|
154
|
+
list: (projectId) => `Content types in ${import_logger.Logger.highlightText(projectId)}:`,
|
|
155
|
+
get: (projectId, id) => `[${projectId}] Content type ${import_logger.Logger.highlightText(id)}`,
|
|
156
|
+
failedGet: (projectId, id) => `[${projectId}] Unable to get content type ${import_logger.Logger.highlightText(id)}`,
|
|
157
|
+
created: (projectId, id, status) => `[${projectId}] Content type ${status}d ${import_logger.Logger.highlightText(id)}`,
|
|
158
|
+
removed: (env, id, commit) => `[${env}] ${commit ? `Deleted` : `Will delete`} content type ${import_logger.Logger.highlightText(id)}`,
|
|
159
|
+
failedRemove: (env, id) => `[${env}] Unable to delete content type ${import_logger.Logger.highlightText(id)}`
|
|
160
|
+
},
|
|
161
|
+
components: {
|
|
162
|
+
list: (projectId) => `Components in ${import_logger.Logger.highlightText(projectId)}:`,
|
|
163
|
+
get: (projectId, id) => `[${projectId}] Component ${import_logger.Logger.highlightText(id)}`,
|
|
164
|
+
failedGet: (projectId, id) => `[${projectId}] Unable to get component ${import_logger.Logger.highlightText(id)}`,
|
|
165
|
+
created: (projectId, id, status) => `[${projectId}] Component ${status}d ${import_logger.Logger.highlightText(id)}`,
|
|
166
|
+
removed: (env, id, commit) => `[${env}] ${commit ? `Deleted` : `Will delete`} component ${import_logger.Logger.highlightText(id)}`,
|
|
167
|
+
failedRemove: (env, id) => `[${env}] Unable to delete component ${import_logger.Logger.highlightText(id)}`
|
|
168
|
+
},
|
|
169
|
+
version: {
|
|
170
|
+
set: (env, versionStatus) => `[${env}] Content version status set to "${versionStatus}"`,
|
|
171
|
+
invalid: (versionStatus) => `Content version status "${versionStatus}" is not valid, allowed values are "published" or "latest".`,
|
|
172
|
+
noEnv: () => `No Contensis environment set, connect to your Contensis cloud instance using "contensis connect {cms alias}"`
|
|
173
|
+
},
|
|
174
|
+
entries: {
|
|
175
|
+
removed: (env, commit) => `[${env}] ${commit ? `Deleted` : `Will delete`} entries`,
|
|
176
|
+
failedRemove: (env) => `[${env}] Unable to delete entries`,
|
|
177
|
+
notFound: (env) => `[${env}] Entries were not found`,
|
|
178
|
+
commitTip: () => ` Add --commit flag to commit the previewed changes`
|
|
179
|
+
},
|
|
180
|
+
keys: {
|
|
181
|
+
list: (env) => `[${env}] API keys:`,
|
|
182
|
+
noList: (env) => `[${env}] Cannot retrieve API`,
|
|
183
|
+
created: (env, name) => `[${env}] Created API key ${import_logger.Logger.highlightText(name)}`,
|
|
184
|
+
failedCreate: (env, name) => `[${env}] Unable to create API key ${import_logger.Logger.highlightText(name)}`,
|
|
185
|
+
removed: (env, id) => `[${env}] Deleted API key ${import_logger.Logger.highlightText(id)}`,
|
|
186
|
+
failedRemove: (env, id) => `[${env}] Unable to delete API key ${import_logger.Logger.highlightText(id)}`
|
|
187
|
+
},
|
|
188
|
+
blocks: {
|
|
189
|
+
runningStatus: (status) => {
|
|
190
|
+
switch (status) {
|
|
191
|
+
case "available":
|
|
192
|
+
return import_logger.Logger.successText(status);
|
|
193
|
+
case "pending":
|
|
194
|
+
case "starting":
|
|
195
|
+
case "stopped":
|
|
196
|
+
return import_logger.Logger.warningText(status);
|
|
197
|
+
case "degraded":
|
|
198
|
+
case "faulted":
|
|
199
|
+
case "broken":
|
|
200
|
+
return import_logger.Logger.errorText(status);
|
|
201
|
+
default:
|
|
202
|
+
return import_logger.Logger.infoText(status);
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
get: (id, env, projectId) => `[${env}] Block ${id} in project ${projectId}:`,
|
|
206
|
+
list: (env, projectId) => `[${env}] Blocks in project ${projectId}:`,
|
|
207
|
+
noList: (env, projectId) => `[${env}] Cannot retrieve blocks in project ${projectId}`,
|
|
208
|
+
getLogs: (id, branch, env, projectId) => `[${env}] Requesting logs from block ${import_logger.Logger.highlightText(
|
|
209
|
+
id
|
|
210
|
+
)} in branch ${branch} in project ${projectId}`,
|
|
211
|
+
failedGetLogs: (id, env, projectId) => `[${env}] Unable to fetch block logs for ${import_logger.Logger.highlightText(
|
|
212
|
+
id
|
|
213
|
+
)} in project ${projectId}`,
|
|
214
|
+
tryPush: (id, branch, env, projectId) => `[${env}] Request to push block ${import_logger.Logger.highlightText(
|
|
215
|
+
id
|
|
216
|
+
)} in branch ${branch} in project ${projectId}`,
|
|
217
|
+
pushed: (id, branch, env, projectId) => `[${env}] Pushed block ${import_logger.Logger.highlightText(
|
|
218
|
+
id
|
|
219
|
+
)} in branch ${branch} in project ${projectId}`,
|
|
220
|
+
failedPush: (id, env, projectId) => `[${env}] Unable to push block ${import_logger.Logger.highlightText(
|
|
221
|
+
id
|
|
222
|
+
)} in project ${projectId}`,
|
|
223
|
+
released: (id, env, projectId) => `[${env}] Released block ${import_logger.Logger.highlightText(
|
|
224
|
+
id
|
|
225
|
+
)} in project ${projectId}`,
|
|
226
|
+
failedRelease: (id, env, projectId) => `[${env}] Unable to release block ${import_logger.Logger.highlightText(
|
|
227
|
+
id
|
|
228
|
+
)} in project ${projectId}`,
|
|
229
|
+
deleted: (id, env, projectId) => `[${env}] Deleted block ${import_logger.Logger.highlightText(
|
|
230
|
+
id
|
|
231
|
+
)} in project ${projectId}`,
|
|
232
|
+
failedDelete: (id, env, projectId) => `[${env}] Unable to delete block ${import_logger.Logger.highlightText(
|
|
233
|
+
id
|
|
234
|
+
)} in project ${projectId}`
|
|
235
|
+
},
|
|
236
|
+
webhooks: {
|
|
237
|
+
list: (env) => `[${env}] Webhook subscriptions:`,
|
|
238
|
+
noList: (env) => `[${env}] Cannot retrieve webhook subscriptions`,
|
|
239
|
+
created: (env, name) => `[${env}] Created Webhook subscription ${import_logger.Logger.highlightText(name)}`,
|
|
240
|
+
failedCreate: (env, name) => `[${env}] Unable to create Webhook subscription ${import_logger.Logger.highlightText(
|
|
241
|
+
name
|
|
242
|
+
)}`,
|
|
243
|
+
deleted: (env, id) => `[${env}] Deleted Webhook subscription ${import_logger.Logger.highlightText(id)}`,
|
|
244
|
+
failedDelete: (env, id) => `[${env}] Unable to delete Webhook subscription ${import_logger.Logger.highlightText(
|
|
245
|
+
id
|
|
246
|
+
)}`
|
|
247
|
+
}
|
|
248
|
+
};
|
|
249
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
250
|
+
0 && (module.exports = {
|
|
251
|
+
LogMessages
|
|
252
|
+
});
|
|
253
|
+
//# sourceMappingURL=en-GB.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../src/localisation/en-GB.ts"],
|
|
4
|
+
"sourcesContent": ["import {\n BlockRunningStatus,\n MigrateModelsResult,\n MigrateStatus,\n} from 'migratortron';\nimport { Logger } from '~/util/logger';\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 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 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`,\n created: (env: string, name: string) =>\n `[${env}] Created API key ${Logger.highlightText(name)}`,\n failedCreate: (env: string, name: string) =>\n `[${env}] Unable to create 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 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 released: (id: string, env: string, projectId?: string) =>\n `[${env}] Released block ${Logger.highlightText(\n id\n )} in project ${projectId}`,\n failedRelease: (id: string, env: string, projectId?: string) =>\n `[${env}] Unable to release 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 },\n webhooks: {\n list: (env: string) => `[${env}] Webhook subscriptions:`,\n noList: (env: string) => `[${env}] Cannot retrieve webhook subscriptions`,\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};\n"],
|
|
5
|
+
"mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAKA,oBAAuB;AAEhB,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,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