@softarc/native-federation 1.1.1 → 1.1.2

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 (68) hide show
  1. package/README.md +9 -9
  2. package/build.d.ts +1 -1
  3. package/build.js +4 -4
  4. package/package.json +4 -3
  5. package/src/build.d.ts +18 -18
  6. package/src/build.js +34 -34
  7. package/src/config.d.ts +1 -1
  8. package/src/config.js +5 -5
  9. package/src/index.d.ts +1 -1
  10. package/src/index.js +4 -4
  11. package/src/lib/config/configuration-context.d.ts +7 -7
  12. package/src/lib/config/configuration-context.js +16 -16
  13. package/src/lib/config/configuration-context.js.map +1 -1
  14. package/src/lib/config/federation-config.d.ts +29 -29
  15. package/src/lib/config/federation-config.js +2 -2
  16. package/src/lib/config/share-utils.d.ts +16 -16
  17. package/src/lib/config/share-utils.js +235 -235
  18. package/src/lib/config/share-utils.js.map +1 -1
  19. package/src/lib/config/with-native-federation.d.ts +2 -2
  20. package/src/lib/config/with-native-federation.js +58 -58
  21. package/src/lib/core/build-adapter.d.ts +17 -16
  22. package/src/lib/core/build-adapter.js +17 -17
  23. package/src/lib/core/build-adapter.js.map +1 -1
  24. package/src/lib/core/build-for-federation.d.ts +9 -8
  25. package/src/lib/core/build-for-federation.js +34 -33
  26. package/src/lib/core/build-for-federation.js.map +1 -1
  27. package/src/lib/core/bundle-exposed.d.ts +5 -5
  28. package/src/lib/core/bundle-exposed.js +74 -74
  29. package/src/lib/core/bundle-exposed.js.map +1 -1
  30. package/src/lib/core/bundle-shared-mappings.d.ts +5 -5
  31. package/src/lib/core/bundle-shared-mappings.js +103 -103
  32. package/src/lib/core/bundle-shared.d.ts +4 -4
  33. package/src/lib/core/bundle-shared.js +91 -101
  34. package/src/lib/core/bundle-shared.js.map +1 -1
  35. package/src/lib/core/default-skip-list.d.ts +12 -12
  36. package/src/lib/core/default-skip-list.js +39 -39
  37. package/src/lib/core/default-skip-list.js.map +1 -1
  38. package/src/lib/core/federation-builder.d.ts +18 -16
  39. package/src/lib/core/federation-builder.js +44 -39
  40. package/src/lib/core/federation-builder.js.map +1 -1
  41. package/src/lib/core/federation-options.d.ts +10 -10
  42. package/src/lib/core/federation-options.js +2 -2
  43. package/src/lib/core/get-externals.d.ts +2 -2
  44. package/src/lib/core/get-externals.js +12 -11
  45. package/src/lib/core/get-externals.js.map +1 -1
  46. package/src/lib/core/load-federation-config.d.ts +3 -3
  47. package/src/lib/core/load-federation-config.js +17 -17
  48. package/src/lib/core/load-federation-config.js.map +1 -1
  49. package/src/lib/core/write-federation-info.d.ts +3 -3
  50. package/src/lib/core/write-federation-info.js +11 -11
  51. package/src/lib/core/write-import-map.d.ts +3 -3
  52. package/src/lib/core/write-import-map.js +15 -15
  53. package/src/lib/utils/build-utils.d.ts +2 -2
  54. package/src/lib/utils/build-utils.js +12 -12
  55. package/src/lib/utils/copy-src-map-if-exists.d.ts +1 -1
  56. package/src/lib/utils/copy-src-map-if-exists.js +13 -13
  57. package/src/lib/utils/hash-file.d.ts +1 -1
  58. package/src/lib/utils/hash-file.js +13 -13
  59. package/src/lib/utils/logger.d.ts +10 -10
  60. package/src/lib/utils/logger.js +38 -38
  61. package/src/lib/utils/mapped-paths.d.ts +10 -10
  62. package/src/lib/utils/mapped-paths.js +37 -37
  63. package/src/lib/utils/normalize.d.ts +1 -1
  64. package/src/lib/utils/normalize.js +17 -17
  65. package/src/lib/utils/normalize.js.map +1 -1
  66. package/src/lib/utils/package-info.d.ts +22 -22
  67. package/src/lib/utils/package-info.js +270 -250
  68. package/src/lib/utils/package-info.js.map +1 -1
