contensis-cli 1.0.0-beta.8 → 1.0.0-beta.80

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.
Files changed (81) hide show
  1. package/README.md +1146 -78
  2. package/dist/commands/connect.js +3 -3
  3. package/dist/commands/connect.js.map +2 -2
  4. package/dist/commands/create.js +45 -10
  5. package/dist/commands/create.js.map +2 -2
  6. package/dist/commands/diff.js +57 -0
  7. package/dist/commands/diff.js.map +7 -0
  8. package/dist/commands/execute.js +103 -0
  9. package/dist/commands/execute.js.map +7 -0
  10. package/dist/commands/get.js +107 -18
  11. package/dist/commands/get.js.map +2 -2
  12. package/dist/commands/globalOptions.js +22 -17
  13. package/dist/commands/globalOptions.js.map +2 -2
  14. package/dist/commands/import.js +46 -11
  15. package/dist/commands/import.js.map +2 -2
  16. package/dist/commands/index.js +16 -2
  17. package/dist/commands/index.js.map +2 -2
  18. package/dist/commands/list.js +53 -10
  19. package/dist/commands/list.js.map +2 -2
  20. package/dist/commands/login.js +3 -3
  21. package/dist/commands/login.js.map +2 -2
  22. package/dist/commands/push.js +9 -5
  23. package/dist/commands/push.js.map +2 -2
  24. package/dist/commands/remove.js +51 -8
  25. package/dist/commands/remove.js.map +2 -2
  26. package/dist/commands/set.js +139 -12
  27. package/dist/commands/set.js.map +2 -2
  28. package/dist/index.js +1 -1
  29. package/dist/index.js.map +2 -2
  30. package/dist/localisation/en-GB.js +193 -49
  31. package/dist/localisation/en-GB.js.map +2 -2
  32. package/dist/providers/CredentialProvider.js +36 -7
  33. package/dist/providers/CredentialProvider.js.map +3 -3
  34. package/dist/providers/SessionCacheProvider.js +21 -1
  35. package/dist/providers/SessionCacheProvider.js.map +2 -2
  36. package/dist/providers/file-provider.js +8 -4
  37. package/dist/providers/file-provider.js.map +3 -3
  38. package/dist/services/ContensisCliService.js +1092 -410
  39. package/dist/services/ContensisCliService.js.map +3 -3
  40. package/dist/shell.js +48 -14
  41. package/dist/shell.js.map +3 -3
  42. package/dist/util/console.printer.js +171 -55
  43. package/dist/util/console.printer.js.map +2 -2
  44. package/dist/util/diff.js +39 -0
  45. package/dist/util/diff.js.map +7 -0
  46. package/dist/util/index.js +8 -2
  47. package/dist/util/index.js.map +3 -3
  48. package/dist/util/logger.js +61 -29
  49. package/dist/util/logger.js.map +3 -3
  50. package/dist/util/timers.js +49 -0
  51. package/dist/util/timers.js.map +7 -0
  52. package/dist/version.js +1 -1
  53. package/dist/version.js.map +1 -1
  54. package/esbuild.config.js +3 -1
  55. package/package.json +2 -2
  56. package/src/commands/connect.ts +3 -2
  57. package/src/commands/create.ts +61 -8
  58. package/src/commands/diff.ts +41 -0
  59. package/src/commands/execute.ts +117 -0
  60. package/src/commands/get.ts +150 -14
  61. package/src/commands/globalOptions.ts +18 -17
  62. package/src/commands/import.ts +57 -7
  63. package/src/commands/index.ts +16 -1
  64. package/src/commands/list.ts +85 -11
  65. package/src/commands/login.ts +3 -2
  66. package/src/commands/push.ts +10 -3
  67. package/src/commands/remove.ts +66 -4
  68. package/src/commands/set.ts +189 -9
  69. package/src/index.ts +1 -4
  70. package/src/localisation/en-GB.ts +269 -66
  71. package/src/providers/CredentialProvider.ts +39 -6
  72. package/src/providers/SessionCacheProvider.ts +29 -2
  73. package/src/providers/file-provider.ts +12 -4
  74. package/src/services/ContensisCliService.ts +1384 -484
  75. package/src/shell.ts +52 -15
  76. package/src/util/console.printer.ts +240 -78
  77. package/src/util/diff.ts +17 -0
  78. package/src/util/index.ts +16 -7
  79. package/src/util/logger.ts +111 -31
  80. package/src/util/timers.ts +24 -0
  81. package/src/version.ts +1 -1
