@module-federation/enhanced 0.8.8 → 0.8.10

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 (45) hide show
  1. package/dist/package.json +15 -13
  2. package/dist/src/schemas/container/ContainerPlugin.check.d.ts +3 -2
  3. package/dist/src/schemas/container/ContainerPlugin.check.js +812 -1064
  4. package/dist/src/schemas/container/ContainerPlugin.check.js.map +1 -1
  5. package/dist/src/schemas/container/ContainerPlugin.d.ts +218 -257
  6. package/dist/src/schemas/container/ContainerPlugin.js +32 -31
  7. package/dist/src/schemas/container/ContainerPlugin.js.map +1 -1
  8. package/dist/src/schemas/container/ContainerReferencePlugin.check.d.ts +4 -3
  9. package/dist/src/schemas/container/ContainerReferencePlugin.check.js +258 -853
  10. package/dist/src/schemas/container/ContainerReferencePlugin.check.js.map +1 -1
  11. package/dist/src/schemas/container/ContainerReferencePlugin.d.ts +72 -67
  12. package/dist/src/schemas/container/ContainerReferencePlugin.js +6 -1
  13. package/dist/src/schemas/container/ContainerReferencePlugin.js.map +1 -1
  14. package/dist/src/schemas/container/ExternalsType.check.d.ts +8 -0
  15. package/dist/src/schemas/container/ExternalsType.check.js +64 -0
  16. package/dist/src/schemas/container/ExternalsType.check.js.map +1 -0
  17. package/dist/src/schemas/container/ExternalsType.d.ts +4 -0
  18. package/dist/src/schemas/container/ExternalsType.js +12 -0
  19. package/dist/src/schemas/container/ExternalsType.js.map +1 -0
  20. package/dist/src/schemas/container/ModuleFederationPlugin.check.js +3100 -0
  21. package/dist/src/schemas/container/ModuleFederationPlugin.check.js.map +1 -0
  22. package/dist/src/schemas/container/ModuleFederationPlugin.d.ts +622 -0
  23. package/dist/src/schemas/container/ModuleFederationPlugin.js +753 -0
  24. package/dist/src/schemas/container/ModuleFederationPlugin.js.map +1 -1
  25. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.d.ts +8 -0
  26. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js +357 -0
  27. package/dist/src/schemas/sharing/ConsumeSharedPlugin.check.js.map +1 -0
  28. package/dist/src/schemas/sharing/ConsumeSharedPlugin.d.ts +106 -0
  29. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js +129 -0
  30. package/dist/src/schemas/sharing/ConsumeSharedPlugin.js.map +1 -0
  31. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.d.ts +8 -0
  32. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js +281 -0
  33. package/dist/src/schemas/sharing/ProvideSharedPlugin.check.js.map +1 -0
  34. package/dist/src/schemas/sharing/ProvideSharedPlugin.d.ts +83 -0
  35. package/dist/src/schemas/sharing/ProvideSharedPlugin.js +103 -0
  36. package/dist/src/schemas/sharing/ProvideSharedPlugin.js.map +1 -0
  37. package/dist/src/schemas/sharing/SharePlugin.check.d.ts +8 -0
  38. package/dist/src/schemas/sharing/SharePlugin.check.js +388 -0
  39. package/dist/src/schemas/sharing/SharePlugin.check.js.map +1 -0
  40. package/dist/src/schemas/sharing/SharePlugin.d.ts +116 -0
  41. package/dist/src/schemas/sharing/SharePlugin.js +142 -0
  42. package/dist/src/schemas/sharing/SharePlugin.js.map +1 -0
  43. package/dist/src/wrapper/ModuleFederationPlugin.js +0 -3
  44. package/dist/src/wrapper/ModuleFederationPlugin.js.map +1 -1
  45. package/package.json +17 -15
