zephyr-repack-plugin 0.0.0-canary-20241122020244 → 0.0.0-canary-20241122064756

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 (75) hide show
  1. package/dist/delegate-module/replace-remote-with-delegate.js +2 -2
  2. package/dist/delegate-module/replace-remote-with-delegate.js.map +1 -1
  3. package/dist/delegate-module/zephyr-delegate.d.ts +1 -6
  4. package/dist/delegate-module/zephyr-delegate.js +22 -70
  5. package/dist/delegate-module/zephyr-delegate.js.map +1 -1
  6. package/dist/index.d.ts +1 -1
  7. package/dist/index.js +3 -2
  8. package/dist/index.js.map +1 -1
  9. package/dist/lib/build-stats/get-build-stats.d.ts +1 -4
  10. package/dist/lib/build-stats/get-build-stats.js +19 -12
  11. package/dist/lib/build-stats/get-build-stats.js.map +1 -1
  12. package/dist/lib/dependency-resolution/replace-remote-with-delegates.js +6 -7
  13. package/dist/lib/dependency-resolution/replace-remote-with-delegates.js.map +1 -1
  14. package/dist/lib/federation-graph/compute-dependencies.js +10 -6
  15. package/dist/lib/federation-graph/compute-dependencies.js.map +1 -1
  16. package/dist/lib/federation-graph/compute-version.js.map +1 -1
  17. package/dist/lib/federation-graph/federation-plugin.d.ts +16 -11
  18. package/dist/lib/federation-graph/federation-plugin.js +26 -19
  19. package/dist/lib/federation-graph/federation-plugin.js.map +1 -1
  20. package/dist/lib/federation-graph/runtime-requirement.js.map +1 -1
  21. package/dist/lib/federation-graph/utils/convert-dependencies.js.map +1 -1
  22. package/dist/lib/federation-graph/utils/convert-to-graph.d.ts +1 -1
  23. package/dist/lib/federation-graph/utils/convert-to-graph.js +2 -2
  24. package/dist/lib/federation-graph/utils/convert-to-graph.js.map +1 -1
  25. package/dist/lib/federation-graph/utils/converted-dependencies.js.map +1 -1
  26. package/dist/lib/federation-graph/utils/get-licenses.js +3 -1
  27. package/dist/lib/federation-graph/utils/get-licenses.js.map +1 -1
  28. package/dist/lib/federation-graph/utils/module-part-one.d.ts +11 -9
  29. package/dist/lib/federation-graph/utils/module-part-one.js +15 -10
  30. package/dist/lib/federation-graph/utils/module-part-one.js.map +1 -1
  31. package/dist/lib/federation-graph/utils/module-part-two.d.ts +6 -4
  32. package/dist/lib/federation-graph/utils/module-part-two.js +26 -10
  33. package/dist/lib/federation-graph/utils/module-part-two.js.map +1 -1
  34. package/dist/lib/federation-graph/utils/process-function-remotes.d.ts +5 -3
  35. package/dist/lib/federation-graph/utils/process-function-remotes.js.map +1 -1
  36. package/dist/lib/{ze-agent/index.d.ts → repack_zephyr_agent.d.ts} +4 -3
  37. package/dist/lib/repack_zephyr_agent.js +58 -0
  38. package/dist/lib/repack_zephyr_agent.js.map +1 -0
  39. package/dist/lib/set-up-build-id.d.ts +2 -2
  40. package/dist/lib/set-up-build-id.js +11 -18
  41. package/dist/lib/set-up-build-id.js.map +1 -1
  42. package/dist/lib/set-up-build-stats-logging.d.ts +2 -2
  43. package/dist/lib/set-up-build-stats-logging.js +6 -8
  44. package/dist/lib/set-up-build-stats-logging.js.map +1 -1
  45. package/dist/lib/set-up-deploy.d.ts +2 -2
  46. package/dist/lib/set-up-deploy.js +6 -6
  47. package/dist/lib/set-up-deploy.js.map +1 -1
  48. package/dist/lib/utils/federation-plugin-get-package-json.js.map +1 -1
  49. package/dist/lib/utils/get-mf-config.d.ts +5 -2
  50. package/dist/lib/utils/get-mf-config.js +11 -11
  51. package/dist/lib/utils/get-mf-config.js.map +1 -1
  52. package/dist/lib/utils/get-platform.js +3 -1
  53. package/dist/lib/utils/get-platform.js.map +1 -1
  54. package/dist/lib/utils/plugin-search.d.ts +7 -1
  55. package/dist/lib/utils/plugin-search.js +4 -2
  56. package/dist/lib/utils/plugin-search.js.map +1 -1
  57. package/dist/lib/with-zephyr.js +22 -22
  58. package/dist/lib/with-zephyr.js.map +1 -1
  59. package/dist/lib/ze-repack-plugin.d.ts +6 -2
  60. package/dist/lib/ze-repack-plugin.js +2 -13
  61. package/dist/lib/ze-repack-plugin.js.map +1 -1
  62. package/dist/package.json +3 -2
  63. package/dist/type/convert-graph-params.d.ts +20 -5
  64. package/dist/type/federation-plugin-options.d.ts +2 -2
  65. package/dist/type/zephyr-internal-types.d.ts +3 -2
  66. package/package.json +4 -3
  67. package/dist/README.md +0 -3
  68. package/dist/lib/federation-graph/compute-shared-module.d.ts +0 -1
  69. package/dist/lib/federation-graph/compute-shared-module.js +0 -3
  70. package/dist/lib/federation-graph/compute-shared-module.js.map +0 -1
  71. package/dist/lib/ze-agent/index.js +0 -55
  72. package/dist/lib/ze-agent/index.js.map +0 -1
  73. package/dist/lib/ze-agent/lifecycle-events.d.ts +0 -2
  74. package/dist/lib/ze-agent/lifecycle-events.js +0 -20
  75. package/dist/lib/ze-agent/lifecycle-events.js.map +0 -1
@@ -1,8 +1,8 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.replace_remote_with_delegate = void 0;
4
- const zephyr_edge_contract_1 = require("zephyr-edge-contract");
5
4
  const delegate_module_template_1 = require("./delegate-module-template");
5
+ const zephyr_agent_1 = require("zephyr-agent");
6
6
  function replace_remote_with_delegate(deps) {
7
7
  // prepare delegate function string template
8
8
  const fnReplace = delegate_module_template_1.delegate_module_template.toString();
@@ -11,7 +11,7 @@ function replace_remote_with_delegate(deps) {
11
11
  const strEnd = new RegExp(/;[^)}]+}$/);
12
12
  const promiseNewPromise = fnReplace.replace(strStart, strNewStart).replace(strEnd, '');
13
13
  const { application_uid, remote_entry_url, default_url, remote_name, library_type } = deps;
