@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
package/dist/build.mjs CHANGED
@@ -1,380 +1,12 @@
1
- import path_0, { dirname, join } from "path";
2
- import fs_0, { existsSync, readFileSync } from "fs";
3
- import process from "process";
4
- import npmlog from "npmlog";
5
- import "json5";
6
- function getExternals(config) {
7
- const shared = Object.keys(config.shared ?? {});
8
- const remotes = config.remotes ?? {};
9
- const remoteKeys = Object.keys(remotes).reduce((acc, key)=>{
10
- if (!key) return acc;
11
- acc.push(key);
12
- acc.push(key + '/*');
13
- return acc;
14
- }, []);
15
- const externals = [
16
- ...shared,
17
- ...remoteKeys
18
- ];
19
- return externals;
20
- }
21
- async function loadFederationConfig(fedOptions) {
22
- const fullConfigPath = join(fedOptions.workspaceRoot, fedOptions.federationConfig);
23
- if (!existsSync(fullConfigPath)) throw new Error('Expected ' + fullConfigPath);
24
- const config = await import(`${fullConfigPath}`);
25
- return config;
26
- }
27
- const DEFAULT_SKIP_LIST = [
28
- '@module-federation/native-federation-runtime',
29
- '@module-federation/native-federation',
30
- '@module-federation/native-federation-core',
31
- '@module-federation/native-federation-esbuild',
32
- '@angular-architects/native-federation',
33
- '@angular-architects/native-federation-runtime',
34
- 'es-module-shims',
35
- 'zone.js',
36
- 'tslib/',
37
- '@angular/localize',
38
- '@angular/localize/init',
39
- '@angular/localize/tools',
40
- '@angular/platform-server',
41
- '@angular/platform-server/init',
42
- '@angular/ssr',
43
- 'express',
44
- /\/schematics(\/|$)/,
45
- /^@nx\/angular/,
46
- (pkg)=>pkg.startsWith('@angular/') && !!pkg.match(/\/testing(\/|$)/),
47
- (pkg)=>pkg.startsWith('@types/'),
48
- (pkg)=>pkg.startsWith('@module-federation/')
49
- ];
50
- const PREPARED_DEFAULT_SKIP_LIST = prepareSkipList(DEFAULT_SKIP_LIST);
51
- function prepareSkipList(skipList) {
52
- return {
53
- strings: new Set(skipList.filter((e)=>'string' == typeof e)),
54
- functions: skipList.filter((e)=>'function' == typeof e),
55
- regexps: skipList.filter((e)=>e instanceof RegExp)
56
- };
57
- }
58
- function default_skip_list_isInSkipList(entry, skipList) {
59
- if (skipList.strings.has(entry)) return true;
60
- if (skipList.functions.some((f)=>f(entry))) return true;
61
- if (skipList.regexps.some((r)=>r.test(entry))) return true;
62
- return false;
63
- }
64
- let _context = {};
65
- function getConfigContext() {
66
- return _context;
67
- }
68
- const levels = npmlog.levels;
69
- npmlog.addLevel('error', levels.error, {
70
- fg: 'brightWhite',
71
- bg: 'red'
72
- }, ' ERR! ');
73
- npmlog.addLevel('warn', levels.info, {
74
- fg: 'brightWhite',
75
- bg: 'yellow'
76
- }, ' WARN ');
77
- npmlog.addLevel('info', levels.warn, {
78
- fg: 'brightWhite',
79
- bg: 'green'
80
- }, ' INFO ');
81
- npmlog.addLevel('notice', levels.notice, {
82
- fg: 'black',
83
- bg: 'brightYellow'
84
- }, ' NOTE ');
85
- npmlog.addLevel('verbose', levels.verbose, {
86
- fg: 'brightWhite',
87
- bg: 'brightBlue'
88
- }, ' VRB! ');
89
- npmlog.addLevel('silly', levels.silly, {
90
- fg: 'black',
91
- bg: 'white'
92
- }, ' DBG! ');
93
- const logger_logger = {
94
- error: (msg)=>npmlog.error('', msg),
95
- warn: (msg)=>npmlog.warn('', msg),
96
- notice: (msg)=>npmlog.notice('', msg),
97
- info: (msg)=>npmlog.info('', msg),
98
- verbose: (msg)=>npmlog.verbose('', msg),
99
- debug: (msg)=>npmlog.silly('', msg)
100
- };
101
- const setLogLevel = (level)=>{
102
- npmlog.level = 'debug' === level ? 'silly' : level;
103
- };
104
- setLogLevel('info');
105
- function normalize_normalize(path, trailingSlash) {
106
- let cand = path.replace(/\\/g, '/');
107
- if (void 0 === trailingSlash) return cand;
108
- while(cand.endsWith('/'))cand = cand.substring(0, cand.length - 1);
109
- if (trailingSlash) return cand + '/';
110
- return cand;
111
- }
112
- const packageCache = {};
113
- function findPackageJsonFiles(project, workspace) {
114
- return expandFolders(project, workspace).map((f)=>join(f, 'package.json')).filter((f)=>existsSync(f));
115
- }
116
- function expandFolders(child, parent) {
117
- const result = [];
118
- parent = normalize_normalize(parent, true);
119
- child = normalize_normalize(child, true);
120
- if (!child.startsWith(parent)) throw new Error(`Workspace folder ${parent} needs to be a parent of the project folder ${child}`);
121
- let current = child;
122
- while(current !== parent){
123
- result.push(current);
124
- const cand = normalize_normalize(dirname(current), true);
125
- if (cand === current) break;
126
- current = cand;
127
- }
128
- result.push(parent);
129
- return result;
130
- }
131
- function getVersionMapCacheKey(project, workspace) {
132
- return `${project}**${workspace}`;
133
- }
134
- function getVersionMaps(project, workspace) {
135
- return getPackageJsonFiles(project, workspace).map((json)=>({
136
- ...json.content['dependencies']
137
- }));
138
- }
139
- function getPackageJsonFiles(project, workspace) {
140
- const cacheKey = getVersionMapCacheKey(project, workspace);
141
- let maps = packageCache[cacheKey];
142
- if (maps) return maps;
143
- maps = findPackageJsonFiles(project, workspace).map((f)=>{
144
- const content = JSON.parse(readFileSync(f, 'utf-8'));
145
- const directory = normalize_normalize(dirname(f), true);
146
- const result = {
147
- content,
148
- directory
149
- };
150
- return result;
151
- });
152
- packageCache[cacheKey] = maps;
153
- return maps;
154
- }
155
- function findDepPackageJson(packageName, projectRoot) {
156
- const mainPkgName = getPkgFolder(packageName);
157
- let mainPkgPath = join(projectRoot, 'node_modules', mainPkgName);
158
- let mainPkgJsonPath = join(mainPkgPath, 'package.json');
159
- let directory = projectRoot;
160
- while(dirname(directory) !== directory){
161
- if (existsSync(mainPkgJsonPath)) break;
162
- directory = normalize_normalize(dirname(directory), true);
163
- mainPkgPath = join(directory, 'node_modules', mainPkgName);
164
- mainPkgJsonPath = join(mainPkgPath, 'package.json');
165
- }
166
- if (!existsSync(mainPkgJsonPath)) {
167
- logger_logger.verbose('No package.json found for ' + packageName + ' in ' + mainPkgPath);
168
- return null;
169
- }
170
- return mainPkgJsonPath;
171
- }
172
- function getPkgFolder(packageName) {
173
- const parts = packageName.split('/');
174
- let folder = parts[0];
175
- if (folder.startsWith('@')) folder += '/' + parts[1];
176
- return folder;
177
- }
178
- let share_utils_inferVersion = false;
179
- const DEFAULT_SECONARIES_SKIP_LIST = [
180
- '@angular/router/upgrade',
181
- '@angular/common/upgrade'
182
- ];
183
- function share_utils_findRootTsConfigJson() {
184
- const packageJson = findPackageJson(process.cwd());
185
- const projectRoot = path_0.dirname(packageJson);
186
- const tsConfigBaseJson = path_0.join(projectRoot, 'tsconfig.base.json');
187
- const tsConfigJson = path_0.join(projectRoot, 'tsconfig.json');
188
- if (fs_0.existsSync(tsConfigBaseJson)) return tsConfigBaseJson;
189
- if (fs_0.existsSync(tsConfigJson)) return tsConfigJson;
190
- throw new Error('Neither a tsconfig.json nor a tsconfig.base.json was found');
191
- }
192
- function findPackageJson(folder) {
193
- while(!fs_0.existsSync(path_0.join(folder, 'package.json')) && path_0.dirname(folder) !== folder)folder = path_0.dirname(folder);
194
- const filePath = path_0.join(folder, 'package.json');
195
- if (fs_0.existsSync(filePath)) return filePath;
196
- throw new Error(`No package.json found. Searched the following folder and all parents: ${folder}`);
197
- }
198
- function lookupVersion(key, workspaceRoot) {
199
- const versionMaps = getVersionMaps(workspaceRoot, workspaceRoot);
200
- for (const versionMap of versionMaps){
201
- const version = lookupVersionInMap(key, versionMap);
202
- if (version) return version;
203
- }
204
- throw new Error(`Shared Dependency ${key} has requiredVersion:'auto'. However, this dependency is not found in your package.json`);
205
- }
206
- function lookupVersionInMap(key, versions) {
207
- const parts = key.split('/');
208
- key = parts.length >= 2 && parts[0].startsWith('@') ? `${parts[0]}/${parts[1]}` : parts[0];
209
- if ('@angular-architects/module-federation-runtime' === key.toLowerCase()) key = '@angular-architects/module-federation';
210
- return versions[key] || null;
211
- }
212
- function _findSecondaries(libPath, excludes, shareObject, acc) {
213
- const files = fs_0.readdirSync(libPath);
214
- const dirs = files.map((f)=>path_0.join(libPath, f)).filter((f)=>fs_0.lstatSync(f).isDirectory() && 'node_modules' !== f);
215
- const secondaries = dirs.filter((d)=>fs_0.existsSync(path_0.join(d, 'package.json')));
216
- for (const s of secondaries){
217
- const secondaryLibName = s.replace(/\\/g, '/').replace(/^.*node_modules[/]/, '');
218
- if (!excludes.includes(secondaryLibName)) {
219
- if (!default_skip_list_isInSkipList(secondaryLibName, PREPARED_DEFAULT_SKIP_LIST)) {
220
- acc[secondaryLibName] = {
221
- ...shareObject
222
- };
223
- _findSecondaries(s, excludes, shareObject, acc);
224
- }
225
- }
226
- }
227
- }
228
- function findSecondaries(libPath, excludes, shareObject) {
229
- const acc = {};
230
- _findSecondaries(libPath, excludes, shareObject, acc);
231
- return acc;
232
- }
233
- function getSecondaries(includeSecondaries, libPath, key, shareObject) {
234
- let exclude = [
235
- ...DEFAULT_SECONARIES_SKIP_LIST
236
- ];
237
- if ('object' == typeof includeSecondaries) {
238
- if (Array.isArray(includeSecondaries.skip)) exclude = includeSecondaries.skip;
239
- else if ('string' == typeof includeSecondaries.skip) exclude = [
240
- includeSecondaries.skip
241
- ];
242
- }
243
- if (!fs_0.existsSync(libPath)) return {};
244
- const configured = readConfiguredSecondaries(key, libPath, exclude, shareObject);
245
- if (configured) return configured;
246
- return findSecondaries(libPath, exclude, shareObject);
247
- }
248
- function readConfiguredSecondaries(parent, libPath, exclude, shareObject) {
249
- const libPackageJson = path_0.join(libPath, 'package.json');
250
- if (!fs_0.existsSync(libPackageJson)) return null;
251
- const packageJson = JSON.parse(fs_0.readFileSync(libPackageJson, 'utf-8'));
252
- const exports = packageJson['exports'];
253
- if (!exports) return null;
254
- const keys = Object.keys(exports).filter((key)=>'.' !== key && './package.json' !== key && !key.endsWith('*') && (exports[key]['default'] || 'string' == typeof exports[key]));
255
- const result = {};
256
- for (const key of keys){
257
- const secondaryName = path_0.join(parent, key).replace(/\\/g, '/');
258
- if (exclude.includes(secondaryName)) continue;
259
- if (default_skip_list_isInSkipList(secondaryName, PREPARED_DEFAULT_SKIP_LIST)) continue;
260
- const entry = getDefaultEntry(exports, key);
261
- if ('string' != typeof entry) {
262
- console.log(`No entry point found for ${secondaryName}`);
263
- continue;
264
- }
265
- if (![
266
- '.css',
267
- '.scss',
268
- '.less'
269
- ].some((ext)=>entry.endsWith(ext))) result[secondaryName] = {
270
- ...shareObject
271
- };
272
- }
273
- return result;
274
- }
275
- function getDefaultEntry(exports, key) {
276
- let entry;
277
- if ('string' == typeof exports[key]) entry = exports[key];
278
- else {
279
- var _exports_key;
280
- entry = null == (_exports_key = exports[key]) ? void 0 : _exports_key['default'];
281
- if ('object' == typeof entry) entry = entry['default'];
282
- }
283
- return entry;
284
- }
285
- function share_utils_shareAll(config, skip = DEFAULT_SKIP_LIST, projectPath = '') {
286
- projectPath = inferProjectPath(projectPath);
287
- const versionMaps = getVersionMaps(projectPath, projectPath);
288
- const shareConfig = {};
289
- for (const versions of versionMaps){
290
- const preparedSkipList = prepareSkipList(skip);
291
- for(const key in versions){
292
- if (default_skip_list_isInSkipList(key, preparedSkipList)) continue;
293
- const inferVersion = !config.requiredVersion || 'auto' === config.requiredVersion;
294
- const requiredVersion = inferVersion ? versions[key] : config.requiredVersion;
295
- if (!shareConfig[key]) shareConfig[key] = {
296
- ...config,
297
- requiredVersion
298
- };
299
- }
300
- }
301
- return share(share, projectPath);
302
- }
303
- function inferProjectPath(projectPath) {
304
- if (!projectPath) projectPath = path_0.dirname(getConfigContext().packageJson || '');
305
- if (!projectPath && getConfigContext().workspaceRoot) projectPath = getConfigContext().workspaceRoot || '';
306
- if (!projectPath) projectPath = process.cwd();
307
- return projectPath;
308
- }
309
- function setInferVersion(infer) {
310
- share_utils_inferVersion = infer;
311
- }
312
- function share(shareObjects, projectPath = '') {
313
- projectPath = inferProjectPath(projectPath);
314
- const packagePath = findPackageJson(projectPath);
315
- const result = {};
316
- let includeSecondaries;
317
- for(const key in shareObjects){
318
- includeSecondaries = false;
319
- const shareObject = shareObjects[key];
320
- if ('auto' === shareObject.requiredVersion || share_utils_inferVersion && void 0 === shareObject.requiredVersion) {
321
- const version = lookupVersion(key, projectPath);
322
- shareObject.requiredVersion = version;
323
- shareObject.version = version.replace(/^\D*/, '');
324
- }
325
- if (void 0 === shareObject.includeSecondaries) shareObject.includeSecondaries = true;
326
- if (shareObject.includeSecondaries) {
327
- includeSecondaries = shareObject.includeSecondaries;
328
- delete shareObject.includeSecondaries;
329
- }
330
- result[key] = shareObject;
331
- if (includeSecondaries) {
332
- const libPackageJson = findDepPackageJson(key, path_0.dirname(packagePath));
333
- if (!libPackageJson) {
334
- logger_logger.error(`Could not find folder containing dep ${key}`);
335
- continue;
336
- }
337
- const libPath = path_0.dirname(libPackageJson);
338
- const secondaries = getSecondaries(includeSecondaries, libPath, key, shareObject);
339
- if (secondaries) addSecondaries(secondaries, result);
340
- }
341
- }
342
- return result;
343
- }
344
- function addSecondaries(secondaries, result) {
345
- Object.assign(result, secondaries);
346
- }
347
- function withFederation(config) {
348
- const skip = prepareSkipList(config.skip ?? []);
349
- return {
350
- name: config.name ?? '',
351
- filename: config.filename ?? 'remoteEntry',
352
- exposes: config.exposes ?? {},
353
- remotes: config.remotes ?? {},
354
- shared: normalizeShared(config, skip)
355
- };
356
- }
357
- function normalizeShared(config, skip) {
358
- let result = {};
359
- const shared = config.shared;
360
- result = shared ? Object.keys(shared).reduce((acc, cur)=>({
361
- ...acc,
362
- [cur]: {
363
- requiredVersion: shared[cur].requiredVersion ?? 'auto',
364
- singleton: shared[cur].singleton ?? false,
365
- strictVersion: shared[cur].strictVersion ?? false,
366
- version: shared[cur].version,
367
- includeSecondaries: shared[cur].includeSecondaries
368
- }
369
- }), {}) : share_utils_shareAll({
370
- singleton: true,
371
- strictVersion: true,
372
- requiredVersion: 'auto'
373
- });
374
- result = Object.keys(result).filter((key)=>!default_skip_list_isInSkipList(key, skip)).reduce((acc, cur)=>({
375
- ...acc,
376
- [cur]: result[cur]
377
- }), {});
378
- return result;
379
- }
380
- export { DEFAULT_SECONARIES_SKIP_LIST, _findSecondaries, addSecondaries, findPackageJson, share_utils_findRootTsConfigJson as findRootTsConfigJson, findSecondaries, getDefaultEntry, getExternals, getSecondaries, loadFederationConfig, logger_logger as logger, lookupVersion, lookupVersionInMap, readConfiguredSecondaries, setInferVersion, setLogLevel, share, share_utils_shareAll as shareAll, withFederation };
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.js CHANGED
@@ -1,36 +1,55 @@
1
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
2
10
  var __webpack_require__ = {};
