@unisphere/cli 1.21.0 → 1.22.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 (104) hide show
  1. package/bundler/package/rollup.js +4 -4
  2. package/bundler/{context → runtime}/rollup.js +6 -6
  3. package/package.json +4 -6
  4. package/src/lib/commands/check/command.js +27 -27
  5. package/src/lib/commands/create/command.js +2 -1
  6. package/src/lib/commands/create/command.js.map +1 -1
  7. package/src/lib/commands/how-to/command.js +15 -15
  8. package/src/lib/commands/info/command.js +6 -6
  9. package/src/lib/commands/package/publish/publish.js +1 -1
  10. package/src/lib/commands/{context → runtime}/build-command.js +12 -12
  11. package/src/lib/commands/{context → runtime}/build-command.js.map +1 -1
  12. package/src/lib/commands/runtime/command.js +17 -0
  13. package/src/lib/commands/runtime/command.js.map +1 -0
  14. package/src/lib/commands/{context → runtime}/publish/command.js +5 -5
  15. package/src/lib/commands/{context → runtime}/publish/command.js.map +1 -1
  16. package/src/lib/commands/{context → runtime}/publish/execute/execute.js +10 -10
  17. package/src/lib/commands/{context → runtime}/publish/execute/execute.js.map +1 -1
  18. package/src/lib/commands/{context → runtime}/publish/execute/sync-element.js.map +1 -1
  19. package/src/lib/commands/{context → runtime}/publish/prepare/build-nx-runtimes.d.ts +2 -2
  20. package/src/lib/commands/{context → runtime}/publish/prepare/build-nx-runtimes.js +14 -14
  21. package/src/lib/commands/{context → runtime}/publish/prepare/build-nx-runtimes.js.map +1 -1
  22. package/src/lib/commands/{context → runtime}/publish/prepare/prepare.js +14 -14
  23. package/src/lib/commands/{context → runtime}/publish/prepare/prepare.js.map +1 -1
  24. package/src/lib/commands/runtime/publish/types.js.map +1 -0
  25. package/src/lib/commands/{context → runtime}/serve-command.js +17 -17
  26. package/src/lib/commands/{context → runtime}/serve-command.js.map +1 -1
  27. package/src/lib/commands/{runtime → runtime-json}/activate/check-element-runtime-availability.d.ts +2 -2
  28. package/src/lib/commands/{runtime → runtime-json}/activate/check-element-runtime-availability.js +3 -3
  29. package/src/lib/commands/runtime-json/activate/check-element-runtime-availability.js.map +1 -0
  30. package/src/lib/commands/runtime-json/activate/command.js +16 -0
  31. package/src/lib/commands/runtime-json/activate/command.js.map +1 -0
  32. package/src/lib/commands/{runtime → runtime-json}/activate/loader/command.js +1 -1
  33. package/src/lib/commands/runtime-json/activate/loader/command.js.map +1 -0
  34. package/src/lib/commands/runtime-json/activate/runtime/command.d.ts +2 -0
  35. package/src/lib/commands/{runtime/activate/context → runtime-json/activate/runtime}/command.js +13 -13
  36. package/src/lib/commands/runtime-json/activate/runtime/command.js.map +1 -0
  37. package/src/lib/commands/{runtime → runtime-json}/activate/update-element-runtime-version.d.ts +4 -4
  38. package/src/lib/commands/{runtime → runtime-json}/activate/update-element-runtime-version.js +14 -12
  39. package/src/lib/commands/runtime-json/activate/update-element-runtime-version.js.map +1 -0
  40. package/src/lib/commands/{runtime → runtime-json}/activate/workspace/command.js +1 -1
  41. package/src/lib/commands/runtime-json/activate/workspace/command.js.map +1 -0
  42. package/src/lib/commands/runtime-json/command.d.ts +2 -0
  43. package/src/lib/commands/runtime-json/command.js +15 -0
  44. package/src/lib/commands/runtime-json/command.js.map +1 -0
  45. package/src/lib/commands/runtime-json/replace-command.d.ts +2 -0
  46. package/src/lib/commands/{runtime/replace-json-command.js → runtime-json/replace-command.js} +5 -5
  47. package/src/lib/commands/runtime-json/replace-command.js.map +1 -0
  48. package/src/lib/commands/{runtime → runtime-json}/unisphere-runtime-json-v1.d.ts +2 -2
  49. package/src/lib/commands/runtime-json/unisphere-runtime-json-v1.js.map +1 -0
  50. package/src/lib/commands/{runtime → runtime-json}/unisphere-runtime-json-v2.d.ts +11 -9
  51. package/src/lib/commands/{runtime → runtime-json}/unisphere-runtime-json-v2.js +26 -28
  52. package/src/lib/commands/runtime-json/unisphere-runtime-json-v2.js.map +1 -0
  53. package/src/lib/commands/runtime-json/verify-env-readiness.js.map +1 -0
  54. package/src/lib/unisphere.js +4 -4
  55. package/src/lib/unisphere.js.map +1 -1
  56. package/src/lib/utils/unisphere/augment-workspace-config.js +6 -6
  57. package/src/lib/utils/unisphere/build-unisphere-elements.d.ts +3 -3
  58. package/src/lib/utils/unisphere/build-unisphere-elements.js +5 -5
  59. package/src/lib/utils/unisphere/reset-env.js +3 -3
  60. package/src/lib/utils/unisphere/types.d.ts +11 -11
  61. package/src/lib/utils/unisphere/types.js +2 -2
  62. package/src/lib/utils/unisphere-utils.d.ts +1 -1
  63. package/src/lib/utils/unisphere-utils.js +4 -4
  64. package/src/lib/utils/unisphere-utils.js.map +1 -1
  65. package/src/lib/utils/utils.d.ts +1 -1
  66. package/src/lib/utils/utils.js +3 -3
  67. package/src/lib/commands/context/context-commands.d.ts +0 -2
  68. package/src/lib/commands/context/context-commands.js +0 -17
  69. package/src/lib/commands/context/context-commands.js.map +0 -1
  70. package/src/lib/commands/context/publish/types.js.map +0 -1
  71. package/src/lib/commands/runtime/activate/check-element-runtime-availability.js.map +0 -1
  72. package/src/lib/commands/runtime/activate/command.js +0 -16
  73. package/src/lib/commands/runtime/activate/command.js.map +0 -1
  74. package/src/lib/commands/runtime/activate/context/command.d.ts +0 -2
  75. package/src/lib/commands/runtime/activate/context/command.js.map +0 -1
  76. package/src/lib/commands/runtime/activate/loader/command.js.map +0 -1
  77. package/src/lib/commands/runtime/activate/update-element-runtime-version.js.map +0 -1
  78. package/src/lib/commands/runtime/activate/workspace/command.js.map +0 -1
  79. package/src/lib/commands/runtime/migrate/command.d.ts +0 -0
  80. package/src/lib/commands/runtime/migrate/command.js +0 -49
  81. package/src/lib/commands/runtime/migrate/command.js.map +0 -1
  82. package/src/lib/commands/runtime/replace-json-command.d.ts +0 -2
  83. package/src/lib/commands/runtime/replace-json-command.js.map +0 -1
  84. package/src/lib/commands/runtime/runtime-commands.js +0 -15
  85. package/src/lib/commands/runtime/runtime-commands.js.map +0 -1
  86. package/src/lib/commands/runtime/unisphere-runtime-json-v1.js.map +0 -1
  87. package/src/lib/commands/runtime/unisphere-runtime-json-v2.js.map +0 -1
  88. package/src/lib/commands/runtime/verify-env-readiness.js.map +0 -1
  89. /package/src/lib/commands/{context → runtime}/build-command.d.ts +0 -0
  90. /package/src/lib/commands/runtime/{runtime-commands.d.ts → command.d.ts} +0 -0
  91. /package/src/lib/commands/{context → runtime}/publish/command.d.ts +0 -0
  92. /package/src/lib/commands/{context → runtime}/publish/execute/execute.d.ts +0 -0
  93. /package/src/lib/commands/{context → runtime}/publish/execute/sync-element.d.ts +0 -0
  94. /package/src/lib/commands/{context → runtime}/publish/execute/sync-element.js +0 -0
  95. /package/src/lib/commands/{context → runtime}/publish/prepare/prepare.d.ts +0 -0
  96. /package/src/lib/commands/{context → runtime}/publish/types.d.ts +0 -0
  97. /package/src/lib/commands/{context → runtime}/publish/types.js +0 -0
  98. /package/src/lib/commands/{context → runtime}/serve-command.d.ts +0 -0
  99. /package/src/lib/commands/{runtime → runtime-json}/activate/command.d.ts +0 -0
  100. /package/src/lib/commands/{runtime → runtime-json}/activate/loader/command.d.ts +0 -0
  101. /package/src/lib/commands/{runtime → runtime-json}/activate/workspace/command.d.ts +0 -0
  102. /package/src/lib/commands/{runtime → runtime-json}/unisphere-runtime-json-v1.js +0 -0
  103. /package/src/lib/commands/{runtime → runtime-json}/verify-env-readiness.d.ts +0 -0
  104. /package/src/lib/commands/{runtime → runtime-json}/verify-env-readiness.js +0 -0