@@ -24,18 +24,21 @@ module.exports = __toCommonJS(remove_exports);
24
24
  var import_commander = require("commander");
25
25
  var import_ContensisCliService = require("../services/ContensisCliService");
26
26
  var import_shell = require("../shell");
27
+ var import_logger = require("../util/logger");
27
28
  var import_globalOptions = require("./globalOptions");
28
29
  const makeRemoveCommand = () => {
29
- const remove = new import_commander.Command().command("remove").showHelpAfterError(true).exitOverride();
30
- remove.command("project").argument("<projectId>", "the project id to delete").usage("<projectId>").action(async (projectId, opts) => {
30
+ const remove = new import_commander.Command().command("remove").description("remove command").addHelpText("after", `
31
+ `).showHelpAfterError(true).exitOverride();
32
+ remove.command("project").description("remove an entire project").argument("<projectId>", "the project id to delete").usage("<projectId>").addHelpText("after", `
33
+ `).action(async (projectId, opts) => {
31
34
  const project = await (0, import_ContensisCliService.cliCommand)(
32
35
  ["remove", "project", projectId],
33
36
  opts
34
37
  ).SetProject(projectId);
35
38
  if (project)
36
- await (0, import_shell.shell)().start();
39
+ await (0, import_shell.shell)().restart();
37
40
  });
38
- remove.command("key").argument("<id>", "the id of the API key to delete").usage("<id>").addHelpText(
41
+ remove.command("key").description("remove api key").argument("<id>", "the id of the API key to delete").usage("<id>").addHelpText(
39
42
  "after",
40
43
  `
41
44
  Example call:
@@ -44,7 +47,18 @@ Example call:
44
47
  ).action(async (id, opts) => {
45
48
  await (0, import_ContensisCliService.cliCommand)(["remove", "key", id], opts).RemoveApiKey(id);
46
49
  });
47
- remove.command("components").argument("<id...>", "the id(s) of the components to delete").addOption(import_globalOptions.commit).usage("<id> [--commit]").addHelpText(
50
+ remove.command("role").description("remove a role").argument('<"Role name" or id>', "the existing role name or id to delete").addHelpText(
51
+ "after",
52
+ `
53
+ Example call:
54
+ > remove role "My role"
55
+ `
56
+ ).action(async (roleNameOrId, opts) => {
57
+ await (0, import_ContensisCliService.cliCommand)(["remove", "role", roleNameOrId], opts).RemoveRole(
58
+ roleNameOrId
59
+ );
60
+ });
61
+ remove.command("components").description("delete components").argument("<id...>", "the id(s) of the components to delete").addOption(import_globalOptions.commit).usage("<id> [--commit]").addHelpText(
48
62
  "after",
49
63
  `
50
64
  Example call:
@@ -52,11 +66,11 @@ Example call:
52
66
  `
53
67
  ).action(async (id, opts) => {
54
68
  await (0, import_ContensisCliService.cliCommand)(
55
- ["remove", "components", id.join(", ")],
69
+ ["remove", "components", id.join(" ")],
56
70
  opts
57
71
  ).RemoveComponents(id, opts.commit);
58
72
  });
59
- remove.command("contenttypes").argument("<id...>", "the id(s) of the content types to delete").addOption(import_globalOptions.commit).usage("<id> [--commit]").addHelpText(
73
+ 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(
60
74
  "after",
61
75
  `
62
76
  Example call:
@@ -64,10 +78,39 @@ Example call:
64
78
  `
65
79
  ).action(async (id, opts) => {
66
80
  await (0, import_ContensisCliService.cliCommand)(
67
- ["remove", "contenttypes", id.join(", ")],
81
+ ["remove", "contenttypes", id.join(" ")],
68
82
  opts
69
83
  ).RemoveContentTypes(id, opts.commit);
70
84
  });
85
+ const removeEntries = remove.command("entries").description("delete entries").argument(
86
+ "[ids...]",
87
+ "the entry id(s) to delete ...or add *** if you wish to delete all entries in all content types"
88
+ ).addOption(import_globalOptions.zenql).addOption(import_globalOptions.commit).addHelpText(
89
+ "after",
90
+ `
91
+ Example call:
92
+ > remove entries a1c25591-8c9b-50e2-96d8-f6c774fcf023 8df914cc-1da1-59d6-86e0-8ea4ebd99aaa
93
+ > remove entries --zenql "sys.contentTypeId = test"
94
+ `
95
+ ).action(async (entryIds, opts) => {
96
+ const removeAll = (entryIds == null ? void 0 : entryIds[0]) === "***";
97
+ if ((entryIds == null ? void 0 : entryIds[0]) && !entryIds[0].replace(/\*/g, ""))
98
+ entryIds.pop();
99
+ const hasArgs = !!((entryIds == null ? void 0 : entryIds.length) || opts.zenql || removeAll);
100
+ if (!hasArgs) {
101
+ import_logger.Logger.help(
102
+ `Not enough arguments supplied
103
+
104
+ ${removeEntries.helpInformation()}`
105
+ );
106
+ } else {
107
+ await (0, import_ContensisCliService.cliCommand)(
108
+ ["remove", "entries", entryIds.join(" ")],
109
+ opts,
110
+ (0, import_globalOptions.mapContensisOpts)({ entryIds, ...opts })
111
+ ).RemoveEntries(opts.commit);
112
+ }
113
+ });
71
114
  return remove;
72
115
  };
73
116
  // 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 { commit, mapContensisOpts } from './globalOptions';\n\nexport const makeRemoveCommand = () => {\n const remove = new Command()\n .command('remove')\n .showHelpAfterError(true)\n .exitOverride();\n\n remove\n .command('project')\n .argument('<projectId>', 'the project id to delete')\n .usage('<projectId>')\n .action(async (projectId, opts) => {\n const project = await cliCommand(\n ['remove', 'project', projectId],\n opts\n ).SetProject(projectId);\n if (project) await shell().start();\n });\n remove\n .command('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 .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 .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,2BAAyC;AAElC,MAAM,oBAAoB,MAAM;AACrC,QAAM,SAAS,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T;",
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,OAAO,OAAO,WAAW,SAAS;AACjC,UAAM,UAAU,UAAM;AAAA,MACpB,CAAC,UAAU,WAAW,SAAS;AAAA,MAC/B;AAAA,IACF,EAAE,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,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;",
6
6
  "names": []
7
7
  }
@@ -25,26 +25,153 @@ var import_commander = require("commander");
25
25
  var import_ContensisCliService = require("../services/ContensisCliService");
26
26
  var import_shell = require("../shell");
27
27
  const makeSetCommand = () => {
28
- const set = new import_commander.Command().command("set").showHelpAfterError(true).exitOverride();
29
- set.command("project").argument("<projectId>", "the project id to work with").usage("<projectId>").action(async (projectId) => {
30
- const project = await (0, import_ContensisCliService.cliCommand)([
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)([
31
38
  "set",
32
39
  "project",
33
40
  projectId
34
41
  ]).SetProject(projectId);
35
- if (project)
36
- await (0, import_shell.shell)().start();
42
+ if (nextProjectId)
43
+ await (0, import_shell.shell)().restart();
37
44
  });
38
- set.command("version").addArgument(
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
+ await (0, import_ContensisCliService.cliCommand)(["set", "project", "name"], opts).UpdateProject({
53
+ name
54
+ });
55
+ });
56
+ project.command("description").description("update project description").argument(
57
+ '<"Project description">',
58
+ "update the current project description"
59
+ ).usage('<"Project description">').addHelpText(
60
+ "after",
61
+ `
62
+ Example call:
63
+ > set project description "Description of project"
64
+ `
65
+ ).action(async (description, opts) => {
66
+ await (0, import_ContensisCliService.cliCommand)(["set", "project", "description"], opts).UpdateProject({
67
+ description
68
+ });
69
+ });
70
+ const role = set.command("role").description("update a role");
71
+ role.command("name").description("update role name").argument('<"Role name">', "update the existing role name").argument('<"New name">', "the new name for the role").usage('<"Role name"> <"New name">').addHelpText(
72
+ "after",
73
+ `
74
+ Example call:
75
+ > set role name "Existing name" "New role name"
76
+ `
77
+ ).action(async (roleNameOrId, newName, opts) => {
78
+ await (0, import_ContensisCliService.cliCommand)(["set", "role", "name"], opts).UpdateRole(roleNameOrId, {
79
+ name: newName
80
+ });
81
+ });
82
+ role.command("description").description("update role description").argument('<"Role name" or id>', "the existing role name or id to update").argument('<"New description">', "the new description for the role").usage('<"Role name"> <"New description">').addHelpText(
83
+ "after",
84
+ `
85
+ Example call:
86
+ > set role description "Existing role" "New role description"
87
+ `
88
+ ).action(async (roleNameOrId, description, opts) => {
89
+ await (0, import_ContensisCliService.cliCommand)(["set", "role", "description"], opts).UpdateRole(
90
+ roleNameOrId,
91
+ {
92
+ description
93
+ }
94
+ );
95
+ });
96
+ role.command("enabled").description("enable or disable a role").argument('<"Role name" or id>', "the existing role name or id to update").usage('<"Role name"> --disabled').option("--disabled", "disable the role", false).addHelpText(
97
+ "after",
98
+ `
99
+ Example call:
100
+ > set role enabled "Existing role"
101
+
102
+ > set role enabled "Other role" --disabled
103
+ `
104
+ ).action(async (roleNameOrId, opts) => {
105
+ await (0, import_ContensisCliService.cliCommand)(
106
+ ["set", "role", opts.disabled ? "disabled" : "enabled"],
107
+ opts
108
+ ).UpdateRole(roleNameOrId, {
109
+ enabled: !opts.disabled
110
+ });
111
+ });
112
+ role.command("assignments").description("assign users, groups or keys to a role").argument('<"Role name" or id>', "the role name or id to update").option(
113
+ "-users --assign-users [assign-users...]",
114
+ "the user id(s) to assign"
115
+ ).option(
116
+ "-groups --assign-groups [assign-groups...]",
117
+ "the groups name(s) to assign"
118
+ ).option("-keys --assign-keys [assign-keys...]", "the key name(s) to assign").addHelpText(
119
+ "after",
120
+ `
121
+ Example call:
122
+ > set role assignments "My role" --assign-users admin
123
+ `
124
+ ).action(async (roleNameOrId, opts) => {
125
+ await (0, import_ContensisCliService.cliCommand)(["set", "role", "assignments"], opts).UpdateRole(
126
+ roleNameOrId,
127
+ {
128
+ assignments: {
129
+ apiKeys: opts.assignKeys || void 0,
130
+ groups: opts.assignGroups || void 0,
131
+ users: opts.assignUsers || void 0
132
+ }
133
+ }
134
+ );
135
+ });
136
+ role.command("permissions").description("add entry permissions to a role").argument('<"Role name" or id>', "the role name or id to update").option(
137
+ "-contenttypes, --content-type-ids [content-type-id...]",
138
+ "any content type ids to add permissions for"
139
+ ).option(
140
+ "--entry-actions [entry-actions...]",
141
+ "the entry actions to add to the role permissions"
142
+ ).option(
143
+ "--entry-languages [entry-languages...]",
144
+ "the entry languages to add to the role permissions"
145
+ ).addHelpText(
146
+ "after",
147
+ `
148
+ Example call:
149
+ > set role permissions "My role" --content-type-id blogs --
150
+ `
151
+ ).action(async (roleNameOrId, opts) => {
152
+ var _a;
153
+ await (0, import_ContensisCliService.cliCommand)(["set", "role", "permissions"], opts).UpdateRole(
154
+ roleNameOrId,
155
+ {
156
+ permissions: {
157
+ entries: (_a = opts.contentTypeIds) == null ? void 0 : _a.map((id) => ({
158
+ id,
159
+ actions: opts.entryActions || [],
160
+ languages: opts.entryLanguages || []
161
+ }))
162
+ }
163
+ }
164
+ );
165
+ });
166
+ set.command("version").description("set content version").addArgument(
39
167
  new import_commander.Argument("<versionStatus>", "content version status").choices(["latest", "published"]).default("latest")
40
- ).usage("<latest/published>").action(async (versionStatus) => {
41
- const success = await (0, import_ContensisCliService.cliCommand)([
42
- "set",
43
- "version",
168
+ ).usage("<latest/published>").addHelpText("after", `
169
+ `).action(async (versionStatus) => {
170
+ const success = (0, import_ContensisCliService.cliCommand)(["set", "version", versionStatus]).SetVersion(
44
171
  versionStatus
45
- ]).SetVersion(versionStatus);
172
+ );
46
173
  if (success)
47
- await (0, import_shell.shell)().start();
174
+ await (0, import_shell.shell)().restart();
48
175
  });
49
176
  return set;
50
177
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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 .showHelpAfterError(true)\n .exitOverride();\n set\n .command('project')\n .argument('<projectId>', 'the project id to work with')\n .usage('<projectId>')\n .action(async projectId => {\n const project = await cliCommand([\n 'set',\n 'project',\n projectId,\n ]).SetProject(projectId);\n if (project) await shell().start();\n });\n set\n .command('version')\n .addArgument(\n new Argument('<versionStatus>', 'content version status')\n .choices(['latest', 'published'])\n .default('latest')\n )\n .usage('<latest/published>')\n .action(async versionStatus => {\n const success = await cliCommand([\n 'set',\n 'version',\n versionStatus,\n ]).SetVersion(versionStatus);\n if (success) await shell().start();\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,mBAAmB,IAAI,EACvB,aAAa;AAChB,MACG,QAAQ,SAAS,EACjB,SAAS,eAAe,6BAA6B,EACrD,MAAM,aAAa,EACnB,OAAO,OAAM,cAAa;AACzB,UAAM,UAAU,UAAM,uCAAW;AAAA,MAC/B;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC,EAAE,WAAW,SAAS;AACvB,QAAI;AAAS,gBAAM,oBAAM,EAAE,MAAM;AAAA,EACnC,CAAC;AACH,MACG,QAAQ,SAAS,EACjB;AAAA,IACC,IAAI,0BAAS,mBAAmB,wBAAwB,EACrD,QAAQ,CAAC,UAAU,WAAW,CAAC,EAC/B,QAAQ,QAAQ;AAAA,EACrB,EACC,MAAM,oBAAoB,EAC1B,OAAO,OAAM,kBAAiB;AAC7B,UAAM,UAAU,UAAM,uCAAW;AAAA,MAC/B;AAAA,MACA;AAAA,MACA;AAAA,IACF,CAAC,EAAE,WAAW,aAAa;AAC3B,QAAI;AAAS,gBAAM,oBAAM,EAAE,MAAM;AAAA,EACnC,CAAC;AAEH,SAAO;AACT;",
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 await cliCommand(['set', 'project', 'name'], opts).UpdateProject({\n name,\n });\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 await cliCommand(['set', 'project', 'description'], opts).UpdateProject({\n description,\n });\n });\n\n const role = set.command('role').description('update a role');\n\n role\n .command('name')\n .description('update role name')\n .argument('<\"Role name\">', 'update the existing role name')\n .argument('<\"New name\">', 'the new name for the role')\n .usage('<\"Role name\"> <\"New name\">')\n .addHelpText(\n 'after',\n `\nExample call:\n > set role name \"Existing name\" \"New role name\"\\n`\n )\n .action(async (roleNameOrId: string, newName: string, opts) => {\n await cliCommand(['set', 'role', 'name'], opts).UpdateRole(roleNameOrId, {\n name: newName,\n });\n });\n\n role\n .command('description')\n .description('update role description')\n .argument('<\"Role name\" or id>', 'the existing role name or id to update')\n .argument('<\"New description\">', 'the new description for the role')\n .usage('<\"Role name\"> <\"New description\">')\n .addHelpText(\n 'after',\n `\nExample call:\n > set role description \"Existing role\" \"New role description\"\\n`\n )\n .action(async (roleNameOrId: string, description: string, opts) => {\n await cliCommand(['set', 'role', 'description'], opts).UpdateRole(\n roleNameOrId,\n {\n description,\n }\n );\n });\n\n role\n .command('enabled')\n .description('enable or disable a role')\n .argument('<\"Role name\" or id>', 'the existing role name or id to update')\n .usage('<\"Role name\"> --disabled')\n .option('--disabled', 'disable the role', false)\n .addHelpText(\n 'after',\n `\nExample call:\n > set role enabled \"Existing role\"\\n\n > set role enabled \"Other role\" --disabled\\n`\n )\n .action(async (roleNameOrId: string, opts) => {\n await cliCommand(\n ['set', 'role', opts.disabled ? 'disabled' : 'enabled'],\n opts\n ).UpdateRole(roleNameOrId, {\n enabled: !opts.disabled,\n });\n });\n\n role\n .command('assignments')\n .description('assign users, groups or keys to a role')\n .argument('<\"Role name\" or id>', 'the role name or id to update')\n .option(\n '-users --assign-users [assign-users...]',\n 'the user id(s) to assign'\n )\n .option(\n '-groups --assign-groups [assign-groups...]',\n 'the groups name(s) to assign'\n )\n .option('-keys --assign-keys [assign-keys...]', 'the key name(s) to assign')\n .addHelpText(\n 'after',\n `\nExample call:\n > set role assignments \"My role\" --assign-users admin \\n`\n )\n .action(async (roleNameOrId: string, opts) => {\n await cliCommand(['set', 'role', 'assignments'], opts).UpdateRole(\n roleNameOrId,\n {\n assignments: {\n apiKeys: opts.assignKeys || undefined,\n groups: opts.assignGroups || undefined,\n users: opts.assignUsers || undefined,\n },\n }\n );\n });\n\n role\n .command('permissions')\n .description('add entry permissions to a role')\n .argument('<\"Role name\" or id>', 'the role name or id to update')\n .option(\n '-contenttypes, --content-type-ids [content-type-id...]',\n 'any content type ids to add permissions for'\n )\n .option(\n '--entry-actions [entry-actions...]',\n 'the entry actions to add to the role permissions'\n )\n .option(\n '--entry-languages [entry-languages...]',\n 'the entry languages to add to the role permissions'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > set role permissions \"My role\" --content-type-id blogs -- \\n`\n )\n .action(async (roleNameOrId: string, opts) => {\n await cliCommand(['set', 'role', 'permissions'], opts).UpdateRole(\n roleNameOrId,\n {\n permissions: {\n entries: opts.contentTypeIds?.map((id: string) => ({\n id,\n actions: opts.entryActions || [],\n languages: opts.entryLanguages || [],\n })),\n },\n }\n );\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": ";;;;;;;;;;;;;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7B,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
6
  "names": []
7
7
  }
package/dist/index.js CHANGED
@@ -25,7 +25,7 @@ program.parseAsync(process.argv).then(() => {
25
25
  import_ContensisCliService.default.quit();
26
26
  }).catch((err) => {
27
27
  var _a;
28
- if (!((_a = err.name) == null ? void 0 : _a.includes("CommanderError")))
28
+ if (err && !((_a = err.name) == null ? void 0 : _a.includes("CommanderError")))
29
29
  (0, import_logger.logError)(err, `CLI ${err.toString()}`);
30
30
  import_ContensisCliService.default.quit(err);
31
31
  });
package/dist/index.js.map CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
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;",
4
+ "sourcesContent": ["import commands from './commands';\nimport { logError } from './util/logger';\nimport ContensisCli from './services/ContensisCliService';\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 && !err.name?.includes('CommanderError'))\n logError(err, `CLI ${err.toString()}`);\n ContensisCli.quit(err);\n });\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;AAAA,sBAAqB;AACrB,oBAAyB;AACzB,iCAAyB;AAGzB,MAAM,cAAU,gBAAAA,SAAS;AACzB,QACG,WAAW,QAAQ,IAAI,EACvB,KAAK,MAAM;AACV,6BAAAC,QAAa,KAAK;AACpB,CAAC,EACA,MAAM,CAAC,QAAa;AAXvB;AAYI,MAAI,OAAO,GAAC,SAAI,SAAJ,mBAAU,SAAS;AAC7B,gCAAS,KAAK,OAAO,IAAI,SAAS,GAAG;AACvC,6BAAAA,QAAa,KAAK,GAAG;AACvB,CAAC;",
6
6
  "names": ["commands", "ContensisCli"]
7
7
  }