@module-federation/esbuild 0.0.95 → 0.0.97
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/adapters/lib/collect-exports.js +151 -0
- package/dist/adapters/lib/collect-exports.mjs +87 -0
- package/dist/adapters/lib/commonjs.js +260 -0
- package/dist/adapters/lib/commonjs.mjs +209 -0
- package/dist/adapters/lib/containerPlugin.js +232 -0
- package/dist/adapters/lib/containerPlugin.mjs +182 -0
- package/dist/adapters/lib/containerReference.js +219 -0
- package/dist/adapters/lib/containerReference.mjs +154 -0
- package/dist/adapters/lib/lexer.js +184 -0
- package/dist/adapters/lib/lexer.mjs +138 -0
- package/dist/adapters/lib/linkRemotesPlugin.js +115 -0
- package/dist/adapters/lib/linkRemotesPlugin.mjs +50 -0
- package/dist/adapters/lib/manifest.js +229 -0
- package/dist/adapters/lib/manifest.mjs +168 -0
- package/dist/adapters/lib/plugin.js +339 -0
- package/dist/adapters/lib/plugin.mjs +282 -0
- package/dist/adapters/lib/react-replacements.js +81 -0
- package/dist/adapters/lib/react-replacements.mjs +35 -0
- package/dist/adapters/lib/transform.js +169 -0
- package/dist/adapters/lib/transform.mjs +120 -0
- package/dist/adapters/lib/utils.js +83 -0
- package/dist/adapters/lib/utils.mjs +33 -0
- package/dist/build.js +131 -473
- package/dist/build.mjs +13 -380
- package/dist/index.js +41 -26
- package/dist/index.mjs +4 -1
- package/dist/lib/config/configuration-context.js +70 -0
- package/dist/lib/config/configuration-context.mjs +20 -0
- package/dist/lib/config/federation-config.js +31 -0
- package/dist/lib/config/federation-config.mjs +4 -0
- package/dist/lib/config/share-utils.js +339 -0
- package/dist/lib/config/share-utils.mjs +254 -0
- package/dist/lib/config/with-native-federation.js +118 -0
- package/dist/lib/config/with-native-federation.mjs +71 -0
- package/dist/lib/core/build-adapter.js +70 -0
- package/dist/lib/core/build-adapter.mjs +18 -0
- package/dist/lib/core/createContainerTemplate.js +231 -0
- package/dist/lib/core/createContainerTemplate.mjs +185 -0
- package/dist/lib/core/default-skip-list.js +99 -0
- package/dist/lib/core/default-skip-list.mjs +47 -0
- package/dist/lib/core/federation-options.js +31 -0
- package/dist/lib/core/federation-options.mjs +4 -0
- package/dist/lib/core/get-externals.js +65 -0
- package/dist/lib/core/get-externals.mjs +19 -0
- package/dist/lib/core/load-federation-config.js +69 -0
- package/dist/lib/core/load-federation-config.mjs +20 -0
- package/dist/lib/core/write-federation-info.js +65 -0
- package/dist/lib/core/write-federation-info.mjs +16 -0
- package/dist/lib/utils/logger.js +111 -0
- package/dist/lib/utils/logger.mjs +46 -0
- package/dist/lib/utils/mapped-paths.js +94 -0
- package/dist/lib/utils/mapped-paths.mjs +46 -0
- package/dist/lib/utils/normalize.js +63 -0
- package/dist/lib/utils/normalize.mjs +17 -0
- package/dist/lib/utils/package-info.js +324 -0
- package/dist/lib/utils/package-info.mjs +265 -0
- package/dist/plugin.d.ts +1 -0
- package/dist/plugin.js +79 -1231
- package/dist/plugin.mjs +2 -1187
- package/dist/resolve/esm-resolver.mjs +15 -22
- package/package.json +2 -2
|
@@ -0,0 +1,99 @@
|
|
|
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
|
+
/************************************************************************/
|
|
13
|
+
// webpack/runtime/define_property_getters
|
|
14
|
+
(() => {
|
|
15
|
+
__webpack_require__.d = (exports, definition) => {
|
|
16
|
+
for(var key in definition) {
|
|
17
|
+
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
})();
|
|
23
|
+
// webpack/runtime/has_own_property
|
|
24
|
+
(() => {
|
|
25
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
26
|
+
})();
|
|
27
|
+
// webpack/runtime/make_namespace_object
|
|
28
|
+
(() => {
|
|
29
|
+
// define __esModule on exports
|
|
30
|
+
__webpack_require__.r = (exports) => {
|
|
31
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
32
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
/************************************************************************/
|
|
38
|
+
var __webpack_exports__ = {};
|
|
39
|
+
__webpack_require__.r(__webpack_exports__);
|
|
40
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
41
|
+
DEFAULT_SKIP_LIST: () => (DEFAULT_SKIP_LIST),
|
|
42
|
+
PREPARED_DEFAULT_SKIP_LIST: () => (PREPARED_DEFAULT_SKIP_LIST),
|
|
43
|
+
isInSkipList: () => (isInSkipList),
|
|
44
|
+
prepareSkipList: () => (prepareSkipList)
|
|
45
|
+
});
|
|
46
|
+
const DEFAULT_SKIP_LIST = [
|
|
47
|
+
'@module-federation/native-federation-runtime',
|
|
48
|
+
'@module-federation/native-federation',
|
|
49
|
+
'@module-federation/native-federation-core',
|
|
50
|
+
'@module-federation/native-federation-esbuild',
|
|
51
|
+
'@angular-architects/native-federation',
|
|
52
|
+
'@angular-architects/native-federation-runtime',
|
|
53
|
+
'es-module-shims',
|
|
54
|
+
'zone.js',
|
|
55
|
+
'tslib/',
|
|
56
|
+
'@angular/localize',
|
|
57
|
+
'@angular/localize/init',
|
|
58
|
+
'@angular/localize/tools',
|
|
59
|
+
'@angular/platform-server',
|
|
60
|
+
'@angular/platform-server/init',
|
|
61
|
+
'@angular/ssr',
|
|
62
|
+
'express',
|
|
63
|
+
/\/schematics(\/|$)/,
|
|
64
|
+
/^@nx\/angular/,
|
|
65
|
+
(pkg)=>pkg.startsWith('@angular/') && !!pkg.match(/\/testing(\/|$)/),
|
|
66
|
+
(pkg)=>pkg.startsWith('@types/'),
|
|
67
|
+
(pkg)=>pkg.startsWith('@module-federation/')
|
|
68
|
+
];
|
|
69
|
+
const PREPARED_DEFAULT_SKIP_LIST = prepareSkipList(DEFAULT_SKIP_LIST);
|
|
70
|
+
function prepareSkipList(skipList) {
|
|
71
|
+
return {
|
|
72
|
+
strings: new Set(skipList.filter((e)=>typeof e === 'string')),
|
|
73
|
+
functions: skipList.filter((e)=>typeof e === 'function'),
|
|
74
|
+
regexps: skipList.filter((e)=>e instanceof RegExp)
|
|
75
|
+
};
|
|
76
|
+
}
|
|
77
|
+
function isInSkipList(entry, skipList) {
|
|
78
|
+
if (skipList.strings.has(entry)) {
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
if (skipList.functions.some((f)=>f(entry))) {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
if (skipList.regexps.some((r)=>r.test(entry))) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
87
|
+
return false;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
exports.DEFAULT_SKIP_LIST = __webpack_exports__.DEFAULT_SKIP_LIST;
|
|
91
|
+
exports.PREPARED_DEFAULT_SKIP_LIST = __webpack_exports__.PREPARED_DEFAULT_SKIP_LIST;
|
|
92
|
+
exports.isInSkipList = __webpack_exports__.isInSkipList;
|
|
93
|
+
exports.prepareSkipList = __webpack_exports__.prepareSkipList;
|
|
94
|
+
for(var __webpack_i__ in __webpack_exports__) {
|
|
95
|
+
if(["DEFAULT_SKIP_LIST","PREPARED_DEFAULT_SKIP_LIST","isInSkipList","prepareSkipList"].indexOf(__webpack_i__) === -1) {
|
|
96
|
+
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
|
|
2
|
+
;// CONCATENATED MODULE: ./src/lib/core/default-skip-list.ts
|
|
3
|
+
const DEFAULT_SKIP_LIST = [
|
|
4
|
+
'@module-federation/native-federation-runtime',
|
|
5
|
+
'@module-federation/native-federation',
|
|
6
|
+
'@module-federation/native-federation-core',
|
|
7
|
+
'@module-federation/native-federation-esbuild',
|
|
8
|
+
'@angular-architects/native-federation',
|
|
9
|
+
'@angular-architects/native-federation-runtime',
|
|
10
|
+
'es-module-shims',
|
|
11
|
+
'zone.js',
|
|
12
|
+
'tslib/',
|
|
13
|
+
'@angular/localize',
|
|
14
|
+
'@angular/localize/init',
|
|
15
|
+
'@angular/localize/tools',
|
|
16
|
+
'@angular/platform-server',
|
|
17
|
+
'@angular/platform-server/init',
|
|
18
|
+
'@angular/ssr',
|
|
19
|
+
'express',
|
|
20
|
+
/\/schematics(\/|$)/,
|
|
21
|
+
/^@nx\/angular/,
|
|
22
|
+
(pkg)=>pkg.startsWith('@angular/') && !!pkg.match(/\/testing(\/|$)/),
|
|
23
|
+
(pkg)=>pkg.startsWith('@types/'),
|
|
24
|
+
(pkg)=>pkg.startsWith('@module-federation/')
|
|
25
|
+
];
|
|
26
|
+
const PREPARED_DEFAULT_SKIP_LIST = prepareSkipList(DEFAULT_SKIP_LIST);
|
|
27
|
+
function prepareSkipList(skipList) {
|
|
28
|
+
return {
|
|
29
|
+
strings: new Set(skipList.filter((e)=>typeof e === 'string')),
|
|
30
|
+
functions: skipList.filter((e)=>typeof e === 'function'),
|
|
31
|
+
regexps: skipList.filter((e)=>e instanceof RegExp)
|
|
32
|
+
};
|
|
33
|
+
}
|
|
34
|
+
function isInSkipList(entry, skipList) {
|
|
35
|
+
if (skipList.strings.has(entry)) {
|
|
36
|
+
return true;
|
|
37
|
+
}
|
|
38
|
+
if (skipList.functions.some((f)=>f(entry))) {
|
|
39
|
+
return true;
|
|
40
|
+
}
|
|
41
|
+
if (skipList.regexps.some((r)=>r.test(entry))) {
|
|
42
|
+
return true;
|
|
43
|
+
}
|
|
44
|
+
return false;
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
export { DEFAULT_SKIP_LIST, PREPARED_DEFAULT_SKIP_LIST, isInSkipList, prepareSkipList };
|
|
@@ -0,0 +1,31 @@
|
|
|
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
|
+
/************************************************************************/
|
|
13
|
+
// webpack/runtime/make_namespace_object
|
|
14
|
+
(() => {
|
|
15
|
+
// define __esModule on exports
|
|
16
|
+
__webpack_require__.r = (exports) => {
|
|
17
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
18
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
19
|
+
}
|
|
20
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
21
|
+
};
|
|
22
|
+
})();
|
|
23
|
+
/************************************************************************/
|
|
24
|
+
var __webpack_exports__ = {};
|
|
25
|
+
__webpack_require__.r(__webpack_exports__);
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
for(var __webpack_i__ in __webpack_exports__) {
|
|
29
|
+
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
30
|
+
}
|
|
31
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
/************************************************************************/
|
|
13
|
+
// webpack/runtime/define_property_getters
|
|
14
|
+
(() => {
|
|
15
|
+
__webpack_require__.d = (exports, definition) => {
|
|
16
|
+
for(var key in definition) {
|
|
17
|
+
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
})();
|
|
23
|
+
// webpack/runtime/has_own_property
|
|
24
|
+
(() => {
|
|
25
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
26
|
+
})();
|
|
27
|
+
// webpack/runtime/make_namespace_object
|
|
28
|
+
(() => {
|
|
29
|
+
// define __esModule on exports
|
|
30
|
+
__webpack_require__.r = (exports) => {
|
|
31
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
32
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
/************************************************************************/
|
|
38
|
+
var __webpack_exports__ = {};
|
|
39
|
+
__webpack_require__.r(__webpack_exports__);
|
|
40
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
41
|
+
getExternals: () => (getExternals)
|
|
42
|
+
});
|
|
43
|
+
function getExternals(config) {
|
|
44
|
+
const shared = Object.keys(config.shared ?? {});
|
|
45
|
+
const remotes = config.remotes ?? {};
|
|
46
|
+
const remoteKeys = Object.keys(remotes).reduce((acc, key)=>{
|
|
47
|
+
if (!key) return acc;
|
|
48
|
+
acc.push(key);
|
|
49
|
+
acc.push(key + '/*');
|
|
50
|
+
return acc;
|
|
51
|
+
}, []);
|
|
52
|
+
const externals = [
|
|
53
|
+
...shared,
|
|
54
|
+
...remoteKeys
|
|
55
|
+
];
|
|
56
|
+
return externals;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
exports.getExternals = __webpack_exports__.getExternals;
|
|
60
|
+
for(var __webpack_i__ in __webpack_exports__) {
|
|
61
|
+
if(["getExternals"].indexOf(__webpack_i__) === -1) {
|
|
62
|
+
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
|
|
2
|
+
;// CONCATENATED MODULE: ./src/lib/core/get-externals.ts
|
|
3
|
+
function getExternals(config) {
|
|
4
|
+
const shared = Object.keys(config.shared ?? {});
|
|
5
|
+
const remotes = config.remotes ?? {};
|
|
6
|
+
const remoteKeys = Object.keys(remotes).reduce((acc, key)=>{
|
|
7
|
+
if (!key) return acc;
|
|
8
|
+
acc.push(key);
|
|
9
|
+
acc.push(key + '/*');
|
|
10
|
+
return acc;
|
|
11
|
+
}, []);
|
|
12
|
+
const externals = [
|
|
13
|
+
...shared,
|
|
14
|
+
...remoteKeys
|
|
15
|
+
];
|
|
16
|
+
return externals;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
export { getExternals };
|
|
@@ -0,0 +1,69 @@
|
|
|
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
|
+
/************************************************************************/
|
|
13
|
+
// webpack/runtime/define_property_getters
|
|
14
|
+
(() => {
|
|
15
|
+
__webpack_require__.d = (exports, definition) => {
|
|
16
|
+
for(var key in definition) {
|
|
17
|
+
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
})();
|
|
23
|
+
// webpack/runtime/has_own_property
|
|
24
|
+
(() => {
|
|
25
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
26
|
+
})();
|
|
27
|
+
// webpack/runtime/make_namespace_object
|
|
28
|
+
(() => {
|
|
29
|
+
// define __esModule on exports
|
|
30
|
+
__webpack_require__.r = (exports) => {
|
|
31
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
32
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
/************************************************************************/
|
|
38
|
+
var __webpack_exports__ = {};
|
|
39
|
+
// ESM COMPAT FLAG
|
|
40
|
+
__webpack_require__.r(__webpack_exports__);
|
|
41
|
+
|
|
42
|
+
// EXPORTS
|
|
43
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
44
|
+
loadFederationConfig: () => (/* binding */ loadFederationConfig)
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
;// CONCATENATED MODULE: external "path"
|
|
48
|
+
const external_path_namespaceObject = require("path");
|
|
49
|
+
;// CONCATENATED MODULE: external "fs"
|
|
50
|
+
const external_fs_namespaceObject = require("fs");
|
|
51
|
+
;// CONCATENATED MODULE: ./src/lib/core/load-federation-config.ts
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
async function loadFederationConfig(fedOptions) {
|
|
55
|
+
const fullConfigPath = external_path_namespaceObject.join(fedOptions.workspaceRoot, fedOptions.federationConfig);
|
|
56
|
+
if (!external_fs_namespaceObject.existsSync(fullConfigPath)) {
|
|
57
|
+
throw new Error('Expected ' + fullConfigPath);
|
|
58
|
+
}
|
|
59
|
+
const config = await import(`${fullConfigPath}`);
|
|
60
|
+
return config;
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
exports.loadFederationConfig = __webpack_exports__.loadFederationConfig;
|
|
64
|
+
for(var __webpack_i__ in __webpack_exports__) {
|
|
65
|
+
if(["loadFederationConfig"].indexOf(__webpack_i__) === -1) {
|
|
66
|
+
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { join } from "path";
|
|
2
|
+
import { existsSync } from "fs";
|
|
3
|
+
|
|
4
|
+
;// CONCATENATED MODULE: external "path"
|
|
5
|
+
|
|
6
|
+
;// CONCATENATED MODULE: external "fs"
|
|
7
|
+
|
|
8
|
+
;// CONCATENATED MODULE: ./src/lib/core/load-federation-config.ts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
async function loadFederationConfig(fedOptions) {
|
|
12
|
+
const fullConfigPath = join(fedOptions.workspaceRoot, fedOptions.federationConfig);
|
|
13
|
+
if (!existsSync(fullConfigPath)) {
|
|
14
|
+
throw new Error('Expected ' + fullConfigPath);
|
|
15
|
+
}
|
|
16
|
+
const config = await import(`${fullConfigPath}`);
|
|
17
|
+
return config;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export { loadFederationConfig };
|
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
/************************************************************************/
|
|
13
|
+
// webpack/runtime/define_property_getters
|
|
14
|
+
(() => {
|
|
15
|
+
__webpack_require__.d = (exports, definition) => {
|
|
16
|
+
for(var key in definition) {
|
|
17
|
+
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
18
|
+
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
};
|
|
22
|
+
})();
|
|
23
|
+
// webpack/runtime/has_own_property
|
|
24
|
+
(() => {
|
|
25
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
26
|
+
})();
|
|
27
|
+
// webpack/runtime/make_namespace_object
|
|
28
|
+
(() => {
|
|
29
|
+
// define __esModule on exports
|
|
30
|
+
__webpack_require__.r = (exports) => {
|
|
31
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
32
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
33
|
+
}
|
|
34
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
35
|
+
};
|
|
36
|
+
})();
|
|
37
|
+
/************************************************************************/
|
|
38
|
+
var __webpack_exports__ = {};
|
|
39
|
+
// ESM COMPAT FLAG
|
|
40
|
+
__webpack_require__.r(__webpack_exports__);
|
|
41
|
+
|
|
42
|
+
// EXPORTS
|
|
43
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
44
|
+
writeFederationInfo: () => (/* binding */ writeFederationInfo)
|
|
45
|
+
});
|
|
46
|
+
|
|
47
|
+
;// CONCATENATED MODULE: external "path"
|
|
48
|
+
const external_path_namespaceObject = require("path");
|
|
49
|
+
;// CONCATENATED MODULE: external "fs"
|
|
50
|
+
const external_fs_namespaceObject = require("fs");
|
|
51
|
+
;// CONCATENATED MODULE: ./src/lib/core/write-federation-info.ts
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
function writeFederationInfo(federationInfo, fedOptions) {
|
|
55
|
+
const metaDataPath = external_path_namespaceObject.join(fedOptions.workspaceRoot, fedOptions.outputPath, 'remoteEntry.json');
|
|
56
|
+
external_fs_namespaceObject.writeFileSync(metaDataPath, JSON.stringify(federationInfo, null, 2));
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
exports.writeFederationInfo = __webpack_exports__.writeFederationInfo;
|
|
60
|
+
for(var __webpack_i__ in __webpack_exports__) {
|
|
61
|
+
if(["writeFederationInfo"].indexOf(__webpack_i__) === -1) {
|
|
62
|
+
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { join } from "path";
|
|
2
|
+
import { writeFileSync } from "fs";
|
|
3
|
+
|
|
4
|
+
;// CONCATENATED MODULE: external "path"
|
|
5
|
+
|
|
6
|
+
;// CONCATENATED MODULE: external "fs"
|
|
7
|
+
|
|
8
|
+
;// CONCATENATED MODULE: ./src/lib/core/write-federation-info.ts
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
function writeFederationInfo(federationInfo, fedOptions) {
|
|
12
|
+
const metaDataPath = join(fedOptions.workspaceRoot, fedOptions.outputPath, 'remoteEntry.json');
|
|
13
|
+
writeFileSync(metaDataPath, JSON.stringify(federationInfo, null, 2));
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export { writeFederationInfo };
|
|
@@ -0,0 +1,111 @@
|
|
|
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
|
+
/************************************************************************/
|
|
13
|
+
// webpack/runtime/compat_get_default_export
|
|
14
|
+
(() => {
|
|
15
|
+
// getDefaultExport function for compatibility with non-ESM modules
|
|
16
|
+
__webpack_require__.n = (module) => {
|
|
17
|
+
var getter = module && module.__esModule ?
|
|
18
|
+
() => (module['default']) :
|
|
19
|
+
() => (module);
|
|
20
|
+
__webpack_require__.d(getter, { a: getter });
|
|
21
|
+
return getter;
|
|
22
|
+
};
|
|
23
|
+
|
|
24
|
+
})();
|
|
25
|
+
// webpack/runtime/define_property_getters
|
|
26
|
+
(() => {
|
|
27
|
+
__webpack_require__.d = (exports, definition) => {
|
|
28
|
+
for(var key in definition) {
|
|
29
|
+
if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
|
30
|
+
Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
})();
|
|
35
|
+
// webpack/runtime/has_own_property
|
|
36
|
+
(() => {
|
|
37
|
+
__webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
|
38
|
+
})();
|
|
39
|
+
// webpack/runtime/make_namespace_object
|
|
40
|
+
(() => {
|
|
41
|
+
// define __esModule on exports
|
|
42
|
+
__webpack_require__.r = (exports) => {
|
|
43
|
+
if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
|
44
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
|
45
|
+
}
|
|
46
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
47
|
+
};
|
|
48
|
+
})();
|
|
49
|
+
/************************************************************************/
|
|
50
|
+
var __webpack_exports__ = {};
|
|
51
|
+
// ESM COMPAT FLAG
|
|
52
|
+
__webpack_require__.r(__webpack_exports__);
|
|
53
|
+
|
|
54
|
+
// EXPORTS
|
|
55
|
+
__webpack_require__.d(__webpack_exports__, {
|
|
56
|
+
setLogLevel: () => (/* binding */ setLogLevel),
|
|
57
|
+
logger: () => (/* binding */ logger)
|
|
58
|
+
});
|
|
59
|
+
|
|
60
|
+
;// CONCATENATED MODULE: external "npmlog"
|
|
61
|
+
const external_npmlog_namespaceObject = require("npmlog");
|
|
62
|
+
var external_npmlog_default = /*#__PURE__*/__webpack_require__.n(external_npmlog_namespaceObject);
|
|
63
|
+
;// CONCATENATED MODULE: ./src/lib/utils/logger.ts
|
|
64
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */ //@ts-ignore
|
|
65
|
+
|
|
66
|
+
const levels = (external_npmlog_default()).levels;
|
|
67
|
+
external_npmlog_default().addLevel('error', levels.error, {
|
|
68
|
+
fg: 'brightWhite',
|
|
69
|
+
bg: 'red'
|
|
70
|
+
}, ' ERR! ');
|
|
71
|
+
external_npmlog_default().addLevel('warn', levels.info, {
|
|
72
|
+
fg: 'brightWhite',
|
|
73
|
+
bg: 'yellow'
|
|
74
|
+
}, ' WARN ');
|
|
75
|
+
external_npmlog_default().addLevel('info', levels.warn, {
|
|
76
|
+
fg: 'brightWhite',
|
|
77
|
+
bg: 'green'
|
|
78
|
+
}, ' INFO ');
|
|
79
|
+
external_npmlog_default().addLevel('notice', levels.notice, {
|
|
80
|
+
fg: 'black',
|
|
81
|
+
bg: 'brightYellow'
|
|
82
|
+
}, ' NOTE ');
|
|
83
|
+
external_npmlog_default().addLevel('verbose', levels.verbose, {
|
|
84
|
+
fg: 'brightWhite',
|
|
85
|
+
bg: 'brightBlue'
|
|
86
|
+
}, ' VRB! ');
|
|
87
|
+
external_npmlog_default().addLevel('silly', levels.silly, {
|
|
88
|
+
fg: 'black',
|
|
89
|
+
bg: 'white'
|
|
90
|
+
}, ' DBG! ');
|
|
91
|
+
const logger = {
|
|
92
|
+
error: (msg)=>external_npmlog_default().error('', msg),
|
|
93
|
+
warn: (msg)=>external_npmlog_default().warn('', msg),
|
|
94
|
+
notice: (msg)=>external_npmlog_default().notice('', msg),
|
|
95
|
+
info: (msg)=>external_npmlog_default().info('', msg),
|
|
96
|
+
verbose: (msg)=>external_npmlog_default().verbose('', msg),
|
|
97
|
+
debug: (msg)=>external_npmlog_default().silly('', msg)
|
|
98
|
+
};
|
|
99
|
+
const setLogLevel = (level)=>{
|
|
100
|
+
(external_npmlog_default()).level = level === 'debug' ? 'silly' : level;
|
|
101
|
+
};
|
|
102
|
+
setLogLevel('info');
|
|
103
|
+
|
|
104
|
+
exports.logger = __webpack_exports__.logger;
|
|
105
|
+
exports.setLogLevel = __webpack_exports__.setLogLevel;
|
|
106
|
+
for(var __webpack_i__ in __webpack_exports__) {
|
|
107
|
+
if(["logger","setLogLevel"].indexOf(__webpack_i__) === -1) {
|
|
108
|
+
exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import npmlog from "npmlog";
|
|
2
|
+
|
|
3
|
+
;// CONCATENATED MODULE: external "npmlog"
|
|
4
|
+
|
|
5
|
+
;// CONCATENATED MODULE: ./src/lib/utils/logger.ts
|
|
6
|
+
/* eslint-disable @typescript-eslint/no-explicit-any */ //@ts-ignore
|
|
7
|
+
|
|
8
|
+
const levels = npmlog.levels;
|
|
9
|
+
npmlog.addLevel('error', levels.error, {
|
|
10
|
+
fg: 'brightWhite',
|
|
11
|
+
bg: 'red'
|
|
12
|
+
}, ' ERR! ');
|
|
13
|
+
npmlog.addLevel('warn', levels.info, {
|
|
14
|
+
fg: 'brightWhite',
|
|
15
|
+
bg: 'yellow'
|
|
16
|
+
}, ' WARN ');
|
|
17
|
+
npmlog.addLevel('info', levels.warn, {
|
|
18
|
+
fg: 'brightWhite',
|
|
19
|
+
bg: 'green'
|
|
20
|
+
}, ' INFO ');
|
|
21
|
+
npmlog.addLevel('notice', levels.notice, {
|
|
22
|
+
fg: 'black',
|
|
23
|
+
bg: 'brightYellow'
|
|
24
|
+
}, ' NOTE ');
|
|
25
|
+
npmlog.addLevel('verbose', levels.verbose, {
|
|
26
|
+
fg: 'brightWhite',
|
|
27
|
+
bg: 'brightBlue'
|
|
28
|
+
}, ' VRB! ');
|
|
29
|
+
npmlog.addLevel('silly', levels.silly, {
|
|
30
|
+
fg: 'black',
|
|
31
|
+
bg: 'white'
|
|
32
|
+
}, ' DBG! ');
|
|
33
|
+
const logger = {
|
|
34
|
+
error: (msg)=>npmlog.error('', msg),
|
|
35
|
+
warn: (msg)=>npmlog.warn('', msg),
|
|
36
|
+
notice: (msg)=>npmlog.notice('', msg),
|
|
37
|
+
info: (msg)=>npmlog.info('', msg),
|
|
38
|
+
verbose: (msg)=>npmlog.verbose('', msg),
|
|
39
|
+
debug: (msg)=>npmlog.silly('', msg)
|
|
40
|
+
};
|
|
41
|
+
const setLogLevel = (level)=>{
|
|
42
|
+
npmlog.level = level === 'debug' ? 'silly' : level;
|
|
43
|
+
};
|
|
44
|
+
setLogLevel('info');
|
|
45
|
+
|
|
46
|
+
export { logger, setLogLevel };
|