@@ -25,16 +25,18 @@ const updateWorkspaceVersion = (runtimeFile, element) => {
25
25
  throw new Error(`Cannot update workspace version, invalid runtime file schema`);
26
26
  }
27
27
  };
28
- const updateContextVersion = (runtimeFile, element) => {
29
- const widgetName = `unisphere.module.${element.widgetName.toLowerCase()}`;
30
- const contextName = element.contextName.toLowerCase();
28
+ const updateRuntimeVersion = (runtimeFile, element) => {
29
+ const widgetName = `unisphere.widget.${element.widgetName.toLowerCase()}`;
30
+ const runtimeName = element.runtimeName.toLowerCase();
31
31
  if ((0, unisphere_runtime_json_v2_1.isUnisphereRuntimeJsonV2)(runtimeFile, console)) {
32
32
  debug('identified runtime file as v2');
33
- let module = runtimeFile.versions.widgets[widgetName];
34
- if (!module) {
35
- module = runtimeFile.versions.widgets[widgetName] = {};
33
+ let widget = runtimeFile.versions.widgets[widgetName];
34
+ if (!widget) {
35
+ widget = runtimeFile.versions.widgets[widgetName] = {
36
+ runtimes: {},
37
+ };
36
38
  }
37
- module[contextName] = {
39
+ widget.runtimes[runtimeName] = {
38
40
  version: element.version,
39
41
  allowSpecificVersion: false,
40
42
  };
@@ -45,11 +47,11 @@ const updateContextVersion = (runtimeFile, element) => {
45
47
  if (!module) {
46
48
  module = runtimeFile.modules[widgetName] = {};
47
49
  }
48
- module[contextName] = element.version;
50
+ module[runtimeName] = element.version;
49
51
  }
50
52
  else {
51
53
  debug('identified runtime file as invalid');
52
- throw new Error(`Cannot update context version, invalid runtime file schema`);
54
+ throw new Error(`Cannot update runtime version, invalid runtime file schema`);
53
55
  }
54
56
  };
55
57
  const updateElementRuntimeVersion = (options) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
@@ -65,11 +67,11 @@ const updateElementRuntimeVersion = (options) => tslib_1.__awaiter(void 0, void
65
67
  updateWorkspaceVersion(runtimeFile, options.element);
66
68
  }
67
69
  else {
68
- debug(`Updating context version`);
69
- updateContextVersion(runtimeFile, options.element);
70
+ debug(`Updating runtime version`);
71
+ updateRuntimeVersion(runtimeFile, options.element);
70
72
  }
71
73
  debug('Modified JSON file:', JSON.stringify(runtimeFile, null, 2));
72
- const isModifiedValid = (0, unisphere_runtime_json_v2_1.isUnisphereRuntimeJsonV2)(runtimeFile) ||
74
+ const isModifiedValid = (0, unisphere_runtime_json_v2_1.isUnisphereRuntimeJsonV2)(runtimeFile, console) ||
73
75
  (0, unisphere_runtime_json_v1_1.isUnisphereRuntimeJsonV1)(runtimeFile);
74
76
  if (!isModifiedValid) {
75
77
  throw new Error(`cannot update element runtime version, invalid modified file schema : ${bucketKey}`);
@@ -0,0 +1 @@
1
+ {"version":3,"file":"update-element-runtime-version.js","sourceRoot":"","sources":["../../../../../../../../packages/unisphere-cli/src/lib/commands/runtime-json/activate/update-element-runtime-version.ts"],"names":[],"mappings":";;;;AAAA,iCAAgC;AAChC,oEAA+D;AAC/D,kEAAyE;AACzE,4FAAsF;AACtF,oFAA8E;AAC9E,4EAAwE;AACxE,4EAAwE;AAExE,MAAM,KAAK,GAAG,IAAA,eAAW,EAAC,oBAAoB,CAAC,CAAC;AAChD,MAAM,SAAS,GAAG,IAAA,+BAAmB,GAAE,CAAC;AA0BxC,MAAM,sBAAsB,GAAG,CAC7B,WAAoB,EACpB,OAAyB,EACzB,EAAE;IACF,IAAI,IAAA,oDAAwB,EAAC,WAAW,EAAE,OAAO,CAAC,EAAE;QAClD,WAAW,CAAC,QAAQ,CAAC,SAAS,GAAG;YAC/B,OAAO,EAAE,OAAO,CAAC,OAAO;YACxB,oBAAoB,EAAE,KAAK;SAC5B,CAAC;KACH;SAAM,IAAI,IAAA,oDAAwB,EAAC,WAAW,EAAE,OAAO,CAAC,EAAE;QACzD,WAAW,CAAC,SAAS,GAAG,OAAO,CAAC,OAAO,CAAC;KACzC;SAAM;QACL,MAAM,IAAI,KAAK,CACb,8DAA8D,CAC/D,CAAC;KACH;AACH,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,CAC3B,WAAoB,EACpB,OAAuB,EACvB,EAAE;IACF,MAAM,UAAU,GAAG,oBAAoB,OAAO,CAAC,UAAU,CAAC,WAAW,EAAE,EAAE,CAAC;IAC1E,MAAM,WAAW,GAAG,OAAO,CAAC,WAAW,CAAC,WAAW,EAAE,CAAC;IAEtD,IAAI,IAAA,oDAAwB,EAAC,WAAW,EAAE,OAAO,CAAC,EAAE;QAClD,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACvC,IAAI,MAAM,GAAG,WAAW,CAAC,QAAQ,CAAC,OAAO,CAAC,UAAU,CAAC,CAAC;QACtD,IAAI,CAAC,MAAM,EAAE;YACX,MAAM,GAAG,WAAW,CAAC,QA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AK,CAAC,0BAA0B,CAAC,CAAC;QAClC,oBAAoB,CAAC,WAAW,EAAE,OAAO,CAAC,OAAO,CAAC,CAAC;KACpD;IAED,KAAK,CAAC,qBAAqB,EAAE,IAAI,CAAC,SAAS,CAAC,WAAW,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC,CAAC;IAEnE,MAAM,eAAe,GACnB,IAAA,oDAAwB,EAAC,WAAW,EAAE,OAAO,CAAC;QAC9C,IAAA,oDAAwB,EAAC,WAAW,CAAC,CAAC;IAExC,IAAI,CAAC,eAAe,EAAE;QACpB,MAAM,IAAI,KAAK,CACb,yEAAyE,SAAS,EAAE,CACrF,CAAC;KACH;IAED,KAAK,CACH,kCAAkC,IAAA,+BAAa,EAC7C,OAAO,CAAC,GAAG,CACZ,UAAU,SAAS,cAAc,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC,EAAE,CAChE,CAAC;IACF,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;QACnB,MAAM,IAAA,0CAAkB,EAAC;YACvB,MAAM,EAAE,IAAA,+BAAa,EAAC,OAAO,CAAC,GAAG,CAAC;YAClC,SAAS;YACT,MAAM,EAAE,OAAO,CAAC,SAAS;YACzB,QAAQ,EAAE,WAAW;YACrB,GAAG,EAAE,OAAO,CAAC,MAAM;SACpB,CAAC,CAAC;KACJ;SAAM;QACL,KAAK,CAAC,+BAA+B,CAAC,CAAC;QACvC,KAAK,CAAC;oBACU,IAAA,+BAAa,EAAC,OAAO,CAAC,GAAG,CAAC;mBAC3B,SAAS;gBACZ,OAAO,CAAC,SAAS;kBACf,IAAI,CAAC,SAAS,CAAC,WAAW,CAAC;aAChC,OAAO,CAAC,MAAM;QACnB,CAAC,CAAC;KACP;AACH,CAAC,CAAA,CAAC;AA1DW,QAAA,2BAA2B,+BA0DtC"}
@@ -15,7 +15,7 @@ const createWorkspaceCommand = (parentCommand) => {
15
15
  command
16
16
  .option('--verbose', 'output debug logs', false)
17
17
  .requiredOption('--env <id>', 'the environment to deploy to')
18
- .requiredOption('-v, --version <value>', 'the new version to update the context to, like 1.2.3 (without prefix v)')
18
+ .requiredOption('-v, --version <value>', 'the new version to update the runtime to, like 1.2.3 (without prefix v)')
19
19
  .requiredOption('--aws-region <value>', 'The AWS region')
20
20
  .option('--aws-arn <name>', 'the aws ARN to assume')
21
21
  .option('--dry-run', 'do not upload the file to AWS')
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../../../packages/unisphere-cli/src/lib/commands/runtime-json/activate/workspace/command.ts"],"names":[],"mappings":";;;;AACA,iCAA0B;AAC1B,mDAA2D;AAC3D,uEAA0E;AAC1E,8FAAwF;AACxF,sFAG2C;AAC3C,+DAAuE;AACvE,qEAAgE;AAEhE,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,qCAAqC,CAAC,CAAC;AAEpD,MAAM,sBAAsB,GAAG,CAAC,aAAsB,EAAW,EAAE;IACxE,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC;IAEnD,OAAO;SACJ,MAAM,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,CAAC;SAC/C,cAAc,CAAC,YAAY,EAAE,8BAA8B,CAAC;SAC5D,cAAc,CACb,uBAAuB,EACvB,yEAAyE,CAC1E;SACA,cAAc,CAAC,sBAAsB,EAAE,gBAAgB,CAAC;SACxD,MAAM,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;SACnD,MAAM,CAAC,WAAW,EAAE,+BAA+B,CAAC;SACpD,IAAI,CAAC,WAAW,EAAE,wBAAgB,CAAC;SACnC,MAAM,CAAC,CAAO,OAA4B,EAAE,EAAE;QAC7C,IACE,OAAO,OAAO,CAAC,OAAO,KAAK,QAAQ;YACnC,CAAC,IAAA,uCAAqB,EAAC,OAAO,CAAC,OAAO,CAAC,EACvC;YACA,IAAA,4BAAkB,EAChB,qEAAqE,CACtE,CAAC;SACH;QAED,MAAM,IAAA,yCAAkB,EAAC;YACvB,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAC;QAEH,MAAM,OAAO,GAAqB;YAChC,IAAI,EAAE,WAAW;YACjB,OAAO,EAAE,OAAO,CAAC,OAAO;SACzB,CAAC;QAEF,MAAM,IAAA,oEAA+B,EAAC;YACpC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO;SACR,CAAC,CAAC;QAEH,MAAM,IAAA,4DAA2B,EAAC;YAChC,GAAG,EAAE,OAAO,CAAC,GAAG;YAChB,SAAS,EAAE,OAAO,CAAC,SAAS;YAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;YACtB,OAAO;YACP,MAAM,EAAE,OAAO,CAAC,MAAM;SACvB,CAAC,CAAC;IACL,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AApDW,QAAA,sBAAsB,0BAoDjC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare const createRuntimeJsonCommand: () => Command;
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.createRuntimeJsonCommand = void 0;
4
+ const commander_1 = require("commander");
5
+ const replace_command_1 = require("./replace-command");
6
+ const command_1 = require("./activate/command");
7
+ const createRuntimeJsonCommand = () => {
8
+ const runtimeJsonCommand = new commander_1.Command('runtime-json');
9
+ runtimeJsonCommand.description('manage Unisphere runtime in unisphere environment');
10
+ (0, replace_command_1.createReplaceCommand)(runtimeJsonCommand);
11
+ (0, command_1.createActivateCommand)(runtimeJsonCommand);
12
+ return runtimeJsonCommand;
13
+ };
14
+ exports.createRuntimeJsonCommand = createRuntimeJsonCommand;
15
+ //# sourceMappingURL=command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/runtime-json/command.ts"],"names":[],"mappings":";;;AAAA,yCAAoC;AACpC,uDAAyD;AACzD,gDAA2D;AAEpD,MAAM,wBAAwB,GAAG,GAAY,EAAE;IACpD,MAAM,kBAAkB,GAAG,IAAI,mBAAO,CAAC,cAAc,CAAC,CAAC;IACvD,kBAAkB,CAAC,WAAW,CAC5B,mDAAmD,CACpD,CAAC;IAEF,IAAA,sCAAoB,EAAC,kBAAkB,CAAC,CAAC;IACzC,IAAA,+BAAqB,EAAC,kBAAkB,CAAC,CAAC;IAC1C,OAAO,kBAAkB,CAAC;AAC5B,CAAC,CAAC;AATW,QAAA,wBAAwB,4BASnC"}
@@ -0,0 +1,2 @@
1
+ import { Command } from 'commander';
2
+ export declare const createReplaceCommand: (parentCommand: Command) => Command;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createReplaceJsonCommand = void 0;
3
+ exports.createReplaceCommand = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const commander_1 = require("commander");
6
6
  const debug_1 = require("debug");
@@ -15,8 +15,8 @@ const unisphere_runtime_json_v2_1 = require("./unisphere-runtime-json-v2");
15
15
  const unisphere_runtime_json_v1_1 = require("./unisphere-runtime-json-v1");
16
16
  const debug = (0, debug_1.default)('unisphere:runtime:replace-json:command');
17
17
  const bucketKey = (0, workspace_1.getRuntimeBucketKey)();
18
- const createReplaceJsonCommand = (parentCommand) => {
19
- const command = parentCommand.command('replace-json');
18
+ const createReplaceCommand = (parentCommand) => {
19
+ const command = parentCommand.command('replace');
20
20
  const isNewEnvironmentOption = new commander_1.Option('--is-new-env', 'Is this a new environment? (Please do not set this to true unless you know what you are doing)').default(false);
21
21
  const bypassValidationOption = new commander_1.Option('--bypass-validation', 'Bypass the validation of the json content')
22
22
  .default(false)
@@ -93,5 +93,5 @@ const createReplaceJsonCommand = (parentCommand) => {
93
93
  }));
94
94
  return command;
95
95
  };
96
- exports.createReplaceJsonCommand = createReplaceJsonCommand;
97
- //# sourceMappingURL=replace-json-command.js.map
96
+ exports.createReplaceCommand = createReplaceCommand;
97
+ //# sourceMappingURL=replace-command.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"replace-command.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/runtime-json/replace-command.ts"],"names":[],"mappings":";;;;AAAA,yCAA4C;AAC5C,iCAA0B;AAC1B,6CAAqD;AACrD,yDAAiE;AACjE,yFAAmF;AACnF,iEAA4D;AAC5D,+DAAsE;AACtE,iFAA2E;AAC3E,iEAA4D;AAC5D,2EAAuE;AACvE,2EAAuE;AAEvE,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,wCAAwC,CAAC,CAAC;AAE9D,MAAM,SAAS,GAAG,IAAA,+BAAmB,GAAE,CAAC;AAEjC,MAAM,oBAAoB,GAAG,CAAC,aAAsB,EAAW,EAAE;IACtE,MAAM,OAAO,GAAG,aAAa,CAAC,OAAO,CAAC,SAAS,CAAC,CAAC;IAEjD,MAAM,sBAAsB,GAAG,IAAI,kBAAM,CACvC,cAAc,EACd,gGAAgG,CACjG,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC;IAEjB,MAAM,sBAAsB,GAAG,IAAI,kBAAM,CACvC,qBAAqB,EACrB,2CAA2C,CAC5C;SACE,OAAO,CAAC,KAAK,CAAC;SACd,QAAQ,EAAE,CAAC;IAEd,OAAO;SACJ,MAAM,CAAC,WAAW,EAAE,mBAAmB,EAAE,KAAK,CAAC;SAC/C,cAAc,CAAC,YAAY,EAAE,8BAA8B,CAAC;SAC5D,cAAc,CAAC,sBAAsB,EAAE,6BAA6B,CAAC;SACrE,cAAc,CAAC,sBAAsB,EAAE,gBAAgB,CAAC;SACxD,MAAM,CAAC,kBAAkB,EAAE,uBAAuB,CAAC;SACnD,SAAS,CAAC,sBAAsB,CAAC;SACjC,SAAS,C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BAAmB,GAAG,MAAM,IAAA,kDAAsB,EAAC;YACvD,MAAM,EAAE,IAAA,+BAAa,EAAC,OAAO,CAAC,GAAG,CAAC;YAClC,SAAS;YACT,MAAM,EAAE,OAAO,CAAC,SAAS;YACzB,GAAG,EAAE,OAAO,CAAC,MAAM;SACpB,CAAC,CAAC;QAEH,OAAO,CAAC,GAAG,CACT,0BAA0B,IAAI,CAAC,SAAS,CAAC,mBAAmB,CAAC,EAAE,CAChE,CAAC;QAEF,IAAI,CAAC,OAAO,CAAC,MAAM,EAAE;YACnB,MAAM,IAAA,0CAAkB,EAAC;gBACvB,MAAM,EAAE,IAAA,+BAAa,EAAC,OAAO,CAAC,GAAG,CAAC;gBAClC,SAAS;gBACT,MAAM,EAAE,OAAO,CAAC,SAAS;gBACzB,QAAQ,EAAE,eAAe;gBACzB,GAAG,EAAE,OAAO,CAAC,MAAM;aACpB,CAAC,CAAC;SACJ;aAAM;YACL,KAAK,CAAC,+BAA+B,CAAC,CAAC;YACvC,KAAK,CAAC;wBACU,IAAA,+BAAa,EAAC,OAAO,CAAC,GAAG,CAAC;uBAC3B,SAAS;oBACZ,OAAO,CAAC,SAAS;sBACf,IAAI,CAAC,SAAS,CAAC,eAAe,CAAC;iBACpC,OAAO,CAAC,MAAM;YACnB,CAAC,CAAC;SACP;IACH,CAAC,CAAA,CAAC,CAAC;IAEL,OAAO,OAAO,CAAC;AACjB,CAAC,CAAC;AAlGW,QAAA,oBAAoB,wBAkG/B"}
@@ -3,12 +3,12 @@ export interface UnisphereRuntimeJson {
3
3
  workspace: string;
4
4
  modules: {
5
5
  [module: string]: {
6
- [context: string]: string;
6
+ [runtime: string]: string;
7
7
  };
8
8
  };
9
9
  components: {
10
10
  [module: string]: {
11
- [context: string]: string;
11
+ [runtime: string]: string;
12
12
  };
13
13
  };
14
14
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unisphere-runtime-json-v1.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/runtime-json/unisphere-runtime-json-v1.ts"],"names":[],"mappings":";AAAA,iFAAiF;AACjF,uDAAuD;;;AAEvD,qDAI+B;AAgBlB,QAAA,4BAA4B,GAAoB;IAC3D,IAAI,EAAE,QAAQ;IACd,sBAAsB,EAAE,IAAI;IAC5B,UAAU,EAAE;QACV,SAAS,EAAE;YACT,IAAI,EAAE,WAAW;YACjB,KAAK,EAAE,QAAQ;SAChB;QACD,OAAO,EAAE;YACP,IAAI,EAAE,KAAK;YACX,KAAK,EAAE;gBACL,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE;oBACL,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,QAAQ;iBAChB;aACF;SACF;QACD,UAAU,EAAE;YACV,IAAI,EAAE,KAAK;YACX,KAAK,EAAE;gBACL,IAAI,EAAE,KAAK;gBACX,KAAK,EAAE;oBACL,IAAI,EAAE,WAAW;oBACjB,KAAK,EAAE,QAAQ;iBAChB;aACF;SACF;KACF;CACF,CAAC;AAEK,MAAM,wBAAwB,GAAG,CACtC,GAAQ,EACR,MAAwB,EACK,EAAE;IAC/B,MAAM,eAAe,GACnB,IAAA,0BAAc,EACZ,GAAG,EACH,oCAA4B,EAC5B,sBAAsB,EACtB,MAAM,CACP,CAAC,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,eAAe,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAhBW,QAAA,wBAAwB,4BAgBnC"}
@@ -1,6 +1,6 @@
1
1
  import { ValidatorLogger, ValidatorSchema } from '../../utils/validator';
2
2
  export interface UnisphereRuntimeJsonV2 {
3
- _version: '2';
3
+ _version: '2.0.0';
4
4
  _lastUpdatedId?: string;
5
5
  env: string;
6
6
  versions: {
@@ -10,24 +10,26 @@ export interface UnisphereRuntimeJsonV2 {
10
10
  };
11
11
  widgets: {
12
12
  [widgetName: string]: {
13
- [contextName: string]: {
14
- version: string;
15
- allowSpecificVersion?: boolean;
13
+ runtimes: {
14
+ [runtimeName: string]: {
15
+ version: string;
16
+ allowSpecificVersion?: boolean;
17
+ };
16
18
  };
17
19
  };
18
20
  };
19
21
  };
20
22
  domains: string[];
21
23
  rules: ({
22
- type: 'block-context';
24
+ type: 'block-runtime';
23
25
  widget: string;
24
- context: string;
26
+ runtime: string;
25
27
  } | {
26
- type: 'check-context-version';
28
+ type: 'check-runtime-version';
27
29
  widget: string;
28
- context: string;
30
+ runtime: string;
29
31
  minimumVersion: string;
30
32
  })[];
31
33
  }
32
- export declare const UnisphereRuntimeJsonV2Schema: ValidatorSchema;
34
+ export declare const UnisphereRuntimeJsonSchemaV2: ValidatorSchema;
33
35
  export declare const isUnisphereRuntimeJsonV2: (obj: any, logger?: ValidatorLogger) => obj is UnisphereRuntimeJsonV2;
@@ -2,20 +2,13 @@
2
2
  // Notice! this file content is a copy of the validator in the unisphere cli package and the unisphere core package
3
3
  // This is done to avoid direct dependencies on the cli package
4
4
  Object.defineProperty(exports, "__esModule", { value: true });
5
- exports.isUnisphereRuntimeJsonV2 = exports.UnisphereRuntimeJsonV2Schema = void 0;
5
+ exports.isUnisphereRuntimeJsonV2 = exports.UnisphereRuntimeJsonSchemaV2 = void 0;
6
6
  const validator_1 = require("../../utils/validator");
7
- exports.UnisphereRuntimeJsonV2Schema = {
7
+ exports.UnisphereRuntimeJsonSchemaV2 = {
8
8
  type: 'object',
9
9
  allowUnknownProperties: true,
10
10
  properties: {
11
- _version: {
12
- type: 'or',
13
- properties: [
14
- { type: 'literal', value: '2' },
15
- { type: 'literal', value: '2.0.0' }, /// todo remove
16
- ],
17
- optional: false,
18
- },
11
+ _version: { type: 'literal', value: '2.0.0', optional: false },
19
12
  _lastUpdatedId: { type: 'primitive', value: 'string', optional: true },
20
13
  env: { type: 'primitive', value: 'string', optional: false },
21
14
  versions: {
@@ -35,19 +28,24 @@ exports.UnisphereRuntimeJsonV2Schema = {
35
28
  widgets: {
36
29
  type: 'map',
37
30
  value: {
38
- type: 'map',
39
- value: {
40
- type: 'object',
41
- properties: {
42
- version: {
43
- type: 'primitive',
44
- value: 'string',
45
- optional: false,
46
- },
47
- allowSpecificVersion: {
48
- type: 'primitive',
49
- value: 'boolean',
50
- optional: true,
31
+ type: 'object',
32
+ properties: {
33
+ runtimes: {
34
+ type: 'map',
35
+ value: {
36
+ type: 'object',
37
+ properties: {
38
+ version: {
39
+ type: 'primitive',
40
+ value: 'string',
41
+ optional: false,
42
+ },
43
+ allowSpecificVersion: {
44
+ type: 'primitive',
45
+ value: 'boolean',
46
+ optional: true,
47
+ },
48
+ },
51
49
  },
52
50
  },
53
51
  },
@@ -70,17 +68,17 @@ exports.UnisphereRuntimeJsonV2Schema = {
70
68
  {
71
69
  type: 'object',
72
70
  properties: {
73
- type: { type: 'literal', value: 'block-context' },
71
+ type: { type: 'literal', value: 'block-runtime' },
74
72
  widget: { type: 'primitive', value: 'string', optional: false },
75
- context: { type: 'primitive', value: 'string', optional: false },
73
+ runtime: { type: 'primitive', value: 'string', optional: false },
76
74
  },
77
75
  },
78
76
  {
79
77
  type: 'object',
80
78
  properties: {
81
- type: { type: 'literal', value: 'check-context-version' },
79
+ type: { type: 'literal', value: 'check-runtime-version' },
82
80
  widget: { type: 'primitive', value: 'string', optional: false },
83
- context: { type: 'primitive', value: 'string', optional: false },
81
+ runtime: { type: 'primitive', value: 'string', optional: false },
84
82
  minimumVersion: {
85
83
  type: 'primitive',
86
84
  value: 'string',
@@ -94,7 +92,7 @@ exports.UnisphereRuntimeJsonV2Schema = {
94
92
  },
95
93
  };
96
94
  const isUnisphereRuntimeJsonV2 = (obj, logger) => {
97
- const hasSchemaErrors = (0, validator_1.validateSchema)(obj, exports.UnisphereRuntimeJsonV2Schema, 'UnisphereRuntimeJson', logger).length > 0;
95
+ const hasSchemaErrors = (0, validator_1.validateSchema)(obj, exports.UnisphereRuntimeJsonSchemaV2, 'UnisphereRuntimeJsonV2', logger).length > 0;
98
96
  if (hasSchemaErrors) {
99
97
  return false;
100
98
  }
@@ -0,0 +1 @@
1
+ {"version":3,"file":"unisphere-runtime-json-v2.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/runtime-json/unisphere-runtime-json-v2.ts"],"names":[],"mappings":";AAAA,mHAAmH;AACnH,+DAA+D;;;AAE/D,qDAI+B;AAmClB,QAAA,4BAA4B,GAAoB;IAC3D,IAAI,EAAE,QAAQ;IACd,sBAAsB,EAAE,IAAI;IAC5B,UAAU,EAAE;QACV,QAAQ,EAAE,EAAE,IAAI,EAAE,SAAS,EAAE,KAAK,EAAE,OAAO,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC9D,cAAc,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,IAAI,EAAE;QACtE,GAAG,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;QAC5D,QAAQ,EAAE;YACR,IAAI,EAAE,QAAQ;YACd,UAAU,EAAE;gBACV,SAAS,EAAE;oBACT,IAAI,EAAE,QAAQ;oBACd,UAAU,EAAE;wBACV,OAAO,EAAE,EAAE,IAAI,EAAE,WAAW,EAAE,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE;wBAChE,oBAAoB,EAAE;4BACpB,IAAI,EAAE,WAAW;4BACjB,KAAK,EAAE,SAAS;4BAChB,QAAQ,EAAE,IAAI;yBACf;qBACF;iBACF;gBACD,OAAO,EAAE;oBACP,IAAI,EAAE,KAAK;oBACX,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,UAAU,EAAE;4BACV,QAAQ,EAAE;gCACR,IAAI,EAAE,KAAK;gCACX,KAAK,EAAE;oCACL,IAAI,EAAE,QAAQ;oCACd,UAAU,EAAE;wCACV,OAAO,EAAE;4CACP,IAAI,EAAE,WAAW;4CACjB,KAAK,EAAE,QAAQ;4CACf,QAAQ,EAAE,KAAK;yCAChB;wCACD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jC,MAAM,eAAe,GACnB,IAAA,0BAAc,EACZ,GAAG,EACH,oCAA4B,EAC5B,wBAAwB,EACxB,MAAM,CACP,CAAC,MAAM,GAAG,CAAC,CAAC;IACf,IAAI,eAAe,EAAE;QACnB,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC,CAAC;AAhBW,QAAA,wBAAwB,4BAgBnC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"verify-env-readiness.js","sourceRoot":"","sources":["../../../../../../../packages/unisphere-cli/src/lib/commands/runtime-json/verify-env-readiness.ts"],"names":[],"mappings":";;;;AAAA,yEAAmE;AAEnE,yDAAiE;AACjE,iEAA4D;AAC5D,+DAAsE;AAKtE,iCAA0B;AAE1B,MAAM,KAAK,GAAG,IAAA,eAAK,EAAC,oCAAoC,CAAC,CAAC;AAOnD,MAAM,kBAAkB,GAAG,CAAO,OAAgB,EAAiB,EAAE;IAC1E,KAAK,CAAC,4DAA4D,CAAC,CAAC;IAEpE,MAAM,MAAM,GAAG,IAAA,+BAAa,EAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IAC1C,MAAM,SAAS,GAAG,IAAA,+BAAmB,GAAE,CAAC;IAExC,KAAK,CAAC,0BAA0B,MAAM,IAAI,SAAS,GAAG,CAAC,CAAC;IACxD,MAAM,mBAAmB,GAAG,MAAM,IAAA,kCAAc,EAAC;QAC/C,MAAM;QACN,GAAG,EAAE,SAAS;QACd,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,MAAM,EAAE,OAAO,CAAC,MAAM;KACvB,CAAC,CAAC;IAEH,IAAI,CAAC,mBAAmB,EAAE;QACxB,IAAA,4BAAkB,EAChB,yEAAyE,CAC1E,CAAC;KACH;IAED,KAAK,CAAC,iCAAiC,CAAC,CAAC;AAC3C,CAAC,CAAA,CAAC;AArBW,QAAA,kBAAkB,sBAqB7B"}
@@ -1,6 +1,6 @@
1
1
  const tslib_1 = require("tslib");
2
2
  const { Command } = require('commander');
3
- const { createContextCommand } = require('./commands/context/context-commands');
3
+ const { createRuntimeCommand } = require('./commands/runtime/command');
4
4
  const { createPackageCommand } = require('./commands/package/package-commands');
5
5
  const { createInfoCommand } = require('./commands/info/command');
6
6
  const { createInitCommand } = require('./commands/init/command');
@@ -9,13 +9,13 @@ const { createHowToCommand } = require('./commands/how-to/command');
9
9
  const { createLocalCommand } = require('./commands/local/local-command');
10
10
  const { createResetCommand } = require('./commands/reset/command');
11
11
  const { createCreateCommand } = require('./commands/create/command');
12
- const { createRuntimeCommand } = require('./commands/runtime/runtime-commands');
12
+ const { createRuntimeJsonCommand } = require('./commands/runtime-json/command');
13
13
  module.exports = () => tslib_1.__awaiter(this, void 0, void 0, function* () {
14
14
  const program = new Command();
15
15
  program
16
16
  .name('Kaltura UNISPHERE command line')
17
17
  .description('CLI with handy Unisphere platform build, lint and publish commands');
18
- program.addCommand(createContextCommand());
18
+ program.addCommand(createRuntimeCommand());
19
19
  // program.addCommand(createGithubCommand());
20
20
  program.addCommand(createPackageCommand());
21
21
  program.addCommand(createInfoCommand());
@@ -25,7 +25,7 @@ module.exports = () => tslib_1.__awaiter(this, void 0, void 0, function* () {
25
25
  program.addCommand(createLocalCommand());
26
26
  program.addCommand(createResetCommand());
27
27
  program.addCommand(createCreateCommand());
28
- program.addCommand(createRuntimeCommand());
28
+ program.addCommand(createRuntimeJsonCommand());
29
29
  program.parse(process.argv);
30
30
  });
31
31
  // 1
@@ -1 +1 @@
1
- {"version":3,"file":"unisphere.js","sourceRoot":"","sources":["../../../../../packages/unisphere-cli/src/lib/unisphere.js"],"names":[],"mappings":";AAAA,MAAM,EAAE,OAAO,EAAE,GAAG,OAAO,CAAC,WAAW,CAAC,CAAC;AACzC,MAAM,EAAE,oBAAoB,EAAC,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAA;AAC9E,MAAM,EAAE,oBAAoB,EAAC,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAA;AAC9E,MAAM,EAAE,iBAAiB,EAAC,G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UAAU,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC3C,6CAA6C;IAC7C,OAAO,CAAC,UAAU,CAAC,oBAAoB,EAAE,CAAC,CAAC;IAC3C,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,UAAU,CAAC,iBAAiB,EAAE,CAAC,CAAC;IACxC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,UAAU,CAAC,kBAAkB,EAAE,CAAC,CAAC;IACzC,OAAO,CAAC,UAAU,CAAC,mBAAmB,EAAE,CAAC,CAAC;IAC1C,OAAO,CAAC,UAAU,CAAC,wBAAwB,EAAE,CAAC,CAAC;IAC/C,OAAO,CAAC,KAAK,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;AAC9B,CAAC,CAAA,CAAA;AAED,IAAI"}
@@ -10,7 +10,7 @@ const prompts_1 = require("../prompts/prompts");
10
10
  const debug = (0, debug_1.default)('unisphere:utils:unisphere');
11
11
  const allowedElementTypes = ['workspace', 'loader'];
12
12
  const allowedDynamicElementTypes = [
13
- 'contexts',
13
+ 'runtimes',
14
14
  'components',
15
15
  'packages',
16
16
  'apps',
@@ -45,12 +45,12 @@ function validateVersionConstraints(workspaceConfig) {
45
45
  }
46
46
  }
47
47
  function collectVersions(constraint, workspaceConfig, versions) {
48
- const { contexts, components, packages } = constraint;
49
- if (contexts) {
50
- contexts.forEach((context) => {
48
+ const { runtimes, components, packages } = constraint;
49
+ if (runtimes) {
50
+ runtimes.forEach((runtime) => {
51
51
  var _a, _b, _c;
52
- versions[context] =
53
- (_c = (_b = (_a = workspaceConfig.elements['contexts']) === null || _a === void 0 ? void 0 : _a[context]) === null || _b === void 0 ? void 0 : _b.version) !== null && _c !== void 0 ? _c : 'n/a';
52
+ versions[runtime] =
53
+ (_c = (_b = (_a = workspaceConfig.elements['runtimes']) === null || _a === void 0 ? void 0 : _a[runtime]) === null || _b === void 0 ? void 0 : _b.version) !== null && _c !== void 0 ? _c : 'n/a';
54
54
  });
55
55
  }
56
56
  if (components) {
@@ -10,13 +10,13 @@ export declare const createListrForBuildingUnispherePackage: ({ cwd, nxProjectNa
10
10
  postTask?: ListrTask<any, any, any>;
11
11
  ctx?: any;
12
12
  }) => Promise<Listr<any, any, any>>;
13
- export declare const getUnisphereEnv: (production: boolean, mode: 'package' | 'context') => {
13
+ export declare const getUnisphereEnv: (production: boolean, mode: 'package' | 'runtime') => {
14
14
  UNISPHERE: string;
15
15
  NODE_ENV: string;
16
16
  UNISPHERE_DEV: string;
17
- UNISPHERE_MODE: "package" | "context";
17
+ UNISPHERE_MODE: "package" | "runtime";
18
18
  };
19
- export declare const createListrForBuildingUnisphereContext: ({ cwd, nxProjectName, lint, parentTask, production, verbose, postTask, ctx, }: {
19
+ export declare const createListrForBuildingUnisphereRuntime: ({ cwd, nxProjectName, lint, parentTask, production, verbose, postTask, ctx, }: {
20
20
  cwd: string;
21
21
  nxProjectName: string;
22
22
  production: boolean;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.createListrForBuildingUnisphereContext = exports.getUnisphereEnv = exports.createListrForBuildingUnispherePackage = void 0;
3
+ exports.createListrForBuildingUnisphereRuntime = exports.getUnisphereEnv = exports.createListrForBuildingUnispherePackage = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path = require("path");
6
6
  const create_exec_task_1 = require("../listr2/create-exec-task");
@@ -48,7 +48,7 @@ const getUnisphereEnv = (production, mode) => ({
48
48
  UNISPHERE_MODE: mode,
49
49
  });
50
50
  exports.getUnisphereEnv = getUnisphereEnv;
51
- const createListrForBuildingUnisphereContext = ({ cwd, nxProjectName, lint, parentTask, production, verbose, postTask, ctx = {}, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
51
+ const createListrForBuildingUnisphereRuntime = ({ cwd, nxProjectName, lint, parentTask, production, verbose, postTask, ctx = {}, }) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
52
52
  return parentTask.newListr([
53
53
  (0, create_exec_task_1.createExecTask)({
54
54
  title: 'Checking nx availability',
@@ -60,16 +60,16 @@ const createListrForBuildingUnisphereContext = ({ cwd, nxProjectName, lint, pare
60
60
  title: 'Running lint',
61
61
  command: `nx run ${nxProjectName}:lint --fix`,
62
62
  cwd,
63
- env: (0, exports.getUnisphereEnv)(production, 'context'),
63
+ env: (0, exports.getUnisphereEnv)(production, 'runtime'),
64
64
  }),
65
65
  (0, create_exec_task_1.createExecTask)({
66
66
  title: 'Running build',
67
67
  command: `nx run ${nxProjectName}:build --skip-nx-cache ${production ? '--prod' : ''} ${verbose ? '--verbose' : ''}`,
68
68
  cwd,
69
- env: (0, exports.getUnisphereEnv)(production, 'context'),
69
+ env: (0, exports.getUnisphereEnv)(production, 'runtime'),
70
70
  }),
71
71
  postTask,
72
72
  ].filter(Boolean), Object.assign(Object.assign({}, (0, defaults_1.getDefaultListrOptions)()), { ctx }));
73
73
  });
74
- exports.createListrForBuildingUnisphereContext = createListrForBuildingUnisphereContext;
74
+ exports.createListrForBuildingUnisphereRuntime = createListrForBuildingUnisphereRuntime;
75
75
  //# sourceMappingURL=build-unisphere-elements.js.map
@@ -13,7 +13,7 @@ const createListr2ForResetEnv = ({ cwd = process.cwd(), verbose = false, parentT
13
13
  return parentTask.newListr([
14
14
  {
15
15
  title: 'Reset rollup-plugin-typescript2 cache',
16
- task: (context, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
16
+ task: (runtime, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
17
17
  const resolvedCwd = path.join(cwd, 'unisphere');
18
18
  if (!fs.existsSync(resolvedCwd)) {
19
19
  debug(`${resolvedCwd} does not exist, skipping`);
@@ -51,7 +51,7 @@ const createListr2ForResetEnv = ({ cwd = process.cwd(), verbose = false, parentT
51
51
  {
52
52
  title: 'Remove NX cache from node_modules',
53
53
  enabled: !onlyRollup,
54
- task: (context, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
54
+ task: (runtime, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
55
55
  debug(`removing NX cache from node_modules in ${cwd} on ${process.platform}`);
56
56
  if (!fs.existsSync(cwd)) {
57
57
  debug(`${cwd} does not exist, skipping`);
@@ -73,7 +73,7 @@ const createListr2ForResetEnv = ({ cwd = process.cwd(), verbose = false, parentT
73
73
  {
74
74
  title: 'Reset NX cache',
75
75
  enabled: !onlyRollup,
76
- task: (context, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
76
+ task: (runtime, task) => tslib_1.__awaiter(void 0, void 0, void 0, function* () {
77
77
  debug(`resetting NX cache using nx reset command`);
78
78
  if (!fs.existsSync(cwd)) {
79
79
  debug(`${cwd} does not exist, skipping`);
@@ -2,7 +2,7 @@ import { Schema } from '../validator';
2
2
  export interface UnisphereElement {
3
3
  sourceRoot: string;
4
4
  }
5
- export interface UnisphereContextElement extends UnisphereElement {
5
+ export interface UnisphereRuntimeElement extends UnisphereElement {
6
6
  distributionChannel: 'none' | 'unisphere';
7
7
  scope: 'global' | 'widget';
8
8
  }
@@ -25,13 +25,13 @@ export interface UnisphereRepositoryFile {
25
25
  schemaVersion: string;
26
26
  constraints?: {
27
27
  type: 'same-version';
28
- contexts?: string[];
28
+ runtimes?: string[];
29
29
  components?: string[];
30
30
  packages?: string[];
31
31
  }[];
32
32
  elements: {
33
- contexts?: {
34
- [key: string]: UnisphereContextElement;
33
+ runtimes?: {
34
+ [key: string]: UnisphereRuntimeElement;
35
35
  };
36
36
  components?: {
37
37
  [key: string]: UnisphereElement;
@@ -42,8 +42,8 @@ export interface UnisphereRepositoryFile {
42
42
  apps?: {
43
43
  [key: string]: UnisphereElement;
44
44
  };
45
- loader?: UnisphereContextElement;
46
- workspace?: UnisphereContextElement;
45
+ loader?: UnisphereRuntimeElement;
46
+ workspace?: UnisphereRuntimeElement;
47
47
  };
48
48
  }
49
49
  export interface UnisphereWorkspaceConfig {
@@ -53,13 +53,13 @@ export interface UnisphereWorkspaceConfig {
53
53
  schemaVersion: string;
54
54
  constraints?: {
55
55
  type: 'same-version';
56
- contexts?: string[];
56
+ runtimes?: string[];
57
57
  components?: string[];
58
58
  packages?: string[];
59
59
  }[];
60
60
  elements: {
61
- contexts?: {
62
- [key: string]: AugmentedUnisphereElement & UnisphereContextElement;
61
+ runtimes?: {
62
+ [key: string]: AugmentedUnisphereElement & UnisphereRuntimeElement;
63
63
  };
64
64
  components?: {
65
65
  [key: string]: AugmentedUnisphereElement & UnisphereElement;
@@ -70,8 +70,8 @@ export interface UnisphereWorkspaceConfig {
70
70
  apps?: {
71
71
  [key: string]: AugmentedUnisphereElement & UnisphereElement;
72
72
  };
73
- loader?: AugmentedUnisphereElement & UnisphereContextElement;
74
- workspace?: AugmentedUnisphereElement & UnisphereContextElement;
73
+ loader?: AugmentedUnisphereElement & UnisphereRuntimeElement;
74
+ workspace?: AugmentedUnisphereElement & UnisphereRuntimeElement;
75
75
  };
76
76
  }
77
77
  export interface UnisphereWorkspace {
@@ -27,7 +27,7 @@ exports.UnisphereRepositoryFileSchema = {
27
27
  value: 'string',
28
28
  },
29
29
  },
30
- contexts: {
30
+ runtimes: {
31
31
  type: 'array',
32
32
  items: {
33
33
  type: 'primitive',
@@ -59,7 +59,7 @@ exports.UnisphereRepositoryFileSchema = {
59
59
  },
60
60
  optional: true,
61
61
  },
62
- contexts: {
62
+ runtimes: {
63
63
  type: 'map',
64
64
  value: {
65
65
  type: 'object',
@@ -4,4 +4,4 @@ export declare function getWorkspaceBucketPrefix(version: string): string;
4
4
  export declare function getLoaderBucketPrefix(version: string): string;
5
5
  export declare function getCurrentLoaderBucketPrefix(): string;
6
6
  export declare function isValidElementVersion(version: string): boolean;
7
- export declare function getElementContextBucketPrefix(element: string, context: string, version: string): string;
7
+ export declare function getElementRuntimeBucketPrefix(element: string, runtime: string, version: string): string;
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getElementContextBucketPrefix = exports.isValidElementVersion = exports.getCurrentLoaderBucketPrefix = exports.getLoaderBucketPrefix = exports.getWorkspaceBucketPrefix = exports.getElementBucketPrefix = exports.getBucketName = void 0;
3
+ exports.getElementRuntimeBucketPrefix = exports.isValidElementVersion = exports.getCurrentLoaderBucketPrefix = exports.getLoaderBucketPrefix = exports.getWorkspaceBucketPrefix = exports.getElementBucketPrefix = exports.getBucketName = void 0;
4
4
  function getBucketName(envName) {
5
5
  return `${envName}-unisphere-content`;
6
6
  }
@@ -26,8 +26,8 @@ function isValidElementVersion(version) {
26
26
  return semverRegex.test(version) && version.split('.')[0] === '1';
27
27
  }
28
28
  exports.isValidElementVersion = isValidElementVersion;
29
- function getElementContextBucketPrefix(element, context, version) {
30
- return `${getElementBucketPrefix(element)}/v${version}/runtime/${context}`;
29
+ function getElementRuntimeBucketPrefix(element, runtime, version) {
30
+ return `${getElementBucketPrefix(element)}/v${version}/runtime/${runtime}`;
31
31
  }
32
- exports.getElementContextBucketPrefix = getElementContextBucketPrefix;
32
+ exports.getElementRuntimeBucketPrefix = getElementRuntimeBucketPrefix;
33
33
  //# sourceMappingURL=unisphere-utils.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"unisphere-utils.js","sourceRoot":"","sources":["../../../../../../packages/unisphere-cli/src/lib/utils/unisphere-utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO,GAAG,OAAO,oBAAoB,CAAC;AACxC,CAAC;AAFD,sCAEC;AAED,SAAgB,sBAAsB,CAAC,OAAe;IACpD,OAAO,qBAAqB,OAAO,EAAE,CAAC;AACxC,CAAC;AAFD,wDAEC;AAED,SAAgB,wBAAwB,CAAC,OAAe;IACtD,OAAO,wBAAwB,OAAO,UAAU,CAAC;AACnD,CAAC;AAFD,4DAEC;AAED,SAAgB,qBAAqB,CAAC,OAAe;IACnD,OAAO,qBAAqB,OAAO,UAAU,CAAC;AAChD,CAAC;AAFD,sDAEC;AAED,SAAgB,4BAA4B;IAC1C,OAAO,WAAW,CAAC;AACrB,CAAC;AAFD,oEAEC;AAED,SAAgB,qBAAqB,CAAC,OAAe;IACnD,MAAM,WAAW,GAAG,sDAAsD,CAAC;IAC3E,OAAO,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;AACpE,CAAC;AAHD,sDAGC;AAED,SAAgB,6BAA6B,CAAC,OAAe,EAAE,OAAe,EAAE,OAAe;IAC7F,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC,KAAK,OAAO,YAAY,OAAO,EAAE,CAAC;AAC7E,CAAC;AAFD,sEAEC"}
1
+ {"version":3,"file":"unisphere-utils.js","sourceRoot":"","sources":["../../../../../../packages/unisphere-cli/src/lib/utils/unisphere-utils.ts"],"names":[],"mappings":";;;AAAA,SAAgB,aAAa,CAAC,OAAe;IAC3C,OAAO,GAAG,OAAO,oBAAoB,CAAC;AACxC,CAAC;AAFD,sCAEC;AAED,SAAgB,sBAAsB,CAAC,OAAe;IACpD,OAAO,qBAAqB,OAAO,EAAE,CAAC;AACxC,CAAC;AAFD,wDAEC;AAED,SAAgB,wBAAwB,CAAC,OAAe;IACtD,OAAO,wBAAwB,OAAO,UAAU,CAAC;AACnD,CAAC;AAFD,4DAEC;AAED,SAAgB,qBAAqB,CAAC,OAAe;IACnD,OAAO,qBAAqB,OAAO,UAAU,CAAC;AAChD,CAAC;AAFD,sDAEC;AAED,SAAgB,4BAA4B;IAC1C,OAAO,WAAW,CAAC;AACrB,CAAC;AAFD,oEAEC;AAED,SAAgB,qBAAqB,CAAC,OAAe;IACnD,MAAM,WAAW,GAAG,sDAAsD,CAAC;IAC3E,OAAO,WAAW,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,OAAO,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,KAAK,GAAG,CAAC;AACpE,CAAC;AAHD,sDAGC;AAED,SAAgB,6BAA6B,CAC3C,OAAe,EACf,OAAe,EACf,OAAe;IAEf,OAAO,GAAG,sBAAsB,CAAC,OAAO,CAAC,KAAK,OAAO,YAAY,OAAO,EAAE,CAAC;AAC7E,CAAC;AAND,sEAMC"}
@@ -5,5 +5,5 @@ declare type Command = {
5
5
  };
6
6
  export declare const printVerboseHook: (thisCommand: Command) => void;
7
7
  export declare function formatElapsedTime(start: number, end: number): string;
8
- export declare function createMeasure(context: string): () => void;
8
+ export declare function createMeasure(runtime: string): () => void;
9
9
  export {};
@@ -21,12 +21,12 @@ function formatElapsedTime(start, end) {
21
21
  return `${minutes}:${seconds.toString().padStart(2, '0')}`;
22
22
  }
23
23
  exports.formatElapsedTime = formatElapsedTime;
24
- function createMeasure(context) {
24
+ function createMeasure(runtime) {
25
25
  const start = performance.now();
26
- debugPerformance(`start: ${context}`);
26
+ debugPerformance(`start: ${runtime}`);
27
27
  return () => {
28
28
  const end = performance.now();
29
- debugPerformance(`stop: took ${formatElapsedTime(start, end)}. ${context}`);
29
+ debugPerformance(`stop: took ${formatElapsedTime(start, end)}. ${runtime}`);
30
30
  };
31
31
  }
32
32
  exports.createMeasure = createMeasure;
@@ -1,2 +0,0 @@
1
- import { Command } from 'commander';
2
- export declare const createContextCommand: () => Command;