package/README.md CHANGED
@@ -326,11 +326,11 @@ To make the polyfill to load your EcmaScript modules (bundles) in shim mode, ass
326
326
 
327
327
  ## React and Other CommonJS Libs
328
328
 
329
- Native Federation uses Web Standards like EcmaScript Modules. Most libs and frameworks support them meanwhile. Unfortunately, React still uses CommonJS (und UMD). We do our best to convert these libs to EcmaScript Modules. In the case of React there are some challenges due to the dynamic way the React bundles use the ``exports`` object.
329
+ Native Federation uses Web Standards like EcmaScript Modules. Most libs and frameworks support them meanwhile. Unfortunately, React still uses CommonJS (und UMD). We do our best to convert these libs to EcmaScript Modules. In the case of React there are some challenges due to the dynamic way the React bundles use the `exports` object.
330
330
 
331
- As the community is moving to EcmaScrpt Modules, we expect that these issues will vanish over time. In between, we provide some solutions for dealing with CommonJS-based libraries using ``exports`` in a dynamic way.
331
+ As the community is moving to EcmaScrpt Modules, we expect that these issues will vanish over time. In between, we provide some solutions for dealing with CommonJS-based libraries using `exports` in a dynamic way.
332
332
 
333
- One of them is ``fileReplacemnts``:
333
+ One of them is `fileReplacemnts`:
334
334
 
335
335
  ```javascript
336
336
  import { reactReplacements } from '@softarc/native-federation-esbuild/src/lib/react-replacements';
@@ -338,23 +338,23 @@ import { createEsBuildAdapter } from '@softarc/native-federation-esbuild';
338
338
 
339
339
  [...]
340
340
 
341
- createEsBuildAdapter({
341
+ createEsBuildAdapter({
342
342
  plugins: [],
343
343
  fileReplacements: reactReplacements.prod
344
344
  })
345
345
  ```
346
346
 
347
- Please note that the adapter comes with ``fileReplacements`` settings for React for both, ``dev`` mode and ``prod`` mode. For similar libraries you can add your own replacements. Also, using the ``compensateExports`` property, you can activate some additional logic for such libraries to make sure the exports are not lost
347
+ Please note that the adapter comes with `fileReplacements` settings for React for both, `dev` mode and `prod` mode. For similar libraries you can add your own replacements. Also, using the `compensateExports` property, you can activate some additional logic for such libraries to make sure the exports are not lost
348
348
 
349
349
  ```javascript
350
- createEsBuildAdapter({
350
+ createEsBuildAdapter({
351
351
  plugins: [],
352
352
  fileReplacements: reactReplacements.prod,
353
- compensateExports: [new RegExp('/my-lib/')]
354
- })
353
+ compensateExports: [new RegExp('/my-lib/')],
354
+ });
355
355
  ```
356
356
 
357
- The default value for ``compensateExports`` is ``[new RegExp('/react/')]``.
357
+ The default value for `compensateExports` is `[new RegExp('/react/')]`.
358
358
 
359
359
  ## More: Blog Articles
360
360
 
package/build.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './src/build';
1
+ export * from './src/build';
package/build.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./src/build"), exports);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("./src/build"), exports);
5
5
  //# sourceMappingURL=build.js.map
package/package.json CHANGED
@@ -1,12 +1,13 @@
1
1
  {
2
2
  "name": "@softarc/native-federation",
3
- "version": "1.1.1",
3
+ "version": "1.1.2",
4
4
  "type": "commonjs",
5
5
  "dependencies": {
6
+ "@softarc/native-federation-runtime": "1.1.2",
6
7
  "json5": "^2.2.0",
7
8
  "npmlog": "^6.0.2",
8
- "@softarc/native-federation-runtime": "1.1.1"
9
+ "process": "0.11.10"
9
10
  },
10
11
  "main": "./src/index.js",
11
- "typings": "./src/index.d.ts"
12
+ "types": "./src/index.d.ts"
12
13
  }
