@softarc/native-federation 0.9.2-beta.2 → 0.9.2-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,11 +1,11 @@
1
1
  {
2
2
  "name": "@softarc/native-federation",
3
- "version": "0.9.2-beta.2",
3
+ "version": "0.9.2-beta.3",
4
4
  "type": "commonjs",
5
5
  "main": "./src/index.js",
6
6
  "typings": "./src/index.d.ts",
7
7
  "dependencies": {},
8
8
  "peerDependencies": {
9
- "@softarc/native-federation-runtime": "0.9.2-beta.2"
9
+ "@softarc/native-federation-runtime": "0.9.2-beta.3"
10
10
  }
11
11
  }
@@ -1,6 +1,7 @@
1
1
  export interface FederationOptions {
2
2
  workspaceRoot: string;
3
3
  outputPath: string;
4
+ federationConfig: string;
4
5
  tsConfig?: string;
5
6
  verbose?: boolean;
6
7
  }
@@ -1,2 +1,3 @@
1
1
  import { NormalizedFederationConfig } from '../config/federation-config';
2
- export declare function loadFederationConfig(fullConfigPath: string): Promise<NormalizedFederationConfig>;
2
+ import { FederationOptions } from './federation-options';
3
+ export declare function loadFederationConfig(fedOptions: FederationOptions): Promise<NormalizedFederationConfig>;
@@ -2,8 +2,14 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.loadFederationConfig = void 0;
4
4
  const tslib_1 = require("tslib");
5
- function loadFederationConfig(fullConfigPath) {
5
+ const path = require("path");
6
+ const fs = require("fs");
7
+ function loadFederationConfig(fedOptions) {
6
8
  return tslib_1.__awaiter(this, void 0, void 0, function* () {
9
+ const fullConfigPath = path.join(fedOptions.workspaceRoot, fedOptions.federationConfig);
10
+ if (!fs.existsSync(fullConfigPath)) {
11
+ throw new Error('Expected ' + fullConfigPath);
12
+ }
7
13
  const config = (yield Promise.resolve().then(() => require(fullConfigPath)));
8
14
  return config;
9
15
  });
@@ -1 +1 @@
1
- {"version":3,"file":"load-federation-config.js","sourceRoot":"","sources":["../../../../../../libs/native-federation-core/src/lib/core/load-federation-config.ts"],"names":[],"mappings":";;;;AAEA,SAAsB,oBAAoB,CAAC,cAAsB;;QAC/D,MAAM,MAAM,GAAG,CAAC,2CAAa,cAAc,EAAC,CAA+B,CAAC;QAC5E,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AAHD,oDAGC"}
1
+ {"version":3,"file":"load-federation-config.js","sourceRoot":"","sources":["../../../../../../libs/native-federation-core/src/lib/core/load-federation-config.ts"],"names":[],"mappings":";;;;AAEA,6BAA6B;AAC7B,yBAAyB;AAEzB,SAAsB,oBAAoB,CAAC,UAA6B;;QAEtE,MAAM,cAAc,GAAG,IAAI,CAAC,IAAI,CAAC,UAAU,CAAC,aAAa,EAAE,UAAU,CAAC,gBAAgB,CAAC,CAAC;QAExF,IAAI,CAAC,EAAE,CAAC,UAAU,CAAC,cAAc,CAAC,EAAE;YAClC,MAAM,IAAI,KAAK,CAAC,WAAW,GAAG,cAAc,CAAC,CAAC;SAC/C;QAED,MAAM,MAAM,GAAG,CAAC,2CAAa,cAAc,EAAC,CAA+B,CAAC;QAC5E,OAAO,MAAM,CAAC;IAChB,CAAC;CAAA;AAVD,oDAUC"}