@@ -0,0 +1,142 @@
1
+ "use strict";
2
+ // @ts-nocheck
3
+ /* eslint-disable */
4
+ /*
5
+ * This file was automatically generated.
6
+ * DO NOT MODIFY BY HAND.
7
+ */
8
+ Object.defineProperty(exports, "__esModule", { value: true });
9
+ exports.default = {
10
+ definitions: {
11
+ Shared: {
12
+ description: 'Modules that should be shared in the share scope. When provided, property names are used to match requested modules in this compilation.',
13
+ anyOf: [
14
+ {
15
+ type: 'array',
16
+ items: {
17
+ description: 'Modules that should be shared in the share scope.',
18
+ anyOf: [
19
+ {
20
+ $ref: '#/definitions/SharedItem',
21
+ },
22
+ {
23
+ $ref: '#/definitions/SharedObject',
24
+ },
25
+ ],
26
+ },
27
+ },
28
+ {
29
+ $ref: '#/definitions/SharedObject',
30
+ },
31
+ ],
32
+ },
33
+ SharedConfig: {
34
+ description: 'Advanced configuration for modules that should be shared in the share scope.',
35
+ type: 'object',
36
+ additionalProperties: false,
37
+ properties: {
38
+ eager: {
39
+ description: 'Include the provided and fallback module directly instead behind an async request. This allows to use this shared module in initial load too. All possible shared modules need to be eager too.',
40
+ type: 'boolean',
41
+ },
42
+ import: {
43
+ description: "Provided module that should be provided to share scope. Also acts as fallback module if no shared module is found in share scope or version isn't valid. Defaults to the property name.",
44
+ anyOf: [
45
+ {
46
+ description: 'No provided or fallback module.',
47
+ enum: [false],
48
+ },
49
+ {
50
+ $ref: '#/definitions/SharedItem',
51
+ },
52
+ ],
53
+ },
54
+ packageName: {
55
+ description: "Package name to determine required version from description file. This is only needed when package name can't be automatically determined from request.",
56
+ type: 'string',
57
+ minLength: 1,
58
+ },
59
+ requiredVersion: {
60
+ description: 'Version requirement from module in share scope.',
61
+ anyOf: [
62
+ {
63
+ description: 'No version requirement check.',
64
+ enum: [false],
65
+ },
66
+ {
67
+ description: "Version as string. Can be prefixed with '^' or '~' for minimum matches. Each part of the version should be separated by a dot '.'.",
68
+ type: 'string',
69
+ },
70
+ ],
71
+ },
72
+ shareKey: {
73
+ description: 'Module is looked up under this key from the share scope.',
74
+ type: 'string',
75
+ minLength: 1,
76
+ },
77
+ shareScope: {
78
+ description: 'Share scope name.',
79
+ type: 'string',
80
+ minLength: 1,
81
+ },
82
+ singleton: {
83
+ description: 'Allow only a single version of the shared module in share scope (disabled by default).',
84
+ type: 'boolean',
85
+ },
86
+ strictVersion: {
87
+ description: 'Do not accept shared module if version is not valid (defaults to yes, if local fallback module is available and shared module is not a singleton, otherwise no, has no effect if there is no required version specified).',
88
+ type: 'boolean',
89
+ },
90
+ version: {
91
+ description: 'Version of the provided module. Will replace lower matching versions, but not higher.',
92
+ anyOf: [
93
+ {
94
+ description: "Don't provide a version.",
95
+ enum: [false],
96
+ },
97
+ {
98
+ description: "Version as string. Each part of the version should be separated by a dot '.'.",
99
+ type: 'string',
100
+ },
101
+ ],
102
+ },
103
+ },
104
+ },
105
+ SharedItem: {
106
+ description: 'A module that should be shared in the share scope.',
107
+ type: 'string',
108
+ minLength: 1,
109
+ },
110
+ SharedObject: {
111
+ description: 'Modules that should be shared in the share scope. Property names are used to match requested modules in this compilation. Relative requests are resolved, module requests are matched unresolved, absolute paths will match resolved requests. A trailing slash will match all requests with this prefix. In this case shareKey must also have a trailing slash.',
112
+ type: 'object',
113
+ additionalProperties: {
114
+ description: 'Modules that should be shared in the share scope.',
115
+ anyOf: [
116
+ {
117
+ $ref: '#/definitions/SharedConfig',
118
+ },
119
+ {
120
+ $ref: '#/definitions/SharedItem',
121
+ },
122
+ ],
123
+ },
124
+ },
125
+ },
126
+ title: 'SharePluginOptions',
127
+ description: 'Options for shared modules.',
128
+ type: 'object',
129
+ additionalProperties: false,
130
+ properties: {
131
+ shareScope: {
132
+ description: "Share scope name used for all shared modules (defaults to 'default').",
133
+ type: 'string',
134
+ minLength: 1,
135
+ },
136
+ shared: {
137
+ $ref: '#/definitions/Shared',
138
+ },
139
+ },
140
+ required: ['shared'],
141
+ };
142
+ //# sourceMappingURL=SharePlugin.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"SharePlugin.js","sourceRoot":"","sources":["../../../../src/schemas/sharing/SharePlugin.ts"],"names":[],"mappings":";AAAA,cAAc;AACd,oBAAoB;AACpB;;;GAGG;;AAEH,kBAAe;IACb,WAAW,EAAE;QACX,MAAM,EAAE;YACN,WAAW,EACT,0IAA0I;YAC5I,KAAK,EAAE;gBACL;oBACE,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,WAAW,EAAE,mDAAmD;wBAChE,KAAK,EAAE;4BACL;gCACE,IAAI,EAAE,0BAA0B;6BACjC;4BACD;gCACE,IAAI,EAAE,4BAA4B;6BACnC;yBACF;qBACF;iBACF;gBACD;oB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BACd;wBACD;4BACE,WAAW,EACT,+EAA+E;4BACjF,IAAI,EAAE,QAAQ;yBACf;qBACF;iBACF;aACF;SACF;QACD,UAAU,EAAE;YACV,WAAW,EAAE,oDAAoD;YACjE,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;SACb;QACD,YAAY,EAAE;YACZ,WAAW,EACT,kWAAkW;YACpW,IAAI,EAAE,QAAQ;YACd,oBAAoB,EAAE;gBACpB,WAAW,EAAE,mDAAmD;gBAChE,KAAK,EAAE;oBACL;wBACE,IAAI,EAAE,4BAA4B;qBACnC;oBACD;wBACE,IAAI,EAAE,0BAA0B;qBACjC;iBACF;aACF;SACF;KACF;IACD,KAAK,EAAE,oBAAoB;IAC3B,WAAW,EAAE,6BAA6B;IAC1C,IAAI,EAAE,QAAQ;IACd,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACV,UAAU,EAAE;YACV,WAAW,EACT,uEAAuE;YACzE,IAAI,EAAE,QAAQ;YACd,SAAS,EAAE,CAAC;SACb;QACD,MAAM,EAAE;YACN,IAAI,EAAE,sBAAsB;SAC7B;KACF;IACD,QAAQ,EAAE,CAAC,QAAQ,CAAC;CACZ,CAAC"}
@@ -15,9 +15,6 @@ class ModuleFederationPlugin {
15
15
  this.name = exports.PLUGIN_NAME;
16
16
  }
