@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.
Files changed (93) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +113 -0
  3. package/dist/adapters/lib/collect-exports.d.ts +3 -0
  4. package/dist/adapters/lib/collect-exports.js +153 -0
  5. package/dist/adapters/lib/collect-exports.mjs +80 -0
  6. package/dist/adapters/lib/commonjs.d.ts +101 -0
  7. package/dist/adapters/lib/commonjs.js +258 -0
  8. package/dist/adapters/lib/commonjs.mjs +182 -0
  9. package/dist/adapters/lib/containerPlugin.d.ts +6 -0
  10. package/dist/adapters/lib/containerPlugin.js +233 -0
  11. package/dist/adapters/lib/containerPlugin.mjs +179 -0
  12. package/dist/adapters/lib/containerReference.d.ts +6 -0
  13. package/dist/adapters/lib/containerReference.js +257 -0
  14. package/dist/adapters/lib/containerReference.mjs +188 -0
  15. package/dist/adapters/lib/lexer.d.ts +9 -0
  16. package/dist/adapters/lib/lexer.js +187 -0
  17. package/dist/adapters/lib/lexer.mjs +136 -0
  18. package/dist/adapters/lib/linkRemotesPlugin.d.ts +6 -0
  19. package/dist/adapters/lib/linkRemotesPlugin.js +117 -0
  20. package/dist/adapters/lib/linkRemotesPlugin.mjs +48 -0
  21. package/dist/adapters/lib/manifest.d.ts +2 -0
  22. package/dist/adapters/lib/manifest.js +227 -0
  23. package/dist/adapters/lib/manifest.mjs +159 -0
  24. package/dist/adapters/lib/plugin.d.ts +8 -0
  25. package/dist/adapters/lib/plugin.js +340 -0
  26. package/dist/adapters/lib/plugin.mjs +247 -0
  27. package/dist/adapters/lib/react-replacements.d.ts +9 -0
  28. package/dist/adapters/lib/react-replacements.js +86 -0
  29. package/dist/adapters/lib/react-replacements.mjs +34 -0
  30. package/dist/adapters/lib/transform.d.ts +8 -0
  31. package/dist/adapters/lib/transform.js +171 -0
  32. package/dist/adapters/lib/transform.mjs +116 -0
  33. package/dist/adapters/lib/utils.d.ts +3 -0
  34. package/dist/adapters/lib/utils.js +87 -0
  35. package/dist/adapters/lib/utils.mjs +31 -0
  36. package/dist/build.d.ts +5 -0
  37. package/dist/build.js +140 -0
  38. package/dist/build.mjs +12 -0
  39. package/dist/index.d.ts +2 -0
  40. package/dist/index.js +55 -0
  41. package/dist/index.mjs +3 -0
  42. package/dist/lib/config/configuration-context.d.ts +7 -0
  43. package/dist/lib/config/configuration-context.js +73 -0
  44. package/dist/lib/config/configuration-context.mjs +18 -0
  45. package/dist/lib/config/federation-config.d.ts +30 -0
  46. package/dist/lib/config/federation-config.js +29 -0
  47. package/dist/lib/config/federation-config.mjs +3 -0
  48. package/dist/lib/config/share-utils.d.ts +29 -0
  49. package/dist/lib/config/share-utils.js +340 -0
  50. package/dist/lib/config/share-utils.mjs +245 -0
  51. package/dist/lib/config/with-native-federation.d.ts +23 -0
  52. package/dist/lib/config/with-native-federation.js +120 -0
  53. package/dist/lib/config/with-native-federation.mjs +66 -0
  54. package/dist/lib/core/build-adapter.d.ts +4 -0
  55. package/dist/lib/core/build-adapter.js +72 -0
  56. package/dist/lib/core/build-adapter.mjs +16 -0
  57. package/dist/lib/core/createContainerTemplate.d.ts +1 -0
  58. package/dist/lib/core/createContainerTemplate.js +235 -0
  59. package/dist/lib/core/createContainerTemplate.mjs +183 -0
  60. package/dist/lib/core/default-skip-list.d.ts +12 -0
  61. package/dist/lib/core/default-skip-list.js +103 -0
  62. package/dist/lib/core/default-skip-list.mjs +45 -0
  63. package/dist/lib/core/federation-options.d.ts +10 -0
  64. package/dist/lib/core/federation-options.js +29 -0
  65. package/dist/lib/core/federation-options.mjs +3 -0
  66. package/dist/lib/core/get-externals.d.ts +2 -0
  67. package/dist/lib/core/get-externals.js +68 -0
  68. package/dist/lib/core/get-externals.mjs +17 -0
  69. package/dist/lib/core/load-federation-config.d.ts +6 -0
  70. package/dist/lib/core/load-federation-config.js +71 -0
  71. package/dist/lib/core/load-federation-config.mjs +16 -0
  72. package/dist/lib/core/write-federation-info.d.ts +9 -0
  73. package/dist/lib/core/write-federation-info.js +67 -0
  74. package/dist/lib/core/write-federation-info.mjs +12 -0
  75. package/dist/lib/utils/logger.d.ts +11 -0
  76. package/dist/lib/utils/logger.js +113 -0
  77. package/dist/lib/utils/logger.mjs +44 -0
  78. package/dist/lib/utils/mapped-paths.d.ts +10 -0
  79. package/dist/lib/utils/mapped-paths.js +95 -0
  80. package/dist/lib/utils/mapped-paths.mjs +40 -0
  81. package/dist/lib/utils/normalize.d.ts +1 -0
  82. package/dist/lib/utils/normalize.js +66 -0
  83. package/dist/lib/utils/normalize.mjs +15 -0
  84. package/dist/lib/utils/package-info.d.ts +18 -0
  85. package/dist/lib/utils/package-info.js +325 -0
  86. package/dist/lib/utils/package-info.mjs +259 -0
  87. package/dist/plugin.d.ts +1 -0
  88. package/dist/plugin.js +96 -0
  89. package/dist/plugin.mjs +4 -0
  90. package/dist/resolve/esm-resolver.mjs +19 -0
  91. package/dist/resolve/package.json +3 -0
  92. package/dist/rslib-runtime.mjs +31 -0
  93. package/package.json +75 -0