package/src/build.d.ts CHANGED
@@ -1,18 +1,18 @@
1
- export { NormalizedFederationConfig } from './lib/config/federation-config';
2
- export { FederationOptions } from './lib/core/federation-options';
3
- export { setBuildAdapter } from './lib/core/build-adapter';
4
- export { writeImportMap } from './lib/core/write-import-map';
5
- export { writeFederationInfo } from './lib/core/write-federation-info';
6
- export { bundleShared } from './lib/core/bundle-shared';
7
- export { bundleSharedMappings } from './lib/core/bundle-shared-mappings';
8
- export { bundleExposed } from './lib/core/bundle-exposed';
9
- export { getExternals } from './lib/core/get-externals';
10
- export { loadFederationConfig } from './lib/core/load-federation-config';
11
- export { MappedPath } from './lib/utils/mapped-paths';
12
- export { BuildAdapter, BuildAdapterOptions } from './lib/core/build-adapter';
13
- export { withNativeFederation } from './lib/config/with-native-federation';
14
- export { buildForFederation } from './lib/core/build-for-federation';
15
- export { share, shareAll, findRootTsConfigJson, } from './lib/config/share-utils';
16
- export { federationBuilder, BuildHelperParams, } from './lib/core/federation-builder';
17
- export { logger, setLogLevel } from './lib/utils/logger';
18
- export { hashFile } from './lib/utils/hash-file';
1
+ export { NormalizedFederationConfig } from './lib/config/federation-config';
2
+ export { FederationOptions } from './lib/core/federation-options';
3
+ export { setBuildAdapter } from './lib/core/build-adapter';
4
+ export { writeImportMap } from './lib/core/write-import-map';
5
+ export { writeFederationInfo } from './lib/core/write-federation-info';
6
+ export { bundleShared } from './lib/core/bundle-shared';
7
+ export { bundleSharedMappings } from './lib/core/bundle-shared-mappings';
8
+ export { bundleExposed } from './lib/core/bundle-exposed';
9
+ export { getExternals } from './lib/core/get-externals';
10
+ export { loadFederationConfig } from './lib/core/load-federation-config';
11
+ export { MappedPath } from './lib/utils/mapped-paths';
12
+ export { BuildAdapter, BuildAdapterOptions } from './lib/core/build-adapter';
13
+ export { withNativeFederation } from './lib/config/with-native-federation';
14
+ export { buildForFederation } from './lib/core/build-for-federation';
15
+ export { share, shareAll, findRootTsConfigJson, } from './lib/config/share-utils';
16
+ export { federationBuilder, BuildHelperParams, } from './lib/core/federation-builder';
17
+ export { logger, setLogLevel } from './lib/utils/logger';
18
+ export { hashFile } from './lib/utils/hash-file';
package/src/build.js CHANGED
@@ -1,35 +1,35 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.hashFile = exports.setLogLevel = exports.logger = exports.federationBuilder = exports.findRootTsConfigJson = exports.shareAll = exports.share = exports.buildForFederation = exports.withNativeFederation = exports.loadFederationConfig = exports.getExternals = exports.bundleExposed = exports.bundleSharedMappings = exports.bundleShared = exports.writeFederationInfo = exports.writeImportMap = exports.setBuildAdapter = void 0;
4
- var build_adapter_1 = require("./lib/core/build-adapter");
5
- Object.defineProperty(exports, "setBuildAdapter", { enumerable: true, get: function () { return build_adapter_1.setBuildAdapter; } });
6
- var write_import_map_1 = require("./lib/core/write-import-map");
7
- Object.defineProperty(exports, "writeImportMap", { enumerable: true, get: function () { return write_import_map_1.writeImportMap; } });
8
- var write_federation_info_1 = require("./lib/core/write-federation-info");
9
- Object.defineProperty(exports, "writeFederationInfo", { enumerable: true, get: function () { return write_federation_info_1.writeFederationInfo; } });
10
- var bundle_shared_1 = require("./lib/core/bundle-shared");
11
- Object.defineProperty(exports, "bundleShared", { enumerable: true, get: function () { return bundle_shared_1.bundleShared; } });
12
- var bundle_shared_mappings_1 = require("./lib/core/bundle-shared-mappings");
13
- Object.defineProperty(exports, "bundleSharedMappings", { enumerable: true, get: function () { return bundle_shared_mappings_1.bundleSharedMappings; } });
14
- var bundle_exposed_1 = require("./lib/core/bundle-exposed");
15
- Object.defineProperty(exports, "bundleExposed", { enumerable: true, get: function () { return bundle_exposed_1.bundleExposed; } });
16
- var get_externals_1 = require("./lib/core/get-externals");
17
- Object.defineProperty(exports, "getExternals", { enumerable: true, get: function () { return get_externals_1.getExternals; } });
18
- var load_federation_config_1 = require("./lib/core/load-federation-config");
19
- Object.defineProperty(exports, "loadFederationConfig", { enumerable: true, get: function () { return load_federation_config_1.loadFederationConfig; } });
20
- var with_native_federation_1 = require("./lib/config/with-native-federation");
21
- Object.defineProperty(exports, "withNativeFederation", { enumerable: true, get: function () { return with_native_federation_1.withNativeFederation; } });
22
- var build_for_federation_1 = require("./lib/core/build-for-federation");
23
- Object.defineProperty(exports, "buildForFederation", { enumerable: true, get: function () { return build_for_federation_1.buildForFederation; } });
24
- var share_utils_1 = require("./lib/config/share-utils");
25
- Object.defineProperty(exports, "share", { enumerable: true, get: function () { return share_utils_1.share; } });
26
- Object.defineProperty(exports, "shareAll", { enumerable: true, get: function () { return share_utils_1.shareAll; } });
27
- Object.defineProperty(exports, "findRootTsConfigJson", { enumerable: true, get: function () { return share_utils_1.findRootTsConfigJson; } });
28
- var federation_builder_1 = require("./lib/core/federation-builder");
29
- Object.defineProperty(exports, "federationBuilder", { enumerable: true, get: function () { return federation_builder_1.federationBuilder; } });
30
- var logger_1 = require("./lib/utils/logger");
31
- Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return logger_1.logger; } });
32
- Object.defineProperty(exports, "setLogLevel", { enumerable: true, get: function () { return logger_1.setLogLevel; } });
33
- var hash_file_1 = require("./lib/utils/hash-file");
34
- Object.defineProperty(exports, "hashFile", { enumerable: true, get: function () { return hash_file_1.hashFile; } });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.hashFile = exports.setLogLevel = exports.logger = exports.federationBuilder = exports.findRootTsConfigJson = exports.shareAll = exports.share = exports.buildForFederation = exports.withNativeFederation = exports.loadFederationConfig = exports.getExternals = exports.bundleExposed = exports.bundleSharedMappings = exports.bundleShared = exports.writeFederationInfo = exports.writeImportMap = exports.setBuildAdapter = void 0;
4
+ var build_adapter_1 = require("./lib/core/build-adapter");
5
+ Object.defineProperty(exports, "setBuildAdapter", { enumerable: true, get: function () { return build_adapter_1.setBuildAdapter; } });
6
+ var write_import_map_1 = require("./lib/core/write-import-map");
7
+ Object.defineProperty(exports, "writeImportMap", { enumerable: true, get: function () { return write_import_map_1.writeImportMap; } });
8
+ var write_federation_info_1 = require("./lib/core/write-federation-info");
9
+ Object.defineProperty(exports, "writeFederationInfo", { enumerable: true, get: function () { return write_federation_info_1.writeFederationInfo; } });
10
+ var bundle_shared_1 = require("./lib/core/bundle-shared");
11
+ Object.defineProperty(exports, "bundleShared", { enumerable: true, get: function () { return bundle_shared_1.bundleShared; } });
12
+ var bundle_shared_mappings_1 = require("./lib/core/bundle-shared-mappings");
13
+ Object.defineProperty(exports, "bundleSharedMappings", { enumerable: true, get: function () { return bundle_shared_mappings_1.bundleSharedMappings; } });
14
+ var bundle_exposed_1 = require("./lib/core/bundle-exposed");
15
+ Object.defineProperty(exports, "bundleExposed", { enumerable: true, get: function () { return bundle_exposed_1.bundleExposed; } });
16
+ var get_externals_1 = require("./lib/core/get-externals");
17
+ Object.defineProperty(exports, "getExternals", { enumerable: true, get: function () { return get_externals_1.getExternals; } });
18
+ var load_federation_config_1 = require("./lib/core/load-federation-config");
19
+ Object.defineProperty(exports, "loadFederationConfig", { enumerable: true, get: function () { return load_federation_config_1.loadFederationConfig; } });
20
+ var with_native_federation_1 = require("./lib/config/with-native-federation");
21
+ Object.defineProperty(exports, "withNativeFederation", { enumerable: true, get: function () { return with_native_federation_1.withNativeFederation; } });
22
+ var build_for_federation_1 = require("./lib/core/build-for-federation");
23
+ Object.defineProperty(exports, "buildForFederation", { enumerable: true, get: function () { return build_for_federation_1.buildForFederation; } });
24
+ var share_utils_1 = require("./lib/config/share-utils");
25
+ Object.defineProperty(exports, "share", { enumerable: true, get: function () { return share_utils_1.share; } });
26
+ Object.defineProperty(exports, "shareAll", { enumerable: true, get: function () { return share_utils_1.shareAll; } });
27
+ Object.defineProperty(exports, "findRootTsConfigJson", { enumerable: true, get: function () { return share_utils_1.findRootTsConfigJson; } });
28
+ var federation_builder_1 = require("./lib/core/federation-builder");
29
+ Object.defineProperty(exports, "federationBuilder", { enumerable: true, get: function () { return federation_builder_1.federationBuilder; } });
30
+ var logger_1 = require("./lib/utils/logger");
31
+ Object.defineProperty(exports, "logger", { enumerable: true, get: function () { return logger_1.logger; } });
32
+ Object.defineProperty(exports, "setLogLevel", { enumerable: true, get: function () { return logger_1.setLogLevel; } });
33
+ var hash_file_1 = require("./lib/utils/hash-file");
34
+ Object.defineProperty(exports, "hashFile", { enumerable: true, get: function () { return hash_file_1.hashFile; } });
35
35
  //# sourceMappingURL=build.js.map
