@module-federation/esbuild 0.0.0-chore-bump-node-22-20260710161714
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/LICENSE +21 -0
- package/README.md +113 -0
- package/dist/adapters/lib/collect-exports.d.ts +3 -0
- package/dist/adapters/lib/collect-exports.js +153 -0
- package/dist/adapters/lib/collect-exports.mjs +80 -0
- package/dist/adapters/lib/commonjs.d.ts +101 -0
- package/dist/adapters/lib/commonjs.js +258 -0
- package/dist/adapters/lib/commonjs.mjs +182 -0
- package/dist/adapters/lib/containerPlugin.d.ts +6 -0
- package/dist/adapters/lib/containerPlugin.js +233 -0
- package/dist/adapters/lib/containerPlugin.mjs +179 -0
- package/dist/adapters/lib/containerReference.d.ts +6 -0
- package/dist/adapters/lib/containerReference.js +257 -0
- package/dist/adapters/lib/containerReference.mjs +188 -0
- package/dist/adapters/lib/lexer.d.ts +9 -0
- package/dist/adapters/lib/lexer.js +187 -0
- package/dist/adapters/lib/lexer.mjs +136 -0
- package/dist/adapters/lib/linkRemotesPlugin.d.ts +6 -0
- package/dist/adapters/lib/linkRemotesPlugin.js +117 -0
- package/dist/adapters/lib/linkRemotesPlugin.mjs +48 -0
- package/dist/adapters/lib/manifest.d.ts +2 -0
- package/dist/adapters/lib/manifest.js +227 -0
- package/dist/adapters/lib/manifest.mjs +159 -0
- package/dist/adapters/lib/plugin.d.ts +8 -0
- package/dist/adapters/lib/plugin.js +340 -0
- package/dist/adapters/lib/plugin.mjs +247 -0
- package/dist/adapters/lib/react-replacements.d.ts +9 -0
- package/dist/adapters/lib/react-replacements.js +86 -0
- package/dist/adapters/lib/react-replacements.mjs +34 -0
- package/dist/adapters/lib/transform.d.ts +8 -0
- package/dist/adapters/lib/transform.js +171 -0
- package/dist/adapters/lib/transform.mjs +116 -0
- package/dist/adapters/lib/utils.d.ts +3 -0
- package/dist/adapters/lib/utils.js +87 -0
- package/dist/adapters/lib/utils.mjs +31 -0
- package/dist/build.d.ts +5 -0
- package/dist/build.js +140 -0
- package/dist/build.mjs +12 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.js +55 -0
- package/dist/index.mjs +3 -0
- package/dist/lib/config/configuration-context.d.ts +7 -0
- package/dist/lib/config/configuration-context.js +73 -0
- package/dist/lib/config/configuration-context.mjs +18 -0
- package/dist/lib/config/federation-config.d.ts +30 -0
- package/dist/lib/config/federation-config.js +29 -0
- package/dist/lib/config/federation-config.mjs +3 -0
- package/dist/lib/config/share-utils.d.ts +29 -0
- package/dist/lib/config/share-utils.js +340 -0
- package/dist/lib/config/share-utils.mjs +245 -0
- package/dist/lib/config/with-native-federation.d.ts +23 -0
- package/dist/lib/config/with-native-federation.js +120 -0
- package/dist/lib/config/with-native-federation.mjs +66 -0
- package/dist/lib/core/build-adapter.d.ts +4 -0
- package/dist/lib/core/build-adapter.js +72 -0
- package/dist/lib/core/build-adapter.mjs +16 -0
- package/dist/lib/core/createContainerTemplate.d.ts +1 -0
- package/dist/lib/core/createContainerTemplate.js +235 -0
- package/dist/lib/core/createContainerTemplate.mjs +183 -0
- package/dist/lib/core/default-skip-list.d.ts +12 -0
- package/dist/lib/core/default-skip-list.js +103 -0
- package/dist/lib/core/default-skip-list.mjs +45 -0
- package/dist/lib/core/federation-options.d.ts +10 -0
- package/dist/lib/core/federation-options.js +29 -0
- package/dist/lib/core/federation-options.mjs +3 -0
- package/dist/lib/core/get-externals.d.ts +2 -0
- package/dist/lib/core/get-externals.js +68 -0
- package/dist/lib/core/get-externals.mjs +17 -0
- package/dist/lib/core/load-federation-config.d.ts +6 -0
- package/dist/lib/core/load-federation-config.js +71 -0
- package/dist/lib/core/load-federation-config.mjs +16 -0
- package/dist/lib/core/write-federation-info.d.ts +9 -0
- package/dist/lib/core/write-federation-info.js +67 -0
- package/dist/lib/core/write-federation-info.mjs +12 -0
- package/dist/lib/utils/logger.d.ts +11 -0
- package/dist/lib/utils/logger.js +113 -0
- package/dist/lib/utils/logger.mjs +44 -0
- package/dist/lib/utils/mapped-paths.d.ts +10 -0
- package/dist/lib/utils/mapped-paths.js +95 -0
- package/dist/lib/utils/mapped-paths.mjs +40 -0
- package/dist/lib/utils/normalize.d.ts +1 -0
- package/dist/lib/utils/normalize.js +66 -0
- package/dist/lib/utils/normalize.mjs +15 -0
- package/dist/lib/utils/package-info.d.ts +18 -0
- package/dist/lib/utils/package-info.js +325 -0
- package/dist/lib/utils/package-info.mjs +259 -0
- package/dist/plugin.d.ts +1 -0
- package/dist/plugin.js +96 -0
- package/dist/plugin.mjs +4 -0
- package/dist/resolve/esm-resolver.mjs +19 -0
- package/dist/resolve/package.json +3 -0
- package/dist/rslib-runtime.mjs +31 -0
- package/package.json +75 -0
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict"
|
|
2
|
+
|
|
3
|
+
const reactReplacements = {
|
|
4
|
+
dev: {
|
|
5
|
+
'node_modules/react/index.js': {
|
|
6
|
+
file: 'node_modules/react/cjs/react.development.js'
|
|
7
|
+
},
|
|
8
|
+
'node_modules/react/jsx-dev-runtime.js': {
|
|
9
|
+
file: 'node_modules/react/cjs/react-jsx-dev-runtime.development.js'
|
|
10
|
+
},
|
|
11
|
+
'node_modules/react/jsx-runtime.js': {
|
|
12
|
+
file: 'node_modules/react/cjs/react-jsx-runtime.development.js'
|
|
13
|
+
},
|
|
14
|
+
'node_modules/react-dom/index.js': {
|
|
15
|
+
file: 'node_modules/react-dom/cjs/react-dom.development.js'
|
|
16
|
+
}
|
|
17
|
+
},
|
|
18
|
+
prod: {
|
|
19
|
+
'node_modules/react/index.js': {
|
|
20
|
+
file: 'node_modules/react/cjs/react.production.min.js'
|
|
21
|
+
},
|
|
22
|
+
'node_modules/react/jsx-dev-runtime.js': {
|
|
23
|
+
file: 'node_modules/react/cjs/react-jsx-dev-runtime.production.min.js'
|
|
24
|
+
},
|
|
25
|
+
'node_modules/react/jsx-runtime.js': {
|
|
26
|
+
file: 'node_modules/react/cjs/react-jsx-runtime.production.min.js'
|
|
27
|
+
},
|
|
28
|
+
'node_modules/react-dom/index.js': {
|
|
29
|
+
file: 'node_modules/react-dom/cjs/react-dom.production.min.js'
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
};
|
|
33
|
+
|
|
34
|
+
export { reactReplacements };
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/define_property_getters
|
|
13
|
+
(() => {
|
|
14
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
15
|
+
var define = (defs, kind) => {
|
|
16
|
+
for(var key in defs) {
|
|
17
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
define(getters, "get");
|
|
23
|
+
define(values, "value");
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
// webpack/runtime/has_own_property
|
|
27
|
+
(() => {
|
|
28
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
29
|
+
})();
|
|
30
|
+
// webpack/runtime/make_namespace_object
|
|
31
|
+
(() => {
|
|
32
|
+
// define __esModule on exports
|
|
33
|
+
__webpack_require__.r = (exports) => {
|
|
34
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
35
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
var __webpack_exports__ = {};
|
|
41
|
+
// ESM COMPAT FLAG
|
|
42
|
+
__webpack_require__.r(__webpack_exports__);
|
|
43
|
+
|
|
44
|
+
// EXPORTS
|
|
45
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
46
|
+
transform: () => (/* binding */ transform)
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
;// CONCATENATED MODULE: external "esbuild"
|
|
50
|
+
const external_esbuild_namespaceObject = require("esbuild");
|
|
51
|
+
;// CONCATENATED MODULE: external "path"
|
|
52
|
+
const external_path_namespaceObject = require("path");
|
|
53
|
+
;// CONCATENATED MODULE: ./src/adapters/lib/transform.ts
|
|
54
|
+
|
|
55
|
+
|
|
56
|
+
const targets = {
|
|
57
|
+
esnext: 'esnext',
|
|
58
|
+
es2015: 'es2015',
|
|
59
|
+
es2016: 'es2016',
|
|
60
|
+
es2017: 'es2017',
|
|
61
|
+
es2018: 'es2018',
|
|
62
|
+
es2019: 'es2019',
|
|
63
|
+
es2020: 'es2020',
|
|
64
|
+
es2021: 'es2021',
|
|
65
|
+
es2022: 'es2022'
|
|
66
|
+
};
|
|
67
|
+
async function transform(input) {
|
|
68
|
+
let target = 'esnext';
|
|
69
|
+
if (input.target && targets[input.target]) {
|
|
70
|
+
target = targets[input.target];
|
|
71
|
+
} else if (input.target) {
|
|
72
|
+
throw new Error('<400> invalid target');
|
|
73
|
+
}
|
|
74
|
+
let loader = 'js';
|
|
75
|
+
const extname = external_path_namespaceObject.extname(input.filename);
|
|
76
|
+
switch(extname){
|
|
77
|
+
case '.jsx':
|
|
78
|
+
loader = 'jsx';
|
|
79
|
+
break;
|
|
80
|
+
case '.ts':
|
|
81
|
+
loader = 'ts';
|
|
82
|
+
break;
|
|
83
|
+
case '.tsx':
|
|
84
|
+
loader = 'tsx';
|
|
85
|
+
break;
|
|
86
|
+
}
|
|
87
|
+
const imports = {};
|
|
88
|
+
const trailingSlashImports = {};
|
|
89
|
+
let jsxImportSource = '';
|
|
90
|
+
if (input.importMap) {
|
|
91
|
+
const im = JSON.parse(input.importMap);
|
|
92
|
+
if (im.imports) {
|
|
93
|
+
for (const [key, value] of Object.entries(im.imports)){
|
|
94
|
+
if (typeof value === 'string' && value !== '') {
|
|
95
|
+
if (key.endsWith('/')) {
|
|
96
|
+
trailingSlashImports[key] = value;
|
|
97
|
+
} else {
|
|
98
|
+
if (key === '@jsxImportSource') {
|
|
99
|
+
jsxImportSource = value;
|
|
100
|
+
}
|
|
101
|
+
imports[key] = value;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
const onResolver = (args)=>{
|
|
108
|
+
let resolvedPath = args.path;
|
|
109
|
+
if (imports[resolvedPath]) {
|
|
110
|
+
resolvedPath = imports[resolvedPath];
|
|
111
|
+
} else {
|
|
112
|
+
for (const [key, value] of Object.entries(trailingSlashImports)){
|
|
113
|
+
if (resolvedPath.startsWith(key)) {
|
|
114
|
+
resolvedPath = value + resolvedPath.slice(key.length);
|
|
115
|
+
break;
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
return {
|
|
120
|
+
path: resolvedPath,
|
|
121
|
+
external: true
|
|
122
|
+
};
|
|
123
|
+
};
|
|
124
|
+
const stdin = {
|
|
125
|
+
contents: input.code,
|
|
126
|
+
resolveDir: '/',
|
|
127
|
+
sourcefile: input.filename,
|
|
128
|
+
loader: loader
|
|
129
|
+
};
|
|
130
|
+
const jsx = jsxImportSource ? 'automatic' : 'transform';
|
|
131
|
+
const opts = {
|
|
132
|
+
outdir: '/esbuild',
|
|
133
|
+
stdin: stdin,
|
|
134
|
+
platform: 'browser',
|
|
135
|
+
format: 'esm',
|
|
136
|
+
target: target,
|
|
137
|
+
jsx: jsx,
|
|
138
|
+
jsxImportSource: jsxImportSource,
|
|
139
|
+
bundle: true,
|
|
140
|
+
treeShaking: false,
|
|
141
|
+
minifyWhitespace: false,
|
|
142
|
+
minifySyntax: false,
|
|
143
|
+
write: false,
|
|
144
|
+
plugins: [
|
|
145
|
+
{
|
|
146
|
+
name: 'resolver',
|
|
147
|
+
setup (build) {
|
|
148
|
+
build.onResolve({
|
|
149
|
+
filter: /.*/
|
|
150
|
+
}, onResolver);
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
]
|
|
154
|
+
};
|
|
155
|
+
const ret = await external_esbuild_namespaceObject.build(opts);
|
|
156
|
+
if (ret.errors.length > 0) {
|
|
157
|
+
throw new Error('<400> failed to validate code: ' + ret.errors[0].text);
|
|
158
|
+
}
|
|
159
|
+
if (!ret.outputFiles || ret.outputFiles.length === 0) {
|
|
160
|
+
throw new Error('<400> failed to validate code: no output files');
|
|
161
|
+
}
|
|
162
|
+
return ret.outputFiles[0].text;
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
exports.transform = __webpack_exports__.transform;
|
|
166
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
167
|
+
if(["transform"].indexOf(__rspack_i) === -1) {
|
|
168
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import * as __rspack_external_esbuild from "esbuild";
|
|
2
|
+
import * as __rspack_external_path from "path";
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
const targets = {
|
|
8
|
+
esnext: 'esnext',
|
|
9
|
+
es2015: 'es2015',
|
|
10
|
+
es2016: 'es2016',
|
|
11
|
+
es2017: 'es2017',
|
|
12
|
+
es2018: 'es2018',
|
|
13
|
+
es2019: 'es2019',
|
|
14
|
+
es2020: 'es2020',
|
|
15
|
+
es2021: 'es2021',
|
|
16
|
+
es2022: 'es2022'
|
|
17
|
+
};
|
|
18
|
+
async function transform(input) {
|
|
19
|
+
let target = 'esnext';
|
|
20
|
+
if (input.target && targets[input.target]) {
|
|
21
|
+
target = targets[input.target];
|
|
22
|
+
} else if (input.target) {
|
|
23
|
+
throw new Error('<400> invalid target');
|
|
24
|
+
}
|
|
25
|
+
let loader = 'js';
|
|
26
|
+
const extname = __rspack_external_path.extname(input.filename);
|
|
27
|
+
switch(extname){
|
|
28
|
+
case '.jsx':
|
|
29
|
+
loader = 'jsx';
|
|
30
|
+
break;
|
|
31
|
+
case '.ts':
|
|
32
|
+
loader = 'ts';
|
|
33
|
+
break;
|
|
34
|
+
case '.tsx':
|
|
35
|
+
loader = 'tsx';
|
|
36
|
+
break;
|
|
37
|
+
}
|
|
38
|
+
const imports = {};
|
|
39
|
+
const trailingSlashImports = {};
|
|
40
|
+
let jsxImportSource = '';
|
|
41
|
+
if (input.importMap) {
|
|
42
|
+
const im = JSON.parse(input.importMap);
|
|
43
|
+
if (im.imports) {
|
|
44
|
+
for (const [key, value] of Object.entries(im.imports)){
|
|
45
|
+
if (typeof value === 'string' && value !== '') {
|
|
46
|
+
if (key.endsWith('/')) {
|
|
47
|
+
trailingSlashImports[key] = value;
|
|
48
|
+
} else {
|
|
49
|
+
if (key === '@jsxImportSource') {
|
|
50
|
+
jsxImportSource = value;
|
|
51
|
+
}
|
|
52
|
+
imports[key] = value;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
const onResolver = (args)=>{
|
|
59
|
+
let resolvedPath = args.path;
|
|
60
|
+
if (imports[resolvedPath]) {
|
|
61
|
+
resolvedPath = imports[resolvedPath];
|
|
62
|
+
} else {
|
|
63
|
+
for (const [key, value] of Object.entries(trailingSlashImports)){
|
|
64
|
+
if (resolvedPath.startsWith(key)) {
|
|
65
|
+
resolvedPath = value + resolvedPath.slice(key.length);
|
|
66
|
+
break;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
return {
|
|
71
|
+
path: resolvedPath,
|
|
72
|
+
external: true
|
|
73
|
+
};
|
|
74
|
+
};
|
|
75
|
+
const stdin = {
|
|
76
|
+
contents: input.code,
|
|
77
|
+
resolveDir: '/',
|
|
78
|
+
sourcefile: input.filename,
|
|
79
|
+
loader: loader
|
|
80
|
+
};
|
|
81
|
+
const jsx = jsxImportSource ? 'automatic' : 'transform';
|
|
82
|
+
const opts = {
|
|
83
|
+
outdir: '/esbuild',
|
|
84
|
+
stdin: stdin,
|
|
85
|
+
platform: 'browser',
|
|
86
|
+
format: 'esm',
|
|
87
|
+
target: target,
|
|
88
|
+
jsx: jsx,
|
|
89
|
+
jsxImportSource: jsxImportSource,
|
|
90
|
+
bundle: true,
|
|
91
|
+
treeShaking: false,
|
|
92
|
+
minifyWhitespace: false,
|
|
93
|
+
minifySyntax: false,
|
|
94
|
+
write: false,
|
|
95
|
+
plugins: [
|
|
96
|
+
{
|
|
97
|
+
name: 'resolver',
|
|
98
|
+
setup (build) {
|
|
99
|
+
build.onResolve({
|
|
100
|
+
filter: /.*/
|
|
101
|
+
}, onResolver);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
]
|
|
105
|
+
};
|
|
106
|
+
const ret = await __rspack_external_esbuild.build(opts);
|
|
107
|
+
if (ret.errors.length > 0) {
|
|
108
|
+
throw new Error('<400> failed to validate code: ' + ret.errors[0].text);
|
|
109
|
+
}
|
|
110
|
+
if (!ret.outputFiles || ret.outputFiles.length === 0) {
|
|
111
|
+
throw new Error('<400> failed to validate code: no output files');
|
|
112
|
+
}
|
|
113
|
+
return ret.outputFiles[0].text;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export { transform };
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/define_property_getters
|
|
13
|
+
(() => {
|
|
14
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
15
|
+
var define = (defs, kind) => {
|
|
16
|
+
for(var key in defs) {
|
|
17
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
define(getters, "get");
|
|
23
|
+
define(values, "value");
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
// webpack/runtime/has_own_property
|
|
27
|
+
(() => {
|
|
28
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
29
|
+
})();
|
|
30
|
+
// webpack/runtime/make_namespace_object
|
|
31
|
+
(() => {
|
|
32
|
+
// define __esModule on exports
|
|
33
|
+
__webpack_require__.r = (exports) => {
|
|
34
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
35
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
var __webpack_exports__ = {};
|
|
41
|
+
__webpack_require__.r(__webpack_exports__);
|
|
42
|
+
function orderedUniq(array) {
|
|
43
|
+
// prettier-ignore
|
|
44
|
+
const ret = [], visited = new Set();
|
|
45
|
+
for (const val of array)if (!visited.has(val)) visited.add(val), ret.push(val);
|
|
46
|
+
return ret;
|
|
47
|
+
}
|
|
48
|
+
function cachedReduce(array, reducer, s) {
|
|
49
|
+
// prettier-ignore
|
|
50
|
+
const cache = [
|
|
51
|
+
s
|
|
52
|
+
];
|
|
53
|
+
let cacheLen = 1, last = s;
|
|
54
|
+
return (len)=>{
|
|
55
|
+
while(cacheLen <= len)cacheLen = cache.push(last = reducer(last, array[cacheLen - 1]));
|
|
56
|
+
return cache[len];
|
|
57
|
+
};
|
|
58
|
+
}
|
|
59
|
+
// from @rollup/pluginutils
|
|
60
|
+
const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
|
|
61
|
+
const builtin = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
|
|
62
|
+
const forbiddenIdentifiers = new Set(`${reservedWords} ${builtin}`.split(' '));
|
|
63
|
+
forbiddenIdentifiers.add('');
|
|
64
|
+
const makeLegalIdentifier = function makeLegalIdentifier(str) {
|
|
65
|
+
let identifier = str.replace(/-(\w)/g, (_, letter)=>letter.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g, '_');
|
|
66
|
+
if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
|
|
67
|
+
identifier = `_${identifier}`;
|
|
68
|
+
}
|
|
69
|
+
return identifier || '_';
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
73
|
+
cachedReduce: () => (cachedReduce),
|
|
74
|
+
orderedUniq: () => (orderedUniq)
|
|
75
|
+
}, {
|
|
76
|
+
makeLegalIdentifier: makeLegalIdentifier
|
|
77
|
+
});
|
|
78
|
+
|
|
79
|
+
exports.cachedReduce = __webpack_exports__.cachedReduce;
|
|
80
|
+
exports.makeLegalIdentifier = __webpack_exports__.makeLegalIdentifier;
|
|
81
|
+
exports.orderedUniq = __webpack_exports__.orderedUniq;
|
|
82
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
83
|
+
if(["cachedReduce","makeLegalIdentifier","orderedUniq"].indexOf(__rspack_i) === -1) {
|
|
84
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
function orderedUniq(array) {
|
|
2
|
+
// prettier-ignore
|
|
3
|
+
const ret = [], visited = new Set();
|
|
4
|
+
for (const val of array)if (!visited.has(val)) visited.add(val), ret.push(val);
|
|
5
|
+
return ret;
|
|
6
|
+
}
|
|
7
|
+
function cachedReduce(array, reducer, s) {
|
|
8
|
+
// prettier-ignore
|
|
9
|
+
const cache = [
|
|
10
|
+
s
|
|
11
|
+
];
|
|
12
|
+
let cacheLen = 1, last = s;
|
|
13
|
+
return (len)=>{
|
|
14
|
+
while(cacheLen <= len)cacheLen = cache.push(last = reducer(last, array[cacheLen - 1]));
|
|
15
|
+
return cache[len];
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
// from @rollup/pluginutils
|
|
19
|
+
const reservedWords = 'break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public';
|
|
20
|
+
const builtin = 'arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl';
|
|
21
|
+
const forbiddenIdentifiers = new Set(`${reservedWords} ${builtin}`.split(' '));
|
|
22
|
+
forbiddenIdentifiers.add('');
|
|
23
|
+
const utils_makeLegalIdentifier = function makeLegalIdentifier(str) {
|
|
24
|
+
let identifier = str.replace(/-(\w)/g, (_, letter)=>letter.toUpperCase()).replace(/[^$_a-zA-Z0-9]/g, '_');
|
|
25
|
+
if (/\d/.test(identifier[0]) || forbiddenIdentifiers.has(identifier)) {
|
|
26
|
+
identifier = `_${identifier}`;
|
|
27
|
+
}
|
|
28
|
+
return identifier || '_';
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
export { cachedReduce, orderedUniq, utils_makeLegalIdentifier as makeLegalIdentifier };
|
package/dist/build.d.ts
ADDED
package/dist/build.js
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
var __webpack_modules__ = ({
|
|
10
|
+
"./lib/config/share-utils"(module) {
|
|
11
|
+
module.exports = require("./lib/config/share-utils.js");
|
|
12
|
+
|
|
13
|
+
},
|
|
14
|
+
"./lib/config/with-native-federation"(module) {
|
|
15
|
+
module.exports = require("./lib/config/with-native-federation.js");
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
"./lib/core/get-externals"(module) {
|
|
19
|
+
module.exports = require("./lib/core/get-externals.js");
|
|
20
|
+
|
|
21
|
+
},
|
|
22
|
+
"./lib/core/load-federation-config"(module) {
|
|
23
|
+
module.exports = require("./lib/core/load-federation-config.js");
|
|
24
|
+
|
|
25
|
+
},
|
|
26
|
+
"./lib/utils/logger"(module) {
|
|
27
|
+
module.exports = require("./lib/utils/logger.js");
|
|
28
|
+
|
|
29
|
+
},
|
|
30
|
+
|
|
31
|
+
});
|
|
32
|
+
// The module cache
|
|
33
|
+
var __webpack_module_cache__ = {};
|
|
34
|
+
|
|
35
|
+
// The require function
|
|
36
|
+
function __webpack_require__(moduleId) {
|
|
37
|
+
|
|
38
|
+
// Check if module is in cache
|
|
39
|
+
var cachedModule = __webpack_module_cache__[moduleId];
|
|
40
|
+
if (cachedModule !== undefined) {
|
|
41
|
+
return cachedModule.exports;
|
|
42
|
+
}
|
|
43
|
+
// Create a new module (and put it into the cache)
|
|
44
|
+
var module = (__webpack_module_cache__[moduleId] = {
|
|
45
|
+
exports: {}
|
|
46
|
+
});
|
|
47
|
+
// Execute the module function
|
|
48
|
+
__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
|
49
|
+
|
|
50
|
+
// Return the exports of the module
|
|
51
|
+
return module.exports;
|
|
52
|
+
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// webpack/runtime/compat_get_default_export
|
|
56
|
+
(() => {
|
|
57
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
|
58
|
+
__webpack_require__.n = (module) => {
|
|
59
|
+
var getter = module && module.__esModule ?
|
|
60
|
+
() => (module['default']) :
|
|
61
|
+
() => (module);
|
|
62
|
+
__webpack_require__.d(getter, { a: getter });
|
|
63
|
+
return getter;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
})();
|
|
67
|
+
// webpack/runtime/define_property_getters
|
|
68
|
+
(() => {
|
|
69
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
70
|
+
var define = (defs, kind) => {
|
|
71
|
+
for(var key in defs) {
|
|
72
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
73
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
};
|
|
77
|
+
define(getters, "get");
|
|
78
|
+
define(values, "value");
|
|
79
|
+
};
|
|
80
|
+
})();
|
|
81
|
+
// webpack/runtime/has_own_property
|
|
82
|
+
(() => {
|
|
83
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
84
|
+
})();
|
|
85
|
+
// webpack/runtime/make_namespace_object
|
|
86
|
+
(() => {
|
|
87
|
+
// define __esModule on exports
|
|
88
|
+
__webpack_require__.r = (exports) => {
|
|
89
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
90
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
91
|
+
}
|
|
92
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
93
|
+
};
|
|
94
|
+
})();
|
|
95
|
+
var __webpack_exports__ = {};
|
|
96
|
+
// This entry needs to be wrapped in an IIFE because it needs to be isolated against other modules in the chunk.
|
|
97
|
+
(() => {
|
|
98
|
+
__webpack_require__.r(__webpack_exports__);
|
|
99
|
+
/* import */ var _lib_core_get_externals__rspack_import_0 = __webpack_require__("./lib/core/get-externals");
|
|
100
|
+
/* import */ var _lib_core_get_externals__rspack_import_0_default = /*#__PURE__*/__webpack_require__.n(_lib_core_get_externals__rspack_import_0);
|
|
101
|
+
|
|
102
|
+
/* reexport */ var __rspack_reexport = {};
|
|
103
|
+
/* reexport */ for( const __rspack_import_key in _lib_core_get_externals__rspack_import_0) if(__rspack_import_key !== "default") __rspack_reexport[__rspack_import_key] =() => _lib_core_get_externals__rspack_import_0[__rspack_import_key]
|
|
104
|
+
/* reexport */ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
105
|
+
/* import */ var _lib_core_load_federation_config__rspack_import_1 = __webpack_require__("./lib/core/load-federation-config");
|
|
106
|
+
/* import */ var _lib_core_load_federation_config__rspack_import_1_default = /*#__PURE__*/__webpack_require__.n(_lib_core_load_federation_config__rspack_import_1);
|
|
107
|
+
|
|
108
|
+
/* reexport */ var __rspack_reexport = {};
|
|
109
|
+
/* reexport */ for( const __rspack_import_key in _lib_core_load_federation_config__rspack_import_1) if(__rspack_import_key !== "default") __rspack_reexport[__rspack_import_key] =() => _lib_core_load_federation_config__rspack_import_1[__rspack_import_key]
|
|
110
|
+
/* reexport */ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
111
|
+
/* import */ var _lib_config_with_native_federation__rspack_import_2 = __webpack_require__("./lib/config/with-native-federation");
|
|
112
|
+
/* import */ var _lib_config_with_native_federation__rspack_import_2_default = /*#__PURE__*/__webpack_require__.n(_lib_config_with_native_federation__rspack_import_2);
|
|
113
|
+
|
|
114
|
+
/* reexport */ var __rspack_reexport = {};
|
|
115
|
+
/* reexport */ for( const __rspack_import_key in _lib_config_with_native_federation__rspack_import_2) if(__rspack_import_key !== "default") __rspack_reexport[__rspack_import_key] =() => _lib_config_with_native_federation__rspack_import_2[__rspack_import_key]
|
|
116
|
+
/* reexport */ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
117
|
+
/* import */ var _lib_config_share_utils__rspack_import_3 = __webpack_require__("./lib/config/share-utils");
|
|
118
|
+
/* import */ var _lib_config_share_utils__rspack_import_3_default = /*#__PURE__*/__webpack_require__.n(_lib_config_share_utils__rspack_import_3);
|
|
119
|
+
|
|
120
|
+
/* reexport */ var __rspack_reexport = {};
|
|
121
|
+
/* reexport */ for( const __rspack_import_key in _lib_config_share_utils__rspack_import_3) if(__rspack_import_key !== "default") __rspack_reexport[__rspack_import_key] =() => _lib_config_share_utils__rspack_import_3[__rspack_import_key]
|
|
122
|
+
/* reexport */ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
123
|
+
/* import */ var _lib_utils_logger__rspack_import_4 = __webpack_require__("./lib/utils/logger");
|
|
124
|
+
/* import */ var _lib_utils_logger__rspack_import_4_default = /*#__PURE__*/__webpack_require__.n(_lib_utils_logger__rspack_import_4);
|
|
125
|
+
|
|
126
|
+
/* reexport */ var __rspack_reexport = {};
|
|
127
|
+
/* reexport */ for( const __rspack_import_key in _lib_utils_logger__rspack_import_4) if(__rspack_import_key !== "default") __rspack_reexport[__rspack_import_key] =() => _lib_utils_logger__rspack_import_4[__rspack_import_key]
|
|
128
|
+
/* reexport */ __webpack_require__.d(__webpack_exports__, __rspack_reexport);
|
|
129
|
+
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
})();
|
|
136
|
+
|
|
137
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
138
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
139
|
+
}
|
|
140
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
package/dist/build.mjs
ADDED
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
export * from "./lib/core/get-externals.mjs";
|
|
2
|
+
export * from "./lib/core/load-federation-config.mjs";
|
|
3
|
+
export * from "./lib/config/with-native-federation.mjs";
|
|
4
|
+
export * from "./lib/config/share-utils.mjs";
|
|
5
|
+
export * from "./lib/utils/logger.mjs";
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
export {};
|
package/dist/index.d.ts
ADDED
package/dist/index.js
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
const __rslib_import_meta_url__ = /*#__PURE__*/ (function () {
|
|
3
|
+
return typeof document === 'undefined'
|
|
4
|
+
? new (require('url'.replace('', '')).URL)('file:' + __filename).href
|
|
5
|
+
: (document.currentScript && document.currentScript.src) ||
|
|
6
|
+
new URL('main.js', document.baseURI).href;
|
|
7
|
+
})();
|
|
8
|
+
;
|
|
9
|
+
// The require scope
|
|
10
|
+
var __webpack_require__ = {};
|
|
11
|
+
|
|
12
|
+
// webpack/runtime/define_property_getters
|
|
13
|
+
(() => {
|
|
14
|
+
__webpack_require__.d = (exports, getters, values) => {
|
|
15
|
+
var define = (defs, kind) => {
|
|
16
|
+
for(var key in defs) {
|
|
17
|
+
if(__webpack_require__.o(defs, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, [kind]: defs[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
define(getters, "get");
|
|
23
|
+
define(values, "value");
|
|
24
|
+
};
|
|
25
|
+
})();
|
|
26
|
+
// webpack/runtime/has_own_property
|
|
27
|
+
(() => {
|
|
28
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
29
|
+
})();
|
|
30
|
+
// webpack/runtime/make_namespace_object
|
|
31
|
+
(() => {
|
|
32
|
+
// define __esModule on exports
|
|
33
|
+
__webpack_require__.r = (exports) => {
|
|
34
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
35
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
36
|
+
}
|
|
37
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
38
|
+
};
|
|
39
|
+
})();
|
|
40
|
+
var __webpack_exports__ = {};
|
|
41
|
+
__webpack_require__.r(__webpack_exports__);
|
|
42
|
+
/* export default */ const __rspack_default_export = ({});
|
|
43
|
+
|
|
44
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
45
|
+
}, {
|
|
46
|
+
"default": __rspack_default_export
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
exports["default"] = __webpack_exports__["default"];
|
|
50
|
+
for(var __rspack_i in __webpack_exports__) {
|
|
51
|
+
if(["default"].indexOf(__rspack_i) === -1) {
|
|
52
|
+
exports[__rspack_i] = __webpack_exports__[__rspack_i];
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
package/dist/index.mjs
ADDED