zephyr-webpack-plugin 0.0.42 → 0.0.43
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/package.json +1 -1
- package/dist/types/missing-webpack-types.d.ts +2 -2
- package/dist/webpack-plugin/with-zephyr.d.ts +2 -2
- package/dist/webpack-plugin/with-zephyr.js +23 -18
- package/dist/webpack-plugin/with-zephyr.js.map +1 -1
- package/dist/webpack-plugin/ze-webpack-plugin.d.ts +2 -2
- package/dist/webpack-plugin/ze-webpack-plugin.js.map +1 -1
- package/package.json +3 -3
package/dist/package.json
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Compiler } from 'webpack';
|
|
2
|
-
import { XPackConfiguration } from 'zephyr-xpack-internal';
|
|
1
|
+
import type { Compiler } from 'webpack';
|
|
2
|
+
import type { XPackConfiguration } from 'zephyr-xpack-internal';
|
|
3
3
|
export type WebpackConfiguration = XPackConfiguration<Compiler>;
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { Configuration } from 'webpack';
|
|
2
|
-
import { ZephyrWebpackPluginOptions } from '../types';
|
|
1
|
+
import type { Configuration } from 'webpack';
|
|
2
|
+
import type { ZephyrWebpackPluginOptions } from '../types';
|
|
3
3
|
export declare function withZephyr(zephyrPluginOptions?: ZephyrWebpackPluginOptions): (config: Configuration) => Promise<Configuration>;
|
|
@@ -2,29 +2,34 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.withZephyr = withZephyr;
|
|
4
4
|
const zephyr_agent_1 = require("zephyr-agent");
|
|
5
|
-
const ze_webpack_plugin_1 = require("./ze-webpack-plugin");
|
|
6
5
|
const zephyr_xpack_internal_1 = require("zephyr-xpack-internal");
|
|
6
|
+
const ze_webpack_plugin_1 = require("./ze-webpack-plugin");
|
|
7
7
|
function withZephyr(zephyrPluginOptions) {
|
|
8
8
|
return (config) => _zephyr_configuration(config, zephyrPluginOptions);
|
|
9
9
|
}
|
|
10
10
|
async function _zephyr_configuration(config, _zephyrOptions) {
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
11
|
+
try {
|
|
12
|
+
// create instance of ZephyrEngine to track the application
|
|
13
|
+
const zephyr_engine = await zephyr_agent_1.ZephyrEngine.create({
|
|
14
|
+
builder: 'webpack',
|
|
15
|
+
context: config.context,
|
|
16
|
+
});
|
|
17
|
+
// Resolve dependencies and update the config
|
|
18
|
+
const dependencyPairs = (0, zephyr_xpack_internal_1.extractFederatedDependencyPairs)(config);
|
|
19
|
+
const resolved_dependency_pairs = await zephyr_engine.resolve_remote_dependencies(dependencyPairs);
|
|
20
|
+
(0, zephyr_xpack_internal_1.mutWebpackFederatedRemotesConfig)(zephyr_engine, config, resolved_dependency_pairs);
|
|
21
|
+
const mfConfig = (0, zephyr_xpack_internal_1.makeCopyOfModuleFederationOptions)(config);
|
|
22
|
+
(0, zephyr_agent_1.ze_log)(`with-zephyr.mfConfig: ${JSON.stringify(mfConfig, null, 2)}`);
|
|
23
|
+
// inject the ZephyrWebpackPlugin
|
|
24
|
+
config.plugins?.push(new ze_webpack_plugin_1.ZeWebpackPlugin({
|
|
25
|
+
zephyr_engine,
|
|
26
|
+
mfConfig: mfConfig,
|
|
27
|
+
wait_for_index_html: _zephyrOptions?.wait_for_index_html,
|
|
28
|
+
}));
|
|
29
|
+
}
|
|
30
|
+
catch (error) {
|
|
31
|
+
(0, zephyr_agent_1.logFn)('error', zephyr_agent_1.ZephyrError.format(error));
|
|
32
|
+
}
|
|
28
33
|
return config;
|
|
29
34
|
}
|
|
30
35
|
//# sourceMappingURL=with-zephyr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-zephyr.js","sourceRoot":"","sources":["../../src/webpack-plugin/with-zephyr.ts"],"names":[],"mappings":";;
|
|
1
|
+
{"version":3,"file":"with-zephyr.js","sourceRoot":"","sources":["../../src/webpack-plugin/with-zephyr.ts"],"names":[],"mappings":";;AAWA,gCAEC;AAZD,+CAAwE;AACxE,iEAI+B;AAG/B,2DAAsD;AAEtD,SAAgB,UAAU,CAAC,mBAAgD;IACzE,OAAO,CAAC,MAAqB,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AACvF,CAAC;AAED,KAAK,UAAU,qBAAqB,CAClC,MAA4B,EAC5B,cAA2C;IAE3C,IAAI,CAAC;QACH,2DAA2D;QAC3D,MAAM,aAAa,GAAG,MAAM,2BAAY,CAAC,MAAM,CAAC;YAC9C,OAAO,EAAE,SAAS;YAClB,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAC;QAEH,6CAA6C;QAC7C,MAAM,eAAe,GAAG,IAAA,uDAA+B,EAAC,MAAM,CAAC,CAAC;QAChE,MAAM,yBAAyB,GAC7B,MAAM,aAAa,CAAC,2BAA2B,CAAC,eAAe,CAAC,CAAC;QAEnE,IAAA,wDAAgC,EAAC,aAAa,EAAE,MAAM,EAAE,yBAAyB,CAAC,CAAC;QAEnF,MAAM,QAAQ,GAAG,IAAA,yDAAiC,EAAC,MAAM,CAAC,CAAC;QAE3D,IAAA,qBAAM,EAAC,yBAAyB,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC;QAErE,iCAAiC;QACjC,MAAM,CAAC,OAAO,EAAE,IAAI,CAClB,IAAI,mCAAe,CAAC;YAClB,aAAa;YACb,QAAQ,EAAE,QAAQ;YAClB,mBAAmB,EAAE,cAAc,EAAE,mBAAmB;SACzD,CAAC,CACH,CAAC;IACJ,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAA,oBAAK,EAAC,OAAO,EAAE,0BAAW,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,CAAC;IAC5C,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC"}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Compiler } from 'webpack';
|
|
2
|
-
import { ZephyrEngine } from 'zephyr-agent';
|
|
3
|
-
import { ModuleFederationPlugin } from 'zephyr-xpack-internal';
|
|
2
|
+
import type { ZephyrEngine } from 'zephyr-agent';
|
|
3
|
+
import type { ModuleFederationPlugin } from 'zephyr-xpack-internal';
|
|
4
4
|
export interface ZephyrWebpackInternalPluginOptions {
|
|
5
5
|
zephyr_engine: ZephyrEngine;
|
|
6
6
|
pluginName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ze-webpack-plugin.js","sourceRoot":"","sources":["../../src/webpack-plugin/ze-webpack-plugin.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ze-webpack-plugin.js","sourceRoot":"","sources":["../../src/webpack-plugin/ze-webpack-plugin.ts"],"names":[],"mappings":";;;AAIA,iEAAqE;AAErE,MAAM,UAAU,GAAG,iBAAiB,CAAC;AAarC,MAAa,eAAe;IAG1B,YAAY,OAA+D;QACzE,IAAI,CAAC,QAAQ,GAAG,MAAM,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,EAAE,OAAO,CAAC,CAAC;IACzD,CAAC;IAED,KAAK,CAAC,QAAkB;QACtB,IAAI,CAAC,QAAQ,CAAC,aAAa,CAAC,eAAe,CAAC,MAAM,GAAG,QAAQ,CAAC,UAAU,CAAC;QAEzE,IAAA,qCAAa,EAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;QACvC,IAAA,qCAAa,EAAC,IAAI,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAC;IACzC,CAAC;CACF;AAbD,0CAaC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zephyr-webpack-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.43",
|
|
4
4
|
"description": "Webpack plugin for Zephyr",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"is-ci": "^4.1.0",
|
|
21
21
|
"tslib": "^2.8.1",
|
|
22
22
|
"webpack": "^5.98.0",
|
|
23
|
-
"zephyr-agent": "0.0.
|
|
24
|
-
"zephyr-xpack-internal": "0.0.
|
|
23
|
+
"zephyr-agent": "0.0.43",
|
|
24
|
+
"zephyr-xpack-internal": "0.0.43"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/is-ci": "3.0.4",
|