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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zephyr-webpack-plugin",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "description": "Webpack plugin for Zephyr",
5
5
  "repository": {
6
6
  "type": "git",
@@ -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
- // create instance of ZephyrEngine to track the application
12
- const zephyr_engine = await zephyr_agent_1.ZephyrEngine.create({
13
- builder: 'webpack',
14
- context: config.context,
15
- });
16
- // Resolve dependencies and update the config
17
- const dependencyPairs = (0, zephyr_xpack_internal_1.extractFederatedDependencyPairs)(config);
18
- const resolved_dependency_pairs = await zephyr_engine.resolve_remote_dependencies(dependencyPairs);
19
- (0, zephyr_xpack_internal_1.mutWebpackFederatedRemotesConfig)(zephyr_engine, config, resolved_dependency_pairs);
20
- const mfConfig = (0, zephyr_xpack_internal_1.makeCopyOfModuleFederationOptions)(config);
21
- (0, zephyr_agent_1.ze_log)(`with-zephyr.mfConfig: ${JSON.stringify(mfConfig, null, 2)}`);
22
- // inject the ZephyrWebpackPlugin
23
- config.plugins?.push(new ze_webpack_plugin_1.ZeWebpackPlugin({
24
- zephyr_engine,
25
- mfConfig: mfConfig,
26
- wait_for_index_html: _zephyrOptions?.wait_for_index_html,
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":";;A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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":";;;AAGA,iEAI+B;AAE/B,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"}
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.42",
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.42",
24
- "zephyr-xpack-internal": "0.0.42"
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",