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,23 +24,26 @@ __export(globalOptions_exports, {
24
24
  addGlobalOptions: () => addGlobalOptions,
25
25
  addImportOptions: () => addImportOptions,
26
26
  commit: () => commit,
27
+ entryId: () => entryId,
27
28
  fromCms: () => fromCms,
28
29
  fromFile: () => fromFile,
29
30
  fromProject: () => fromProject,
30
31
  mapContensisOpts: () => mapContensisOpts,
31
- project: () => project
32
+ project: () => project,
33
+ zenql: () => zenql
32
34
  });
33
35
  module.exports = __toCommonJS(globalOptions_exports);
34
36
  var import_commander = require("commander");
35
37
  var import_util = require("../util");
36
38
  const mapContensisOpts = (opts = {}) => ({
37
- source: opts.sourceCms || opts.sourceProjectId ? {
38
- url: opts.sourceCms ? (0, import_util.url)(opts.sourceCms, "website").cms : void 0,
39
+ source: opts.sourceAlias || opts.sourceProjectId ? {
40
+ url: opts.sourceAlias ? (0, import_util.url)(opts.sourceAlias, "website").cms : void 0,
39
41
  project: opts.sourceProjectId || void 0
40
42
  } : void 0,
41
- query: opts.id || opts.phrase || opts.fields ? {
43
+ models: opts.modelIds,
44
+ query: opts.id || opts.entryIds || opts.phrase || opts.fields ? {
42
45
  fields: opts.fields,
43
- includeIds: opts.id,
46
+ includeIds: opts.id || opts.entryIds,
44
47
  searchTerm: opts.phrase
45
48
  } : void 0,
46
49
  zenQL: opts.zenql,
@@ -55,49 +58,49 @@ const format = new import_commander.Option(
55
58
  "format output as csv, json, xml or table (default)"
56
59
  ).choices(["csv", "json", "xml", "table"]);
57
60
  const alias = new import_commander.Option(
58
- "-a --alias <alias>",
61
+ "-a, --alias <alias>",
59
62
  "the cloud CMS alias to connect your request with"
60
63
  );
61
64
  const project = new import_commander.Option(
62
- "-p --project-id <projectId>",
65
+ "-p, --project-id <projectId>",
63
66
  "the projectId to make your request with"
64
67
  );
65
68
  const user = new import_commander.Option(
66
- "-u --user <user>",
69
+ "-u, --user <user>",
67
70
  "the username to authenticate your request with"
68
71
  );
69
72
  const password = new import_commander.Option(
70
- "-pw --password <password>",
73
+ "-pw, --password <password>",
71
74
  "the password to use to login with (optional/insecure)"
72
75
  );
73
76
  const clientId = new import_commander.Option(
74
- "-id --client-id <clientId>",
77
+ "-id, --client-id <clientId>",
75
78
  "the clientId to authenticate your request with"
76
79
  );
77
80
  const sharedSecret = new import_commander.Option(
78
- "-s --shared-secret <sharedSecret>",
81
+ "-s, --shared-secret <sharedSecret>",
79
82
  "the shared secret to use when logging in with a client id"
80
83
  );
81
84
  const zenql = new import_commander.Option(
82
85
  "-q, --zenql <zenql>",
83
86
  "get entries with a supplied ZenQL statement"
84
87
  );
85
- const entryId = new import_commander.Option("-i --id <id...>", "the entry id to get");
88
+ const entryId = new import_commander.Option("-i --id <id...>", "the entry id(s) to get");
86
89
  const fromFile = new import_commander.Option(
87
- "-file --from-file <fromFile>",
90
+ "-file, --from-file <fromFile>",
88
91
  "file path to import asset(s) from"
89
92
  );
90
93
  const fromCms = new import_commander.Option(
91
- "-source --source-alias <fromCms>",
94
+ "-source, --source-alias <fromCms>",
92
95
  "the cloud CMS alias to import asset(s) from"
93
96
  );
94
97
  const fromProject = new import_commander.Option(
95
- "-sp --source-project-id <fromProject>",
98
+ "-sp, --source-project-id <fromProject>",
96
99
  "the id of the Contensis project to import asset(s) from (Default: [last connected project])"
97
100
  );
98
101
  const commit = new import_commander.Option(
99
102
  "--commit",
100
- "omit and only add this flag when you are happy with the preview of the import"
103
+ "add this flag only after you have run a preview of the import and agree with the analysis"
101
104
  ).default(false);
102
105
  const addConnectOptions = (program) => program.addOption(alias.hideHelp()).addOption(project.hideHelp());
103
106
  const addAuthenticationOptions = (program) => program.addOption(user.hideHelp()).addOption(password.hideHelp()).addOption(clientId.hideHelp()).addOption(sharedSecret.hideHelp());
@@ -130,10 +133,12 @@ const addGlobalOptions = (program) => {
130
133
  addGlobalOptions,
131
134
  addImportOptions,
132
135
  commit,
136
+ entryId,
133
137
  fromCms,
134
138
  fromFile,
135
139
  fromProject,
136
140
  mapContensisOpts,
137
- project
141
+ project,
142
+ zenql
138
143
  });
139
144
  //# sourceMappingURL=globalOptions.js.map
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/globalOptions.ts"],
4
- "sourcesContent": ["import { Command, Option } from 'commander';\nimport { url } from '~/util';\n\nexport const mapContensisOpts = (opts: any = {}) => ({\n source:\n opts.sourceCms || opts.sourceProjectId\n ? {\n url: opts.sourceCms\n ? url(opts.sourceCms, 'website').cms\n : (undefined as any),\n project: opts.sourceProjectId || (undefined as any),\n }\n : undefined,\n query:\n opts.id || opts.phrase || opts.fields\n ? {\n fields: opts.fields,\n includeIds: opts.id,\n searchTerm: opts.phrase,\n }\n : undefined,\n zenQL: opts.zenql,\n transformGuids: !opts.preserveGuids,\n});\n\n/* Output options */\nconst output = new Option(\n '-o, --output <output>',\n 'save output to a file e.g. --output ./output.txt'\n);\n\nconst format = new Option(\n '-f, --format <format>',\n 'format output as csv, json, xml or table (default)'\n).choices(['csv', 'json', 'xml', 'table']);\n\n/* Connect options */\nconst alias = new Option(\n '-a --alias <alias>',\n 'the cloud CMS alias to connect your request with'\n);\n\nexport const project = new Option(\n '-p --project-id <projectId>',\n 'the projectId to make your request with'\n);\n\n/* Authentication options */\nconst user = new Option(\n '-u --user <user>',\n 'the username to authenticate your request with'\n);\nconst password = new Option(\n '-pw --password <password>',\n 'the password to use to login with (optional/insecure)'\n);\nconst clientId = new Option(\n '-id --client-id <clientId>',\n 'the clientId to authenticate your request with'\n);\nconst sharedSecret = new Option(\n '-s --shared-secret <sharedSecret>',\n 'the shared secret to use when logging in with a client id'\n);\n\n/* Entry get options */\nconst zenql = new Option(\n '-q, --zenql <zenql>',\n 'get entries with a supplied ZenQL statement'\n);\n\nconst entryId = new Option('-i --id <id...>', 'the entry id to get');\n\n/* Import options */\nexport const fromFile = new Option(\n '-file --from-file <fromFile>',\n 'file path to import asset(s) from'\n);\n\nexport const fromCms = new Option(\n '-source --source-alias <fromCms>',\n 'the cloud CMS alias to import asset(s) from'\n);\nexport const fromProject = new Option(\n '-sp --source-project-id <fromProject>',\n 'the id of the Contensis project to import asset(s) from (Default: [last connected project])'\n);\n\nexport const commit = new Option(\n '--commit',\n 'omit and only add this flag when you are happy with the preview of the import'\n).default(false);\n\nexport const addConnectOptions = (program: Command) =>\n program.addOption(alias.hideHelp()).addOption(project.hideHelp());\n\nexport const addAuthenticationOptions = (program: Command) =>\n program\n .addOption(user.hideHelp())\n .addOption(password.hideHelp())\n .addOption(clientId.hideHelp())\n .addOption(sharedSecret.hideHelp());\n\nconst addOutputAndFormatOptions = (program: Command) =>\n program.addOption(output).addOption(format);\n\nexport const addImportOptions = (program: Command) => {\n for (const command of program.commands) {\n command.addOption(fromFile).addOption(fromCms).addOption(fromProject);\n }\n return program;\n};\nexport const addGetEntryOptions = (program: Command) => {\n for (const command of program.commands) {\n command.addOption(entryId).addOption(zenql);\n }\n return program;\n};\nexport const addGlobalOptions = (program: Command) => {\n for (const command of program.commands) {\n addOutputAndFormatOptions(command);\n addConnectOptions(command);\n addAuthenticationOptions(command);\n }\n return program;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC;AAChC,kBAAoB;AAEb,MAAM,mBAAmB,CAAC,OAAY,CAAC,OAAO;AAAA,EACnD,QACE,KAAK,aAAa,KAAK,kBACnB;AAAA,IACE,KAAK,KAAK,gBACN,iBAAI,KAAK,WAAW,SAAS,EAAE,MAC9B;AAAA,IACL,SAAS,KAAK,mBAAoB;AAAA,EACpC,IACA;AAAA,EACN,OACE,KAAK,MAAM,KAAK,UAAU,KAAK,SAC3B;AAAA,IACE,QAAQ,KAAK;AAAA,IACb,YAAY,KAAK;AAAA,IACjB,YAAY,KAAK;AAAA,EACnB,IACA;AAAA,EACN,OAAO,KAAK;AAAA,EACZ,gBAAgB,CAAC,KAAK;AACxB;AAGA,MAAM,SAAS,IAAI;AAAA,EACjB;AAAA,EACA;AACF;AAEA,MAAM,SAAS,IAAI;AAAA,EACjB;AAAA,EACA;AACF,EAAE,QAAQ,CAAC,OAAO,QAAQ,OAAO,OAAO,CAAC;AAGzC,MAAM,QAAQ,IAAI;AAAA,EAChB;AAAA,EACA;AACF;AAEO,MAAM,UAAU,IAAI;AAAA,EACzB;AAAA,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AAO;AACjC,sBAAkB,OAAO;AACzB,6BAAyB,OAAO;AAAA,EAClC;AACA,SAAO;AACT;",
4
+ "sourcesContent": ["import { Command, Option } from 'commander';\nimport { url } from '~/util';\n\nexport const mapContensisOpts = (opts: any = {}) => ({\n source:\n opts.sourceAlias || opts.sourceProjectId\n ? {\n url: opts.sourceAlias\n ? url(opts.sourceAlias, 'website').cms\n : (undefined as any),\n project: opts.sourceProjectId || (undefined as any),\n }\n : undefined,\n models: opts.modelIds,\n query:\n opts.id || opts.entryIds || opts.phrase || opts.fields\n ? {\n fields: opts.fields,\n includeIds: opts.id || opts.entryIds,\n searchTerm: opts.phrase,\n }\n : undefined,\n zenQL: opts.zenql,\n transformGuids: !opts.preserveGuids,\n});\n\n/* Output options */\nconst output = new Option(\n '-o, --output <output>',\n 'save output to a file e.g. --output ./output.txt'\n);\n\nconst format = new Option(\n '-f, --format <format>',\n 'format output as csv, json, xml or table (default)'\n).choices(['csv', 'json', 'xml', 'table']);\n\n/* Connect options */\nconst alias = new Option(\n '-a, --alias <alias>',\n 'the cloud CMS alias to connect your request with'\n);\n\nexport const project = new Option(\n '-p, --project-id <projectId>',\n 'the projectId to make your request with'\n);\n\n/* Authentication options */\nconst user = new Option(\n '-u, --user <user>',\n 'the username to authenticate your request with'\n);\nconst password = new Option(\n '-pw, --password <password>',\n 'the password to use to login with (optional/insecure)'\n);\nconst clientId = new Option(\n '-id, --client-id <clientId>',\n 'the clientId to authenticate your request with'\n);\nconst sharedSecret = new Option(\n '-s, --shared-secret <sharedSecret>',\n 'the shared secret to use when logging in with a client id'\n);\n\n/* Entry get options */\nexport const zenql = new Option(\n '-q, --zenql <zenql>',\n 'get entries with a supplied ZenQL statement'\n);\n\nexport const entryId = new Option('-i --id <id...>', 'the entry id(s) to get');\n\n/* Import options */\nexport const fromFile = new Option(\n '-file, --from-file <fromFile>',\n 'file path to import asset(s) from'\n);\n\nexport const fromCms = new Option(\n '-source, --source-alias <fromCms>',\n 'the cloud CMS alias to import asset(s) from'\n);\nexport const fromProject = new Option(\n '-sp, --source-project-id <fromProject>',\n 'the id of the Contensis project to import asset(s) from (Default: [last connected project])'\n);\n\nexport const commit = new Option(\n '--commit',\n 'add this flag only after you have run a preview of the import and agree with the analysis'\n).default(false);\n\nexport const addConnectOptions = (program: Command) =>\n program.addOption(alias.hideHelp()).addOption(project.hideHelp());\n\nexport const addAuthenticationOptions = (program: Command) =>\n program\n .addOption(user.hideHelp())\n .addOption(password.hideHelp())\n .addOption(clientId.hideHelp())\n .addOption(sharedSecret.hideHelp());\n\nconst addOutputAndFormatOptions = (program: Command) =>\n program.addOption(output).addOption(format);\n\nexport const addImportOptions = (program: Command) => {\n for (const command of program.commands) {\n command.addOption(fromFile).addOption(fromCms).addOption(fromProject);\n }\n return program;\n};\nexport const addGetEntryOptions = (program: Command) => {\n for (const command of program.commands) {\n command.addOption(entryId).addOption(zenql);\n }\n return program;\n};\nexport const addGlobalOptions = (program: Command) => {\n for (const command of program.commands) {\n addOutputAndFormatOptions(command);\n addConnectOptions(command);\n addAuthenticationOptions(command);\n }\n return program;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC;AAChC,kBAAoB;AAEb,MAAM,mBAAmB,CAAC,OAAY,CAAC,OAAO;AAAA,EACnD,QACE,KAAK,eAAe,KAAK,kBACrB;AAAA,IACE,KAAK,KAAK,kBACN,iBAAI,KAAK,aAAa,SAAS,EAAE,MAChC;AAAA,IACL,SAAS,KAAK,mBAAoB;AAAA,EACpC,IACA;AAAA,EACN,QAAQ,KAAK;AAAA,EACb,OACE,KAAK,MAAM,KAAK,YAAY,KAAK,UAAU,KAAK,SAC5C;AAAA,IACE,QAAQ,KAAK;AAAA,IACb,YAAY,KAAK,MAAM,KAAK;AAAA,IAC5B,YAAY,KAAK;AAAA,EACnB,I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Q,UAAU;AACtC,YAAQ,UAAU,QAAQ,EAAE,UAAU,OAAO,EAAE,UAAU,WAAW;AAAA,EACtE;AACA,SAAO;AACT;AACO,MAAM,qBAAqB,CAAC,YAAqB;AACtD,aAAW,WAAW,QAAQ,UAAU;AACtC,YAAQ,UAAU,OAAO,EAAE,UAAU,KAAK;AAAA,EAC5C;AACA,SAAO;AACT;AACO,MAAM,mBAAmB,CAAC,YAAqB;AACpD,aAAW,WAAW,QAAQ,UAAU;AACtC,8BAA0B,OAAO;AACjC,sBAAkB,OAAO;AACzB,6BAAyB,OAAO;AAAA,EAClC;AACA,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -26,11 +26,29 @@ var import_commander = require("commander");
26
26
  var import_ContensisCliService = require("../services/ContensisCliService");
27
27
  var import_globalOptions = require("./globalOptions");
28
28
  const makeImportCommand = () => {
29
- const program = new import_commander.Command().command("import").showHelpAfterError(true).exitOverride();
30
- program.command("contenttypes").argument(
31
- "[contentTypeIds]",
29
+ const program = new import_commander.Command().command("import").description("import command").addHelpText("after", `
30
+ `).showHelpAfterError(true).exitOverride();
31
+ program.command("models").description("import complete content models").argument("[modelIds...]", "ids of the content models to import (optional)").addOption(import_globalOptions.commit).addHelpText(
32
+ "after",
33
+ `
34
+ Example call:
35
+ > import models blogPost --from-file contentmodels-backup.json
36
+ > import models --source-alias example-dev
37
+ `
38
+ ).action(async (modelIds, opts) => {
39
+ await (0, import_ContensisCliService.cliCommand)(
40
+ ["import", "models", modelIds.join(" ")],
41
+ opts,
42
+ (0, import_globalOptions.mapContensisOpts)({ modelIds, ...opts })
43
+ ).ImportContentModels({
44
+ fromFile: opts.fromFile,
45
+ commit: opts.commit
46
+ });
47
+ });
48
+ program.command("contenttypes").description("import content types").argument(
49
+ "[contentTypeIds...]",
32
50
  "Optional list of API id(s) of the content type(s) to import"
33
- ).addHelpText(
51
+ ).addOption(import_globalOptions.commit).addHelpText(
34
52
  "after",
35
53
  `
36
54
  Example call:
@@ -38,7 +56,11 @@ Example call:
38
56
  > import contenttypes {contentTypeIds} --source-alias example-dev
39
57
  `
40
58
  ).action(async (contentTypeIds, opts) => {
41
- await (0, import_ContensisCliService.cliCommand)(["import", "contenttypes"], opts).ImportContentTypes(
59
+ await (0, import_ContensisCliService.cliCommand)(
60
+ ["import", "contenttypes"],
61
+ opts,
62
+ (0, import_globalOptions.mapContensisOpts)({ contentTypeIds, ...opts })
63
+ ).ImportContentTypes(
42
64
  {
43
65
  fromFile: opts.fromFile,
44
66
  commit: opts.commit
@@ -46,10 +68,10 @@ Example call:
46
68
  contentTypeIds
47
69
  );
48
70
  });
49
- program.command("components").argument(
50
- "[componentIds]",
71
+ program.command("components").description("import components").argument(
72
+ "[componentIds...]",
51
73
  "Optional list of API id(s) of the component(s) to import"
52
- ).addHelpText(
74
+ ).addOption(import_globalOptions.commit).addHelpText(
53
75
  "after",
54
76
  `
55
77
  Example call:
@@ -57,7 +79,11 @@ Example call:
57
79
  > import components {componentIds} --source-alias example-dev
58
80
  `
59
81
  ).action(async (componentIds, opts) => {
60
- await (0, import_ContensisCliService.cliCommand)(["import", "component"], opts).ImportComponents(
82
+ await (0, import_ContensisCliService.cliCommand)(
83
+ ["import", "component"],
84
+ opts,
85
+ (0, import_globalOptions.mapContensisOpts)({ componentIds, ...opts })
86
+ ).ImportComponents(
61
87
  {
62
88
  fromFile: opts.fromFile,
63
89
  commit: opts.commit
@@ -65,12 +91,17 @@ Example call:
65
91
  componentIds
66
92
  );
67
93
  });
68
- program.command("entries").argument(
94
+ program.command("entries").description("import entries").argument(
69
95
  "[search phrase]",
70
96
  "get entries with the search phrase, use quotes for multiple words"
71
97
  ).addOption(import_globalOptions.commit).option(
72
98
  "-preserve, --preserve-guids",
73
99
  "include this flag when you are importing entries that you have previously exported and wish to update"
100
+ ).addOption(
101
+ new import_commander.Option(
102
+ "-oe, --output-entries <outputEntries>",
103
+ "which details of the entries included in the import to output"
104
+ ).choices(["errors", "changes", "all"]).default("errors")
74
105
  ).addHelpText(
75
106
  "after",
76
107
  `
@@ -82,7 +113,11 @@ Example call:
82
113
  ["import", "entries"],
83
114
  opts,
84
115
  (0, import_globalOptions.mapContensisOpts)({ phrase, ...opts })
85
- ).ImportEntries({ commit: opts.commit, fromFile: opts.fromFile });
116
+ ).ImportEntries({
117
+ commit: opts.commit,
118
+ fromFile: opts.fromFile,
119
+ logOutput: opts.outputEntries
120
+ });
86
121
  });
87
122
  return program;
88
123
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/import.ts"],
4
- "sourcesContent": ["import { Argument, Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { url } from '~/util';\nimport { commit, mapContensisOpts } from './globalOptions';\n\nexport const makeImportCommand = () => {\n const program = new Command()\n .command('import')\n .showHelpAfterError(true)\n .exitOverride();\n\n program\n .command('contenttypes')\n .argument(\n '[contentTypeIds]',\n 'Optional list of API id(s) of the content type(s) to import'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > import contenttypes {contentTypeIds} --from-file contenttypes-backup.json\n > import contenttypes {contentTypeIds} --source-alias example-dev\n`\n )\n .action(async (contentTypeIds: string[], opts) => {\n await cliCommand(['import', 'contenttypes'], opts).ImportContentTypes(\n {\n fromFile: opts.fromFile,\n commit: opts.commit,\n },\n contentTypeIds\n );\n });\n\n program\n .command('components')\n .argument(\n '[componentIds]',\n 'Optional list of API id(s) of the component(s) to import'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > import components {componentIds} --from-file component-backup.json\n > import components {componentIds} --source-alias example-dev\n`\n )\n .action(async (componentIds: string[], opts) => {\n await cliCommand(['import', 'component'], opts).ImportComponents(\n {\n fromFile: opts.fromFile,\n commit: opts.commit,\n },\n componentIds\n );\n });\n\n program\n .command('entries')\n .argument(\n '[search phrase]',\n 'get entries with the search phrase, use quotes for multiple words'\n )\n .addOption(commit)\n .option(\n '-preserve, --preserve-guids',\n 'include this flag when you are importing entries that you have previously exported and wish to update'\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > import entries --source-cms example-dev --source-project-id microsite --zenql \"sys.contentTypeId = blog\"\n`\n )\n .action(async (phrase: string, opts, cmd) => {\n await cliCommand(\n ['import', 'entries'],\n opts,\n mapContensisOpts({ phrase, ...opts })\n ).ImportEntries({ commit: opts.commit, fromFile: opts.fromFile });\n });\n\n return program;\n};\n\nexport const get = makeImportCommand();\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAkC;AAClC,iCAA2B;AAE3B,2BAAyC;AAElC,MAAM,oBAAoB,MAAM;AACrC,QAAM,UAAU,IAAI,yBAAQ,EACzB,QAAQ,QAAQ,EAChB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,UACG,QAAQ,cAAc,EACtB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAO,gBAA0B,SAAS;AAChD,cAAM,uCAAW,CAAC,UAAU,cAAc,GAAG,IAAI,EAAE;AAAA,MACjD;AAAA,QACE,UAAU,KAAK;AAAA,QACf,QAAQ,KAAK;AAAA,MACf;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AAEH,UACG,QAAQ,YAAY,EACpB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA,EAKF,EACC,OAAO,OAAO,cAAwB,SAAS;AAC9C,cAAM,uCAAW,CAAC,UAAU,WAAW,GAAG,IAAI,EAAE;AAAA,MAC9C;AAAA,QACE,UAAU,KAAK;AAAA,QACf,QAAQ,KAAK;AAAA,MACf;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AAEH,UACG,QAAQ,SAAS,EACjB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,QAAgB,MAAM,QAAQ;AAC3C,cAAM;AAAA,MACJ,CAAC,UAAU,SAAS;AAAA,MACpB;AAAA,UACA,uCAAiB,EAAE,QAAQ,GAAG,KAAK,CAAC;AAAA,IACtC,EAAE,cAAc,EAAE,QAAQ,KAAK,QAAQ,UAAU,KAAK,SAAS,CAAC;AAAA,EAClE,CAAC;AAEH,SAAO;AACT;AAEO,MAAM,MAAM,kBAAkB;",
4
+ "sourcesContent": ["import { Command, Option } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { commit, mapContensisOpts } from './globalOptions';\n\nexport const makeImportCommand = () => {\n const program = new Command()\n .command('import')\n .description('import command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n program\n .command('models')\n .description('import complete content models')\n .argument('[modelIds...]', 'ids of the content models to import (optional)')\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > import models blogPost --from-file contentmodels-backup.json\n > import models --source-alias example-dev\n`\n )\n .action(async (modelIds: string[], opts) => {\n await cliCommand(\n ['import', 'models', modelIds.join(' ')],\n opts,\n mapContensisOpts({ modelIds, ...opts })\n ).ImportContentModels({\n fromFile: opts.fromFile,\n commit: opts.commit,\n });\n });\n\n program\n .command('contenttypes')\n .description('import content types')\n .argument(\n '[contentTypeIds...]',\n 'Optional list of API id(s) of the content type(s) to import'\n )\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > import contenttypes {contentTypeIds} --from-file contenttypes-backup.json\n > import contenttypes {contentTypeIds} --source-alias example-dev\n`\n )\n .action(async (contentTypeIds: string[], opts) => {\n await cliCommand(\n ['import', 'contenttypes'],\n opts,\n mapContensisOpts({ contentTypeIds, ...opts })\n ).ImportContentTypes(\n {\n fromFile: opts.fromFile,\n commit: opts.commit,\n },\n contentTypeIds\n );\n });\n\n program\n .command('components')\n .description('import components')\n .argument(\n '[componentIds...]',\n 'Optional list of API id(s) of the component(s) to import'\n )\n .addOption(commit)\n .addHelpText(\n 'after',\n `\nExample call:\n > import components {componentIds} --from-file component-backup.json\n > import components {componentIds} --source-alias example-dev\n`\n )\n .action(async (componentIds: string[], opts) => {\n await cliCommand(\n ['import', 'component'],\n opts,\n mapContensisOpts({ componentIds, ...opts })\n ).ImportComponents(\n {\n fromFile: opts.fromFile,\n commit: opts.commit,\n },\n componentIds\n );\n });\n\n program\n .command('entries')\n .description('import entries')\n .argument(\n '[search phrase]',\n 'get entries with the search phrase, use quotes for multiple words'\n )\n .addOption(commit)\n .option(\n '-preserve, --preserve-guids',\n 'include this flag when you are importing entries that you have previously exported and wish to update'\n )\n .addOption(\n new Option(\n '-oe, --output-entries <outputEntries>',\n 'which details of the entries included in the import to output'\n )\n .choices(['errors', 'changes', 'all'])\n .default('errors')\n )\n .addHelpText(\n 'after',\n `\nExample call:\n > import entries --source-cms example-dev --source-project-id microsite --zenql \"sys.contentTypeId = blog\"\n`\n )\n .action(async (phrase: string, opts, cmd) => {\n await cliCommand(\n ['import', 'entries'],\n opts,\n mapContensisOpts({ phrase, ...opts })\n ).ImportEntries({\n commit: opts.commit,\n fromFile: opts.fromFile,\n logOutput: opts.outputEntries,\n });\n });\n\n return program;\n};\n\nexport const get = makeImportCommand();\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAgC;AAChC,iCAA2B;AAC3B,2BAAyC;AAElC,MAAM,oBAAoB,MAAM;AACrC,QAAM,UAAU,IAAI,yBAAQ,EACzB,QAAQ,QAAQ,EAChB,YAAY,gBAAgB,EAC5B,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,UACG,QAAQ,QAAQ,EAChB,YAAY,gCAAgC,EAC5C,SAAS,iBAAiB,gDAAgD,EAC1E,UAAU,2BAAM,EAChB;AAAA,IACC;AA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AA,IACA;AAAA,EACF,EACC,UAAU,2BAAM,EAChB;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC,IAAI;AAAA,MACF;AAAA,MACA;AAAA,IACF,EACG,QAAQ,CAAC,UAAU,WAAW,KAAK,CAAC,EACpC,QAAQ,QAAQ;AAAA,EACrB,EACC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,QAAgB,MAAM,QAAQ;AAC3C,cAAM;AAAA,MACJ,CAAC,UAAU,SAAS;AAAA,MACpB;AAAA,UACA,uCAAiB,EAAE,QAAQ,GAAG,KAAK,CAAC;AAAA,IACtC,EAAE,cAAc;AAAA,MACd,QAAQ,KAAK;AAAA,MACb,UAAU,KAAK;AAAA,MACf,WAAW,KAAK;AAAA,IAClB,CAAC;AAAA,EACH,CAAC;AAEH,SAAO;AACT;AAEO,MAAM,MAAM,kBAAkB;",
6
6
  "names": []
7
7
  }
@@ -26,6 +26,8 @@ var import_logger = require("../util/logger");
26
26
  var import_version = require("../version");
27
27
  var import_connect = require("./connect");
28
28
  var import_create = require("./create");
29
+ var import_diff = require("./diff");
30
+ var import_execute = require("./execute");
29
31
  var import_get = require("./get");
30
32
  var import_globalOptions = require("./globalOptions");
31
33
  var import_import = require("./import");
@@ -39,15 +41,27 @@ const commands = () => {
39
41
  writeErr: (str) => {
40
42
  return str.toLowerCase().includes("error") ? import_logger.Logger.error(`Command ${str}`) : str.trim() && import_logger.Logger.help(str);
41
43
  }
42
- }).exitOverride().showHelpAfterError(true);
44
+ }).addHelpText(
45
+ "after",
46
+ import_logger.Logger.helpText`
47
+ >> Each command has its own help - for example:
48
+ > login --help\n > get --help
49
+ `
50
+ ).exitOverride().showHelpAfterError(true);
43
51
  program.addCommand(
44
52
  (0, import_globalOptions.addAuthenticationOptions)((0, import_connect.makeConnectCommand)()).copyInheritedSettings(
45
53
  program
46
54
  )
47
55
  );
56
+ program.addCommand(
57
+ (0, import_globalOptions.addGlobalOptions)((0, import_create.makeCreateCommand)()).copyInheritedSettings(program)
58
+ );
59
+ program.addCommand(
60
+ (0, import_globalOptions.addGlobalOptions)((0, import_execute.makeExecuteCommand)()).copyInheritedSettings(program)
61
+ );
48
62
  program.addCommand(
49
63
  (0, import_globalOptions.addGlobalOptions)(
50
- (0, import_globalOptions.addImportOptions)((0, import_create.makeCreateCommand)())
64
+ (0, import_globalOptions.addGetEntryOptions)((0, import_globalOptions.addImportOptions)((0, import_diff.makeDiffCommand)()))
51
65
  ).copyInheritedSettings(program)
52
66
  );
53
67
  program.addCommand(
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/index.ts"],
4
- "sourcesContent": ["import { Command } from 'commander';\nimport { Logger } from '~/util/logger';\nimport { LIB_VERSION } from '~/version';\nimport { makeConnectCommand } from './connect';\nimport { makeCreateCommand } from './create';\nimport { makeGetCommand } from './get';\nimport {\n addAuthenticationOptions,\n addConnectOptions,\n addGetEntryOptions,\n addGlobalOptions,\n addImportOptions,\n} from './globalOptions';\nimport { makeImportCommand } from './import';\nimport { makeListCommand } from './list';\nimport { makeLoginCommand } from './login';\nimport { makePushCommand } from './push';\nimport { makeRemoveCommand } from './remove';\nimport { makeSetCommand } from './set';\n\nconst commands = () => {\n const program = new Command()\n .name('contensis')\n .version(LIB_VERSION)\n .configureOutput({\n writeErr: str => {\n return str.toLowerCase().includes('error')\n ? Logger.error(`Command ${str}`)\n : str.trim() && Logger.help(str);\n },\n })\n .exitOverride()\n .showHelpAfterError(true);\n\n program.addCommand(\n addAuthenticationOptions(makeConnectCommand()).copyInheritedSettings(\n program\n )\n );\n program.addCommand(\n addGlobalOptions(\n addImportOptions(makeCreateCommand())\n ).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makeGetCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(\n addGetEntryOptions(addImportOptions(makeImportCommand()))\n ).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makeListCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addConnectOptions(makeLoginCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makePushCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makeRemoveCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addConnectOptions(makeSetCommand()).copyInheritedSettings(program)\n );\n\n return program;\n};\n\nexport default commands;\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,oBAAuB;AACvB,qBAA4B;AAC5B,qBAAmC;AACnC,oBAAkC;AAClC,iBAA+B;AAC/B,2BAMO;AACP,oBAAkC;AAClC,kBAAgC;AAChC,mBAAiC;AACjC,kBAAgC;AAChC,oBAAkC;AAClC,iBAA+B;AAE/B,MAAM,WAAW,MAAM;AACrB,QAAM,UAAU,IAAI,yBAAQ,EACzB,KAAK,WAAW,EAChB,QAAQ,0BAAW,EACnB,gBAAgB;AAAA,IACf,UAAU,SAAO;AACf,aAAO,IAAI,YAAY,EAAE,SAAS,OAAO,IACrC,qBAAO,MAAM,WAAW,KAAK,IAC7B,IAAI,KAAK,KAAK,qBAAO,KAAK,GAAG;AAAA,IACnC;AAAA,EACF,CAAC,EACA,aAAa,EACb,mBAAmB,IAAI;AAE1B,UAAQ;AAAA,QACN,mDAAyB,mCAAmB,CAAC,EAAE;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACA,UAAQ;AAAA,QACN;AAAA,UACE,2CAAiB,iCAAkB,CAAC;AAAA,IACtC,EAAE,sBAAsB,OAAO;AAAA,EACjC;AACA,UAAQ;AAAA,QACN,2CAAiB,2BAAe,CAAC,EAAE,sBAAsB,OAAO;AAAA,EAClE;AACA,UAAQ;AAAA,QACN;AAAA,UACE,6CAAmB,2CAAiB,iCAAkB,CAAC,CAAC;AAAA,IAC1D,EAAE,sBAAsB,OAAO;AAAA,EACjC;AACA,UAAQ;AAAA,QACN,2CAAiB,6BAAgB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACnE;AACA,UAAQ;AAAA,QACN,4CAAkB,+BAAiB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACrE;AACA,UAAQ;AAAA,QACN,2CAAiB,6BAAgB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACnE;AACA,UAAQ;AAAA,QACN,2CAAiB,iCAAkB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACrE;AACA,UAAQ;AAAA,QACN,4CAAkB,2BAAe,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACnE;AAEA,SAAO;AACT;AAEA,IAAO,mBAAQ;",
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport { Logger } from '~/util/logger';\nimport { LIB_VERSION } from '~/version';\nimport { makeConnectCommand } from './connect';\nimport { makeCreateCommand } from './create';\nimport { makeDiffCommand } from './diff';\nimport { makeExecuteCommand } from './execute';\nimport { makeGetCommand } from './get';\nimport {\n addAuthenticationOptions,\n addConnectOptions,\n addGetEntryOptions,\n addGlobalOptions,\n addImportOptions,\n} from './globalOptions';\nimport { makeImportCommand } from './import';\nimport { makeListCommand } from './list';\nimport { makeLoginCommand } from './login';\nimport { makePushCommand } from './push';\nimport { makeRemoveCommand } from './remove';\nimport { makeSetCommand } from './set';\n\nconst commands = () => {\n const program = new Command()\n .name('contensis')\n .version(LIB_VERSION)\n .configureOutput({\n writeErr: str => {\n return str.toLowerCase().includes('error')\n ? Logger.error(`Command ${str}`)\n : str.trim() && Logger.help(str);\n },\n })\n .addHelpText(\n 'after',\n Logger.helpText`\n>> Each command has its own help - for example:\n > login --help\\n > get --help\n`\n )\n .exitOverride()\n .showHelpAfterError(true);\n\n program.addCommand(\n addAuthenticationOptions(makeConnectCommand()).copyInheritedSettings(\n program\n )\n );\n program.addCommand(\n addGlobalOptions(makeCreateCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makeExecuteCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(\n addGetEntryOptions(addImportOptions(makeDiffCommand()))\n ).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makeGetCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(\n addGetEntryOptions(addImportOptions(makeImportCommand()))\n ).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makeListCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addConnectOptions(makeLoginCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makePushCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addGlobalOptions(makeRemoveCommand()).copyInheritedSettings(program)\n );\n program.addCommand(\n addConnectOptions(makeSetCommand()).copyInheritedSettings(program)\n );\n\n return program;\n};\n\nexport default commands;\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,oBAAuB;AACvB,qBAA4B;AAC5B,qBAAmC;AACnC,oBAAkC;AAClC,kBAAgC;AAChC,qBAAmC;AACnC,iBAA+B;AAC/B,2BAMO;AACP,oBAAkC;AAClC,kBAAgC;AAChC,mBAAiC;AACjC,kBAAgC;AAChC,oBAAkC;AAClC,iBAA+B;AAE/B,MAAM,WAAW,MAAM;AACrB,QAAM,UAAU,IAAI,yBAAQ,EACzB,KAAK,WAAW,EAChB,QAAQ,0BAAW,EACnB,gBAAgB;AAAA,IACf,UAAU,SAAO;AACf,aAAO,IAAI,YAAY,EAAE,SAAS,OAAO,IACrC,qBAAO,MAAM,WAAW,KAAK,IAC7B,IAAI,KAAK,KAAK,qBAAO,KAAK,GAAG;AAAA,IACnC;AAAA,EACF,CAAC,EACA;AAAA,IACC;AAAA,IACA,qBAAO;AAAA;AAAA;AAAA;AAAA,EAIT,EACC,aAAa,EACb,mBAAmB,IAAI;AAE1B,UAAQ;AAAA,QACN,mDAAyB,mCAAmB,CAAC,EAAE;AAAA,MAC7C;AAAA,IACF;AAAA,EACF;AACA,UAAQ;AAAA,QACN,2CAAiB,iCAAkB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACrE;AACA,UAAQ;AAAA,QACN,2CAAiB,mCAAmB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACtE;AACA,UAAQ;AAAA,QACN;AAAA,UACE,6CAAmB,2CAAiB,6BAAgB,CAAC,CAAC;AAAA,IACxD,EAAE,sBAAsB,OAAO;AAAA,EACjC;AACA,UAAQ;AAAA,QACN,2CAAiB,2BAAe,CAAC,EAAE,sBAAsB,OAAO;AAAA,EAClE;AACA,UAAQ;AAAA,QACN;AAAA,UACE,6CAAmB,2CAAiB,iCAAkB,CAAC,CAAC;AAAA,IAC1D,EAAE,sBAAsB,OAAO;AAAA,EACjC;AACA,UAAQ;AAAA,QACN,2CAAiB,6BAAgB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACnE;AACA,UAAQ;AAAA,QACN,4CAAkB,+BAAiB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACrE;AACA,UAAQ;AAAA,QACN,2CAAiB,6BAAgB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACnE;AACA,UAAQ;AAAA,QACN,2CAAiB,iCAAkB,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACrE;AACA,UAAQ;AAAA,QACN,4CAAkB,2BAAe,CAAC,EAAE,sBAAsB,OAAO;AAAA,EACnE;AAEA,SAAO;AACT;AAEA,IAAO,mBAAQ;",
6
6
  "names": []
7
7
  }
@@ -24,8 +24,9 @@ module.exports = __toCommonJS(list_exports);
24
24
  var import_commander = require("commander");
25
25
  var import_ContensisCliService = require("../services/ContensisCliService");
26
26
  const makeListCommand = () => {
27
- const list = new import_commander.Command().command("list").showHelpAfterError(true).exitOverride();
28
- list.command("envs").addHelpText(
27
+ const list = new import_commander.Command().command("list").description("list command").addHelpText("after", `
28
+ `).showHelpAfterError(true).exitOverride();
29
+ list.command("envs").description("List all previously connected environments").addHelpText(
29
30
  "after",
30
31
  `
31
32
  Example call:
@@ -34,10 +35,25 @@ Example call:
34
35
  ).action((opts) => {
35
36
  (0, import_ContensisCliService.cliCommand)(["list", "envs"], opts).PrintEnvironments();
36
37
  });
37
- list.command("projects").action(async (opts) => {
38
+ list.command("projects").description("print list of projects").addHelpText(
39
+ "after",
40
+ `
41
+ Example call:
42
+ > list projects
43
+ `
44
+ ).action(async (opts) => {
38
45
  await (0, import_ContensisCliService.cliCommand)(["list", "projects"], opts).PrintProjects();
39
46
  });
40
- list.command("contenttypes").addHelpText(
47
+ list.command("models").description("print list of content models").addHelpText(
48
+ "after",
49
+ `
50
+ Example call:
51
+ > list models
52
+ `
53
+ ).action(async (opts) => {
54
+ await (0, import_ContensisCliService.cliCommand)(["list", "models"], opts).PrintContentModels();
55
+ });
56
+ list.command("contenttypes").description("print list of content types").addHelpText(
41
57
  "after",
42
58
  `
43
59
  Example call:
@@ -46,7 +62,7 @@ Example call:
46
62
  ).action(async (opts) => {
47
63
  await (0, import_ContensisCliService.cliCommand)(["list", "contenttypes"], opts).PrintContentTypes();
48
64
  });
49
- list.command("components").addHelpText(
65
+ list.command("components").description("print list of components").addHelpText(
50
66
  "after",
51
67
  `
52
68
  Example call:
@@ -55,7 +71,7 @@ Example call:
55
71
  ).action(async (opts) => {
56
72
  await (0, import_ContensisCliService.cliCommand)(["list", "components"], opts).PrintComponents();
57
73
  });
58
- list.command("blocks").addHelpText(
74
+ list.command("blocks").description("print list of content blocks").addHelpText(
59
75
  "after",
60
76
  `
61
77
  Example call:
@@ -64,7 +80,7 @@ Example call:
64
80
  ).action(async (opts) => {
65
81
  await (0, import_ContensisCliService.cliCommand)(["list", "blocks"], opts).PrintBlocks();
66
82
  });
67
- list.command("keys").addHelpText(
83
+ list.command("keys").description("print list of API keys").addHelpText(
68
84
  "after",
69
85
  `
70
86
  Example call:
@@ -73,10 +89,37 @@ Example call:
73
89
  ).action(async (opts) => {
74
90
  await (0, import_ContensisCliService.cliCommand)(["list", "keys"], opts).PrintApiKeys();
75
91
  });
76
- list.command("webhooks").argument("[name]", "find webhooks matching the supplied name").option("-i --id <id...>", "the subscription id(s) to get").action(async (name, { id, ...opts } = {}) => {
92
+ list.command("proxies").description("print list of proxies").addHelpText(
93
+ "after",
94
+ `
95
+ Example call:
96
+ > list proxies
97
+ `
98
+ ).action(async (opts) => {
99
+ await (0, import_ContensisCliService.cliCommand)(["list", "proxies"], opts).PrintProxies();
100
+ });
101
+ list.command("renderers").description("print list of renderers").addHelpText(
102
+ "after",
103
+ `
104
+ Example call:
105
+ > list renderers
106
+ `
107
+ ).action(async (opts) => {
108
+ await (0, import_ContensisCliService.cliCommand)(["list", "renderers"], opts).PrintRenderers();
109
+ });
110
+ list.command("roles").description("print list of roles").addHelpText(
111
+ "after",
112
+ `
113
+ Example call:
114
+ > list roles
115
+ `
116
+ ).action(async (opts) => {
117
+ await (0, import_ContensisCliService.cliCommand)(["list", "roles"], opts).PrintRoles();
118
+ });
119
+ list.command("webhooks").description("print list of webhooks").argument("[name]", "find webhooks matching the supplied name").option("-i --id <id...>", "the subscription id(s) to get").addHelpText("after", `
120
+ `).action(async (name, { id, ...opts } = {}) => {
77
121
  await (0, import_ContensisCliService.cliCommand)(["list", "webhooks"], opts).PrintWebhookSubscriptions(
78
- id,
79
- name
122
+ name ? [name] : id
80
123
  );
81
124
  });
82
125
  return list;
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/list.ts"],
4
- "sourcesContent": ["import { Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\n\n// projects\n// content types\n// components\n// api keys\n// roles\n// webhooks\nexport const makeListCommand = () => {\n const list = new Command()\n .command('list')\n .showHelpAfterError(true)\n .exitOverride();\n\n list\n .command('envs')\n .addHelpText(\n 'after',\n `\nExample call:\n > list envs\n`\n )\n .action(opts => {\n cliCommand(['list', 'envs'], opts).PrintEnvironments();\n });\n list.command('projects').action(async opts => {\n await cliCommand(['list', 'projects'], opts).PrintProjects();\n });\n list\n .command('contenttypes')\n .addHelpText(\n 'after',\n `\nExample call:\n > list contenttypes -o ./output.json -f json\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'contenttypes'], opts).PrintContentTypes();\n });\n list\n .command('components')\n .addHelpText(\n 'after',\n `\nExample call:\n > list components -o ./output.json -f json\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'components'], opts).PrintComponents();\n });\n list\n .command('blocks')\n .addHelpText(\n 'after',\n `\nExample call:\n > list blocks\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'blocks'], opts).PrintBlocks();\n });\n list\n .command('keys')\n .addHelpText(\n 'after',\n `\nExample call:\n > list keys\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'keys'], opts).PrintApiKeys();\n });\n list\n .command('webhooks')\n .argument('[name]', 'find webhooks matching the supplied name')\n .option('-i --id <id...>', 'the subscription id(s) to get')\n .action(async (name?: string, { id, ...opts }: any = {}) => {\n await cliCommand(['list', 'webhooks'], opts).PrintWebhookSubscriptions(\n id,\n name\n );\n });\n return list;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAQpB,MAAM,kBAAkB,MAAM;AACnC,QAAM,OAAO,IAAI,yBAAQ,EACtB,QAAQ,MAAM,EACd,mBAAmB,IAAI,EACvB,aAAa;AAEhB,OACG,QAAQ,MAAM,EACd;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,UAAQ;AACd,+CAAW,CAAC,QAAQ,MAAM,GAAG,IAAI,EAAE,kBAAkB;AAAA,EACvD,CAAC;AACH,OAAK,QAAQ,UAAU,EAAE,OAAO,OAAM,SAAQ;AAC5C,cAAM,uCAAW,CAAC,QAAQ,UAAU,GAAG,IAAI,EAAE,cAAc;AAAA,EAC7D,CAAC;AACD,OACG,QAAQ,cAAc,EACtB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAM,SAAQ;AACpB,cAAM,uCAAW,CAAC,QAAQ,cAAc,GAAG,IAAI,EAAE,kBAAkB;AAAA,EACrE,CAAC;AACH,OACG,QAAQ,YAAY,EACpB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAM,SAAQ;AACpB,cAAM,uCAAW,CAAC,QAAQ,YAAY,GAAG,IAAI,EAAE,gBAAgB;AAAA,EACjE,CAAC;AACH,OACG,QAAQ,QAAQ,EAChB;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAM,SAAQ;AACpB,cAAM,uCAAW,CAAC,QAAQ,QAAQ,GAAG,IAAI,EAAE,YAAY;AAAA,EACzD,CAAC;AACH,OACG,QAAQ,MAAM,EACd;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAM,SAAQ;AACpB,cAAM,uCAAW,CAAC,QAAQ,MAAM,GAAG,IAAI,EAAE,aAAa;AAAA,EACxD,CAAC;AACH,OACG,QAAQ,UAAU,EAClB,SAAS,UAAU,0CAA0C,EAC7D,OAAO,mBAAmB,+BAA+B,EACzD,OAAO,OAAO,MAAe,EAAE,OAAO,KAAK,IAAS,CAAC,MAAM;AAC1D,cAAM,uCAAW,CAAC,QAAQ,UAAU,GAAG,IAAI,EAAE;AAAA,MAC3C;AAAA,MACA;AAAA,IACF;AAAA,EACF,CAAC;AACH,SAAO;AACT;",
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\n\nexport const makeListCommand = () => {\n const list = new Command()\n .command('list')\n .description('list command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n list\n .command('envs')\n .description('List all previously connected environments')\n .addHelpText(\n 'after',\n `\nExample call:\n > list envs\n`\n )\n .action(opts => {\n cliCommand(['list', 'envs'], opts).PrintEnvironments();\n });\n\n list\n .command('projects')\n .description('print list of projects')\n .addHelpText(\n 'after',\n `\nExample call:\n > list projects\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'projects'], opts).PrintProjects();\n });\n\n list\n .command('models')\n .description('print list of content models')\n .addHelpText(\n 'after',\n `\nExample call:\n > list models\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'models'], opts).PrintContentModels();\n });\n\n list\n .command('contenttypes')\n .description('print list of content types')\n .addHelpText(\n 'after',\n `\nExample call:\n > list contenttypes -o ./output.json -f json\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'contenttypes'], opts).PrintContentTypes();\n });\n\n list\n .command('components')\n .description('print list of components')\n .addHelpText(\n 'after',\n `\nExample call:\n > list components -o ./output.json -f json\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'components'], opts).PrintComponents();\n });\n\n list\n .command('blocks')\n .description('print list of content blocks')\n .addHelpText(\n 'after',\n `\nExample call:\n > list blocks\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'blocks'], opts).PrintBlocks();\n });\n\n list\n .command('keys')\n .description('print list of API keys')\n .addHelpText(\n 'after',\n `\nExample call:\n > list keys\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'keys'], opts).PrintApiKeys();\n });\n\n list\n .command('proxies')\n .description('print list of proxies')\n .addHelpText(\n 'after',\n `\nExample call:\n > list proxies\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'proxies'], opts).PrintProxies();\n });\n\n list\n .command('renderers')\n .description('print list of renderers')\n .addHelpText(\n 'after',\n `\nExample call:\n > list renderers\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'renderers'], opts).PrintRenderers();\n });\n\n list\n .command('roles')\n .description('print list of roles')\n .addHelpText(\n 'after',\n `\nExample call:\n > list roles\n`\n )\n .action(async opts => {\n await cliCommand(['list', 'roles'], opts).PrintRoles();\n });\n\n list\n .command('webhooks')\n .description('print list of webhooks')\n .argument('[name]', 'find webhooks matching the supplied name')\n .option('-i --id <id...>', 'the subscription id(s) to get')\n .addHelpText('after', `\\n`)\n .action(async (name?: string, { id, ...opts }: any = {}) => {\n await cliCommand(['list', 'webhooks'], opts).PrintWebhookSubscriptions(\n name ? [name] : id\n );\n });\n return list;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAEpB,MAAM,kBAAkB,MAAM;AACnC,QAAM,OAAO,IAAI,yBAAQ,EACtB,QAAQ,MAAM,EACd,YAAY,cAAc,EAC1B,YAAY,SAAS;AAAA,CAAI,EACzB,mBAAmB,IAAI,EACvB,aAAa;AAEhB,OACG,QAAQ,MAAM,EACd,YAAY,4CAA4C,EACxD;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,UAAQ;AACd,+CAAW,CAAC,QAAQ,MAAM,GAAG,IAAI,EAAE,kBAAkB;AAAA,EACvD,CAAC;AAEH,OACG,QAAQ,UAAU,EAClB,YAAY,wBAAwB,EACpC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAM,SAAQ;AACpB,cAAM,uCAAW,CAAC,QAAQ,UAAU,GAAG,IAAI,EAAE,cAAc;AAAA,EAC7D,CAAC;AAEH,OACG,QAAQ,QAAQ,EAChB,YAAY,8BAA8B,EAC1C;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAM,SAAQ;AACpB,cAAM,uCAAW,CAAC,QAAQ,QAAQ,GAAG,IAAI,EAAE,mBAAmB;AAAA,EAChE,CAAC;AAEH,OACG,QAAQ,cAAc,EACtB,YAAY,6BAA6B,EACzC;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAM,SAAQ;AACpB,cAAM,uCAAW,CAAC,QAAQ,cAAc,GAAG,IAAI,EAAE,kBAAkB;AAAA,EACrE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AAW;AAAA,EACvD,CAAC;AAEH,OACG,QAAQ,UAAU,EAClB,YAAY,wBAAwB,EACpC,SAAS,UAAU,0CAA0C,EAC7D,OAAO,mBAAmB,+BAA+B,EACzD,YAAY,SAAS;AAAA,CAAI,EACzB,OAAO,OAAO,MAAe,EAAE,OAAO,KAAK,IAAS,CAAC,MAAM;AAC1D,cAAM,uCAAW,CAAC,QAAQ,UAAU,GAAG,IAAI,EAAE;AAAA,MAC3C,OAAO,CAAC,IAAI,IAAI;AAAA,IAClB;AAAA,EACF,CAAC;AACH,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -25,11 +25,11 @@ var import_commander = require("commander");
25
25
  var import_ContensisCliService = require("../services/ContensisCliService");
26
26
  var import_shell = require("../shell");
27
27
  const makeLoginCommand = () => {
28
- const login = new import_commander.Command().command("login").argument("<user/clientId>", "the username to login with").argument(
28
+ const login = new import_commander.Command().command("login").description("login to a connected Contensis instance").argument("<user/clientId>", "the username to login with").argument(
29
29
  "[password]",
30
30
  "the password to use to login with (optional/insecure)"
31
31
  ).option(
32
- "-s --shared-secret <sharedSecret>",
32
+ "-s, --shared-secret <sharedSecret>",
33
33
  "the shared secret to use when logging in with a client id"
34
34
  ).usage("<user/clientId> [password] [-s <sharedSecret>]").addHelpText(
35
35
  "after",
@@ -45,7 +45,7 @@ Example call:
45
45
  sharedSecret: opts.sharedSecret
46
46
  });
47
47
  if (token)
48
- await (0, import_shell.shell)().start();
48
+ await (0, import_shell.shell)().restart();
49
49
  });
50
50
  return login;
51
51
  };
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/login.ts"],
4
- "sourcesContent": ["import { Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { shell } from '~/shell';\n\nexport const makeLoginCommand = () => {\n const login = new Command()\n .command('login')\n .argument('<user/clientId>', 'the username to login with')\n .argument(\n '[password]',\n 'the password to use to login with (optional/insecure)'\n )\n .option(\n '-s --shared-secret <sharedSecret>',\n 'the shared secret to use when logging in with a client id'\n )\n .usage('<user/clientId> [password] [-s <sharedSecret>]')\n .addHelpText(\n 'after',\n `\nExample call:\n > login myuserid\\n -- or --\\n > login {clientId} -s {sharedSecret}\n`\n )\n .action(async (user, password, opts) => {\n const token = await cliCommand(['login', user]).Login(user, {\n password,\n sharedSecret: opts.sharedSecret,\n });\n if (token) await shell().start();\n });\n return login;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAC3B,mBAAsB;AAEf,MAAM,mBAAmB,MAAM;AACpC,QAAM,QAAQ,IAAI,yBAAQ,EACvB,QAAQ,OAAO,EACf,SAAS,mBAAmB,4BAA4B,EACxD;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,MAAM,gDAAgD,EACtD;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,MAAM,UAAU,SAAS;AACtC,UAAM,QAAQ,UAAM,uCAAW,CAAC,SAAS,IAAI,CAAC,EAAE,MAAM,MAAM;AAAA,MAC1D;AAAA,MACA,cAAc,KAAK;AAAA,IACrB,CAAC;AACD,QAAI;AAAO,gBAAM,oBAAM,EAAE,MAAM;AAAA,EACjC,CAAC;AACH,SAAO;AACT;",
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport { cliCommand } from '~/services/ContensisCliService';\nimport { shell } from '~/shell';\n\nexport const makeLoginCommand = () => {\n const login = new Command()\n .command('login')\n .description('login to a connected Contensis instance')\n .argument('<user/clientId>', 'the username to login with')\n .argument(\n '[password]',\n 'the password to use to login with (optional/insecure)'\n )\n .option(\n '-s, --shared-secret <sharedSecret>',\n 'the shared secret to use when logging in with a client id'\n )\n .usage('<user/clientId> [password] [-s <sharedSecret>]')\n .addHelpText(\n 'after',\n `\nExample call:\n > login myuserid\\n -- or --\\n > login {clientId} -s {sharedSecret}\n`\n )\n .action(async (user, password, opts) => {\n const token = await cliCommand(['login', user]).Login(user, {\n password,\n sharedSecret: opts.sharedSecret,\n });\n if (token) await shell().restart();\n });\n return login;\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,iCAA2B;AAC3B,mBAAsB;AAEf,MAAM,mBAAmB,MAAM;AACpC,QAAM,QAAQ,IAAI,yBAAQ,EACvB,QAAQ,OAAO,EACf,YAAY,yCAAyC,EACrD,SAAS,mBAAmB,4BAA4B,EACxD;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,MAAM,gDAAgD,EACtD;AAAA,IACC;AAAA,IACA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAIF,EACC,OAAO,OAAO,MAAM,UAAU,SAAS;AACtC,UAAM,QAAQ,UAAM,uCAAW,CAAC,SAAS,IAAI,CAAC,EAAE,MAAM,MAAM;AAAA,MAC1D;AAAA,MACA,cAAc,KAAK;AAAA,IACrB,CAAC;AACD,QAAI;AAAO,gBAAM,oBAAM,EAAE,QAAQ;AAAA,EACnC,CAAC;AACH,SAAO;AACT;",
6
6
  "names": []
7
7
  }
@@ -31,8 +31,9 @@ var import_commander = require("commander");
31
31
  var import_jsonpath_mapper = __toESM(require("jsonpath-mapper"));
32
32
  var import_ContensisCliService = require("../services/ContensisCliService");
33
33
  const makePushCommand = () => {
34
- const push = new import_commander.Command().command("push").showHelpAfterError(true).exitOverride();
35
- push.command("block").argument("<block-id>", "the name of the block to push to").argument(
34
+ const push = new import_commander.Command().command("push").description("push command").addHelpText("after", `
35
+ `).showHelpAfterError(true).exitOverride();
36
+ push.command("block").description("push a block").argument("<block-id>", "the name of the block to push to").argument(
36
37
  "<image uri:tag>",
37
38
  "the uri and tag of the container image to push as a block (tag default: latest)"
38
39
  ).argument("[branch]", "the branch we are pushing to").option(
@@ -64,7 +65,7 @@ const makePushCommand = () => {
64
65
  "after",
65
66
  `
66
67
  Example call:
67
- > push block contensis-app ghcr.io/contensis/contensis-app/build-4359 master --release
68
+ > push block contensis-app ghcr.io/contensis/contensis-app/app:build-4359 master --release
68
69
  `
69
70
  ).action(async (blockId, imageUri, branch, opts) => {
70
71
  const cli = (0, import_ContensisCliService.cliCommand)(["push", "block", blockId], opts);
@@ -76,7 +77,7 @@ Example call:
76
77
  ...process.env
77
78
  };
78
79
  const blockRequest = (0, import_jsonpath_mapper.default)(mapSourceVars, {
79
- autoRelease: { $path: "release", $default: () => false },
80
+ release: { $path: "release", $default: () => false },
80
81
  id: ["blockId"],
81
82
  image: () => {
82
83
  const lastIndexOfColon = imageUri.lastIndexOf(":");
@@ -111,7 +112,10 @@ Example call:
111
112
  branch: ["branch", "CI_COMMIT_REF_NAME", "GITHUB_REF_NAME"],
112
113
  commit: {
113
114
  id: ["commitId", "CI_COMMIT_SHORT_SHA", "GITHUB_SHA"],
114
- message: ["commitMessage", "CI_COMMIT_MESSAGE"],
115
+ message: {
116
+ $path: ["commitMessage", "CI_COMMIT_MESSAGE"],
117
+ $formatting: (msg) => msg == null ? void 0 : msg.replace(/\\n/g, " ").replace(/\\n/g, " ").trim()
118
+ },
115
119
  dateTime: ["commitDatetime", "CI_COMMIT_TIMESTAMP"],
116
120
  authorEmail: ["authorEmail", "GITLAB_USER_EMAIL", "GITHUB_ACTOR"],
117
121
  committerEmail: [
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../src/commands/push.ts"],
4
- "sourcesContent": ["import { Command } from 'commander';\nimport mapJson from 'jsonpath-mapper';\nimport { PushBlockParams } from 'migratortron';\nimport { cliCommand } from '~/services/ContensisCliService';\n\nexport const makePushCommand = () => {\n const push = new Command()\n .command('push')\n .showHelpAfterError(true)\n .exitOverride();\n\n push\n .command('block')\n .argument('<block-id>', 'the name of the block to push to')\n .argument(\n '<image uri:tag>',\n 'the uri and tag of the container image to push as a block (tag default: latest)'\n )\n .argument('[branch]', 'the branch we are pushing to')\n .option(\n '-r, --release',\n 'whether to release the pushed block version',\n false\n )\n .option(\n '-cid, --commit-id <commitId>',\n 'the id of the source git commit for the supplied image uri'\n )\n .option(\n '-cmsg, --commit-message <commitMessage>',\n 'the git commit message for the supplied commit id'\n )\n .option(\n '-cdt, --commit-datetime <commitDateTime>',\n 'the timestamp of the source git commit for the supplied image uri'\n )\n .option(\n '-author, --author-email <authorEmail>',\n 'the git email address of the author of the source git commit'\n )\n .option(\n '-committer, --committer-email <committerEmail>',\n 'the git email address of the commiter of the source git commit'\n )\n .option(\n '-repo, --repository-url <repositoryUrl>',\n 'the url of the source repository for the supplied image uri'\n )\n .option(\n '-pr, --provider <sourceProvider>',\n 'the url of the source repository for the supplied image uri'\n )\n .usage('<block-id> <image uri> [branch] [options]')\n .addHelpText(\n 'after',\n `\nExample call:\n > push block contensis-app ghcr.io/contensis/contensis-app/build-4359 master --release\\n`\n )\n .action(async (blockId: string, imageUri: string, branch: string, opts) => {\n const cli = cliCommand(['push', 'block', blockId], opts);\n const mapSourceVars = {\n blockId,\n imageUri,\n branch,\n ...opts,\n ...process.env,\n };\n\n const blockRequest = mapJson(mapSourceVars, {\n autoRelease: { $path: 'release', $default: () => false },\n id: ['blockId'],\n image: () => {\n const lastIndexOfColon = imageUri.lastIndexOf(':');\n return {\n uri: imageUri.slice(0, lastIndexOfColon),\n tag: imageUri.slice(lastIndexOfColon + 1) || 'latest',\n };\n },\n projectId: () => cli.env.currentProject || '',\n source: {\n provider: {\n $path: ['provider'],\n $return: (provider: string, { GITHUB_ACTIONS, GITLAB_CI }) => {\n if (provider) return provider;\n if (GITHUB_ACTIONS) return 'Github';\n else if (GITLAB_CI) return 'GitlabSelfHosted';\n },\n },\n repositoryUrl: {\n $path: ['repositoryUrl', 'CI_PROJECT_URL', 'GITHUB_REPOSITORY'],\n $formatting: (url: string, { GITHUB_ACTIONS }) => {\n if (GITHUB_ACTIONS) url = `https://github.com/${url}`;\n\n if (url && !url.endsWith('.git')) return `${url}.git`;\n return url;\n },\n },\n branch: ['branch', 'CI_COMMIT_REF_NAME', 'GITHUB_REF_NAME'],\n commit: {\n id: ['commitId', 'CI_COMMIT_SHORT_SHA', 'GITHUB_SHA'],\n message: ['commitMessage', 'CI_COMMIT_MESSAGE'], // ${{ github.event.head_commit.message }}\n dateTime: ['commitDatetime', 'CI_COMMIT_TIMESTAMP'], // ${{ github.event.head_commit.timestamp }}\n authorEmail: ['authorEmail', 'GITLAB_USER_EMAIL', 'GITHUB_ACTOR'], // ${{ github.event.head_commit.author.email }}\n committerEmail: [\n 'committerEmail',\n 'GITLAB_USER_EMAIL',\n 'GITHUB_TRIGGERING_ACTOR',\n ], // ${{ github.event.head_commit.committer.email }}\n },\n },\n }) as PushBlockParams;\n\n await cli.PushBlock(blockRequest);\n\n // console.log(process.env);\n });\n\n return push;\n};\n"],
5
- "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAAwB;AACxB,6BAAoB;AAEpB,iCAA2B;AAEpB,MAAM,kBAAkB,MAAM;AACnC,QAAM,OAAO,IAAI,yBAAQ,EACtB,QAAQ,MAAM,EACd,mBAAmB,IAAI,EACvB,aAAa;AAEhB,OACG,QAAQ,OAAO,EACf,SAAS,cAAc,kCAAkC,EACzD;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC,SAAS,YAAY,8BAA8B,EACnD;AAAA,IACC;AAAA,IACA;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF,EACC;AAAA,IACC;AAAA,IACA;AAAA,EACF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uB,YAAY;AAAA,UACpD,SAAS,CAAC,iBAAiB,mBAAmB;AAAA,UAC9C,UAAU,CAAC,kBAAkB,qBAAqB;AAAA,UAClD,aAAa,CAAC,eAAe,qBAAqB,cAAc;AAAA,UAChE,gBAAgB;AAAA,YACd;AAAA,YACA;AAAA,YACA;AAAA,UACF;AAAA,QACF;AAAA,MACF;AAAA,IACF,CAAC;AAED,UAAM,IAAI,UAAU,YAAY;AAAA,EAGlC,CAAC;AAEH,SAAO;AACT;",
4
+ "sourcesContent": ["import { Command } from 'commander';\nimport mapJson from 'jsonpath-mapper';\nimport { PushBlockParams } from 'migratortron';\nimport { cliCommand } from '~/services/ContensisCliService';\n\nexport const makePushCommand = () => {\n const push = new Command()\n .command('push')\n .description('push command')\n .addHelpText('after', `\\n`)\n .showHelpAfterError(true)\n .exitOverride();\n\n push\n .command('block')\n .description('push a block')\n .argument('<block-id>', 'the name of the block to push to')\n .argument(\n '<image uri:tag>',\n 'the uri and tag of the container image to push as a block (tag default: latest)'\n )\n .argument('[branch]', 'the branch we are pushing to')\n .option(\n '-r, --release',\n 'whether to release the pushed block version',\n false\n )\n .option(\n '-cid, --commit-id <commitId>',\n 'the id of the source git commit for the supplied image uri'\n )\n .option(\n '-cmsg, --commit-message <commitMessage>',\n 'the git commit message for the supplied commit id'\n )\n .option(\n '-cdt, --commit-datetime <commitDateTime>',\n 'the timestamp of the source git commit for the supplied image uri'\n )\n .option(\n '-author, --author-email <authorEmail>',\n 'the git email address of the author of the source git commit'\n )\n .option(\n '-committer, --committer-email <committerEmail>',\n 'the git email address of the commiter of the source git commit'\n )\n .option(\n '-repo, --repository-url <repositoryUrl>',\n 'the url of the source repository for the supplied image uri'\n )\n .option(\n '-pr, --provider <sourceProvider>',\n 'the url of the source repository for the supplied image uri'\n )\n .usage('<block-id> <image uri> [branch] [options]')\n .addHelpText(\n 'after',\n `\nExample call:\n > push block contensis-app ghcr.io/contensis/contensis-app/app:build-4359 master --release\\n`\n )\n .action(async (blockId: string, imageUri: string, branch: string, opts) => {\n const cli = cliCommand(['push', 'block', blockId], opts);\n const mapSourceVars = {\n blockId,\n imageUri,\n branch,\n ...opts,\n ...process.env,\n };\n\n const blockRequest = mapJson(mapSourceVars, {\n release: { $path: 'release', $default: () => false },\n id: ['blockId'],\n image: () => {\n const lastIndexOfColon = imageUri.lastIndexOf(':');\n return {\n uri: imageUri.slice(0, lastIndexOfColon),\n tag: imageUri.slice(lastIndexOfColon + 1) || 'latest',\n };\n },\n projectId: () => cli.env.currentProject || '',\n source: {\n provider: {\n $path: ['provider'],\n $return: (provider: string, { GITHUB_ACTIONS, GITLAB_CI }) => {\n if (provider) return provider;\n if (GITHUB_ACTIONS) return 'Github';\n else if (GITLAB_CI) return 'GitlabSelfHosted';\n },\n },\n repositoryUrl: {\n $path: ['repositoryUrl', 'CI_PROJECT_URL', 'GITHUB_REPOSITORY'],\n $formatting: (url: string, { GITHUB_ACTIONS }) => {\n if (GITHUB_ACTIONS) url = `https://github.com/${url}`;\n\n if (url && !url.endsWith('.git')) return `${url}.git`;\n return url;\n },\n },\n branch: ['branch', 'CI_COMMIT_REF_NAME', 'GITHUB_REF_NAME'],\n commit: {\n id: ['commitId', 'CI_COMMIT_SHORT_SHA', 'GITHUB_SHA'],\n message: {\n $path: ['commitMessage', 'CI_COMMIT_MESSAGE'], // ${{ github.event.head_commit.message }}\n $formatting: (msg?: string) =>\n msg?.replace(/\\\\n/g, ' ').replace(/\\\\n/g, ' ').trim(),\n },\n dateTime: ['commitDatetime', 'CI_COMMIT_TIMESTAMP'], // ${{ github.event.head_commit.timestamp }}\n authorEmail: ['authorEmail', 'GITLAB_USER_EMAIL', 'GITHUB_ACTOR'], // ${{ github.event.head_commit.author.email }}\n committerEmail: [\n 'committerEmail',\n 'GITLAB_USER_EMAIL',\n 'GITHUB_TRIGGERING_ACTOR',\n ], // ${{ github.event.head_commit.committer.email }}\n },\n },\n }) as PushBlockParams;\n\n await cli.PushBlock(blockRequest);\n\n // console.log(process.env);\n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