14
- (0, zephyr_edge_contract_1.ze_log)('replace_remote_with_delegate: ', {
14
+ (0, zephyr_agent_1.ze_log)('replace_remote_with_delegate: ', {
15
15
  application_uid: application_uid,
16
16
  remote_entry_url: remote_entry_url,
17
17
  remote_name: remote_name,
@@ -1 +1 @@
1
- {"version":3,"file":"replace-remote-with-delegate.js","sourceRoot":"","sources":["../../src/delegate-module/replace-remote-with-delegate.ts"],"names":[],"mappings":";;;AAAA,+DAA8C;AAE9C,yEAAsE;AAEtE,SAAgB,4BAA4B,CAAC,IAAwB;IACnE,4CAA4C;IAC5C,MAAM,SAAS,GAAG,mDAAwB,CAAC,QAAQ,EAAE,CAAC;IACtD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,oCAAoC,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,qBAAqB,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;IACvC,MAAM,iBAAiB,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAEvF,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC;IAE3F,IAAA,6BAAM,EAAC,gCAAgC,EAAE;QACvC,eAAe,EAAE,eAAe;QAChC,gBAAgB,EAAE,gBAAgB;QAClC,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,YAAY;KAC3B,CAAC,CAAC;IAEH,OAAO,iBAAiB;SACrB,OAAO,CAAC,qBAAqB,EAAE,eAAe,CAAC;SAC/C,OAAO,CAAC,sBAAsB,EAAE,gBAAgB,CAAC;SACjD,OAAO,CAAC,iBAAiB,EAAE,WAAW,CAAC;SACvC,OAAO,CAAC,iBAAiB,EAAE,WAAW,CAAC;SACvC,OAAO,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAC/C,CAAC;AAxBD,oEAwBC"}
1
+ {"version":3,"file":"replace-remote-with-delegate.js","sourceRoot":"","sources":["../../src/delegate-module/replace-remote-with-delegate.ts"],"names":[],"mappings":";;;AACA,yEAAsE;AACtE,+CAAsC;AAEtC,SAAgB,4BAA4B,CAAC,IAAwB;IACnE,4CAA4C;IAC5C,MAAM,SAAS,GAAG,mDAAwB,CAAC,QAAQ,EAAE,CAAC;IACtD,MAAM,QAAQ,GAAG,IAAI,MAAM,CAAC,oCAAoC,CAAC,CAAC;IAClE,MAAM,WAAW,GAAG,qBAAqB,CAAC;IAC1C,MAAM,MAAM,GAAG,IAAI,MAAM,CAAC,WAAW,CAAC,CAAC;IACvC,MAAM,iBAAiB,GAAG,SAAS,CAAC,OAAO,CAAC,QAAQ,EAAE,WAAW,CAAC,CAAC,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAEvF,MAAM,EAAE,eAAe,EAAE,gBAAgB,EAAE,WAAW,EAAE,WAAW,EAAE,YAAY,EAAE,GACjF,IAAI,CAAC;IAEP,IAAA,qBAAM,EAAC,gCAAgC,EAAE;QACvC,eAAe,EAAE,eAAe;QAChC,gBAAgB,EAAE,gBAAgB;QAClC,WAAW,EAAE,WAAW;QACxB,WAAW,EAAE,WAAW;QACxB,YAAY,EAAE,YAAY;KAC3B,CAAC,CAAC;IAEH,OAAO,iBAAiB;SACrB,OAAO,CAAC,qBAAqB,EAAE,eAAe,CAAC;SAC/C,OAAO,CAAC,sBAAsB,EAAE,gBAAgB,CAAC;SACjD,OAAO,CAAC,iBAAiB,EAAE,WAAW,CAAC;SACvC,OAAO,CAAC,iBAAiB,EAAE,WAAW,CAAC;SACvC,OAAO,CAAC,kBAAkB,EAAE,YAAY,CAAC,CAAC;AAC/C,CAAC;AAzBD,oEAyBC"}
@@ -1,7 +1,2 @@
1
- import { DelegateConfig, ResolvedDependency } from '../type/zephyr-internal-types';
2
- export declare function resolve_remote_dependency({ application_uid, version, platform, }: {
3
- application_uid: string;
4
- version: string;
5
- platform: DelegateConfig['target'];
6
- }): Promise<ResolvedDependency>;
1
+ import { DelegateConfig } from '../type/zephyr-internal-types';
7
2
  export declare function replace_remote_in_mf_config(mf_config: any, config: DelegateConfig): Promise<void>;
@@ -1,72 +1,17 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.replace_remote_in_mf_config = exports.resolve_remote_dependency = void 0;
3
+ exports.replace_remote_in_mf_config = void 0;
4
4
  const zephyr_edge_contract_1 = require("zephyr-edge-contract");
5
- const zephyr_edge_contract_2 = require("zephyr-edge-contract");
6
- const zephyr_edge_contract_3 = require("zephyr-edge-contract");
7
- async function resolve_remote_dependency({ application_uid, version, platform, }) {
8
- (0, zephyr_edge_contract_3.ze_log)('resolve_remote_dependency.version:', version);
9
- const resolveDependency = new URL(`${zephyr_edge_contract_2.ze_api_gateway.resolve}/${encodeURIComponent(application_uid)}/${encodeURIComponent(version)}`, (0, zephyr_edge_contract_2.ZE_API_ENDPOINT)());
10
- const searchParams = new URLSearchParams();
11
- platform && searchParams.set('build_target', platform);
12
- resolveDependency.search = searchParams.toString();
13
- (0, zephyr_edge_contract_3.ze_log)('trying to resolve dependencies via URL: ', resolveDependency);
14
- const [appName, projectName, orgName] = application_uid.split('.');
15
- try {
16
- const token = await (0, zephyr_edge_contract_2.getToken)();
17
- const res = await fetch(resolveDependency, {
18
- method: 'GET',
19
- headers: {
20
- 'Content-Type': 'application/json',
21
- Authorization: 'Bearer ' + token,
22
- Accept: 'application/json',
23
- },
24
- });
25
- if (!res.ok) {
26
- (0, zephyr_edge_contract_3.ze_log)({ 'error in resolve_remote_dependency': await res.json().catch(() => res.text()) });
27
- throw new zephyr_edge_contract_2.ZephyrError(zephyr_edge_contract_2.ZeErrors.ERR_RESOLVE_REMOTES, {
28
- appUid: application_uid,
29
- appName,
30
- projectName,
31
- orgName,
32
- data: {
33
- url: resolveDependency.toString(),
34
- version,
35
- error: await res.json().catch(() => res.text()),
36
- },
37
- });
38
- }
39
- const response = (await res.json());
40
- if (response.value) {
41
- (0, zephyr_edge_contract_3.ze_log)('Response from resolve dependency: ', response.value);
42
- return response.value;
43
- }
44
- throw new zephyr_edge_contract_2.ZephyrError(zephyr_edge_contract_2.ZeErrors.ERR_RESOLVE_REMOTES, {
45
- appUid: application_uid,
46
- appName,
47
- projectName,
48
- orgName,
49
- data: { version, response },
50
- });
51
- }
52
- catch (cause) {
53
- (0, zephyr_edge_contract_3.ze_log)({ 'error in resolve_remote_dependency': cause });
54
- throw new zephyr_edge_contract_2.ZephyrError(zephyr_edge_contract_2.ZeErrors.ERR_CANNOT_RESOLVE_APP_NAME_WITH_VERSION, {
55
- data: { version },
56
- cause,
57
- });
58
- }
59
- }
60
- exports.resolve_remote_dependency = resolve_remote_dependency;
5
+ const zephyr_agent_1 = require("zephyr-agent");
61
6
  async function replace_remote_in_mf_config(mf_config, config) {
62
7
  // In Repack.plugins.ModuleFederationPlugin, the config is exposed under `config`
63
8
  // !! don't create a shallow copy other than pointing to the reference in javascript
64
9
  const mfConfig = mf_config.config;
65
- (0, zephyr_edge_contract_3.ze_log)('replace_remote_in_mf_config', mfConfig);
66
10
  if (!mfConfig.remotes) {
11
+ (0, zephyr_agent_1.ze_log)('no remotes found in mfConfig, skipping resolving remote dependencies...');
67
12
  return;
68
13
  }
69
- (0, zephyr_edge_contract_3.ze_log)('replace_remote_in_mf_config.mfPlugin', mfConfig);
14
+ (0, zephyr_agent_1.ze_log)('replace_remote_in_mf_config.mfPlugin', mfConfig);
70
15
  // Replace remotes with delegate function
71
16
  await Promise.all(Object.keys(mfConfig.remotes).map(async (key) => {
72
17
  const [app_name, project_name, org_name] = key.split('.', 3);
@@ -74,30 +19,34 @@ async function replace_remote_in_mf_config(mf_config, config) {
74
19
  // Does remote key contain localhost?
75
20
  // step 1:if the remote is a local path, we resolve it
76
21
  if (mfConfig.remotes[key].includes('localhost')) {
77
- const application_uid = (0, zephyr_edge_contract_1.createApplicationUID)({
22
+ const application_uid = (0, zephyr_edge_contract_1.createApplicationUid)({
78
23
  org: org_name ?? config.org,
79
24
  project: project_name ?? config.project,
80
25
  name: app_name,
81
26
  });
82
- const [ok, error, resolvedDependency] = await zephyr_edge_contract_1.ZeUtils.PromiseTuple(resolve_remote_dependency({
27
+ const [error, resolvedDependency] = await zephyr_edge_contract_1.ZeUtils.PromiseTuple((0, zephyr_agent_1.resolve_remote_dependency)({
83
28
  application_uid: application_uid,
84
29
  version: mfConfig.remotes[key],
85
30
  platform: config.target,
86
31
  }));
87
32
  // If couldn't resolve remote dependency, skip replacing it
88
- if (!ok || error) {
33
+ if (error || !resolvedDependency) {
34
+ (0, zephyr_agent_1.ze_log)('error resolving remote dependency:', error);
89
35
  return;
90
36
  }
91
37
  resolvedDependency.library_type = mfConfig?.library?.type ?? 'self';
92
38
  const [v_app] = mfConfig.remotes[key]?.split('@') ?? [];
93
39
  if (v_app) {
94
- resolvedDependency.remote_entry_url = [v_app, resolvedDependency.remote_entry_url].join('@');
95
- (0, zephyr_edge_contract_3.ze_log)({ ' resolvedDependency.remote_entry_url ': resolvedDependency.remote_entry_url });
40
+ resolvedDependency.remote_entry_url = [
41
+ v_app,
42
+ resolvedDependency.remote_entry_url,
43
+ ].join('@');
44
+ (0, zephyr_agent_1.ze_log)({
45
+ ' resolvedDependency.remote_entry_url ': resolvedDependency.remote_entry_url,
46
+ });
96
47
  }
97
- resolvedDependency.remote_name = key;
98
- // mfConfig.remotes[key] = await replace_remote_with_delegate(resolvedDependency);
99
48
  mfConfig.remotes[key] = resolvedDependency.remote_entry_url;
100
- (0, zephyr_edge_contract_3.ze_log)('mfConfig: ', mfConfig, 'key: ', resolvedDependency);
49
+ (0, zephyr_agent_1.ze_log)('mfConfig: ', mfConfig, 'key: ', resolvedDependency);
101
50
  }
102
51
  // step 2: If the remote is not a local path (user wants a custom, environment-specific remote), we can skip replacing it
103
52
  return;
@@ -106,14 +55,14 @@ async function replace_remote_in_mf_config(mf_config, config) {
106
55
  exports.replace_remote_in_mf_config = replace_remote_in_mf_config;
107
56
  function replace_remote_with_delegate(deps) {
108
57
  // prepare delegate function string template
109
- (0, zephyr_edge_contract_3.ze_log)('start replacing remote with delegate...', deps);
58
+ (0, zephyr_agent_1.ze_log)('start replacing remote with delegate...', deps);
110
59
  const fnReplace = delegate_module_template.toString();
111
60
  const strStart = new RegExp(/^function[\W\S]+return new Promise/);
112
61
  const strNewStart = `promise new Promise`;
113
62
  const strEnd = new RegExp(/;[^)}]+}$/);
114
63
  const promiseNewPromise = fnReplace.replace(strStart, strNewStart).replace(strEnd, '');
115
64
  const { application_uid, remote_entry_url, default_url, remote_name, library_type } = deps;
116
- (0, zephyr_edge_contract_3.ze_log)('replace_remote_with_delegate: ', {
65
+ (0, zephyr_agent_1.ze_log)('replace_remote_with_delegate: ', {
117
66
  application_uid: application_uid,
118
67
  remote_entry_url: remote_entry_url,
119
68
  remote_name: remote_name,
@@ -152,7 +101,10 @@ function delegate_module_template() {
152
101
  if (typeof remoteUrl !== 'string')
153
102
  return;
154
103
  let _win = {};
155
- _win = globalThis !== undefined ? globalThis : global;
104
+ _win =
105
+ globalThis !== undefined
106
+ ? globalThis
107
+ : global;
156
108
  const ScriptManager = __webpack_require__.repack.shared.scriptManager;
157
109
  ScriptManager.addResolver(
158
110
  // @ts-expect-error TODO fix await
@@ -1 +1 @@
1
- {"version":3,"file":"zephyr-delegate.js","sourceRoot":"","sources":["../../src/delegate-module/zephyr-delegate.ts"],"names":[],"mappings":";;;AAAA,+DAAqE;AAGrE,+DAAwG;AACxG,+DAA8C;AAEvC,KAAK,UAAU,yBAAyB,CAAC,EAC9C,eAAe,EACf,OAAO,EACP,QAAQ,GAKT;IACC,IAAA,6BAAM,EAAC,oCAAoC,EAAE,OAAO,CAAC,CAAC;IACtD,MAAM,iBAAiB,GAAG,IAAI,GAAG,CAC/B,GAAG,qCAAc,CAAC,OAAO,IAAI,kBAAkB,CAAC,eAAe,CAAC,IAAI,kBAAkB,CAAC,OAAO,CAAC,EAAE,EACjG,IAAA,sCAAe,GAAE,CAClB,CAAC;IACF,MAAM,YAAY,GAAG,IAAI,eAAe,EAAE,CAAC;IAC3C,QAAQ,IAAI,YAAY,CAAC,GAAG,CAAC,cAAc,EAAE,QAAQ,CAAC,CAAC;IACvD,iBAAiB,CAAC,MAAM,GAAG,YAAY,CAAC,QAAQ,EAAE,CAAC;IACnD,IAAA,6BAAM,EAAC,0CAA0C,EAAE,iBAAiB,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C,WAAW,CAAC,KAAK,WAAW,EAAE,CAAC;gBAC7C,OAAO,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;YACpC,CAAC;YAED,IACE,OAAO,mBAAmB,KAAK,WAAW;gBAC1C,OAAO,mBAAmB,CAAC,CAAC,KAAK,UAAU;gBAC3C,2EAA2E;gBAC3E,YAAY,KAAK,MAAM,EACvB,CAAC;gBACD,wBAAwB;gBACxB,mBAAmB,CAAC,CAAC,CACnB,gBAAgB,EAChB,GAAG,EAAE;oBACH,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;gBAC7B,CAAC,EACD,WAAW;gBACX,cAAc;iBACf,CAAC;gBACF,OAAO;YACT,CAAC;YAED,OAAO,IAAI,QAAQ,CAAC,kBAAkB,SAAS,IAAI,CAAC,EAAE;iBACnD,IAAI,CAAC,CAAC,GAAY,EAAE,EAAE;gBACrB,IAAI,OAAO,IAAI,CAAC,WAAW,CAAC,KAAK,WAAW,EAAE,CAAC;oBAC7C,OAAO,OAAO,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC,CAAC;gBACpC,CAAC;gBACD,OAAO,OAAO,CAAC,GAAG,CAAC,CAAC;YACtB,CAAC,CAAC;iBACD,KAAK,CAAC,CAAC,GAAY,EAAE,EAAE;gBACtB,MAAM,CAAC,GAAG,CAAC,CAAC;YACd,CAAC,CAAC,CAAC;QACP,CAAC,CAAC;aACD,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE;YACb,OAAO,CAAC,KAAK,CAAC,sCAAsC,gBAAgB,EAAE,EAAE,GAAG,CAAC,CAAC;QAC/E,CAAC,CAAC,CAAC;IACP,CAAC,CAAC,CAAC;AACL,CAAC"}
package/dist/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './lib/with-zephyr';
1
+ export { withZephyr } from './lib/with-zephyr';
package/dist/index.js CHANGED
@@ -1,5 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./lib/with-zephyr"), exports);
3
+ exports.withZephyr = void 0;
4
+ var with_zephyr_1 = require("./lib/with-zephyr");
5
+ Object.defineProperty(exports, "withZephyr", { enumerable: true, get: function () { return with_zephyr_1.withZephyr; } });
5
6
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,4DAAkC"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";;;AAAA,iDAA+C;AAAtC,yGAAA,UAAU,OAAA"}
@@ -1,6 +1,3 @@
1
1
  import type { ZephyrAgentProps } from '../../type/zephyr-internal-types';
2
2
  import { ZephyrBuildStats } from 'zephyr-edge-contract';
3
- export declare function getBuildStats({ stats, stats_json, pluginOptions, EDGE_URL, PLATFORM, }: ZephyrAgentProps & {
4
- EDGE_URL: string;
5
- PLATFORM?: string;
6
- }): ZephyrBuildStats;
3
+ export declare function getBuildStats({ stats, stats_json, pluginOptions, }: ZephyrAgentProps): Promise<ZephyrBuildStats>;
@@ -5,8 +5,9 @@ const tslib_1 = require("tslib");
5
5
  const isCI = tslib_1.__importStar(require("is-ci"));
6
6
  const zephyr_edge_contract_1 = require("zephyr-edge-contract");
7
7
  const federation_plugin_1 = require("../federation-graph/federation-plugin");
8
- function getBuildStats({ stats, stats_json, pluginOptions, EDGE_URL, PLATFORM, }) {
9
- (0, zephyr_edge_contract_1.ze_log)('Started getting build stats...');
8
+ const zephyr_agent_1 = require("zephyr-agent");
9
+ async function getBuildStats({ stats, stats_json, pluginOptions, }) {
10
+ (0, zephyr_agent_1.ze_log)('Started getting build stats...');
10
11
  const dashboardPlugin = new federation_plugin_1.FederationDashboardPlugin({
11
12
  app: pluginOptions.app,
12
13
  git: pluginOptions.git,
@@ -15,26 +16,31 @@ function getBuildStats({ stats, stats_json, pluginOptions, EDGE_URL, PLATFORM, }
15
16
  },
16
17
  target: pluginOptions.target,
17
18
  });
18
- (0, zephyr_edge_contract_1.ze_log)('process webpack graph...');
19
+ (0, zephyr_agent_1.ze_log)('process webpack graph...');
19
20
  const convertedGraph = dashboardPlugin.processRspackGraph({
20
21
  stats,
21
22
  stats_json,
22
23
  pluginOptions,
23
24
  });
24
25
  if (!convertedGraph) {
25
- throw new zephyr_edge_contract_1.ZephyrError(zephyr_edge_contract_1.ZeErrors.ERR_CONVERT_GRAPH_TO_DASHBOARD);
26
+ throw new zephyr_agent_1.ZephyrError(zephyr_agent_1.ZeErrors.ERR_CONVERT_GRAPH_TO_DASHBOARD);
26
27
  }
27
- const version = (0, zephyr_edge_contract_1.createSnapshotId)(pluginOptions);
28
+ const build_id = await pluginOptions.zephyr_engine.build_id;
29
+ const app_config = await pluginOptions.zephyr_engine.application_configuration;
30
+ const version = (0, zephyr_edge_contract_1.flatCreateSnapshotId)({
31
+ org: pluginOptions.app.org,
32
+ project: pluginOptions.app.project,
33
+ name: pluginOptions.app.name,
34
+ username: app_config.username,
35
+ buildId: build_id,
36
+ });
28
37
  const remote_name = pluginOptions.mfConfig?.filename ?? 'mf-manifest.json';
29
38
  const { app, git } = pluginOptions;
30
39
  const data_overrides = {
31
40
  id: pluginOptions.application_uid,
32
41
  name: pluginOptions.mfConfig?.name,
33
- edge: { url: EDGE_URL },
34
- // domain: DOMAIN,
35
- platform: PLATFORM,
36
- // type: TYPE,
37
- app: Object.assign({}, app, { buildId: pluginOptions.zeConfig.buildId }),
42
+ edge: { url: app_config.EDGE_URL },
43
+ app: Object.assign({}, app, { buildId: build_id }),
38
44
  version,
39
45
  git,
40
46
  project: pluginOptions.app.project,
@@ -42,13 +48,14 @@ function getBuildStats({ stats, stats_json, pluginOptions, EDGE_URL, PLATFORM, }
42
48
  remote: remote_name,
43
49
  remotes: Object.keys(pluginOptions.mfConfig?.remotes || {}),
44
50
  context: {
45
- isCI: pluginOptions.isCI,
51
+ isCI: pluginOptions.zephyr_engine.env.isCI,
46
52
  },
47
53
  build_target: pluginOptions.target,
48
54
  };
49
55
  // todo: extend data
56
+ // @ts-expect-error incompatible types
50
57
  const res = Object.assign({}, convertedGraph, data_overrides);
51
- (0, zephyr_edge_contract_1.ze_log)('get build stats done.', res);
58
+ (0, zephyr_agent_1.ze_log)('get build stats done.', res);
52
59
  return res;
53
60
  }
54
61
  exports.getBuildStats = getBuildStats;
@@ -1 +1 @@
1
- {"version":3,"file":"get-build-stats.js","sourceRoot":"","sources":["../../../src/lib/build-stats/get-build-stats.ts"],"names":[],"mappings":";;;;AAAA,oDAA8B;AAC9B,+DAA4G;AAE5G,6EAAkF;AAGlF,SAAgB,aAAa,CAAC,EAC5B,KAAK,EACL,UAAU,EACV,aAAa,EACb,QAAQ,EACR,QAAQ,GAKT;IACC,IAAA,6BAAM,EAAC,gCAAgC,CAAC,CAAC;IAEzC,MAAM,eAAe,GAAG,IAAI,6CAAyB,CAAC;QACpD,GAAG,EAAE,aAAa,CAAC,GAAG;QACtB,GAAG,EAAE,aAAa,CAAC,GAAG;QACtB,OAAO,EAAE;YACP,IAAI;SACL;QACD,MAAM,EAAE,aAAa,CAAC,MAAM;KAC7B,CAAC,CAAC;IAEH,IAAA,6BAAM,EAAC,0BAA0B,CAAC,CAAC;IACnC,MAAM,cAAc,GAAG,eAAe,CAAC,kBAAkB,CAAC;QACxD,KAAK;QACL,UAAU;QACV,aAAa;KACd,CAAC,CAAC;IAEH,IAAI,CAAC,cAAc,EAAE,CAAC;QACpB,MAAM,IAAI,kCAAW,CAAC,+BAAQ,CAAC,8BAA8B,CAAC,CAAC;IACjE,CAAC;IAED,MAAM,OAAO,GAAG,IAAA,uCAAgB,EAAC,aAAa,CAAC,CAAC;IAEhD,MAAM,WAAW,GAAG,aAAa,CAAC,QAAQ,EAAE,QAAQ,IAAI,kBAAkB,CAAC;IAE3E,MAAM,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,aAAa,CAAC;IACnC,MAAM,cAA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AG,CAAC,OAAO;QAClC,IAAI,EAAE,EAAE;QACR,MAAM,EAAE,WAAW;QACnB,OAAO,EAAE,MAAM,CAAC,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,OAAO,IAAI,EAAE,CAAC;QAC3D,OAAO,EAAE;YACP,IAAI,EAAE,aAAa,CAAC,aAAa,CAAC,GAAG,CAAC,IAAI;SAC3C;QACD,YAAY,EAAE,aAAa,CAAC,MAAM;KACnC,CAAC;IAEF,oBAAoB;IACpB,sCAAsC;IACtC,MAAM,GAAG,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,EAAE,cAAc,EAAE,cAAc,CAAqB,CAAC;IAClF,IAAA,qBAAM,EAAC,uBAAuB,EAAE,GAAG,CAAC,CAAC;IACrC,OAAO,GAAG,CAAC;AACb,CAAC;AA9DD,sCA8DC"}
@@ -3,24 +3,23 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.replace_remote_with_delegates = void 0;
4
4
  const zephyr_delegate_1 = require("../../delegate-module/zephyr-delegate");
5
5
  const plugin_search_1 = require("../utils/plugin-search");
6
- const zephyr_edge_contract_1 = require("zephyr-edge-contract");
6
+ const zephyr_agent_1 = require("zephyr-agent");
7
7
  async function replace_remote_with_delegates(_config, { org, project, target }) {
8
- (0, zephyr_edge_contract_1.ze_log)('start replacing remote with delegate...');
9
- (0, zephyr_edge_contract_1.ze_log)('config plugins:', _config.plugins?.length);
8
+ (0, zephyr_agent_1.ze_log)('start replacing remote with delegate...');
9
+ (0, zephyr_agent_1.ze_log)('config plugins:', _config.plugins?.length);
10
10
  // Set public path to auto to resolve the remote dependency prevent Repack from using their own public path, need to set this as soon as possible
11
11
  // Reference: https://github.com/callstack/repack/blob/3b1f6021c199559989502f9ade978f2690e958ff/packages/repack/src/utils/getPublicPath.ts#L38
12
12
  // TODO: this should only be done in a remote, not in the host
13
13
  //_config.output!.publicPath = 'auto'
14
14
  const mf_plugins = _config.plugins?.filter(plugin_search_1.is_module_federation_plugin) || [];
15
- (0, zephyr_edge_contract_1.ze_log)('found module federation plugins:', mf_plugins.length);
15
+ (0, zephyr_agent_1.ze_log)('found module federation plugins:', mf_plugins.length);
16
16
  const dependency_resolution_tasks = mf_plugins.map((mfConfig) => {
17
- (0, zephyr_edge_contract_1.ze_log)('processing module federation config:', mfConfig);
18
- (0, zephyr_edge_contract_1.ze_log)('does mfConfig._options exist?', mfConfig?.config);
17
+ (0, zephyr_agent_1.ze_log)('does mfConfig._options exist?', mfConfig?.config);
19
18
  return (0, zephyr_delegate_1.replace_remote_in_mf_config)(mfConfig, { org, project, target });
20
19
  });
21
20
  if (dependency_resolution_tasks) {
22
21
  const dependency_resolution_result = await Promise.all(dependency_resolution_tasks);
23
- (0, zephyr_edge_contract_1.ze_log)('dependency resolution completed successfully:', dependency_resolution_result);
22
+ (0, zephyr_agent_1.ze_log)('dependency resolution completed successfully:', dependency_resolution_result);
24
23
  }
25
24
  }
26
25
  exports.replace_remote_with_delegates = replace_remote_with_delegates;
@@ -1 +1 @@
1
- {"version":3,"file":"replace-remote-with-delegates.js","sourceRoot":"","sources":["../../../src/lib/dependency-resolution/replace-remote-with-delegates.ts"],"names":[],"mappings":";;;AACA,2EAAoF;AACpF,0DAAqE;AAErE,+DAA8C;AAEvC,KAAK,UAAU,6BAA6B,CAAC,OAAsB,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAkB;IAClH,IAAA,6BAAM,EAAC,yCAAyC,CAAC,CAAC;IAClD,IAAA,6BAAM,EAAC,iBAAiB,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAEnD,iJAAiJ;IACjJ,8IAA8I;IAC9I,8DAA8D;IAC9D,qCAAqC;IAErC,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,2CAA2B,CAAC,IAAI,EAAE,CAAC;IAC9E,IAAA,6BAAM,EAAC,kCAAkC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAE9D,MAAM,2BAA2B,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE;QACnE,IAAA,6BAAM,EAAC,sCAAsC,EAAE,QAAQ,CAAC,CAAC;QAEzD,IAAA,6BAAM,EAAC,+BAA+B,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC1D,OAAO,IAAA,6CAA2B,EAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;IAEH,IAAI,2BAA2B,EAAE,CAAC;QAChC,MAAM,4BAA4B,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QACpF,IAAA,6BAAM,EAAC,+CAA+C,EAAE,4BAA4B,CAAC,CAAC;IACxF,CAAC;AACH,CAAC;AAvBD,sEAuBC"}
1
+ {"version":3,"file":"replace-remote-with-delegates.js","sourceRoot":"","sources":["../../../src/lib/dependency-resolution/replace-remote-with-delegates.ts"],"names":[],"mappings":";;;AACA,2EAAoF;AACpF,0DAAqE;AAErE,+CAAsC;AAE/B,KAAK,UAAU,6BAA6B,CACjD,OAAsB,EACtB,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAkB;IAExC,IAAA,qBAAM,EAAC,yCAAyC,CAAC,CAAC;IAClD,IAAA,qBAAM,EAAC,iBAAiB,EAAE,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,CAAC;IAEnD,iJAAiJ;IACjJ,8IAA8I;IAC9I,8DAA8D;IAC9D,qCAAqC;IAErC,MAAM,UAAU,GAAG,OAAO,CAAC,OAAO,EAAE,MAAM,CAAC,2CAA2B,CAAC,IAAI,EAAE,CAAC;IAC9E,IAAA,qBAAM,EAAC,kCAAkC,EAAE,UAAU,CAAC,MAAM,CAAC,CAAC;IAE9D,MAAM,2BAA2B,GAAG,UAAU,CAAC,GAAG,CAAC,CAAC,QAAa,EAAE,EAAE;QACnE,IAAA,qBAAM,EAAC,+BAA+B,EAAE,QAAQ,EAAE,MAAM,CAAC,CAAC;QAC1D,OAAO,IAAA,6CAA2B,EAAC,QAAQ,EAAE,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,CAAC,CAAC;IACzE,CAAC,CAAC,CAAC;IAEH,IAAI,2BAA2B,EAAE,CAAC;QAChC,MAAM,4BAA4B,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC,2BAA2B,CAAC,CAAC;QACpF,IAAA,qBAAM,EAAC,+CAA+C,EAAE,4BAA4B,CAAC,CAAC;IACxF,CAAC;AACH,CAAC;AAxBD,sEAwBC"}
@@ -4,7 +4,7 @@ const tslib_1 = require("tslib");
4
4
  const find_package_json_1 = tslib_1.__importDefault(require("find-package-json"));
5
5
  const path = tslib_1.__importStar(require("path"));
6
6
  const fs = tslib_1.__importStar(require("fs"));
7
- const zephyr_edge_contract_1 = require("zephyr-edge-contract");
7
+ const zephyr_agent_1 = require("zephyr-agent");
8
8
  const ComputeSharedDependenciesFederation = ({ exclude, ignoreVersion, packageJson, ignorePatchVersion = true, shareFrom = ['dependencies'], }) => {
9
9
  if (!packageJson) {
10
10
  throw new Error('ComputeDependencyFederation: You must pass the package.json file of your app');
@@ -31,7 +31,7 @@ const ComputeSharedDependenciesFederation = ({ exclude, ignoreVersion, packageJs
31
31
  packageVersion = require(packageJsonPath).version.split('.');
32
32
  }
33
33
  catch (e) {
34
- throw new zephyr_edge_contract_1.ZephyrError(zephyr_edge_contract_1.ZeErrors.ERR_SHARED_PACKAGE, {
34
+ throw new zephyr_agent_1.ZephyrError(zephyr_agent_1.ZeErrors.ERR_SHARED_PACKAGE, {
35
35
  cause: "We couldn't find Federation shared package's version - are you sure this is a valid package installed from npm registry?",
36
36
  });
37
37
  }
@@ -41,7 +41,7 @@ const ComputeSharedDependenciesFederation = ({ exclude, ignoreVersion, packageJs
41
41
  const jsonValue = f.next().value;
42
42
  const filePath = f.next().filename;
43
43
  if (!filePath || typeof filePath !== 'string') {
44
- (0, zephyr_edge_contract_1.ze_log)("Package.json path not found - we couldn't find package.");
44
+ (0, zephyr_agent_1.ze_log)("Package.json path not found - we couldn't find package.");
45
45
  }
46
46
  // eslint-disable-next-line @typescript-eslint/no-var-requires
47
47
  packageVersion = require(filePath).version.split('.');
@@ -49,8 +49,12 @@ const ComputeSharedDependenciesFederation = ({ exclude, ignoreVersion, packageJs
49
49
  if (ignorePatchVersion && packageVersion) {
50
50
  packageVersion.pop();
51
51
  }
52
- const versionedPkgName = packageVersion ? `${pkg}-${packageVersion.join('.')}` : pkg;
53
- if (ignoreVersion && Array.isArray(ignoreVersion) && ignoreVersion.includes(pkg)) {
52
+ const versionedPkgName = packageVersion
53
+ ? `${pkg}-${packageVersion.join('.')}`
54
+ : pkg;
55
+ if (ignoreVersion &&
56
+ Array.isArray(ignoreVersion) &&
57
+ ignoreVersion.includes(pkg)) {
54
58
  shared[pkg] = pkg;
55
59
  }
56
60
  else {
@@ -59,7 +63,7 @@ const ComputeSharedDependenciesFederation = ({ exclude, ignoreVersion, packageJs
59
63
  }
60
64
  catch (e) {
61
65
  // Skip package if there's an error
62
- (0, zephyr_edge_contract_1.ze_log)(`Error during finding Federation required shared package: `, e, 'Skipping package to next...');
66
+ (0, zephyr_agent_1.ze_log)(`Error during finding Federation required shared package: `, e, 'Skipping package to next...');
63
67
  return shared;
64
68
  }
65
69
  return shared;
@@ -1 +1 @@
1
- {"version":3,"file":"compute-dependencies.js","sourceRoot":"","sources":["../../../src/lib/federation-graph/compute-dependencies.ts"],"names":[],"mappings":";;;AAAA,kFAAqC;AACrC,mDAA6B;AAC7B,+CAAyB;AACzB,+DAAqE;AAarE,MAAM,mCAAmC,GAAG,CAAC,EAC3C,OAAO,EACP,aAAa,EACb,WAAW,EACX,kBAAkB,GAAG,IAAI,EACzB,SAAS,GAAG,CAAC,cAAc,CAAC,GACS,EAA0B,EAAE;IACjE,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,8EAA8E,CAAC,CAAC;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C,EACD,EAA4B,CAC7B,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,mCAAmC,CAAC"}
1
+ {"version":3,"file":"compute-dependencies.js","sourceRoot":"","sources":["../../../src/lib/federation-graph/compute-dependencies.ts"],"names":[],"mappings":";;;AAAA,kFAAqC;AACrC,mDAA6B;AAC7B,+CAAyB;AAEzB,+CAA6D;AAY7D,MAAM,mCAAmC,GAAG,CAAC,EAC3C,OAAO,EACP,aAAa,EACb,WAAW,EACX,kBAAkB,GAAG,IAAI,EACzB,SAAS,GAAG,CAAC,cAAc,CAAC,GACS,EAA0B,EAAE;IACjE,IAAI,CAAC,WAAW,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CACb,8EAA8E,CAC/E,CAAC;IACJ,CAAC;IAED,IAAI,CAAC,KAAK,CAAC,OAAO,CAAC,SAAS,CAAC,EAAE,CAAC;QAC9B,MAAM,IAAI,KAAK,CAAC,yDAAyD,CAAC,CAAC;IAC7E,CAAC;IAED,wDAAwD;IACxD,MAAM,oBAAoB,GAAG,SAAS,CAAC,MAAM,CAC3C,CAAC,GAAG,EAAE,OAAO,EAAE,EAAE;QACf,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC,CAAC;QACzC,OAAO,GAAG,CAAC;IACb,CAAC,EACD,EAAyB,CAC1B,CAAC;IAEF,8CAA8C;IAC9C,MAAM,qBAAqB,GAAG,MAAM,CAAC,IAAI,CAAC,oBAAoB,CAAC,CAAC,MAAM,CACpE,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,UAAU,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC,CACjE,CAAC;IAEF,OAAO,qBAAqB,CAAC,MAAM,CACjC,CAAC,MAAM,EAAE,GAAG,EAAE,EAAE;QACd,IAAI,cAAoC,CAAC;QAEzC,IAAI,CAAC;YACH,MAAM,WAAW,GAAG,IAAI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AC,GAAG,CAAC;YAER,IACE,aAAa;gBACb,KAAK,CAAC,OAAO,CAAC,aAAa,CAAC;gBAC5B,aAAa,CAAC,QAAQ,CAAC,GAAG,CAAC,EAC3B,CAAC;gBACD,MAAM,CAAC,GAAG,CAAC,GAAG,GAAG,CAAC;YACpB,CAAC;iBAAM,CAAC;gBACN,MAAM,CAAC,gBAAgB,CAAC,GAAG,GAAG,CAAC;YACjC,CAAC;QACH,CAAC;QAAC,OAAO,CAAC,EAAE,CAAC;YACX,mCAAmC;YACnC,IAAA,qBAAM,EACJ,2DAA2D,EAC3D,CAAC,EACD,6BAA6B,CAC9B,CAAC;YACF,OAAO,MAAM,CAAC;QAChB,CAAC;QAED,OAAO,MAAM,CAAC;IAChB,CAAC,EACD,EAA4B,CAC7B,CAAC;AACJ,CAAC,CAAC;AAEF,kBAAe,mCAAmC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"compute-version.js","sourceRoot":"","sources":["../../../src/lib/federation-graph/compute-version.ts"],"names":[],"mappings":";;;AAAA,2DAA8C;AAG9C,IAAI,CAAC;IACH,cAAM,GAAG,IAAA,6BAAQ,EAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;AAC5D,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC;AAEM,MAAM,sBAAsB,GAAG,CAAC,KAAwB,EAAE,GAAuB,EAAsB,EAAE;IAC9G,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,QAAQ;YACX,OAAO,cAAM,CAAC;QAChB,KAAK,WAAW;YACd,OAAO,KAAK,CAAC,IAAI,CAAC;QACpB;YACE,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,cAAM,CAAC;IACzC,CAAC;AACH,CAAC,CAAC;AATW,QAAA,sBAAsB,0BASjC"}
1
+ {"version":3,"file":"compute-version.js","sourceRoot":"","sources":["../../../src/lib/federation-graph/compute-version.ts"],"names":[],"mappings":";;;AAAA,2DAA8C;AAG9C,IAAI,CAAC;IACH,cAAM,GAAG,IAAA,6BAAQ,EAAC,oBAAoB,CAAC,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,CAAC;AAC5D,CAAC;AAAC,OAAO,CAAC,EAAE,CAAC;IACX,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;AACnB,CAAC;AAEM,MAAM,sBAAsB,GAAG,CACpC,KAAwB,EACxB,GAAuB,EACH,EAAE;IACtB,QAAQ,GAAG,EAAE,CAAC;QACZ,KAAK,QAAQ;YACX,OAAO,cAAM,CAAC;QAChB,KAAK,WAAW;YACd,OAAO,KAAK,CAAC,IAAI,CAAC;QACpB;YACE,OAAO,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,cAAM,CAAC;IACzC,CAAC;AACH,CAAC,CAAC;AAZW,QAAA,sBAAsB,0BAYjC"}
@@ -16,16 +16,19 @@ export declare class FederationDashboardPlugin {
16
16
  constructor(options: Partial<FederationDashboardPluginOptions>);
17
17
  /** @param {Compiler} compiler */
18
18
  apply(compiler: Compiler): void;
19
- processRspackGraph({ stats, stats_json, pluginOptions }: ProcessRspackGraphParams): ConvertedGraph | undefined;
19
+ processRspackGraph({ stats, stats_json, pluginOptions, }: ProcessRspackGraphParams): ConvertedGraph | undefined;
20
20
  getRemoteEntryChunk(stats: StatsCompilation, FederationPluginOptions: typeof this.FederationPluginOptions): StatsChunk | undefined;
21
21
  /**
22
22
  * Return { "main": [{...dep1Details}, {...dep2Details}], "vendor": [{...dep3Details}],
23
23
  *
24
- * 1. Useful for dynamic imports - object generated could inform the bundler or runtime loader about which chunks are needed for specific
25
- * part of the app, enabling better performance optimization 1.1 if a chunk representing a React component dynamically loads, this
26
- * dependency graph can help the runtime understand what other chunks need to be loaded alongside it.
27
- * 2. Optimized loading and caching: By mapping chunk dependencies, this function supports advanced optimizations like caching. Chunks that
28
- * haven’t changed between builds can be cached separately, reducing the need for users to download unchanged code.
24
+ * 1. Useful for dynamic imports - object generated could inform the bundler or runtime
25
+ * loader about which chunks are needed for specific part of the app, enabling better
26
+ * performance optimization 1.1 if a chunk representing a React component dynamically
27
+ * loads, this dependency graph can help the runtime understand what other chunks
28
+ * need to be loaded alongside it.
29
+ * 2. Optimized loading and caching: By mapping chunk dependencies, this function supports
30
+ * advanced optimizations like caching. Chunks that haven’t changed between builds
31
+ * can be cached separately, reducing the need for users to download unchanged code.
29
32
  *
30
33
  * }
31
34
  */
@@ -33,14 +36,16 @@ export declare class FederationDashboardPlugin {
33
36
  buildVendorFederationMap(liveStats: Stats): TopLevelPackage;
34
37
  mapToObjectRec(m: Record<string, Chunk[keyof Chunk]> | Map<string, Chunk[keyof Chunk]> | Chunk[keyof Chunk][]): Record<string, unknown>;
35
38
  /**
36
- * In a remote application, this function is used to find all the chunks that are referenced by the remote entry chunk It won't return
37
- * anything from HostApp
39
+ * In a remote application, this function is used to find all the chunks that are
40
+ * referenced by the remote entry chunk It won't return anything from HostApp
38
41
  */
39
42
  buildValidChunkArray(liveStats: Stats, FederationPluginOptions: typeof this.FederationPluginOptions): Chunk[];
40
43
  /**
41
- * We are doing this because the filename in React Native is the actual JS bundle, "How we understand the filename is different in react
42
- * native" - filename would be at the end of the URL modified in get_mf_config.ts If we don't attach the remote bundle name to metadata,
43
- * we will have no track record of the actual bundle when we need it later -- this is RePack specific.
44
+ * We are doing this because the filename in React Native is the actual JS bundle, "How
45
+ * we understand the filename is different in react native" - filename would be at the
46
+ * end of the URL modified in get_mf_config.ts If we don't attach the remote bundle name
47
+ * to metadata, we will have no track record of the actual bundle when we need it later
48
+ * -- this is RePack specific.
44
49
  */
45
50
  attach_remote_bundle_name_to_metadata(): Record<string, string> | undefined;
46
51
  postDashboardData(dashData: any): Promise<{
@@ -3,14 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.FederationDashboardPlugin = void 0;
4
4
  const tslib_1 = require("tslib");
5
5
  const path_1 = require("path");
6
- const zephyr_edge_contract_1 = require("zephyr-edge-contract");
7
- const zephyr_edge_contract_2 = require("zephyr-edge-contract");
8
6
  const compute_version_1 = require("./compute-version");
9
7
  const runtime_requirement_1 = require("./runtime-requirement");
10
8
  const plugin_search_1 = require("../utils/plugin-search");
11
9
  const federation_plugin_get_package_json_1 = require("../utils/federation-plugin-get-package-json");
12
10
  const compute_dependencies_1 = tslib_1.__importDefault(require("./compute-dependencies"));
13
11
  const convert_to_graph_1 = require("./utils/convert-to-graph");
12
+ const zephyr_agent_1 = require("zephyr-agent");
14
13
  const remote_entry_last_part = 'mf-manifest.json';
15
14
  class FederationDashboardPlugin {
16
15
  constructor(options) {
@@ -38,15 +37,18 @@ class FederationDashboardPlugin {
38
37
  throw new Error('Statistic plugin is missing Module Federation of standalone option');
39
38
  }
40
39
  }
41
- processRspackGraph({ stats, stats_json, pluginOptions }) {
40
+ processRspackGraph({ stats, stats_json, pluginOptions, }) {
42
41
  this.FederationPluginOptions = Object.assign({}, this.FederationPluginOptions, pluginOptions.mfConfig);
43
42
  const RemoteEntryChunk = this.getRemoteEntryChunk(stats_json, this.FederationPluginOptions);
44
43
  const validChunkArray = this.buildValidChunkArray(stats, this.FederationPluginOptions);
45
44
  const chunkDependencies = this.getChunkDependencies(validChunkArray);
46
45
  const vendorFederation = this.buildVendorFederationMap(stats);
47
46
  // TODO: this type casting might not be every compilation result from rspack, but it's fine for now
48
- const getPlatformFromStats = stats.compilation.name;
49
- const remotes = this.FederationPluginOptions?.remotes ? Object.keys(this.FederationPluginOptions.remotes) : [];
47
+ const getPlatformFromStats = stats.compilation
48
+ .name;
49
+ const remotes = this.FederationPluginOptions?.remotes
50
+ ? Object.keys(this.FederationPluginOptions.remotes)
51
+ : [];
50
52
  const rawData = {
51
53
  name: this.FederationPluginOptions?.name,
52
54
  remotes: remotes,
@@ -67,8 +69,8 @@ class FederationDashboardPlugin {
67
69
  };
68
70
  let graphData;
69
71
  try {
70
- graphData = (0, convert_to_graph_1.convertToGraph)(rawData, !!this._options.standalone);
71
- (0, zephyr_edge_contract_1.ze_log)('\n\n', 'graphData', graphData, '\n\n');
72
+ graphData = (0, convert_to_graph_1.convertToGraph)(rawData);
73
+ (0, zephyr_agent_1.ze_log)('\n\n', 'graphData', graphData, '\n\n');
72
74
  }
73
75
  catch (err) {
74
76
  console.warn('Error during dashboard data processing..');
@@ -89,11 +91,14 @@ class FederationDashboardPlugin {
89
91
  /**
90
92
  * Return { "main": [{...dep1Details}, {...dep2Details}], "vendor": [{...dep3Details}],
91
93
  *
92
- * 1. Useful for dynamic imports - object generated could inform the bundler or runtime loader about which chunks are needed for specific
93
- * part of the app, enabling better performance optimization 1.1 if a chunk representing a React component dynamically loads, this
94
- * dependency graph can help the runtime understand what other chunks need to be loaded alongside it.
95
- * 2. Optimized loading and caching: By mapping chunk dependencies, this function supports advanced optimizations like caching. Chunks that
96
- * haven’t changed between builds can be cached separately, reducing the need for users to download unchanged code.
94
+ * 1. Useful for dynamic imports - object generated could inform the bundler or runtime
95
+ * loader about which chunks are needed for specific part of the app, enabling better
96
+ * performance optimization 1.1 if a chunk representing a React component dynamically
97
+ * loads, this dependency graph can help the runtime understand what other chunks
98
+ * need to be loaded alongside it.
99
+ * 2. Optimized loading and caching: By mapping chunk dependencies, this function supports
100
+ * advanced optimizations like caching. Chunks that haven’t changed between builds
101
+ * can be cached separately, reducing the need for users to download unchanged code.
97
102
  *
98
103
  * }
99
104
  */
@@ -127,7 +132,7 @@ class FederationDashboardPlugin {
127
132
  packageJson = require(this._options.packageJsonPath);
128
133
  }
129
134
  catch (e) {
130
- throw new zephyr_edge_contract_2.ZephyrError(zephyr_edge_contract_2.ZeErrors.ERR_PACKAGE_JSON_NOT_FOUND, {
135
+ throw new zephyr_agent_1.ZephyrError(zephyr_agent_1.ZeErrors.ERR_PACKAGE_JSON_NOT_FOUND, {
131
136
  data: {
132
137
  process: `While finding dependencies in package.json.`,
133
138
  cause: e,
@@ -182,8 +187,8 @@ class FederationDashboardPlugin {
182
187
  return lo;
183
188
  }
184
189
  /**
185
- * In a remote application, this function is used to find all the chunks that are referenced by the remote entry chunk It won't return
186
- * anything from HostApp
190
+ * In a remote application, this function is used to find all the chunks that are
191
+ * referenced by the remote entry chunk It won't return anything from HostApp
187
192
  */
188
193
  buildValidChunkArray(liveStats, FederationPluginOptions) {
189
194
  if (!FederationPluginOptions.name)
@@ -201,9 +206,11 @@ class FederationDashboardPlugin {
201
206
  return validChunkArray;
202
207
  }
203
208
  /**
204
- * We are doing this because the filename in React Native is the actual JS bundle, "How we understand the filename is different in react
205
- * native" - filename would be at the end of the URL modified in get_mf_config.ts If we don't attach the remote bundle name to metadata,
206
- * we will have no track record of the actual bundle when we need it later -- this is RePack specific.
209
+ * We are doing this because the filename in React Native is the actual JS bundle, "How
210
+ * we understand the filename is different in react native" - filename would be at the
211
+ * end of the URL modified in get_mf_config.ts If we don't attach the remote bundle name
212
+ * to metadata, we will have no track record of the actual bundle when we need it later
213
+ * -- this is RePack specific.
207
214
  */
208
215
  attach_remote_bundle_name_to_metadata() {
209
216
  if (!this.FederationPluginOptions.exposes) {
@@ -211,7 +218,7 @@ class FederationDashboardPlugin {
211
218
  }
212
219
  // TODO: not sure if this error would break the build. Silently log it for now
213
220
  if (!this.FederationPluginOptions.bundle_name) {
214
- console.warn(zephyr_edge_contract_2.ZeErrors.ERR_MF_CONFIG_MISSING_FILENAME);
221
+ console.warn(zephyr_agent_1.ZeErrors.ERR_MF_CONFIG_MISSING_FILENAME);
215
222
  return;
216
223
  }
217
224
  return { remote_bundle_name: this.FederationPluginOptions.bundle_name };