@axinom/mosaic-cli 0.20.0-rc.9 → 0.21.0-rc.0

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 (47) hide show
  1. package/dist/commands/hosting/index.js +2 -0
  2. package/dist/commands/hosting/index.js.map +1 -1
  3. package/dist/commands/hosting/manifest/upload-manifest.js +4 -0
  4. package/dist/commands/hosting/manifest/upload-manifest.js.map +1 -1
  5. package/dist/commands/hosting/pilet/pilet-commands.js +8 -13
  6. package/dist/commands/hosting/pilet/pilet-commands.js.map +1 -1
  7. package/dist/commands/hosting/pilet/register-pilet-options.d.ts +0 -2
  8. package/dist/commands/hosting/pilet/register-pilet.d.ts +1 -1
  9. package/dist/commands/hosting/pilet/register-pilet.js +62 -51
  10. package/dist/commands/hosting/pilet/register-pilet.js.map +1 -1
  11. package/dist/commands/hosting/service/deploy/service-deploy-command.d.ts +3 -0
  12. package/dist/commands/hosting/service/deploy/service-deploy-command.js +72 -0
  13. package/dist/commands/hosting/service/deploy/service-deploy-command.js.map +1 -0
  14. package/dist/commands/hosting/service/deploy/service-deploy-options.d.ts +14 -0
  15. package/dist/commands/hosting/service/deploy/service-deploy-options.js +3 -0
  16. package/dist/commands/hosting/service/deploy/service-deploy-options.js.map +1 -0
  17. package/dist/commands/hosting/service/deploy/service-deploy.d.ts +9 -0
  18. package/dist/commands/hosting/service/deploy/service-deploy.js +244 -0
  19. package/dist/commands/hosting/service/deploy/service-deploy.js.map +1 -0
  20. package/dist/commands/hosting/service/service-commands.d.ts +2 -0
  21. package/dist/commands/hosting/service/service-commands.js +16 -0
  22. package/dist/commands/hosting/service/service-commands.js.map +1 -0
  23. package/dist/commands/hosting/service/undeploy/service-undeploy-command.d.ts +3 -0
  24. package/dist/commands/hosting/service/undeploy/service-undeploy-command.js +53 -0
  25. package/dist/commands/hosting/service/undeploy/service-undeploy-command.js.map +1 -0
  26. package/dist/commands/hosting/service/undeploy/service-undeploy-options.d.ts +11 -0
  27. package/dist/commands/hosting/service/undeploy/service-undeploy-options.js +3 -0
  28. package/dist/commands/hosting/service/undeploy/service-undeploy-options.js.map +1 -0
  29. package/dist/commands/hosting/service/undeploy/service-undeploy.d.ts +9 -0
  30. package/dist/commands/hosting/service/undeploy/service-undeploy.js +140 -0
  31. package/dist/commands/hosting/service/undeploy/service-undeploy.js.map +1 -0
  32. package/dist/commands/msg-diff/index.js +1 -1
  33. package/dist/commands/msg-diff/index.js.map +1 -1
  34. package/package.json +4 -4
  35. package/src/commands/hosting/index.ts +2 -0
  36. package/src/commands/hosting/manifest/upload-manifest.ts +7 -0
  37. package/src/commands/hosting/pilet/pilet-commands.ts +9 -13
  38. package/src/commands/hosting/pilet/register-pilet-options.ts +0 -2
  39. package/src/commands/hosting/pilet/register-pilet.ts +89 -57
  40. package/src/commands/hosting/service/deploy/service-deploy-command.ts +72 -0
  41. package/src/commands/hosting/service/deploy/service-deploy-options.ts +14 -0
  42. package/src/commands/hosting/service/deploy/service-deploy.ts +347 -0
  43. package/src/commands/hosting/service/service-commands.ts +23 -0
  44. package/src/commands/hosting/service/undeploy/service-undeploy-command.ts +53 -0
  45. package/src/commands/hosting/service/undeploy/service-undeploy-options.ts +11 -0
  46. package/src/commands/hosting/service/undeploy/service-undeploy.ts +188 -0
  47. package/src/commands/msg-diff/index.ts +1 -1
@@ -3,12 +3,14 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.hosting = void 0;
4
4
  const manifest_commands_1 = require("./manifest/manifest-commands");
5
5
  const pilet_commands_1 = require("./pilet/pilet-commands");
