vite-plugin-zephyr 0.0.0-canary.3 → 0.0.0-canary.31
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.
- package/dist/index.d.ts +1 -0
- package/dist/lib/internal/mf-vite-etl/inject_resolved_remotes.d.ts +13 -0
- package/dist/lib/internal/mf-vite-etl/inject_resolved_remotes.js +41 -0
- package/dist/lib/internal/mf-vite-etl/inject_resolved_remotes.js.map +1 -0
- package/dist/lib/internal/mf-vite-etl/runtime_plugin.mjs +40 -0
- package/dist/lib/vite-plugin-zephyr.d.ts +2 -0
- package/dist/lib/vite-plugin-zephyr.js +80 -104
- package/dist/lib/vite-plugin-zephyr.js.map +1 -1
- package/dist/package.json +11 -9
- package/eslint.config.mjs +3 -0
- package/package.json +12 -10
- package/dist/lib/internal/mf-vite-etl/load_resolved_remotes.d.ts +0 -2
- package/dist/lib/internal/mf-vite-etl/load_resolved_remotes.js +0 -39
- package/dist/lib/internal/mf-vite-etl/load_resolved_remotes.js.map +0 -1
- package/dist/lib/internal/mf-vite-etl/runtime_plugin.d.ts +0 -2
- package/dist/lib/internal/mf-vite-etl/runtime_plugin.js +0 -53
- package/dist/lib/internal/mf-vite-etl/runtime_plugin.js.map +0 -1
- package/dist/lib/internal/mf-vite-etl/runtime_plugins_parser.d.ts +0 -6
- package/dist/lib/internal/mf-vite-etl/runtime_plugins_parser.js +0 -51
- package/dist/lib/internal/mf-vite-etl/runtime_plugins_parser.js.map +0 -1
package/dist/index.d.ts
CHANGED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type { ZeResolvedDependency } from 'zephyr-agent';
|
|
2
|
+
/**
|
|
3
|
+
* Injects resolved remote dependencies into the remoteEntry.js code by replacing the
|
|
4
|
+
* **REMOTE_MAP** placeholder with actual resolved data.
|
|
5
|
+
*
|
|
6
|
+
* This approach is much more robust than AST parsing because:
|
|
7
|
+
*
|
|
8
|
+
* - Works regardless of minification/bundling changes
|
|
9
|
+
* - No dependency on function name patterns
|
|
10
|
+
* - Handles all import aliasing variations
|
|
11
|
+
* - Simple string replacement instead of complex AST manipulation
|
|
12
|
+
*/
|
|
13
|
+
export declare function inject_resolved_remotes_map(resolved_remotes: ZeResolvedDependency[], code: string): string;
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.inject_resolved_remotes_map = inject_resolved_remotes_map;
|
|
4
|
+
const zephyr_agent_1 = require("zephyr-agent");
|
|
5
|
+
// The placeholder used in runtime_plugin.mjs that we'll replace with actual data
|
|
6
|
+
const REMOTE_MAP_TEMPLATE = '"__REMOTE_MAP__"';
|
|
7
|
+
/**
|
|
8
|
+
* Injects resolved remote dependencies into the remoteEntry.js code by replacing the
|
|
9
|
+
* **REMOTE_MAP** placeholder with actual resolved data.
|
|
10
|
+
*
|
|
11
|
+
* This approach is much more robust than AST parsing because:
|
|
12
|
+
*
|
|
13
|
+
* - Works regardless of minification/bundling changes
|
|
14
|
+
* - No dependency on function name patterns
|
|
15
|
+
* - Handles all import aliasing variations
|
|
16
|
+
* - Simple string replacement instead of complex AST manipulation
|
|
17
|
+
*/
|
|
18
|
+
function inject_resolved_remotes_map(resolved_remotes, code) {
|
|
19
|
+
const startTime = Date.now();
|
|
20
|
+
try {
|
|
21
|
+
// Check if placeholder exists in the code
|
|
22
|
+
if (!code.includes(REMOTE_MAP_TEMPLATE)) {
|
|
23
|
+
zephyr_agent_1.ze_log.mf('Placeholder not found in remoteEntry.js - runtime plugin may not be configured');
|
|
24
|
+
return code;
|
|
25
|
+
}
|
|
26
|
+
// Build the remote map from resolved dependencies
|
|
27
|
+
const remoteMap = Object.fromEntries(resolved_remotes.map((remote) => [remote.name, remote]));
|
|
28
|
+
// Replace the placeholder with actual JSON data
|
|
29
|
+
// The placeholder is already quoted as '"__REMOTE_MAP__"' so we replace the whole thing
|
|
30
|
+
const updatedCode = code.replace(REMOTE_MAP_TEMPLATE, JSON.stringify(remoteMap));
|
|
31
|
+
const endTime = Date.now();
|
|
32
|
+
zephyr_agent_1.ze_log.remotes(`inject_resolved_remotes_map took ${endTime - startTime}ms`);
|
|
33
|
+
zephyr_agent_1.ze_log.remotes(`Injected ${resolved_remotes.length} resolved remotes into remoteEntry.js`);
|
|
34
|
+
return updatedCode;
|
|
35
|
+
}
|
|
36
|
+
catch (error) {
|
|
37
|
+
zephyr_agent_1.ze_log.remotes('Error in inject_resolved_remotes_map:', error);
|
|
38
|
+
return code; // Return original code in case of error
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
//# sourceMappingURL=inject_resolved_remotes.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"inject_resolved_remotes.js","sourceRoot":"","sources":["../../../../src/lib/internal/mf-vite-etl/inject_resolved_remotes.ts"],"names":[],"mappings":";;AAiBA,kEAmCC;AAnDD,+CAAsC;AAEtC,iFAAiF;AACjF,MAAM,mBAAmB,GAAG,kBAAkB,CAAC;AAE/C;;;;;;;;;;GAUG;AACH,SAAgB,2BAA2B,CACzC,gBAAwC,EACxC,IAAY;IAEZ,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,0CAA0C;QAC1C,IAAI,CAAC,IAAI,CAAC,QAAQ,CAAC,mBAAmB,CAAC,EAAE,CAAC;YACxC,qBAAM,CAAC,EAAE,CACP,gFAAgF,CACjF,CAAC;YACF,OAAO,IAAI,CAAC;QACd,CAAC;QAED,kDAAkD;QAClD,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAClC,gBAAgB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CACxD,CAAC;QAEF,gDAAgD;QAChD,wFAAwF;QACxF,MAAM,WAAW,GAAG,IAAI,CAAC,OAAO,CAAC,mBAAmB,EAAE,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC,CAAC;QAEjF,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC3B,qBAAM,CAAC,OAAO,CAAC,oCAAoC,OAAO,GAAG,SAAS,IAAI,CAAC,CAAC;QAC5E,qBAAM,CAAC,OAAO,CACZ,YAAY,gBAAgB,CAAC,MAAM,uCAAuC,CAC3E,CAAC;QAEF,OAAO,WAAW,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,qBAAM,CAAC,OAAO,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;QAC/D,OAAO,IAAI,CAAC,CAAC,wCAAwC;IACvD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Zephyr Runtime Plugin for Module Federation This file MUST be in ES Module
|
|
3
|
+
* format (.mjs) for Vite/Rollup compatibility
|
|
4
|
+
*
|
|
5
|
+
* The **REMOTE_MAP** placeholder will be replaced during build time with actual
|
|
6
|
+
* resolved remote dependencies by the inject_resolved_remotes function.
|
|
7
|
+
*
|
|
8
|
+
* IMPORTANT: Module Federation expects runtime plugins to be functions that
|
|
9
|
+
* return the plugin object, not the object itself. That's why we export a
|
|
10
|
+
* function here, not a plain object.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
const REMOTE_MAP_TEMPLATE = '"__REMOTE_MAP__"';
|
|
14
|
+
|
|
15
|
+
export default function () {
|
|
16
|
+
return {
|
|
17
|
+
name: 'zephyr-runtime-remote-resolver',
|
|
18
|
+
beforeInit: (args) => {
|
|
19
|
+
const resolvedRemoteMap = JSON.parse(REMOTE_MAP_TEMPLATE);
|
|
20
|
+
const _windows = typeof window !== 'undefined' ? window : globalThis;
|
|
21
|
+
|
|
22
|
+
args.userOptions.remotes.forEach((remote) => {
|
|
23
|
+
const resolvedRemote = resolvedRemoteMap[remote.name];
|
|
24
|
+
if (!resolvedRemote) {
|
|
25
|
+
return;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const sessionEdgeURL = _windows.sessionStorage.getItem(
|
|
29
|
+
resolvedRemote.application_uid
|
|
30
|
+
);
|
|
31
|
+
|
|
32
|
+
const urlOverwrite = sessionEdgeURL ?? resolvedRemote.remote_entry_url;
|
|
33
|
+
|
|
34
|
+
remote.entry = urlOverwrite;
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
return args;
|
|
38
|
+
},
|
|
39
|
+
};
|
|
40
|
+
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { federation } from '@module-federation/vite';
|
|
2
2
|
import { type Plugin } from 'vite';
|
|
3
|
+
import { type ZephyrBuildHooks } from 'zephyr-agent';
|
|
3
4
|
export type ModuleFederationOptions = Parameters<typeof federation>[0];
|
|
4
5
|
interface VitePluginZephyrOptions {
|
|
5
6
|
mfConfig?: ModuleFederationOptions;
|
|
7
|
+
hooks?: ZephyrBuildHooks;
|
|
6
8
|
}
|
|
7
9
|
export declare function withZephyr(_options?: VitePluginZephyrOptions): Plugin[];
|
|
8
10
|
export {};
|
|
@@ -4,21 +4,29 @@ exports.withZephyr = withZephyr;
|
|
|
4
4
|
const vite_1 = require("@module-federation/vite");
|
|
5
5
|
const vite_2 = require("vite");
|
|
6
6
|
const zephyr_agent_1 = require("zephyr-agent");
|
|
7
|
-
const zephyr_environment_variables_1 = require("zephyr-environment-variables");
|
|
8
7
|
const extract_mf_plugin_1 = require("./internal/extract/extract_mf_plugin");
|
|
9
8
|
const extract_vite_assets_map_1 = require("./internal/extract/extract_vite_assets_map");
|
|
10
9
|
const extract_mf_vite_remotes_1 = require("./internal/mf-vite-etl/extract-mf-vite-remotes");
|
|
11
|
-
const
|
|
10
|
+
const inject_resolved_remotes_1 = require("./internal/mf-vite-etl/inject_resolved_remotes");
|
|
12
11
|
function withZephyr(_options) {
|
|
13
12
|
const mfConfig = _options === null || _options === void 0 ? void 0 : _options.mfConfig;
|
|
13
|
+
const hooks = _options === null || _options === void 0 ? void 0 : _options.hooks;
|
|
14
14
|
const plugins = [];
|
|
15
15
|
if (mfConfig) {
|
|
16
|
+
if (!mfConfig.runtimePlugins) {
|
|
17
|
+
mfConfig.runtimePlugins = [];
|
|
18
|
+
}
|
|
19
|
+
// Add the runtime plugin by resolving the .mjs file
|
|
20
|
+
// The .mjs extension ensures ESM compatibility - Rollup/Vite can import it natively
|
|
21
|
+
// without CommonJS interop issues. The __REMOTE_MAP__ placeholder gets replaced
|
|
22
|
+
// during generateBundle with actual resolved remote data.
|
|
23
|
+
mfConfig.runtimePlugins.push(require.resolve('./internal/mf-vite-etl/runtime_plugin.mjs'));
|
|
16
24
|
plugins.push(...(0, vite_1.federation)(mfConfig));
|
|
17
25
|
}
|
|
18
|
-
plugins.push(zephyrPlugin());
|
|
26
|
+
plugins.push(zephyrPlugin(hooks));
|
|
19
27
|
return plugins;
|
|
20
28
|
}
|
|
21
|
-
function zephyrPlugin() {
|
|
29
|
+
function zephyrPlugin(hooks) {
|
|
22
30
|
const { zephyr_engine_defer, zephyr_defer_create } = zephyr_agent_1.ZephyrEngine.defer_create();
|
|
23
31
|
let resolve_vite_internal_options;
|
|
24
32
|
const vite_internal_options_defer = new Promise((resolve) => {
|
|
@@ -61,61 +69,18 @@ function zephyrPlugin() {
|
|
|
61
69
|
// ignore if loadEnv unavailable
|
|
62
70
|
}
|
|
63
71
|
},
|
|
64
|
-
// config: (config) => {
|
|
65
|
-
// // Configure Vite to handle JSON imports with import assertions
|
|
66
|
-
// config.build = config.build || {};
|
|
67
|
-
// config.build.rollupOptions = config.build.rollupOptions || {};
|
|
68
|
-
// // Ensure JSON files are treated as external when imported with import assertions
|
|
69
|
-
// const existingExternal = config.build.rollupOptions.external;
|
|
70
|
-
// if (typeof existingExternal === 'function') {
|
|
71
|
-
// const originalExternal = existingExternal;
|
|
72
|
-
// config.build.rollupOptions.external = (
|
|
73
|
-
// id: string,
|
|
74
|
-
// importer: string | undefined,
|
|
75
|
-
// isResolved: boolean
|
|
76
|
-
// ) => {
|
|
77
|
-
// if (id.endsWith('.json') && id.includes('zephyr-manifest')) {
|
|
78
|
-
// return true;
|
|
79
|
-
// }
|
|
80
|
-
// return originalExternal(id, importer, isResolved);
|
|
81
|
-
// };
|
|
82
|
-
// } else {
|
|
83
|
-
// // Convert to function to handle JSON files
|
|
84
|
-
// const externals = Array.isArray(existingExternal)
|
|
85
|
-
// ? existingExternal
|
|
86
|
-
// : existingExternal
|
|
87
|
-
// ? [existingExternal]
|
|
88
|
-
// : [];
|
|
89
|
-
// config.build.rollupOptions.external = (
|
|
90
|
-
// id: string,
|
|
91
|
-
// importer: string | undefined,
|
|
92
|
-
// isResolved: boolean
|
|
93
|
-
// ) => {
|
|
94
|
-
// if (id.endsWith('.json') && id.includes('zephyr-manifest')) {
|
|
95
|
-
// return true;
|
|
96
|
-
// }
|
|
97
|
-
// // Check against existing externals
|
|
98
|
-
// return externals.some((external) => {
|
|
99
|
-
// if (typeof external === 'string') return id === external;
|
|
100
|
-
// if (external instanceof RegExp) return external.test(id);
|
|
101
|
-
// return false;
|
|
102
|
-
// });
|
|
103
|
-
// };
|
|
104
|
-
// }
|
|
105
|
-
// return config;
|
|
106
|
-
// },
|
|
107
72
|
resolveId: async (source) => {
|
|
108
73
|
try {
|
|
109
74
|
const zephyr_engine = await zephyr_engine_defer;
|
|
110
75
|
if (!cachedSpecifier) {
|
|
111
|
-
const
|
|
112
|
-
cachedSpecifier = `env:vars:${
|
|
76
|
+
const appUid = zephyr_engine.application_uid;
|
|
77
|
+
cachedSpecifier = `env:vars:${appUid}`;
|
|
113
78
|
}
|
|
114
79
|
if (source === cachedSpecifier) {
|
|
115
80
|
// In dev mode, use a virtual module; in build mode, mark as external
|
|
116
81
|
if (process.env['NODE_ENV'] === 'development') {
|
|
117
|
-
const
|
|
118
|
-
return { id: `\0virtual:zephyr-env-${
|
|
82
|
+
const appUid = zephyr_engine.application_uid;
|
|
83
|
+
return { id: `\0virtual:zephyr-env-${appUid}` };
|
|
119
84
|
}
|
|
120
85
|
else {
|
|
121
86
|
// Mark this as external so it gets resolved by the import map at runtime
|
|
@@ -128,54 +93,47 @@ function zephyrPlugin() {
|
|
|
128
93
|
}
|
|
129
94
|
return null;
|
|
130
95
|
},
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
return
|
|
96
|
+
transform: {
|
|
97
|
+
// Hook filter for Rolldown/Vite 7 performance optimization
|
|
98
|
+
// Only process Module Federation virtual remote entry files
|
|
99
|
+
filter: {
|
|
100
|
+
id: /virtual:mf-REMOTE_ENTRY_ID/,
|
|
101
|
+
},
|
|
102
|
+
handler: async (code, id) => {
|
|
103
|
+
try {
|
|
104
|
+
// Additional check for backward compatibility with older Vite/Rollup versions
|
|
105
|
+
if (id.includes('virtual:mf-REMOTE_ENTRY_ID') && mfPlugin) {
|
|
106
|
+
const dependencyPairs = (0, extract_mf_vite_remotes_1.extract_remotes_dependencies)(root, mfPlugin._options);
|
|
107
|
+
if (!dependencyPairs) {
|
|
108
|
+
return code;
|
|
109
|
+
}
|
|
110
|
+
const zephyr_engine = await zephyr_engine_defer;
|
|
111
|
+
const resolved_remotes = await zephyr_engine.resolve_remote_dependencies(dependencyPairs);
|
|
112
|
+
if (!resolved_remotes) {
|
|
113
|
+
return code;
|
|
114
|
+
}
|
|
115
|
+
const result = (0, inject_resolved_remotes_1.inject_resolved_remotes_map)(resolved_remotes, code);
|
|
116
|
+
return result;
|
|
152
117
|
}
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
118
|
+
if (/\.(mjs|cjs|js|ts|jsx|tsx)$/.test(id) && !id.includes('node_modules')) {
|
|
119
|
+
const zephyr_engine = await zephyr_engine_defer;
|
|
120
|
+
if (!cachedSpecifier) {
|
|
121
|
+
const appUid = zephyr_engine.application_uid;
|
|
122
|
+
cachedSpecifier = `env:vars:${appUid}`;
|
|
123
|
+
}
|
|
124
|
+
const res = (0, zephyr_agent_1.rewriteEnvReadsToVirtualModule)(String(code), cachedSpecifier);
|
|
125
|
+
if (res && typeof res.code === 'string' && res.code !== code) {
|
|
126
|
+
code = res.code;
|
|
127
|
+
}
|
|
157
128
|
}
|
|
158
|
-
|
|
159
|
-
return result;
|
|
129
|
+
return code;
|
|
160
130
|
}
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
cachedSpecifier = `env:vars:${appName}`;
|
|
166
|
-
}
|
|
167
|
-
const res = (0, zephyr_environment_variables_1.rewriteEnvReadsToVirtualModule)(String(code), cachedSpecifier);
|
|
168
|
-
if (res && typeof res.code === 'string' && res.code !== code) {
|
|
169
|
-
code = res.code;
|
|
170
|
-
}
|
|
131
|
+
catch (error) {
|
|
132
|
+
(0, zephyr_agent_1.handleGlobalError)(error);
|
|
133
|
+
// returns the original code in case of error
|
|
134
|
+
return code;
|
|
171
135
|
}
|
|
172
|
-
|
|
173
|
-
}
|
|
174
|
-
catch (error) {
|
|
175
|
-
(0, zephyr_agent_1.logFn)('error', zephyr_agent_1.ZephyrError.format(error));
|
|
176
|
-
// returns the original code in case of error
|
|
177
|
-
return code;
|
|
178
|
-
}
|
|
136
|
+
},
|
|
179
137
|
},
|
|
180
138
|
generateBundle: async function (options, bundle) {
|
|
181
139
|
// Process remoteEntry.js to inject runtime plugin
|
|
@@ -197,11 +155,11 @@ function zephyrPlugin() {
|
|
|
197
155
|
if (!resolved_remotes) {
|
|
198
156
|
continue;
|
|
199
157
|
}
|
|
200
|
-
const result = (0,
|
|
158
|
+
const result = (0, inject_resolved_remotes_1.inject_resolved_remotes_map)(resolved_remotes, chunk.code);
|
|
201
159
|
chunk.code = result;
|
|
202
160
|
}
|
|
203
161
|
catch (error) {
|
|
204
|
-
(0, zephyr_agent_1.
|
|
162
|
+
(0, zephyr_agent_1.handleGlobalError)(error);
|
|
205
163
|
}
|
|
206
164
|
}
|
|
207
165
|
}
|
|
@@ -234,7 +192,7 @@ function zephyrPlugin() {
|
|
|
234
192
|
});
|
|
235
193
|
}
|
|
236
194
|
catch (error) {
|
|
237
|
-
(0, zephyr_agent_1.
|
|
195
|
+
(0, zephyr_agent_1.handleGlobalError)(error);
|
|
238
196
|
// Fallback to empty manifest if there's an error
|
|
239
197
|
this.emitFile({
|
|
240
198
|
type: 'asset',
|
|
@@ -293,11 +251,12 @@ function zephyrPlugin() {
|
|
|
293
251
|
await zephyr_engine.upload_assets({
|
|
294
252
|
assetsMap,
|
|
295
253
|
buildStats: await (0, zephyr_agent_1.zeBuildDashData)(zephyr_engine),
|
|
254
|
+
hooks,
|
|
296
255
|
});
|
|
297
256
|
await zephyr_engine.build_finished();
|
|
298
257
|
}
|
|
299
258
|
catch (error) {
|
|
300
|
-
(0, zephyr_agent_1.
|
|
259
|
+
(0, zephyr_agent_1.handleGlobalError)(error);
|
|
301
260
|
}
|
|
302
261
|
},
|
|
303
262
|
// Inject import map into HTML
|
|
@@ -305,14 +264,15 @@ function zephyrPlugin() {
|
|
|
305
264
|
var _a;
|
|
306
265
|
try {
|
|
307
266
|
const zephyr_engine = await zephyr_engine_defer;
|
|
308
|
-
const
|
|
267
|
+
const appUid = zephyr_engine.application_uid;
|
|
309
268
|
// Convert federated dependencies to remotes format
|
|
310
269
|
const remotes = ((_a = zephyr_engine.federated_dependencies) === null || _a === void 0 ? void 0 : _a.map((dep) => ({
|
|
311
270
|
name: dep.name,
|
|
271
|
+
application_uid: dep.application_uid,
|
|
312
272
|
remote_entry_url: dep.default_url,
|
|
313
273
|
}))) || [];
|
|
314
274
|
// Use the same import map creation as Rspack plugin
|
|
315
|
-
const importMap = (0, zephyr_agent_1.buildEnvImportMap)(
|
|
275
|
+
const importMap = (0, zephyr_agent_1.buildEnvImportMap)(appUid, remotes);
|
|
316
276
|
const importMapScript = `<script type="importmap">${JSON.stringify({ imports: importMap }, null, 2)}</script>`;
|
|
317
277
|
// Check if import map already exists
|
|
318
278
|
if (!html.includes('type="importmap"')) {
|
|
@@ -322,12 +282,13 @@ function zephyrPlugin() {
|
|
|
322
282
|
return html;
|
|
323
283
|
}
|
|
324
284
|
catch (error) {
|
|
325
|
-
(0, zephyr_agent_1.
|
|
285
|
+
(0, zephyr_agent_1.handleGlobalError)(error);
|
|
326
286
|
return html;
|
|
327
287
|
}
|
|
328
288
|
},
|
|
329
289
|
// For production builds
|
|
330
290
|
closeBundle: async () => {
|
|
291
|
+
var _a;
|
|
331
292
|
try {
|
|
332
293
|
const [vite_internal_options, zephyr_engine] = await Promise.all([
|
|
333
294
|
vite_internal_options_defer,
|
|
@@ -336,14 +297,29 @@ function zephyrPlugin() {
|
|
|
336
297
|
zephyr_engine.buildProperties.baseHref = baseHref;
|
|
337
298
|
await zephyr_engine.start_new_build();
|
|
338
299
|
const assetsMap = await (0, extract_vite_assets_map_1.extract_vite_assets_map)(zephyr_engine, vite_internal_options);
|
|
300
|
+
const modules = Object.entries((_a = mfPlugin === null || mfPlugin === void 0 ? void 0 : mfPlugin._options.exposes) !== null && _a !== void 0 ? _a : {})
|
|
301
|
+
.map(([name, file]) => ({
|
|
302
|
+
name: name.replace('./', ''),
|
|
303
|
+
file: typeof file === 'string' ? file : file.import,
|
|
304
|
+
}))
|
|
305
|
+
.map(({ name, file }) => ({
|
|
306
|
+
id: name,
|
|
307
|
+
applicationID: `${name}:${name}`,
|
|
308
|
+
requires: [],
|
|
309
|
+
name,
|
|
310
|
+
file,
|
|
311
|
+
}));
|
|
312
|
+
const buildStats = await (0, zephyr_agent_1.zeBuildDashData)(zephyr_engine);
|
|
313
|
+
buildStats.modules = modules;
|
|
339
314
|
await zephyr_engine.upload_assets({
|
|
340
315
|
assetsMap,
|
|
341
|
-
buildStats
|
|
316
|
+
buildStats,
|
|
317
|
+
hooks,
|
|
342
318
|
});
|
|
343
319
|
await zephyr_engine.build_finished();
|
|
344
320
|
}
|
|
345
321
|
catch (error) {
|
|
346
|
-
(0, zephyr_agent_1.
|
|
322
|
+
(0, zephyr_agent_1.handleGlobalError)(error);
|
|
347
323
|
}
|
|
348
324
|
},
|
|
349
325
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"vite-plugin-zephyr.js","sourceRoot":"","sources":["../../src/lib/vite-plugin-zephyr.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"vite-plugin-zephyr.js","sourceRoot":"","sources":["../../src/lib/vite-plugin-zephyr.ts"],"names":[],"mappings":";;AAyBA,gCAmBC;AA5CD,kDAAqD;AACrD,+BAAiE;AACjE,+CASsB;AACtB,4EAAyE;AACzE,wFAAqF;AACrF,4FAA8F;AAC9F,4FAA6F;AAU7F,SAAgB,UAAU,CAAC,QAAkC;IAC3D,MAAM,QAAQ,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,QAAQ,CAAC;IACpC,MAAM,KAAK,GAAG,QAAQ,aAAR,QAAQ,uBAAR,QAAQ,CAAE,KAAK,CAAC;IAC9B,MAAM,OAAO,GAAG,EAAE,CAAC;IACnB,IAAI,QAAQ,EAAE,CAAC;QACb,IAAI,CAAC,QAAQ,CAAC,cAAc,EAAE,CAAC;YAC7B,QAAQ,CAAC,cAAc,GAAG,EAAE,CAAC;QAC/B,CAAC;QACD,oDAAoD;QACpD,oFAAoF;QACpF,gFAAgF;QAChF,0DAA0D;QAC1D,QAAQ,CAAC,cAAc,CAAC,IAAI,CAC1B,OAAO,CAAC,OAAO,CAAC,2CAA2C,CAAC,CAC7D,CAAC;QACF,OAAO,CAAC,IAAI,CAAC,GAAI,IAAA,iBAAU,EAAC,QAAQ,CAAc,CAAC,CAAC;IACtD,CAAC;IACD,OAAO,CAAC,IAAI,CAAC,YAAY,CAAC,KAAK,CAAC,CAAC,CAAC;IAClC,OAA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AC;oBAC5B,IAAI,EAAE,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,MAAM;iBACpD,CAAC,CAAC;qBACF,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,EAAE,EAAE,CAAC,CAAC;oBACxB,EAAE,EAAE,IAAI;oBACR,aAAa,EAAE,GAAG,IAAI,IAAI,IAAI,EAAE;oBAChC,QAAQ,EAAE,EAAE;oBACZ,IAAI;oBACJ,IAAI;iBACL,CAAC,CAAC,CAAC;gBACN,MAAM,UAAU,GAAG,MAAM,IAAA,8BAAe,EAAC,aAAa,CAAC,CAAC;gBACxD,UAAU,CAAC,OAAO,GAAG,OAAO,CAAC;gBAC7B,MAAM,aAAa,CAAC,aAAa,CAAC;oBAChC,SAAS;oBACT,UAAU;oBACV,KAAK;iBACN,CAAC,CAAC;gBACH,MAAM,aAAa,CAAC,cAAc,EAAE,CAAC;YACvC,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAA,gCAAiB,EAAC,KAAK,CAAC,CAAC;YAC3B,CAAC;QACH,CAAC;KACF,CAAC;AACJ,CAAC"}
|
package/dist/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-zephyr",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "Vite plugin for Zephyr",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -24,18 +24,20 @@
|
|
|
24
24
|
"@module-federation/vite": "catalog:module-federation",
|
|
25
25
|
"acorn": "^8.12.1",
|
|
26
26
|
"acorn-walk": "^8.3.4",
|
|
27
|
-
"
|
|
28
|
-
"
|
|
29
|
-
"rollup": "catalog:rollup4",
|
|
30
|
-
"vite": "catalog:vite6",
|
|
31
|
-
"zephyr-agent": "workspace:*",
|
|
32
|
-
"zephyr-environment-variables": "workspace:*"
|
|
27
|
+
"tslib": "catalog:typescript",
|
|
28
|
+
"zephyr-agent": "workspace:*"
|
|
33
29
|
},
|
|
34
30
|
"devDependencies": {
|
|
35
|
-
"@types/is-ci": "catalog:typescript",
|
|
36
31
|
"@types/jest": "catalog:typescript",
|
|
32
|
+
"@types/node": "catalog:typescript",
|
|
37
33
|
"@typescript-eslint/eslint-plugin": "catalog:eslint",
|
|
38
|
-
"
|
|
34
|
+
"rollup": "catalog:rollup4",
|
|
35
|
+
"ts-jest": "catalog:typescript",
|
|
36
|
+
"vite": "catalog:vite7"
|
|
37
|
+
},
|
|
38
|
+
"peerDependencies": {
|
|
39
|
+
"rollup": "^4.0.0",
|
|
40
|
+
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
39
41
|
},
|
|
40
42
|
"publishConfig": {
|
|
41
43
|
"access": "public",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vite-plugin-zephyr",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.31",
|
|
4
4
|
"description": "Vite plugin for Zephyr",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -16,22 +16,24 @@
|
|
|
16
16
|
"main": "dist/index.js",
|
|
17
17
|
"types": "dist/index.d.ts",
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@module-federation/runtime": "^0.
|
|
19
|
+
"@module-federation/runtime": "^0.21.0",
|
|
20
20
|
"@module-federation/vite": "^1.2.6",
|
|
21
21
|
"acorn": "^8.12.1",
|
|
22
22
|
"acorn-walk": "^8.3.4",
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"rollup": "^4.36.0",
|
|
26
|
-
"vite": "^6.2.7",
|
|
27
|
-
"zephyr-agent": "0.0.0-canary.3",
|
|
28
|
-
"zephyr-environment-variables": "0.0.0"
|
|
23
|
+
"tslib": "^2.8.1",
|
|
24
|
+
"zephyr-agent": "0.0.0-canary.31"
|
|
29
25
|
},
|
|
30
26
|
"devDependencies": {
|
|
31
|
-
"@types/is-ci": "3.0.4",
|
|
32
27
|
"@types/jest": "29.5.14",
|
|
28
|
+
"@types/node": "^22.13.11",
|
|
33
29
|
"@typescript-eslint/eslint-plugin": "^8.27.0",
|
|
34
|
-
"
|
|
30
|
+
"rollup": "^4.36.0",
|
|
31
|
+
"ts-jest": "^29.2.6",
|
|
32
|
+
"vite": "^7.1.11"
|
|
33
|
+
},
|
|
34
|
+
"peerDependencies": {
|
|
35
|
+
"rollup": "^4.0.0",
|
|
36
|
+
"vite": "^5.0.0 || ^6.0.0 || ^7.0.0"
|
|
35
37
|
},
|
|
36
38
|
"publishConfig": {
|
|
37
39
|
"access": "public",
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.load_resolved_remotes = load_resolved_remotes;
|
|
4
|
-
const zephyr_agent_1 = require("zephyr-agent");
|
|
5
|
-
const runtime_plugin_1 = require("./runtime_plugin");
|
|
6
|
-
const runtime_plugins_parser_1 = require("./runtime_plugins_parser");
|
|
7
|
-
function load_resolved_remotes(resolved_remotes, code) {
|
|
8
|
-
const startTime = Date.now();
|
|
9
|
-
try {
|
|
10
|
-
const runtimePluginsExtraction = (0, runtime_plugins_parser_1.parseRuntimePlugin)(code);
|
|
11
|
-
if (!runtimePluginsExtraction) {
|
|
12
|
-
return code;
|
|
13
|
-
}
|
|
14
|
-
const { pluginsArray, startIndex, endIndex } = runtimePluginsExtraction;
|
|
15
|
-
// Add Zephyr plugin to the array
|
|
16
|
-
// We need to add a Zephyr plugin to the end of the array
|
|
17
|
-
// The array is in format: [plugin1(), plugin2(), ...] or []
|
|
18
|
-
let updatedPluginsArray;
|
|
19
|
-
const runtimePlugin = (0, runtime_plugin_1.generateRuntimePlugin)(resolved_remotes);
|
|
20
|
-
if (pluginsArray === '[]') {
|
|
21
|
-
// Handle empty array case
|
|
22
|
-
updatedPluginsArray = `[${runtimePlugin}]`;
|
|
23
|
-
}
|
|
24
|
-
else {
|
|
25
|
-
// Handle non-empty array case
|
|
26
|
-
updatedPluginsArray = pluginsArray.replace(/\]$/, `, ${runtimePlugin}]`);
|
|
27
|
-
}
|
|
28
|
-
// Replace the original array with the updated one
|
|
29
|
-
const updatedCode = code.substring(0, startIndex) + updatedPluginsArray + code.substring(endIndex);
|
|
30
|
-
const endTime = Date.now();
|
|
31
|
-
zephyr_agent_1.ze_log.remotes(`load_resolved_remotes took ${endTime - startTime}ms`);
|
|
32
|
-
return updatedCode;
|
|
33
|
-
}
|
|
34
|
-
catch (error) {
|
|
35
|
-
zephyr_agent_1.ze_log.remotes('Error in load_resolved_remotes:', error);
|
|
36
|
-
return code; // Return original code in case of error
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
//# sourceMappingURL=load_resolved_remotes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"load_resolved_remotes.js","sourceRoot":"","sources":["../../../../src/lib/internal/mf-vite-etl/load_resolved_remotes.ts"],"names":[],"mappings":";;AAKA,sDAwCC;AA5CD,+CAAsC;AACtC,qDAAyD;AACzD,qEAA8D;AAE9D,SAAgB,qBAAqB,CACnC,gBAAwC,EACxC,IAAY;IAEZ,MAAM,SAAS,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IAE7B,IAAI,CAAC;QACH,MAAM,wBAAwB,GAAG,IAAA,2CAAkB,EAAC,IAAI,CAAC,CAAC;QAE1D,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAC9B,OAAO,IAAI,CAAC;QACd,CAAC;QAED,MAAM,EAAE,YAAY,EAAE,UAAU,EAAE,QAAQ,EAAE,GAAG,wBAAwB,CAAC;QAExE,iCAAiC;QACjC,yDAAyD;QACzD,4DAA4D;QAC5D,IAAI,mBAAmB,CAAC;QACxB,MAAM,aAAa,GAAG,IAAA,sCAAqB,EAAC,gBAAgB,CAAC,CAAC;QAE9D,IAAI,YAAY,KAAK,IAAI,EAAE,CAAC;YAC1B,0BAA0B;YAC1B,mBAAmB,GAAG,IAAI,aAAa,GAAG,CAAC;QAC7C,CAAC;aAAM,CAAC;YACN,8BAA8B;YAC9B,mBAAmB,GAAG,YAAY,CAAC,OAAO,CAAC,KAAK,EAAE,KAAK,aAAa,GAAG,CAAC,CAAC;QAC3E,CAAC;QAED,kDAAkD;QAClD,MAAM,WAAW,GACf,IAAI,CAAC,SAAS,CAAC,CAAC,EAAE,UAAU,CAAC,GAAG,mBAAmB,GAAG,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,CAAC;QAEjF,MAAM,OAAO,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QAC3B,qBAAM,CAAC,OAAO,CAAC,8BAA8B,OAAO,GAAG,SAAS,IAAI,CAAC,CAAC;QACtE,OAAO,WAAW,CAAC;IACrB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,qBAAM,CAAC,OAAO,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;QACzD,OAAO,IAAI,CAAC,CAAC,wCAAwC;IACvD,CAAC;AACH,CAAC"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.generateRuntimePlugin = generateRuntimePlugin;
|
|
4
|
-
function generateRuntimePlugin(resolved_remotes) {
|
|
5
|
-
const remoteMap = Object.fromEntries(resolved_remotes.map((remote) => [remote.name, remote]));
|
|
6
|
-
const runtimePlugin = {
|
|
7
|
-
name: 'zephyr-runtime-remote-resolver',
|
|
8
|
-
beforeInit: (args) => {
|
|
9
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: beforeInit called!');
|
|
10
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: args.userOptions.remotes:', args.userOptions.remotes);
|
|
11
|
-
const resolvedRemoteMap = JSON.parse('__REMOTE_MAP__');
|
|
12
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: resolvedRemoteMap:', resolvedRemoteMap);
|
|
13
|
-
const _windows = typeof window !== 'undefined' ? window : globalThis;
|
|
14
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: _windows:', _windows);
|
|
15
|
-
args.userOptions.remotes.forEach((remote) => {
|
|
16
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: Processing remote:', remote.name, 'original remote:', remote);
|
|
17
|
-
const resolvedRemote = resolvedRemoteMap[remote.name];
|
|
18
|
-
if (!resolvedRemote) {
|
|
19
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: No resolved remote found for:', remote.name);
|
|
20
|
-
return;
|
|
21
|
-
}
|
|
22
|
-
const sessionEdgeURL = _windows.sessionStorage.getItem(resolvedRemote.application_uid);
|
|
23
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: sessionEdgeURL for', remote.name, ':', sessionEdgeURL);
|
|
24
|
-
const urlOverwrite = sessionEdgeURL !== null && sessionEdgeURL !== void 0 ? sessionEdgeURL : resolvedRemote.remote_entry_url;
|
|
25
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: urlOverwrite for', remote.name, ':', urlOverwrite);
|
|
26
|
-
// @ts-expect-error overwriting entry if needed
|
|
27
|
-
remote.entry = urlOverwrite;
|
|
28
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: Updated remote for', remote.name, 'to:', remote);
|
|
29
|
-
});
|
|
30
|
-
console.log('🚀 ZEPHYR RUNTIME PLUGIN: Final args.userOptions.remotes:', args.userOptions.remotes);
|
|
31
|
-
return args;
|
|
32
|
-
},
|
|
33
|
-
};
|
|
34
|
-
return objectToTemplate(runtimePlugin).replace('__REMOTE_MAP__', JSON.stringify(remoteMap));
|
|
35
|
-
}
|
|
36
|
-
function objectToTemplate(obj) {
|
|
37
|
-
const entries = Object.entries(obj).map(([key, value]) => {
|
|
38
|
-
if (typeof value === 'function') {
|
|
39
|
-
return `${key}: ${value.toString()}`;
|
|
40
|
-
}
|
|
41
|
-
else if (typeof value === 'object' && value !== null) {
|
|
42
|
-
return `${key}: ${objectToTemplate(value)}`;
|
|
43
|
-
}
|
|
44
|
-
else if (typeof value === 'string') {
|
|
45
|
-
return `${key}: "${value}"`;
|
|
46
|
-
}
|
|
47
|
-
else {
|
|
48
|
-
return `${key}: ${value}`;
|
|
49
|
-
}
|
|
50
|
-
});
|
|
51
|
-
return `{ ${entries.join(', ')} }`;
|
|
52
|
-
}
|
|
53
|
-
//# sourceMappingURL=runtime_plugin.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime_plugin.js","sourceRoot":"","sources":["../../../../src/lib/internal/mf-vite-etl/runtime_plugin.ts"],"names":[],"mappings":";;AAGA,sDA8EC;AA9ED,SAAgB,qBAAqB,CAAC,gBAAwC;IAC5E,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAClC,gBAAgB,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC,MAAM,CAAC,IAAI,EAAE,MAAM,CAAC,CAAC,CACxD,CAAC;IAEF,MAAM,aAAa,GAA4B;QAC7C,IAAI,EAAE,gCAAgC;QACtC,UAAU,EAAE,CAAC,IAAI,EAAE,EAAE;YACnB,OAAO,CAAC,GAAG,CAAC,8CAA8C,CAAC,CAAC;YAC5D,OAAO,CAAC,GAAG,CACT,qDAAqD,EACrD,IAAI,CAAC,WAAW,CAAC,OAAO,CACzB,CAAC;YAEF,MAAM,iBAAiB,GACrB,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,CAAC;YAC/B,OAAO,CAAC,GAAG,CAAC,8CAA8C,EAAE,iBAAiB,CAAC,CAAC;YAE/E,MAAM,QAAQ,GAAG,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,UAAU,CAAC;YACrE,OAAO,CAAC,GAAG,CAAC,qCAAqC,EAAE,QAAQ,CAAC,CAAC;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A4B;IACpD,MAAM,OAAO,GAAG,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,EAAE,KAAK,CAAC,EAAE,EAAE;QACvD,IAAI,OAAO,KAAK,KAAK,UAAU,EAAE,CAAC;YAChC,OAAO,GAAG,GAAG,KAAK,KAAK,CAAC,QAAQ,EAAE,EAAE,CAAC;QACvC,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,EAAE,CAAC;YACvD,OAAO,GAAG,GAAG,KAAK,gBAAgB,CAAC,KAAK,CAAC,EAAE,CAAC;QAC9C,CAAC;aAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;YACrC,OAAO,GAAG,GAAG,MAAM,KAAK,GAAG,CAAC;QAC9B,CAAC;aAAM,CAAC;YACN,OAAO,GAAG,GAAG,KAAK,KAAK,EAAE,CAAC;QAC5B,CAAC;IACH,CAAC,CAAC,CAAC;IACH,OAAO,KAAK,OAAO,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC;AACrC,CAAC"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.parseRuntimePlugin = parseRuntimePlugin;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const acorn_1 = tslib_1.__importDefault(require("acorn"));
|
|
6
|
-
const acorn_walk_1 = tslib_1.__importDefault(require("acorn-walk"));
|
|
7
|
-
const zephyr_agent_1 = require("zephyr-agent");
|
|
8
|
-
function parseRuntimePlugin(code) {
|
|
9
|
-
// Parse the code into an AST
|
|
10
|
-
const ast = acorn_1.default.parse(code, {
|
|
11
|
-
ecmaVersion: 'latest',
|
|
12
|
-
sourceType: 'module',
|
|
13
|
-
locations: true,
|
|
14
|
-
ranges: true,
|
|
15
|
-
});
|
|
16
|
-
let pluginsArrayNode;
|
|
17
|
-
// Find the plugins array in the runtimeInit call (both original and minified)
|
|
18
|
-
acorn_walk_1.default.simple(ast, {
|
|
19
|
-
CallExpression(node) {
|
|
20
|
-
var _a, _b, _c, _d, _e, _f;
|
|
21
|
-
// Check for both 'runtimeInit' and 'p.init' (minified)
|
|
22
|
-
const isRuntimeInit = ((_a = node.callee) === null || _a === void 0 ? void 0 : _a.name) === 'runtimeInit';
|
|
23
|
-
const isMinifiedInit = ((_c = (_b = node.callee) === null || _b === void 0 ? void 0 : _b.object) === null || _c === void 0 ? void 0 : _c.name) === 'p' && ((_e = (_d = node.callee) === null || _d === void 0 ? void 0 : _d.property) === null || _e === void 0 ? void 0 : _e.name) === 'init';
|
|
24
|
-
if ((isRuntimeInit || isMinifiedInit) && ((_f = node.arguments) === null || _f === void 0 ? void 0 : _f.length) > 0) {
|
|
25
|
-
const initArg = node.arguments[0];
|
|
26
|
-
if (initArg.type === 'ObjectExpression') {
|
|
27
|
-
for (const prop of initArg.properties) {
|
|
28
|
-
if (prop.key.type === 'Identifier' &&
|
|
29
|
-
prop.key.name === 'plugins' &&
|
|
30
|
-
prop.value.type === 'ArrayExpression') {
|
|
31
|
-
pluginsArrayNode = prop.value;
|
|
32
|
-
break;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
},
|
|
38
|
-
});
|
|
39
|
-
if (!pluginsArrayNode ||
|
|
40
|
-
!('start' in pluginsArrayNode) ||
|
|
41
|
-
!('end' in pluginsArrayNode)) {
|
|
42
|
-
zephyr_agent_1.ze_log.mf('Could not find plugins array in remote entry');
|
|
43
|
-
return undefined;
|
|
44
|
-
}
|
|
45
|
-
// Extract the plugins array
|
|
46
|
-
const startIndex = pluginsArrayNode.start;
|
|
47
|
-
const endIndex = pluginsArrayNode.end;
|
|
48
|
-
const pluginsArray = code.slice(startIndex, endIndex);
|
|
49
|
-
return { pluginsArray, startIndex, endIndex };
|
|
50
|
-
}
|
|
51
|
-
//# sourceMappingURL=runtime_plugins_parser.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime_plugins_parser.js","sourceRoot":"","sources":["../../../../src/lib/internal/mf-vite-etl/runtime_plugins_parser.ts"],"names":[],"mappings":";;AAUA,gDAqDC;;AA/DD,0DAA0B;AAC1B,oEAA8B;AAC9B,+CAAsC;AAQtC,SAAgB,kBAAkB,CAAC,IAAY;IAC7C,6BAA6B;IAC7B,MAAM,GAAG,GAAG,eAAK,CAAC,KAAK,CAAC,IAAI,EAAE;QAC5B,WAAW,EAAE,QAAQ;QACrB,UAAU,EAAE,QAAQ;QACpB,SAAS,EAAE,IAAI;QACf,MAAM,EAAE,IAAI;KACb,CAAC,CAAC;IAEH,IAAI,gBAAwC,CAAC;IAE7C,8EAA8E;IAC9E,oBAAI,CAAC,MAAM,CAAC,GAAG,EAAE;QACf,cAAc,CAAC,IAAS;;YACtB,uDAAuD;YACvD,MAAM,aAAa,GAAG,CAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,IAAI,MAAK,aAAa,CAAC;YAC1D,MAAM,cAAc,GAClB,CAAA,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,MAAM,0CAAE,IAAI,MAAK,GAAG,IAAI,CAAA,MAAA,MAAA,IAAI,CAAC,MAAM,0CAAE,QAAQ,0CAAE,IAAI,MAAK,MAAM,CAAC;YAE9E,IAAI,CAAC,aAAa,IAAI,cAAc,CAAC,IAAI,CAAA,MAAA,IAAI,CAAC,SAAS,0CAAE,MAAM,IAAG,CAAC,EAAE,CAAC;gBACpE,MAAM,OAAO,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,CAAC;gBAElC,IAAI,OAAO,CAAC,IAAI,KAAK,kBAAkB,EAAE,CAAC;oBACxC,KAAK,MAAM,IAAI,IAAI,OAAO,CAAC,UAAU,EAAE,CAAC;wBACtC,IACE,IAAI,CAAC,GAAG,CAAC,IAAI,KAAK,YAAY;4BAC9B,IAAI,CAAC,GAAG,CAA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