@module-federation/esbuild 0.0.0-perf-devtools-20260107043700 → 0.0.0-perf-website-code-usage-20260914033703

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