6
+ const service_commands_1 = require("./service/service-commands");
6
7
  exports.hosting = {
7
8
  command: 'hosting',
8
9
  describe: 'Commands related to Mosaic Hosting.',
9
10
  builder: (yargs) => yargs
10
11
  .command('pilet', 'Pilet related actions', pilet_commands_1.piletCommands)
11
12
  .command('manifest', 'Deployment Manifest related actions', manifest_commands_1.manifestCommands)
13
+ .command('service', 'Service Deployment related actions', service_commands_1.serviceCommands)
12
14
  .demandCommand(),
13
15
  handler: (_args) => {
14
16
  console.log('Please pick a sub command related to hosting.');
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/hosting/index.ts"],"names":[],"mappings":";;;AACA,oEAAgE;AAChE,2DAAuD;AAE1C,QAAA,OAAO,GAAoC;IACtD,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,qCAAqC;IAC/C,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,OAAO,EAAE,uBAAuB,EAAE,8BAAa,CAAC;SACxD,OAAO,CACN,UAAU,EACV,qCAAqC,EACrC,oCAAgB,CACjB;SACA,aAAa,EAAE;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;IAC/D,CAAC;CACF,CAAC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/commands/hosting/index.ts"],"names":[],"mappings":";;;AACA,oEAAgE;AAChE,2DAAuD;AACvD,iEAA6D;AAEhD,QAAA,OAAO,GAAoC;IACtD,OAAO,EAAE,SAAS;IAClB,QAAQ,EAAE,qCAAqC;IAC/C,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CAAC,OAAO,EAAE,uBAAuB,EAAE,8BAAa,CAAC;SACxD,OAAO,CACN,UAAU,EACV,qCAAqC,EACrC,oCAAgB,CACjB;SACA,OAAO,CAAC,SAAS,EAAE,oCAAoC,EAAE,kCAAe,CAAC;SACzE,aAAa,EAAE;IACpB,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACjB,OAAO,CAAC,GAAG,CAAC,+CAA+C,CAAC,CAAC;IAC/D,CAAC;CACF,CAAC"}
@@ -28,6 +28,10 @@ const uploadDeploymentManifest = (args) => tslib_1.__awaiter(void 0, void 0, voi
28
28
  console.log(`Error occurred while trying to read the Deployment Manifest at ${args.deploymentManifestPath}.`);
29
29
  return;
30
30
  }
31
+ if (manifestToUpload.serviceId !== args.serviceId) {
32
+ console.log(`Service ID in the given Deployment Manifest does not match with the argument value. Please make sure the value of the argument given for Service ID matches the value in the Deployment Manifest.`);
33
+ return;
34
+ }
31
35
  const axiosInstance = getAxiosInstance(args.hostingServiceBaseURL, serviceAccountToken.accessToken);
32
36
  const data = JSON.stringify({
33
37
  query: `mutation CreateServiceDeploymentManifest($serviceId: String!, $name: String, $configMap: DeploymentConfigMap!) {
@@ -1 +1 @@
1
- {"version":3,"file":"upload-manifest.js","sourceRoot":"","sources":["../../../../src/commands/hosting/manifest/upload-manifest.ts"],"names":[],"mappings":";;;;AAAA,iEAAmE;AACnE,yEAAmE;AACnE,iCAAyD;AACzD,2BAAyD;AACzD,gCAAgC;AAChC,6BAA6B;AAG7B,MAAM,gBAAgB,GAAG,CACvB,qBAA6B,EAC7B,mBAA2B,EACZ,EAAE;IACjB,OAAO,eAAK,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,IAAI,GAAG,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;QAClD,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,mBAAmB,EAAE;YAC9C,cAAc,EAAE,kBAAkB;SACnC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,wBAAwB,GAAG,CACtC,IAAwC,EACzB,EAAE;;IACjB,MAAM,mBAAmB,GAAG,MAAM,IAAA,0CAAsB,EACtD,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,qBAAqB,EAC1B,IAAI,CAAC,yBAAyB,CAC/B,CAAC;IAEF,IAAI,gBAAgB,CAAC;IACrB,IAAI;QACF,gBAAgB,GAAG,oBAAoB,CAAC,IAAI,CAAC,sBAAsB,CAAC,CAAC;KACtE;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,GAAG,CACT,kEAAkE,IAAI,CAAC,sBAAsB,GAAG,CACjG,CAAC;QACF,OAAO;KACR;IAED,MA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CAAC,sBAA8B,EAAW,EAAE;IACvE,IAAI,CAAC,IAAA,eAAU,EAAC,sBAAsB,CAAC,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,yBAAyB,sBAAsB,EAAE,CAAC,CAAC;KACpE;IAED,MAAM,IAAI,GAAG,IAAA,cAAS,EAAC,sBAAsB,CAAC,CAAC;IAE/C,IAAI,YAAoB,CAAC;IACzB,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;QACtB,YAAY,GAAG,IAAI,CAAC,IAAI,CACtB,sBAAsB,EACtB,yCAAyC,CAC1C,CAAC;KACH;SAAM;QACL,YAAY,GAAG,sBAAsB,CAAC;KACvC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAA,iBAAY,EAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,gCAAgC,YAAY,GAAG,CAAC,CAAC;IAE7D,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
1
+ {"version":3,"file":"upload-manifest.js","sourceRoot":"","sources":["../../../../src/commands/hosting/manifest/upload-manifest.ts"],"names":[],"mappings":";;;;AAAA,iEAAmE;AACnE,yEAAmE;AACnE,iCAAyD;AACzD,2BAAyD;AACzD,gCAAgC;AAChC,6BAA6B;AAG7B,MAAM,gBAAgB,GAAG,CACvB,qBAA6B,EAC7B,mBAA2B,EACZ,EAAE;IACjB,OAAO,eAAK,CAAC,MAAM,CAAC;QAClB,OAAO,EAAE,IAAI,GAAG,CAAC,qBAAqB,CAAC,CAAC,QAAQ,EAAE;QAClD,OAAO,EAAE;YACP,aAAa,EAAE,UAAU,mBAAmB,EAAE;YAC9C,cAAc,EAAE,kBAAkB;SACnC;KACF,CAAC,CAAC;AACL,CAAC,CAAC;AAEK,MAAM,wBAAwB,GAAG,CACtC,IAAwC,EACzB,EAAE;;IACjB,MAAM,mBAAmB,GAAG,MAAM,IAAA,0CAAsB,EACtD,IAAI,CAAC,oBAAoB,EACzB,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AA0B,CAAC,CAAC;KAChD;IACD,IAAI,IAAA,0CAAkB,EAAC,qBAAqB,CAAC,EAAE;QAC7C,aAAa,CAAC,IAAI,CAAC,sCAAsC,CAAC,CAAC;KAC5D;IAED,OAAO;QACL;YACE,IAAI,EAAE,IAAI,CAAC,IAAI;YACf,oBAAoB;YACpB,qBAAqB;YACrB,yBAAyB;YACzB,SAAS;YACT,sBAAsB,EACpB,MAAA,IAAI,CAAC,sBAAsB,mCAC3B,2CAA2C;YAC7C,qBAAqB;SACtB;QACD,aAAa;KACd,CAAC;AACJ,CAAC,CAAC;AA/CW,QAAA,YAAY,gBA+CvB;AAEF,MAAM,oBAAoB,GAAG,CAAC,sBAA8B,EAAW,EAAE;IACvE,IAAI,CAAC,IAAA,eAAU,EAAC,sBAAsB,CAAC,EAAE;QACvC,MAAM,IAAI,KAAK,CAAC,yBAAyB,sBAAsB,EAAE,CAAC,CAAC;KACpE;IAED,MAAM,IAAI,GAAG,IAAA,cAAS,EAAC,sBAAsB,CAAC,CAAC;IAE/C,IAAI,YAAoB,CAAC;IACzB,IAAI,IAAI,CAAC,WAAW,EAAE,EAAE;QACtB,YAAY,GAAG,IAAI,CAAC,IAAI,CACtB,sBAAsB,EACtB,yCAAyC,CAC1C,CAAC;KACH;SAAM;QACL,YAAY,GAAG,sBAAsB,CAAC;KACvC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,IAAI,CAAC,IAAA,iBAAY,EAAC,YAAY,EAAE,MAAM,CAAC,CAAC,CAAC;IAC1D,OAAO,CAAC,GAAG,CAAC,gCAAgC,YAAY,GAAG,CAAC,CAAC;IAE7D,OAAO,GAAG,CAAC;AACb,CAAC,CAAC"}
@@ -28,19 +28,9 @@ const piletRegister = {
28
28
  describe: 'Client Secret to authenticate',
29
29
  alias: 's',
30
30
  string: true,
31
- })
32
- .option('tenantId', {
33
- describe: 'Tenant ID',
34
- alias: 't',
35
- string: true,
36
- })
37
- .option('environmentId', {
38
- describe: 'Environment ID',
39
- alias: 'e',
40
- string: true,
41
31
  })
42
32
  .option('piletArtifactPath', {
43
- describe: 'Pilet Artifact Path',
33
+ describe: 'Path to the pilet artifact .tgz file or a directory containing the .tgz file',
44
34
  alias: 'p',
45
35
  string: true,
46
36
  })
@@ -63,8 +53,13 @@ const piletRegister = {
63
53
  },
64
54
  handler: (args) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
65
55
  // Validate arguments and read any arguments that are coming from environment variables.
66
- const validatedArgs = (0, register_pilet_1.validateArgs)(args);
67
- yield (0, register_pilet_1.registerPilet)(validatedArgs);
56
+ const [validatedArgs, errorMessages] = (0, register_pilet_1.validateArgs)(args);
57
+ if (errorMessages.length > 0) {
58
+ console.log(errorMessages);
59
+ }
60
+ else {
61
+ yield (0, register_pilet_1.registerPilet)(validatedArgs);
62
+ }
68
63
  }),
69
64
  };
70
65
  //# sourceMappingURL=pilet-commands.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"pilet-commands.js","sourceRoot":"","sources":["../../../../src/commands/hosting/pilet/pilet-commands.ts"],"names":[],"mappings":";;;;AACA,qDAA+D;AAGlD,QAAA,aAAa,GAAoC;IAC5D,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE,CACjB,KAAK;SACF,OAAO,CACN,UAAU,EACV,oDAAoD,EACpD,aAAa,CACd;SACA,aAAa,EAAE;IACpB,OAAO,EAAE,GAAG,EAAE;QACZ,OAAO,CAAC,GAAG,CAAC,yDAAyD,CAAC,CAAC;IACzE,CAAC;CACF,CAAC;AAEF,MAAM,aAAa,GAAoD;IACrE,OAAO,EAAE,CAAC,KAAK,EAAE,EAAE;QACjB,OAAO,KAAK;aACT,MAAM,CAAC,WAAW,EAAE;YACnB,QAAQ,EAAE,8CAA8C;YACxD,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,uBAAuB,EAAE;YAC/B,QAAQ,EAAE,2BAA2B;YACrC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,2BAA2B,EAAE;YACnC,QAAQ,EAAE,+BAA+B;YACzC,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,UAAU,EAAE;YAClB,QAAQ,EAAE,WAAW;YACrB,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,eAAe,EAAE;YACvB,QAAQ,EAAE,gBAAgB;YAC1B,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,mBAAmB,EAAE;YAC3B,QAAQ,EAAE,qBAAqB;YAC/B,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,sBAAsB,EAAE;YAC9B,QAAQ,EAAE,6CAA6C;YACvD,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,6BAA6B,EAAE;YACrC,QAAQ,EAAE,iCAAiC;YAC3C,KAAK,EAAE,GAAG;YACV,MAAM,EAAE,IAAI;SACb,CAAC;aACD,MAAM,CAAC,sBAAsB,EAAE;YAC9B,QAAQ,EAAE,uBAAuB;YACjC,KAAK,EAAE,GAAG;YACV,OAAO,EAAE,KAAK;YACd,OAAO,EAAE,IAAI;SACd,CAAC,CAAC;IACP,CAAC;IACD,OAAO,EAAE,CAAO,IAAI,EAAE,EAAE;QACtB,wFAAwF;QACxF,MAAM,aAAa,GAAG,IAAA,6BAAY,EAAC,IAAI,CAAC,CAAC;QACzC,MAAM,IAAA,8BAAa,EAAC,aAAa,CAAC,CAAC;IACrC,CAAC,CAAA;CACF,CAAC"}
1
+ {"version":3,"file":"pilet-commands.js","sourceRoot":"","sources":["../../../../src/commands/hosting/pilet/pilet-commands.ts"],"names":[],"mappings":";;;;AACA,qDAA+D;AAGlD,QAAA,aAAa,GAAoC;IAC5D,OAAO,EAAE,CAAC,KAAK,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CAAC,GAAG,IAAA,6BAAY,EAAC,IAAI,CAAC,CAAC;QAE1D,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5B,OAAO,CAAC,GAAG,CAAC,aAAa,CAAC,CAAC;SAC5B;aAAM;YACL,MAAM,IAAA,8BAAa,EAAC,aAAa,CAAC,CAAC;SACpC;IACH,CAAC,CAAA;CACF,CAAC"}
@@ -5,8 +5,6 @@ export interface GetRegisterPiletOptions {
5
5
  serviceId?: string;
6
6
  mosaicHostingClientId?: string;
7
7
  mosaicHostingClientSecret?: string;
8
- tenantId?: string;
9
- environmentId?: string;
10
8
  piletArtifactPath?: string;
11
9
  idServiceAuthBaseURL?: string;
12
10
  microFrontendServiceBaseURL?: string;
@@ -7,4 +7,4 @@ export declare const registerPilet: (args: Required<GetRegisterPiletOptions>) =>
7
7
  * @param args
8
8
  * @returns
9
9
  */
10
- export declare const validateArgs: (args: GetRegisterPiletOptions) => Required<GetRegisterPiletOptions>;
10
+ export declare const validateArgs: (args: GetRegisterPiletOptions) => [Required<GetRegisterPiletOptions>, string[]];
@@ -10,7 +10,16 @@ const fs_1 = require("fs");
10
10
  const path = require("path");
11
11
  const registerPilet = (args) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
12
12
  var _a, _b;
13
- const serviceAccountToken = yield (0, mosaic_id_link_be_1.getServiceAccountToken)(args.idServiceAuthBaseURL, args.mosaicHostingClientId, args.mosaicHostingClientSecret);
13
+ let serviceAccountToken;
14
+ try {
15
+ serviceAccountToken = yield (0, mosaic_id_link_be_1.getServiceAccountToken)(args.idServiceAuthBaseURL, args.mosaicHostingClientId, args.mosaicHostingClientSecret);
16
+ }
17
+ catch (error) {
18
+ console.log(`\nFailed to get the service account token. ${error.message}\n`);
19
+ return;
20
+ }
21
+ // Extract the tenant/environment IDs from the access token
22
+ const { tenantId, environmentId } = JSON.parse(Buffer.from(serviceAccountToken.accessToken.split('.')[1], 'base64').toString());
14
23
  const data = new FormData();
15
24
  const config = {
16
25
  maxBodyLength: 52428890,
@@ -18,23 +27,25 @@ const registerPilet = (args) => tslib_1.__awaiter(void 0, void 0, void 0, functi
18
27
  };
19
28
  try {
20
29
  const artifactToPublish = findArtifactToPublish(args.piletArtifactPath);
21
- if (artifactToPublish) {
22
- data.append('', (0, fs_1.createReadStream)(artifactToPublish));
23
- }
24
- else {
25
- throw new Error(`No Pilet Artifact found at ${args.piletArtifactPath}.`);
26
- }
30
+ data.append('', (0, fs_1.createReadStream)(artifactToPublish));
27
31
  }
28
32
  catch (error) {
29
- throw new Error(`Error occurred while trying to read the Pilet Artifact at ${args.piletArtifactPath}.`);
33
+ console.log(`\n${error.message}`);
34
+ return;
30
35
  }
31
36
  try {
32
- const result = yield axios_1.default.post(`${args.microFrontendServiceBaseURL}/v1/pilets/${args.tenantId}/${args.environmentId}/${args.serviceId}/register?override=${args.overrideRegistration}`, data, config);
37
+ console.log(`\nRegistering pilet...`);
38
+ console.log(`path:\t\t${args.piletArtifactPath}`);
39
+ console.log(`tenantId:\t${tenantId}`);
40
+ console.log(`environmentId:\t${environmentId}`);
41
+ console.log(`serviceId:\t${args.serviceId}\n`);
42
+ const result = yield axios_1.default.post(`${args.microFrontendServiceBaseURL}/v1/pilets/${tenantId}/${environmentId}/${args.serviceId}/register?override=${args.overrideRegistration}`, data, config);
33
43
  console.log('Registration of Pilet complete.');
34
44
  console.log(result.data);
35
45
  }
36
46
  catch (error) {
37
47
  console.log('Registration of Pilet failed.', (_b = (_a = error.response) === null || _a === void 0 ? void 0 : _a.data) !== null && _b !== void 0 ? _b : error.message);
48
+ return;
38
49
  }
39
50
  });
40
51
  exports.registerPilet = registerPilet;
@@ -46,70 +57,70 @@ exports.registerPilet = registerPilet;
46
57
  * @returns
47
58
  */
48
59
  const validateArgs = (args) => {
49
- var _a, _b, _c, _d, _e, _f, _g, _h, _j;
50
- const idServiceAuthBaseURL = (_a = args.idServiceAuthBaseURL) !== null && _a !== void 0 ? _a : process.env.ID_SERVICE_AUTH_BASE_URL;
51
- const mosaicHostingClientId = (_b = args.mosaicHostingClientId) !== null && _b !== void 0 ? _b : process.env.MOSAIC_HOSTING_CLIENT_ID;
52
- const mosaicHostingClientSecret = (_c = args.mosaicHostingClientSecret) !== null && _c !== void 0 ? _c : process.env.MOSAIC_HOSTING_CLIENT_SECRET;
53
- const tenantId = (_d = args.tenantId) !== null && _d !== void 0 ? _d : process.env.TENANT_ID;
54
- const environmentId = (_e = args.environmentId) !== null && _e !== void 0 ? _e : process.env.ENVIRONMENT_ID;
55
- const serviceId = (_f = args.serviceId) !== null && _f !== void 0 ? _f : process.env.SERVICE_ID;
56
- const piletArtifactPath = (_g = args.piletArtifactPath) !== null && _g !== void 0 ? _g : process.env.PILET_PATH;
57
- const microFrontendServiceBaseURL = (_h = args.microFrontendServiceBaseURL) !== null && _h !== void 0 ? _h : process.env.MICRO_FRONTEND_SERVICE_BASE_URL;
60
+ var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m, _o;
61
+ const errorMessages = [];
62
+ const idServiceAuthBaseURL = (_b = (_a = args.idServiceAuthBaseURL) !== null && _a !== void 0 ? _a : process.env.ID_SERVICE_AUTH_BASE_URL) !== null && _b !== void 0 ? _b : '';
63
+ const mosaicHostingClientId = (_d = (_c = args.mosaicHostingClientId) !== null && _c !== void 0 ? _c : process.env.MOSAIC_HOSTING_CLIENT_ID) !== null && _d !== void 0 ? _d : '';
64
+ const mosaicHostingClientSecret = (_f = (_e = args.mosaicHostingClientSecret) !== null && _e !== void 0 ? _e : process.env.MOSAIC_HOSTING_CLIENT_SECRET) !== null && _f !== void 0 ? _f : '';
65
+ const serviceId = (_h = (_g = args.serviceId) !== null && _g !== void 0 ? _g : process.env.SERVICE_ID) !== null && _h !== void 0 ? _h : '';
66
+ const piletArtifactPath = (_k = (_j = args.piletArtifactPath) !== null && _j !== void 0 ? _j : process.env.PILET_PATH) !== null && _k !== void 0 ? _k : '';
67
+ const microFrontendServiceBaseURL = (_m = (_l = args.microFrontendServiceBaseURL) !== null && _l !== void 0 ? _l : process.env.MICRO_FRONTEND_SERVICE_BASE_URL) !== null && _m !== void 0 ? _m : '';
58
68
  if ((0, mosaic_service_common_1.isNullOrWhitespace)(idServiceAuthBaseURL)) {
59
- throw new Error('idServiceAuthBaseURL is required.');
69
+ errorMessages.push('[idServiceAuthBaseURL] is required.');
60
70
  }
61
71
  if ((0, mosaic_service_common_1.isNullOrWhitespace)(mosaicHostingClientId)) {
62
- throw new Error('clientId is required.');
72
+ errorMessages.push('[clientId] is required.');
63
73
  }
64
74
  if ((0, mosaic_service_common_1.isNullOrWhitespace)(mosaicHostingClientSecret)) {
65
- throw new Error('clientSecret is required.');
66
- }
67
- if ((0, mosaic_service_common_1.isNullOrWhitespace)(tenantId)) {
68
- throw new Error('tenantId is required.');
69
- }
70
- if ((0, mosaic_service_common_1.isNullOrWhitespace)(environmentId)) {
71
- throw new Error('environmentId is required,');
75
+ errorMessages.push('[clientSecret] is required.');
72
76
  }
73
77
  if ((0, mosaic_service_common_1.isNullOrWhitespace)(serviceId)) {
74
- throw new Error('serviceId is required.');
78
+ errorMessages.push('[serviceId] is required.');
75
79
  }
76
80
  if ((0, mosaic_service_common_1.isNullOrWhitespace)(piletArtifactPath)) {
77
- throw new Error('piletArtifactPath is required,');
81
+ errorMessages.push('[piletArtifactPath] is required,');
78
82
  }
79
83
  if ((0, mosaic_service_common_1.isNullOrWhitespace)(microFrontendServiceBaseURL)) {
80
- throw new Error('microFrontendServiceBaseURL is required.');
81
- }
82
- return {
83
- idServiceAuthBaseURL,
84
- mosaicHostingClientId,
85
- mosaicHostingClientSecret,
86
- tenantId,
87
- environmentId,
88
- serviceId,
89
- piletArtifactPath,
90
- microFrontendServiceBaseURL,
91
- overrideRegistration: (_j = args.overrideRegistration) !== null && _j !== void 0 ? _j : false,
92
- };
84
+ errorMessages.push('[microFrontendServiceBaseURL] is required.');
85
+ }
86
+ return [
87
+ {
88
+ idServiceAuthBaseURL,
89
+ mosaicHostingClientId,
90
+ mosaicHostingClientSecret,
91
+ serviceId,
92
+ piletArtifactPath,
93
+ microFrontendServiceBaseURL,
94
+ overrideRegistration: (_o = args.overrideRegistration) !== null && _o !== void 0 ? _o : false,
95
+ },
96
+ errorMessages,
97
+ ];
93
98
  };
94
99
  exports.validateArgs = validateArgs;
95
100
  const findArtifactToPublish = (piletPath) => {
96
101
  if (!(0, fs_1.existsSync)(piletPath)) {
97
- throw new Error(`No directory found at ${piletPath}`);
102
+ throw new Error(`The specified pilet artifact path [${piletPath}] does not exist.`);
98
103
  }
99
- const files = (0, fs_1.readdirSync)(piletPath);
100
104
  const tgzFiles = [];
101
- for (let i = 0; i < files.length; i++) {
102
- const filename = path.join(piletPath, files[i]);
103
- const stat = (0, fs_1.lstatSync)(filename);
104
- if (!stat.isDirectory() && filename.endsWith('.tgz')) {
105
- tgzFiles.push(filename);
105
+ // Is the path a directory?
106
+ if ((0, fs_1.lstatSync)(piletPath).isDirectory()) {
107
+ const files = (0, fs_1.readdirSync)(piletPath);
108
+ for (let i = 0; i < files.length; i++) {
109
+ const filename = path.join(piletPath, files[i]);
110
+ const stat = (0, fs_1.lstatSync)(filename);
111
+ if (!stat.isDirectory() && filename.endsWith('.tgz')) {
112
+ tgzFiles.push(filename);
113
+ }
106
114
  }
115
+ } // Path is a file
116
+ else {
117
+ tgzFiles.push(piletPath);
107
118
  }
108
119
  if (tgzFiles.length > 1) {
109
- throw new Error(`Found more than one .tgz files in the folder ${piletPath}. Please make sure only one .tgz file exists`);
120
+ throw new Error(`Found more than one .tgz files in the folder [${piletPath}]. Please make sure only one .tgz file exists or specify the path to the .tgz file.`);
110
121
  }
111
122
  if (tgzFiles.length === 0) {
112
- throw new Error(`'No .tgz files found at ${piletPath}.`);
123
+ throw new Error(`No .tgz files found at pilet artifact path [${piletPath}].`);
113
124
  }
114
125
  return tgzFiles[0];
115
126
  };
@@ -1 +1 @@
1
- {"version":3,"file":"register-pilet.js","sourceRoot":"","sources":["../../../../src/commands/hosting/pilet/register-pilet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AAC;IAE9B,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;QACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;QAChD,MAAM,IAAI,GAAG,IAAA,cAAS,EAAC,QAAQ,CAAC,CAAC;QACjC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;YACpD,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;SACzB;KACF;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,MAAM,IAAI,KAAK,CACb,gDAAgD,SAAS,8CAA8C,CACxG,CAAC;KACH;IACD,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CAAC,2BAA2B,SAAS,GAAG,CAAC,CAAC;KAC1D;IAED,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC"}
1
+ {"version":3,"file":"register-pilet.js","sourceRoot":"","sources":["../../../../src/commands/hosting/pilet/register-pilet.ts"],"names":[],"mappings":";;;;AAAA,iEAAgF;AAChF,yEAAmE;AACnE,iCAA0C;AAC1C,sCAAsC;AACtC,2BAA0E;AAC1E,6BAA6B;AAGtB,MAAM,aAAa,GAAG,CAC3B,IAAuC,EACxB,EAAE;;IACjB,IAAI,mBAA4C,CAAC;IAEjD,IAAI;QACF,mBAAmB,GAAG,MAAM,IAAA,0CAAsB,EAChD,IAAI,CAAC,oBAAoB,EACzB,IAAI,CAAC,qBAAqB,EAC1B,IAAI,CAAC,yBAAyB,CAC/B,CAAC;KACH;IAAC,OAAO,KAAK,EAAE;QACd,OAAO,CAAC,GAAG,CACT,8CACG,KAAe,CAAC,OACnB,IAAI,CACL,CAAC;QACF,OAAO;KACR;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CAAC,GAAG,KAAK,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;YACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC;YAChD,MAAM,IAAI,GAAG,IAAA,cAAS,EAAC,QAAQ,CAAC,CAAC;YACjC,IAAI,CAAC,IAAI,CAAC,WAAW,EAAE,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE;gBACpD,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aACzB;SACF;KACF,CAAC,iBAAiB;SACd;QACH,QAAQ,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC;KAC1B;IAED,IAAI,QAAQ,CAAC,MAAM,GAAG,CAAC,EAAE;QACvB,MAAM,IAAI,KAAK,CACb,iDAAiD,SAAS,qFAAqF,CAChJ,CAAC;KACH;IAED,IAAI,QAAQ,CAAC,MAAM,KAAK,CAAC,EAAE;QACzB,MAAM,IAAI,KAAK,CACb,+CAA+C,SAAS,IAAI,CAC7D,CAAC;KACH;IAED,OAAO,QAAQ,CAAC,CAAC,CAAC,CAAC;AACrB,CAAC,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { CommandModule } from 'yargs';
2
+ import { GetServiceDeployOptions } from './service-deploy-options';
3
+ export declare const serviceDeploy: CommandModule<unknown, GetServiceDeployOptions>;
@@ -0,0 +1,72 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.serviceDeploy = void 0;
4
+ const tslib_1 = require("tslib");
5
+ const chalk_1 = require("chalk");
6
+ const service_deploy_1 = require("./service-deploy");
7
+ exports.serviceDeploy = {
8
+ builder: (yargs) => {
9
+ return yargs
10
+ .option('name', {
11
+ describe: 'Name of the Deployment',
12
+ alias: 'n',
13
+ string: true,
14
+ demandOption: true,
15
+ })
16
+ .option('serviceId', {
17
+ describe: 'Service ID the deployment must be done for. (If a deployment manifest is found in the current directory, the serviceId will be derived from it.)',
18
+ alias: 'i',
19
+ string: true,
20
+ })
21
+ .option('containerImageTag', {
22
+ describe: 'Tag of the container image to be used in the deployment. i.e: It should be the <tag> from the container image format <username>/<repository_name>:<tag>.',
23
+ alias: 't',
24
+ string: true,
25
+ demandOption: true,
26
+ })
27
+ .option('manifestName', {
28
+ describe: 'Name of the deployment manifest',
29
+ alias: 'm',
30
+ string: true,
31
+ demandOption: true,
32
+ })
33
+ .option('pilets', {
34
+ describe: 'Pilet(s) to be used in the deployment. The pilet name should match the format package-name@version => media-workflows@1.5.7',
35
+ alias: 'p',
36
+ array: true,
37
+ string: true,
38
+ })
39
+ .option('mosaicHostingClientId', {
40
+ describe: 'Service Account Client ID to authenticate',
41
+ alias: 'c',
42
+ string: true,
43
+ })
44
+ .option('mosaicHostingClientSecret', {
45
+ describe: 'Service Account Client Secret to authenticate',
46
+ alias: 's',
47
+ string: true,
48
+ })
49
+ .option('idServiceAuthBaseURL', {
50
+ describe: 'ID Service Authentication Endpoint Base URL',
51
+ alias: 'a',
52
+ string: true,
53
+ })
54
+ .option('hostingServiceBaseURL', {
55
+ describe: 'Hosting Service Base URL',
56
+ alias: 'h',
57
+ string: true,
58
+ });
59
+ },
60
+ handler: (args) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
61
+ const [validatedArgs, errorMessages] = (0, service_deploy_1.validateDeploymentArgs)(args);
62
+ if (errorMessages.length > 0) {
63
+ console.log((0, chalk_1.red)('Some required arguments are missing.'));
64
+ console.log((0, chalk_1.yellow)(errorMessages));
65
+ console.log();
66
+ }
67
+ else {
68
+ yield (0, service_deploy_1.deployService)(validatedArgs);
69
+ }
70
+ }),
71
+ };
72
+ //# sourceMappingURL=service-deploy-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-deploy-command.js","sourceRoot":"","sources":["../../../../../src/commands/hosting/service/deploy/service-deploy-command.ts"],"names":[],"mappings":";;;;AAAA,iCAAoC;AAEpC,qDAAyE;AAG5D,QAAA,aA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AC;IACD,OAAO,EAAE,CAAO,IAAI,EAAE,EAAE;QACtB,MAAM,CAAC,aAAa,EAAE,aAAa,CAAC,GAAG,IAAA,uCAAsB,EAAC,IAAI,CAAC,CAAC;QACpE,IAAI,aAAa,CAAC,MAAM,GAAG,CAAC,EAAE;YAC5B,OAAO,CAAC,GAAG,CAAC,IAAA,WAAG,EAAC,sCAAsC,CAAC,CAAC,CAAC;YACzD,OAAO,CAAC,GAAG,CAAC,IAAA,cAAM,EAAC,aAAa,CAAC,CAAC,CAAC;YACnC,OAAO,CAAC,GAAG,EAAE,CAAC;SACf;aAAM;YACL,MAAM,IAAA,8BAAa,EAAC,aAAa,CAAC,CAAC;SACpC;IACH,CAAC,CAAA;CACF,CAAC"}
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Options for Deploying a Service
3
+ */
4
+ export interface GetServiceDeployOptions {
5
+ name: string;
6
+ serviceId?: string;
7
+ containerImageTag: string;
8
+ manifestName: string;
9
+ pilets?: string[];
10
+ mosaicHostingClientId?: string;
11
+ mosaicHostingClientSecret?: string;
12
+ idServiceAuthBaseURL?: string;
13
+ hostingServiceBaseURL?: string;
14
+ }
@@ -0,0 +1,3 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ //# sourceMappingURL=service-deploy-options.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"service-deploy-options.js","sourceRoot":"","sources":["../../../../../src/commands/hosting/service/deploy/service-deploy-options.ts"],"names":[],"mappings":""}
@@ -0,0 +1,9 @@
1
+ import { GetServiceDeployOptions } from './service-deploy-options';
2
+ export declare const deployService: (args: Required<GetServiceDeployOptions>) => Promise<void>;
3
+ /**
4
+ * Validate arguments for Service Deployment
5
+ *
6
+ * @param args
7
+ * @returns
8
+ */
9
+ export declare const validateDeploymentArgs: (args: GetServiceDeployOptions) => [Required<GetServiceDeployOptions>, string[]];