@@ -0,0 +1,7 @@
1
+ export interface ConfigurationContext {
2
+ workspaceRoot?: string;
3
+ packageJson?: string;
4
+ }
5
+ export declare function useWorkspace(workspaceRoot: string): void;
6
+ export declare function usePackageJson(packageJson: string): void;
7
+ export declare function getConfigContext(): ConfigurationContext;
@@ -0,0 +1,73 @@
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
+ let _context = {};
43
+ function useWorkspace(workspaceRoot) {
44
+ _context = {
45
+ ..._context,
46
+ workspaceRoot
47
+ };
48
+ }
49
+ function usePackageJson(packageJson) {
50
+ _context = {
51
+ ..._context,
52
+ packageJson
53
+ };
54
+ }
55
+ function getConfigContext() {
56
+ return _context;
57
+ }
58
+
59
+ __webpack_require__.d(__webpack_exports__, {
60
+ getConfigContext: () => (getConfigContext),
61
+ usePackageJson: () => (usePackageJson),
62
+ useWorkspace: () => (useWorkspace)
63
+ });
64
+
65
+ exports.getConfigContext = __webpack_exports__.getConfigContext;
66
+ exports.usePackageJson = __webpack_exports__.usePackageJson;
67
+ exports.useWorkspace = __webpack_exports__.useWorkspace;
68
+ for(var __rspack_i in __webpack_exports__) {
69
+ if(["getConfigContext","usePackageJson","useWorkspace"].indexOf(__rspack_i) === -1) {
70
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
71
+ }
72
+ }
73
+ Object.defineProperty(exports, '__esModule', { value: true });
@@ -0,0 +1,18 @@
1
+ let _context = {};
2
+ function useWorkspace(workspaceRoot) {
3
+ _context = {
4
+ ..._context,
5
+ workspaceRoot
6
+ };
7
+ }
8
+ function usePackageJson(packageJson) {
9
+ _context = {
10
+ ..._context,
11
+ packageJson
12
+ };
13
+ }
14
+ function getConfigContext() {
15
+ return _context;
16
+ }
17
+
18
+ export { getConfigContext, usePackageJson, useWorkspace };
@@ -0,0 +1,30 @@
1
+ import { SkipList } from '../core/default-skip-list';
2
+ export interface SharedConfig {
3
+ singleton?: boolean;
4
+ strictVersion?: boolean;
5
+ requiredVersion?: string;
6
+ version?: string;
7
+ includeSecondaries?: boolean;
8
+ }
9
+ export interface FederationConfig {
10
+ name?: string;
11
+ exposes?: Record<string, string>;
12
+ shared?: Record<string, SharedConfig>;
13
+ sharedMappings?: Array<string>;
14
+ skip?: SkipList;
15
+ }
16
+ export interface NormalizedSharedConfig {
17
+ singleton: boolean;
18
+ strictVersion: boolean;
19
+ requiredVersion: string;
20
+ version?: string;
21
+ eager?: boolean;
22
+ includeSecondaries?: boolean;
23
+ }
24
+ export interface NormalizedFederationConfig {
25
+ name: string;
26
+ filename?: string;
27
+ exposes?: Record<string, string>;
28
+ shared?: Record<string, NormalizedSharedConfig>;
29
+ remotes?: Record<string, string>;
30
+ }
@@ -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,29 @@
1
+ import { SharedConfig } from './federation-config';
2
+ import { SkipListEntry } from '../core/default-skip-list';
3
+ type IncludeSecondariesOptions = {
4
+ skip: string | string[];
5
+ } | boolean;
6
+ type CustomSharedConfig = SharedConfig & {
7
+ includeSecondaries?: IncludeSecondariesOptions;
8
+ };
9
+ type ConfigObject = Record<string, CustomSharedConfig>;
10
+ type Config = (string | ConfigObject)[] | ConfigObject;
11
+ export declare const DEFAULT_SECONARIES_SKIP_LIST: string[];
12
+ export declare function findRootTsConfigJson(): string;
13
+ export declare function findPackageJson(folder: string): string;
14
+ export declare function lookupVersion(key: string, workspaceRoot: string): string;
15
+ export declare function lookupVersionInMap(key: string, versions: Record<string, string>): string | null;
16
+ export declare function _findSecondaries(libPath: string, excludes: string[], shareObject: Record<string, any>, acc: Record<string, any>): void;
17
+ export declare function findSecondaries(libPath: string, excludes: string[], shareObject: Record<string, any>): Record<string, any>;
18
+ export declare function getSecondaries(includeSecondaries: boolean | {
19
+ skip?: string | string[];
20
+ }, libPath: string, key: string, shareObject: Record<string, any>): Record<string, any>;
21
+ export declare function readConfiguredSecondaries(parent: string, libPath: string, exclude: string[], shareObject: Record<string, any>): Record<string, any> | null;
22
+ export declare function getDefaultEntry(exports: {
23
+ [key: string]: any;
24
+ }, key: string): string;
25
+ export declare function shareAll(config: CustomSharedConfig, skip?: SkipListEntry[], projectPath?: string): Config;
26
+ export declare function setInferVersion(infer: boolean): void;
27
+ export declare function share(shareObjects: Record<string, any>, projectPath?: string): Record<string, any>;
28
+ export declare function addSecondaries(secondaries: Record<string, any>, result: Record<string, any>): void;
29
+ export {};
@@ -0,0 +1,340 @@
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
+ DEFAULT_SECONARIES_SKIP_LIST: () => (/* binding */ DEFAULT_SECONARIES_SKIP_LIST),
59
+ _findSecondaries: () => (/* binding */ _findSecondaries),
60
+ addSecondaries: () => (/* binding */ addSecondaries),
61
+ findPackageJson: () => (/* binding */ findPackageJson),
62
+ findRootTsConfigJson: () => (/* binding */ findRootTsConfigJson),
63
+ findSecondaries: () => (/* binding */ findSecondaries),
64
+ getDefaultEntry: () => (/* binding */ getDefaultEntry),
65
+ getSecondaries: () => (/* binding */ getSecondaries),
66
+ lookupVersion: () => (/* binding */ lookupVersion),
67
+ lookupVersionInMap: () => (/* binding */ lookupVersionInMap),
68
+ readConfiguredSecondaries: () => (/* binding */ readConfiguredSecondaries),
69
+ setInferVersion: () => (/* binding */ setInferVersion),
70
+ share: () => (/* binding */ share),
71
+ shareAll: () => (/* binding */ shareAll)
72
+ });
73
+
74
+ ;// CONCATENATED MODULE: external "fs"
75
+ const external_fs_namespaceObject = require("fs");
76
+ var external_fs_default = /*#__PURE__*/__webpack_require__.n(external_fs_namespaceObject);
77
+ ;// CONCATENATED MODULE: external "path"
78
+ const external_path_namespaceObject = require("path");
79
+ var external_path_default = /*#__PURE__*/__webpack_require__.n(external_path_namespaceObject);
80
+ ;// CONCATENATED MODULE: external "process"
81
+ const external_process_namespaceObject = require("process");
82
+ var external_process_default = /*#__PURE__*/__webpack_require__.n(external_process_namespaceObject);
83
+ ;// CONCATENATED MODULE: external "./configuration-context.js"
84
+ const external_configuration_context_js_namespaceObject = require("./configuration-context.js");
85
+ ;// CONCATENATED MODULE: external "../utils/package-info.js"
86
+ const package_info_js_namespaceObject = require("../utils/package-info.js");
87
+ ;// CONCATENATED MODULE: external "../utils/logger.js"
88
+ const logger_js_namespaceObject = require("../utils/logger.js");
89
+ ;// CONCATENATED MODULE: external "../core/default-skip-list.js"
90
+ const default_skip_list_js_namespaceObject = require("../core/default-skip-list.js");
91
+ ;// CONCATENATED MODULE: ./src/lib/config/share-utils.ts
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+ let share_utils_inferVersion = false;
100
+ const DEFAULT_SECONARIES_SKIP_LIST = [
101
+ '@angular/router/upgrade',
102
+ '@angular/common/upgrade'
103
+ ];
104
+ function findRootTsConfigJson() {
105
+ const packageJson = findPackageJson(external_process_default().cwd());
106
+ const projectRoot = external_path_default().dirname(packageJson);
107
+ const tsConfigBaseJson = external_path_default().join(projectRoot, 'tsconfig.base.json');
108
+ const tsConfigJson = external_path_default().join(projectRoot, 'tsconfig.json');
109
+ if (external_fs_default().existsSync(tsConfigBaseJson)) {
110
+ return tsConfigBaseJson;
111
+ } else if (external_fs_default().existsSync(tsConfigJson)) {
112
+ return tsConfigJson;
113
+ }
114
+ throw new Error('Neither a tsconfig.json nor a tsconfig.base.json was found');
115
+ }
116
+ function findPackageJson(folder) {
117
+ while(!external_fs_default().existsSync(external_path_default().join(folder, 'package.json')) && external_path_default().dirname(folder) !== folder){
118
+ folder = external_path_default().dirname(folder);
119
+ }
120
+ const filePath = external_path_default().join(folder, 'package.json');
121
+ if (external_fs_default().existsSync(filePath)) {
122
+ return filePath;
123
+ }
124
+ throw new Error(`No package.json found. Searched the following folder and all parents: ${folder}`);
125
+ }
126
+ function lookupVersion(key, workspaceRoot) {
127
+ const versionMaps = (0,package_info_js_namespaceObject.getVersionMaps)(workspaceRoot, workspaceRoot);
128
+ for (const versionMap of versionMaps){
129
+ const version = lookupVersionInMap(key, versionMap);
130
+ if (version) {
131
+ return version;
132
+ }
133
+ }
134
+ throw new Error(`Shared Dependency ${key} has requiredVersion:'auto'. However, this dependency is not found in your package.json`);
135
+ }
136
+ function lookupVersionInMap(key, versions) {
137
+ const parts = key.split('/');
138
+ if (parts.length >= 2 && parts[0].startsWith('@')) {
139
+ key = `${parts[0]}/${parts[1]}`;
140
+ } else {
141
+ key = parts[0];
142
+ }
143
+ if (key.toLowerCase() === '@angular-architects/module-federation-runtime') {
144
+ key = '@angular-architects/module-federation';
145
+ }
146
+ return versions[key] || null;
147
+ }
148
+ function _findSecondaries(libPath, excludes, shareObject, acc) {
149
+ const files = external_fs_default().readdirSync(libPath);
150
+ const dirs = files.map((f)=>external_path_default().join(libPath, f)).filter((f)=>external_fs_default().lstatSync(f).isDirectory() && f !== 'node_modules');
151
+ const secondaries = dirs.filter((d)=>external_fs_default().existsSync(external_path_default().join(d, 'package.json')));
152
+ for (const s of secondaries){
153
+ const secondaryLibName = s.replace(/\\/g, '/').replace(/^.*node_modules[/]/, '');
154
+ if (excludes.includes(secondaryLibName)) {
155
+ continue;
156
+ }
157
+ if ((0,default_skip_list_js_namespaceObject.isInSkipList)(secondaryLibName, default_skip_list_js_namespaceObject.PREPARED_DEFAULT_SKIP_LIST)) {
158
+ continue;
159
+ }
160
+ acc[secondaryLibName] = {
161
+ ...shareObject
162
+ };
163
+ _findSecondaries(s, excludes, shareObject, acc);
164
+ }
165
+ }
166
+ function findSecondaries(libPath, excludes, shareObject) {
167
+ const acc = {};
168
+ _findSecondaries(libPath, excludes, shareObject, acc);
169
+ return acc;
170
+ }
171
+ function getSecondaries(includeSecondaries, libPath, key, shareObject) {
172
+ let exclude = [
173
+ ...DEFAULT_SECONARIES_SKIP_LIST
174
+ ];
175
+ if (typeof includeSecondaries === 'object') {
176
+ if (Array.isArray(includeSecondaries.skip)) {
177
+ exclude = includeSecondaries.skip;
178
+ } else if (typeof includeSecondaries.skip === 'string') {
179
+ exclude = [
180
+ includeSecondaries.skip
181
+ ];
182
+ }
183
+ }
184
+ if (!external_fs_default().existsSync(libPath)) {
185
+ return {};
186
+ }
187
+ const configured = readConfiguredSecondaries(key, libPath, exclude, shareObject);
188
+ if (configured) {
189
+ return configured;
190
+ }
191
+ // Fallback: Search folders
192
+ return findSecondaries(libPath, exclude, shareObject);
193
+ }
194
+ function readConfiguredSecondaries(parent, libPath, exclude, shareObject) {
195
+ const libPackageJson = external_path_default().join(libPath, 'package.json');
196
+ if (!external_fs_default().existsSync(libPackageJson)) {
197
+ return null;
198
+ }
199
+ const packageJson = JSON.parse(external_fs_default().readFileSync(libPackageJson, 'utf-8'));
200
+ const exports = packageJson['exports'];
201
+ if (!exports) {
202
+ return null;
203
+ }
204
+ const keys = Object.keys(exports).filter((key)=>key !== '.' && key !== './package.json' && !key.endsWith('*') && (exports[key]['default'] || typeof exports[key] === 'string'));
205
+ const result = {};
206
+ for (const key of keys){
207
+ const secondaryName = external_path_default().join(parent, key).replace(/\\/g, '/');
208
+ if (exclude.includes(secondaryName)) {
209
+ continue;
210
+ }
211
+ if ((0,default_skip_list_js_namespaceObject.isInSkipList)(secondaryName, default_skip_list_js_namespaceObject.PREPARED_DEFAULT_SKIP_LIST)) {
212
+ continue;
213
+ }
214
+ const entry = getDefaultEntry(exports, key);
215
+ if (typeof entry !== 'string') {
216
+ console.log(`No entry point found for ${secondaryName}`);
217
+ continue;
218
+ }
219
+ if ([
220
+ '.css',
221
+ '.scss',
222
+ '.less'
223
+ ].some((ext)=>entry.endsWith(ext))) {
224
+ continue;
225
+ }
226
+ result[secondaryName] = {
227
+ ...shareObject
228
+ };
229
+ }
230
+ return result;
231
+ }
232
+ function getDefaultEntry(exports, key) {
233
+ let entry;
234
+ if (typeof exports[key] === 'string') {
235
+ entry = exports[key];
236
+ } else {
237
+ entry = exports[key]?.['default'];
238
+ if (typeof entry === 'object') {
239
+ entry = entry['default'];
240
+ }
241
+ }
242
+ return entry;
243
+ }
244
+ function shareAll(config, skip = default_skip_list_js_namespaceObject.DEFAULT_SKIP_LIST, projectPath = '') {
245
+ projectPath = inferProjectPath(projectPath);
246
+ const versionMaps = (0,package_info_js_namespaceObject.getVersionMaps)(projectPath, projectPath);
247
+ const shareConfig = {};
248
+ for (const versions of versionMaps){
249
+ const preparedSkipList = (0,default_skip_list_js_namespaceObject.prepareSkipList)(skip);
250
+ for(const key in versions){
251
+ if ((0,default_skip_list_js_namespaceObject.isInSkipList)(key, preparedSkipList)) {
252
+ continue;
253
+ }
254
+ const inferVersion = !config.requiredVersion || config.requiredVersion === 'auto';
255
+ const requiredVersion = inferVersion ? versions[key] : config.requiredVersion;
256
+ if (!shareConfig[key]) {
257
+ shareConfig[key] = {
258
+ ...config,
259
+ requiredVersion
260
+ };
261
+ }
262
+ }
263
+ }
264
+ return share(share, projectPath);
265
+ }
266
+ function inferProjectPath(projectPath) {
267
+ if (!projectPath) {
268
+ projectPath = external_path_default().dirname((0,external_configuration_context_js_namespaceObject.getConfigContext)().packageJson || '');
269
+ }
270
+ if (!projectPath && (0,external_configuration_context_js_namespaceObject.getConfigContext)().workspaceRoot) {
271
+ projectPath = (0,external_configuration_context_js_namespaceObject.getConfigContext)().workspaceRoot || '';
272
+ }
273
+ if (!projectPath) {
274
+ projectPath = external_process_default().cwd();
275
+ }
276
+ return projectPath;
277
+ }
278
+ function setInferVersion(infer) {
279
+ share_utils_inferVersion = infer;
280
+ }
281
+ function share(shareObjects, projectPath = '') {
282
+ projectPath = inferProjectPath(projectPath);
283
+ const packagePath = findPackageJson(projectPath);
284
+ const result = {};
285
+ let includeSecondaries;
286
+ for(const key in shareObjects){
287
+ includeSecondaries = false;
288
+ const shareObject = shareObjects[key];
289
+ if (shareObject.requiredVersion === 'auto' || share_utils_inferVersion && typeof shareObject.requiredVersion === 'undefined') {
290
+ const version = lookupVersion(key, projectPath);
291
+ shareObject.requiredVersion = version;
292
+ shareObject.version = version.replace(/^\D*/, '');
293
+ }
294
+ if (typeof shareObject.includeSecondaries === 'undefined') {
295
+ shareObject.includeSecondaries = true;
296
+ }
297
+ if (shareObject.includeSecondaries) {
298
+ includeSecondaries = shareObject.includeSecondaries;
299
+ delete shareObject.includeSecondaries;
300
+ }
301
+ result[key] = shareObject;
302
+ if (includeSecondaries) {
303
+ const libPackageJson = (0,package_info_js_namespaceObject.findDepPackageJson)(key, external_path_default().dirname(packagePath));
304
+ if (!libPackageJson) {
305
+ logger_js_namespaceObject.logger.error(`Could not find folder containing dep ${key}`);
306
+ continue;
307
+ }
308
+ const libPath = external_path_default().dirname(libPackageJson);
309
+ const secondaries = getSecondaries(includeSecondaries, libPath, key, shareObject);
310
+ if (secondaries) {
311
+ addSecondaries(secondaries, result);
312
+ }
313
+ }
314
+ }
315
+ return result;
316
+ }
317
+ function addSecondaries(secondaries, result) {
318
+ Object.assign(result, secondaries);
319
+ }
320
+
321
+ exports.DEFAULT_SECONARIES_SKIP_LIST = __webpack_exports__.DEFAULT_SECONARIES_SKIP_LIST;
322
+ exports._findSecondaries = __webpack_exports__._findSecondaries;
323
+ exports.addSecondaries = __webpack_exports__.addSecondaries;
324
+ exports.findPackageJson = __webpack_exports__.findPackageJson;
325
+ exports.findRootTsConfigJson = __webpack_exports__.findRootTsConfigJson;
326
+ exports.findSecondaries = __webpack_exports__.findSecondaries;
327
+ exports.getDefaultEntry = __webpack_exports__.getDefaultEntry;
328
+ exports.getSecondaries = __webpack_exports__.getSecondaries;
329
+ exports.lookupVersion = __webpack_exports__.lookupVersion;
330
+ exports.lookupVersionInMap = __webpack_exports__.lookupVersionInMap;
331
+ exports.readConfiguredSecondaries = __webpack_exports__.readConfiguredSecondaries;
332
+ exports.setInferVersion = __webpack_exports__.setInferVersion;
333
+ exports.share = __webpack_exports__.share;
334
+ exports.shareAll = __webpack_exports__.shareAll;
335
+ for(var __rspack_i in __webpack_exports__) {
336
+ if(["DEFAULT_SECONARIES_SKIP_LIST","_findSecondaries","addSecondaries","findPackageJson","findRootTsConfigJson","findSecondaries","getDefaultEntry","getSecondaries","lookupVersion","lookupVersionInMap","readConfiguredSecondaries","setInferVersion","share","shareAll"].indexOf(__rspack_i) === -1) {
337
+ exports[__rspack_i] = __webpack_exports__[__rspack_i];
338
+ }
339
+ }
340
+ Object.defineProperty(exports, '__esModule', { value: true });