package/src/config.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './build';
1
+ export * from './build';
package/src/config.js CHANGED
@@ -1,6 +1,6 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- // For parity with our other libs
5
- tslib_1.__exportStar(require("./build"), exports);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ // For parity with our other libs
5
+ tslib_1.__exportStar(require("./build"), exports);
6
6
  //# sourceMappingURL=config.js.map
package/src/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from '@softarc/native-federation-runtime';
1
+ export * from '@softarc/native-federation-runtime';
package/src/index.js CHANGED
@@ -1,5 +1,5 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("@softarc/native-federation-runtime"), exports);
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const tslib_1 = require("tslib");
4
+ tslib_1.__exportStar(require("@softarc/native-federation-runtime"), exports);
5
5
  //# sourceMappingURL=index.js.map
@@ -1,7 +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;
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;
@@ -1,17 +1,17 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getConfigContext = exports.usePackageJson = exports.useWorkspace = void 0;
4
- let _context = {};
5
- function useWorkspace(workspaceRoot) {
6
- _context = Object.assign(Object.assign({}, _context), { workspaceRoot });
7
- }
8
- exports.useWorkspace = useWorkspace;
9
- function usePackageJson(packageJson) {
10
- _context = Object.assign(Object.assign({}, _context), { packageJson });
11
- }
12
- exports.usePackageJson = usePackageJson;
13
- function getConfigContext() {
14
- return _context;
15
- }
16
- exports.getConfigContext = getConfigContext;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getConfigContext = exports.usePackageJson = exports.useWorkspace = void 0;
4
+ let _context = {};
5
+ function useWorkspace(workspaceRoot) {
6
+ _context = Object.assign(Object.assign({}, _context), { workspaceRoot });
7
+ }
8
+ exports.useWorkspace = useWorkspace;
9
+ function usePackageJson(packageJson) {
10
+ _context = Object.assign(Object.assign({}, _context), { packageJson });
11
+ }
12
+ exports.usePackageJson = usePackageJson;
13
+ function getConfigContext() {
14
+ return _context;
15
+ }
16
+ exports.getConfigContext = getConfigContext;
17
17
  //# sourceMappingURL=configuration-context.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"configuration-context.js","sourceRoot":"","sources":["../../../../../../libs/native-federation-core/src/lib/config/configuration-context.ts"],"names":[],"mappings":";;;AAKA,IAAI,QAAQ,GAAyB,EAAE,CAAC;AAExC,SAAgB,YAAY,CAAC,aAAqB;IAChD,QAAQ,mCAAO,QAAQ,KAAE,aAAa,GAAC,CAAC;AAC1C,CAAC;AAFD,oCAEC;AAED,SAAgB,cAAc,CAAC,WAAoB;IACjD,QAAQ,mCAAO,QAAQ,KAAE,WAAW,GAAC,CAAC;AACxC,CAAC;AAFD,wCAEC;AAGD,SAAgB,gBAAgB;IAC9B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAFD,4CAEC"}