17
17
  apply(compiler) {
18
- if (!compiler.options.plugins.find((p) => p && p['name'] === exports.PLUGIN_NAME)) {
19
- compiler.options.plugins.push(this);
20
- }
21
18
  process.env['FEDERATION_WEBPACK_PATH'] =
22
19
  process.env['FEDERATION_WEBPACK_PATH'] || (0, normalize_webpack_path_1.getWebpackPath)(compiler);
23
20
  const CoreModuleFederationPlugin = require('../lib/container/ModuleFederationPlugin')
@@ -1 +1 @@
1
- {"version":3,"file":"ModuleFederationPlugin.js","sourceRoot":"","sources":["../../../src/wrapper/ModuleFederationPlugin.ts"],"names":[],"mappings":";;;;;;AAUA,0FAA+E;AAC/E,0DAA6B;AAC7B,sDAAyB;AAC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AAI,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,CAAC,YAAY,CAAC,EAC9D,CAAC;YACD,IAAI,qCAAiB,CAAC;gBACpB,uBAAuB,EAAE,IAAI,CAAC,QAAQ;aACvC,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACrB,CAAC;IACH,CAAC;IAED,IAAI,iBAAiB;QACnB,OAAO,IAAI,CAAC,SAAS,EAAE,iBAAiB,CAAC;IAC3C,CAAC;CACF;AAvCD,yCAuCC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@module-federation/enhanced",
3
- "version": "0.8.8",
3
+ "version": "0.8.10",
4
4
  "main": "./dist/src/index.js",
5
5
  "types": "./dist/src/index.d.ts",
6
6
  "repository": {
@@ -17,9 +17,9 @@
17
17
  "access": "public"
18
18
  },
19
19
  "peerDependencies": {
20
- "webpack": "^5.0.0",
21
20
  "typescript": "^4.9.0 || ^5.0.0",
22
- "vue-tsc": ">=1.0.24"
21
+ "vue-tsc": ">=1.0.24",
22
+ "webpack": "^5.0.0"
23
23
  },
24
24
  "peerDependenciesMeta": {
25
25
  "webpack": {
@@ -80,21 +80,23 @@
80
80
  },
81
81
  "devDependencies": {
82
82
  "@types/btoa": "^1.2.5",
83
+ "ajv": "^8.17.1",
83
84
  "enhanced-resolve": "^5.0.0",
84
- "@module-federation/webpack-bundler-runtime": "0.8.8"
85
+ "terser": "^5.37.0",
86
+ "@module-federation/webpack-bundler-runtime": "0.8.10"
85
87
  },
86
88
  "dependencies": {
87
- "upath": "2.0.1",
88
89
  "btoa": "^1.2.1",
89
- "@module-federation/sdk": "0.8.8",
90
- "@module-federation/runtime-tools": "0.8.8",
91
- "@module-federation/manifest": "0.8.8",
92
- "@module-federation/managers": "0.8.8",
93
- "@module-federation/error-codes": "0.8.8",
94
- "@module-federation/dts-plugin": "0.8.8",
95
- "@module-federation/rspack": "0.8.8",
96
- "@module-federation/bridge-react-webpack-plugin": "0.8.8",
97
- "@module-federation/data-prefetch": "0.8.8",
98
- "@module-federation/inject-external-runtime-core-plugin": "0.8.8"
90
+ "upath": "2.0.1",
91
+ "@module-federation/bridge-react-webpack-plugin": "0.8.10",
92
+ "@module-federation/data-prefetch": "0.8.10",
93
+ "@module-federation/dts-plugin": "0.8.10",
94
+ "@module-federation/error-codes": "0.8.10",
95
+ "@module-federation/inject-external-runtime-core-plugin": "0.8.10",
96
+ "@module-federation/managers": "0.8.10",
97
+ "@module-federation/manifest": "0.8.10",
98
+ "@module-federation/rspack": "0.8.10",
99
+ "@module-federation/runtime-tools": "0.8.10",
100
+ "@module-federation/sdk": "0.8.10"
99
101
  }
100
102
  }