zephyr-rspack-plugin 0.0.42 → 0.0.44
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/rspack-plugin/with-zephyr.d.ts +2 -2
- package/dist/rspack-plugin/with-zephyr.js +21 -16
- package/dist/rspack-plugin/with-zephyr.js.map +1 -1
- package/dist/rspack-plugin/ze-rspack-plugin.d.ts +3 -3
- package/dist/rspack-plugin/ze-rspack-plugin.js.map +1 -1
- package/dist/types/missing-webpack-types.d.ts +2 -2
- package/package.json +3 -3
package/dist/package.json
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Configuration as RspackConfiguration } from '@rspack/core';
|
|
2
|
-
import { ZephyrRspackPluginOptions } from '../types';
|
|
1
|
+
import type { Configuration as RspackConfiguration } from '@rspack/core';
|
|
2
|
+
import type { ZephyrRspackPluginOptions } from '../types';
|
|
3
3
|
export type Configuration = RspackConfiguration;
|
|
4
4
|
export declare function withZephyr(zephyrPluginOptions?: ZephyrRspackPluginOptions): (config: Configuration) => Promise<Configuration>;
|
|
@@ -2,27 +2,32 @@
|
|
|
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_rspack_plugin_1 = require("./ze-rspack-plugin");
|
|
6
5
|
const zephyr_xpack_internal_1 = require("zephyr-xpack-internal");
|
|
6
|
+
const ze_rspack_plugin_1 = require("./ze-rspack-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
|
-
|
|
11
|
+
try {
|
|
12
|
+
// create instance of ZephyrEngine to track the application
|
|
13
|
+
const zephyr_engine = await zephyr_agent_1.ZephyrEngine.create({
|
|
14
|
+
builder: 'rspack',
|
|
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
|
+
// inject the ZephyrRspackPlugin
|
|
22
|
+
config.plugins?.push(new ze_rspack_plugin_1.ZeRspackPlugin({
|
|
23
|
+
zephyr_engine,
|
|
24
|
+
mfConfig: (0, zephyr_xpack_internal_1.makeCopyOfModuleFederationOptions)(config),
|
|
25
|
+
wait_for_index_html: _zephyrOptions?.wait_for_index_html,
|
|
26
|
+
}));
|
|
27
|
+
}
|
|
28
|
+
catch (error) {
|
|
29
|
+
(0, zephyr_agent_1.logFn)('error', zephyr_agent_1.ZephyrError.format(error));
|
|
30
|
+
}
|
|
26
31
|
return config;
|
|
27
32
|
}
|
|
28
33
|
//# sourceMappingURL=with-zephyr.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"with-zephyr.js","sourceRoot":"","sources":["../../src/rspack-plugin/with-zephyr.ts"],"names":[],"mappings":";;AAYA,gCAIC;AAfD,+
|
|
1
|
+
{"version":3,"file":"with-zephyr.js","sourceRoot":"","sources":["../../src/rspack-plugin/with-zephyr.ts"],"names":[],"mappings":";;AAYA,gCAIC;AAfD,+CAAgE;AAChE,iEAI+B;AAE/B,yDAAoD;AAIpD,SAAgB,UAAU,CACxB,mBAA+C;IAE/C,OAAO,CAAC,MAAM,EAAE,EAAE,CAAC,qBAAqB,CAAC,MAAM,EAAE,mBAAmB,CAAC,CAAC;AACxE,CAAC;AAED,KAAK,UAAU,qBAAqB,CAClC,MAAqB,EACrB,cAA0C;IAE1C,IAAI,CAAC;QACH,2DAA2D;QAC3D,MAAM,aAAa,GAAG,MAAM,2BAAY,CAAC,MAAM,CAAC;YAC9C,OAAO,EAAE,QAAQ;YACjB,OAAO,EAAE,MAAM,CAAC,OAAO;SACxB,CAAC,CAAC;QAEH,6CAA6C;QAC7C,MAAM,eAAe,GAAG,IAAA,uDAA+B,EAAC,MAAM,CAAC,CAAC;QAEhE,MAAM,yBAAyB,GAC7B,MAAM,aAAa,CAAC,2BAA2B,CAAC,eAAe,CAAC,CAAC;QAEnE,IAAA,wDAAgC,EAAC,aAAa,EAAE,MAAM,EAAE,yBAAyB,CAAC,CAAC;QAEnF,gCAAgC;QAChC,MAAM,CAAC,OAAO,EAAE,IAAI,CAClB,IAAI,iCAAc,CAAC;YACjB,aAAa;YACb,QAAQ,EAAE,IAAA,yDAAiC,EAAC,MAAM,CAAC;YACnD,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
|
-
import { ZephyrEngine } from 'zephyr-agent';
|
|
2
|
-
import { ModuleFederationPlugin } from 'zephyr-xpack-internal';
|
|
3
|
-
import { Compiler } from '@rspack/core';
|
|
1
|
+
import type { ZephyrEngine } from 'zephyr-agent';
|
|
2
|
+
import type { ModuleFederationPlugin } from 'zephyr-xpack-internal';
|
|
3
|
+
import type { Compiler } from '@rspack/core';
|
|
4
4
|
export interface ZephyrRspackInternalPluginOptions {
|
|
5
5
|
zephyr_engine: ZephyrEngine;
|
|
6
6
|
pluginName: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ze-rspack-plugin.js","sourceRoot":"","sources":["../../src/rspack-plugin/ze-rspack-plugin.ts"],"names":[],"mappings":";;;
|
|
1
|
+
{"version":3,"file":"ze-rspack-plugin.js","sourceRoot":"","sources":["../../src/rspack-plugin/ze-rspack-plugin.ts"],"names":[],"mappings":";;;AAGA,iEAAqE;AAGrE,MAAM,UAAU,GAAG,gBAAgB,CAAC;AAapC,MAAa,cAAc;IAGzB,YAAY,OAA8D;QACxE,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,wCAaC"}
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
import { XPackConfiguration } from 'zephyr-xpack-internal';
|
|
2
|
-
import { Compiler } from '@rspack/core';
|
|
1
|
+
import type { XPackConfiguration } from 'zephyr-xpack-internal';
|
|
2
|
+
import type { Compiler } from '@rspack/core';
|
|
3
3
|
export type RspackConfiguration = XPackConfiguration<Compiler>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zephyr-rspack-plugin",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.44",
|
|
4
4
|
"description": "Repack plugin for Zephyr",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -20,8 +20,8 @@
|
|
|
20
20
|
"@rspack/core": "1.2.8",
|
|
21
21
|
"is-ci": "^4.1.0",
|
|
22
22
|
"tslib": "^2.8.1",
|
|
23
|
-
"zephyr-agent": "0.0.
|
|
24
|
-
"zephyr-xpack-internal": "0.0.
|
|
23
|
+
"zephyr-agent": "0.0.44",
|
|
24
|
+
"zephyr-xpack-internal": "0.0.44"
|
|
25
25
|
},
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/is-ci": "3.0.4",
|