3
- (()=>{
4
- __webpack_require__.d = (exports1, definition)=>{
5
- for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
6
- enumerable: true,
7
- get: definition[key]
8
- });
9
- };
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
+ };
10
25
  })();
11
- (()=>{
12
- __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
26
+ // webpack/runtime/has_own_property
27
+ (() => {
28
+ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
13
29
  })();
14
- (()=>{
15
- __webpack_require__.r = (exports1)=>{
16
- if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
17
- value: 'Module'
18
- });
19
- Object.defineProperty(exports1, '__esModule', {
20
- value: true
21
- });
22
- };
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
+ };
23
39
  })();
24
40
  var __webpack_exports__ = {};
25
41
  __webpack_require__.r(__webpack_exports__);
42
+ /* export default */ const __rspack_default_export = ({});
43
+
26
44
  __webpack_require__.d(__webpack_exports__, {
27
- default: ()=>__WEBPACK_DEFAULT_EXPORT__
45
+ }, {
46
+ "default": __rspack_default_export
28
47
  });
29
- const __WEBPACK_DEFAULT_EXPORT__ = {};
48
+
30
49
  exports["default"] = __webpack_exports__["default"];
31
- for(var __webpack_i__ in __webpack_exports__)if (-1 === [
32
- "default"
33
- ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
34
- Object.defineProperty(exports, '__esModule', {
35
- value: true
36
- });
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 CHANGED
@@ -1,2 +1,3 @@
1
- const src = {};
2
- export { src as default };
1
+ /* export default */ const src = ({});
2
+
3
+ export default src;
@@ -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,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 {};