1
+ {"version":3,"file":"configuration-context.js","sourceRoot":"","sources":["../../../../../../libs/native-federation-core/src/lib/config/configuration-context.ts"],"names":[],"mappings":";;;AAKA,IAAI,QAAQ,GAAyB,EAAE,CAAC;AAExC,SAAgB,YAAY,CAAC,aAAqB;IAChD,QAAQ,mCAAQ,QAAQ,KAAE,aAAa,GAAE,CAAC;AAC5C,CAAC;AAFD,oCAEC;AAED,SAAgB,cAAc,CAAC,WAAoB;IACjD,QAAQ,mCAAQ,QAAQ,KAAE,WAAW,GAAE,CAAC;AAC1C,CAAC;AAFD,wCAEC;AAED,SAAgB,gBAAgB;IAC9B,OAAO,QAAQ,CAAC;AAClB,CAAC;AAFD,4CAEC"}
@@ -1,29 +1,29 @@
1
- import { SkipList } from '../core/default-skip-list';
2
- import { MappedPath } from '../utils/mapped-paths';
3
- export interface SharedConfig {
4
- singleton?: boolean;
5
- strictVersion?: boolean;
6
- requiredVersion?: string;
7
- version?: string;
8
- includeSecondaries?: boolean;
9
- }
10
- export interface FederationConfig {
11
- name?: string;
12
- exposes?: Record<string, string>;
13
- shared?: Record<string, SharedConfig>;
14
- sharedMappings?: Array<string>;
15
- skip?: SkipList;
16
- }
17
- export interface NormalizedSharedConfig {
18
- singleton: boolean;
19
- strictVersion: boolean;
20
- requiredVersion: string;
21
- version?: string;
22
- includeSecondaries?: boolean;
23
- }
24
- export interface NormalizedFederationConfig {
25
- name: string;
26
- exposes: Record<string, string>;
27
- shared: Record<string, NormalizedSharedConfig>;
28
- sharedMappings: Array<MappedPath>;
29
- }
1
+ import { SkipList } from '../core/default-skip-list';
2
+ import { MappedPath } from '../utils/mapped-paths';
3
+ export interface SharedConfig {
4
+ singleton?: boolean;
5
+ strictVersion?: boolean;
6
+ requiredVersion?: string;
7
+ version?: string;
8
+ includeSecondaries?: boolean;
9
+ }
10
+ export interface FederationConfig {
11
+ name?: string;
12
+ exposes?: Record<string, string>;
13
+ shared?: Record<string, SharedConfig>;
14
+ sharedMappings?: Array<string>;
15
+ skip?: SkipList;
16
+ }
17
+ export interface NormalizedSharedConfig {
18
+ singleton: boolean;
19
+ strictVersion: boolean;
20
+ requiredVersion: string;
21
+ version?: string;
22
+ includeSecondaries?: boolean;
23
+ }
24
+ export interface NormalizedFederationConfig {
25
+ name: string;
26
+ exposes: Record<string, string>;
27
+ shared: Record<string, NormalizedSharedConfig>;
28
+ sharedMappings: Array<MappedPath>;
29
+ }
@@ -1,3 +1,3 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  //# sourceMappingURL=federation-config.js.map
@@ -1,16 +1,16 @@
1
- import { SharedConfig } from './federation-config';
2
- import { SkipList } from '../core/default-skip-list';
3
- export declare const DEFAULT_SECONARIES_SKIP_LIST: string[];
4
- declare type IncludeSecondariesOptions = {
5
- skip: string | string[];
6
- } | boolean;
7
- declare type CustomSharedConfig = SharedConfig & {
8
- includeSecondaries?: IncludeSecondariesOptions;
9
- };
10
- declare type ConfigObject = Record<string, CustomSharedConfig>;
11
- declare type Config = (string | ConfigObject)[] | ConfigObject;
12
- export declare function findRootTsConfigJson(): string;
13
- export declare function shareAll(config?: CustomSharedConfig, skip?: SkipList, projectPath?: string): Config | null;
14
- export declare function setInferVersion(infer: boolean): void;
15
- export declare function share(shareObjects: Config, projectPath?: string): Config;
16
- export {};
1
+ import { SharedConfig } from './federation-config';
2
+ import { SkipList } from '../core/default-skip-list';
3
+ export declare const DEFAULT_SECONARIES_SKIP_LIST: string[];
4
+ type IncludeSecondariesOptions = {
5
+ skip: string | string[];
6
+ } | boolean;
7
+ type CustomSharedConfig = SharedConfig & {
8
+ includeSecondaries?: IncludeSecondariesOptions;
9
+ };
10
+ type ConfigObject = Record<string, CustomSharedConfig>;
11
+ type Config = (string | ConfigObject)[] | ConfigObject;
12
+ export declare function findRootTsConfigJson(): string;
13
+ export declare function shareAll(config?: CustomSharedConfig, skip?: SkipList, projectPath?: string): Config | null;
14
+ export declare function setInferVersion(infer: boolean): void;
15
+ export declare function share(shareObjects: Config, projectPath?: string): Config;
16
+ export {};