@equinor/fusion-framework-cli 11.1.3 → 11.1.4

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.
@@ -1,5 +1,6 @@
1
1
  import { dirname } from 'node:path';
2
2
  import { readPackageUp, } from 'read-package-up';
3
+ import normalizePackageData from 'normalize-package-data'; // Correct import for normalize-package-data
3
4
  /**
4
5
  * Resolves the application package by searching for the nearest `package.json` file.
5
6
  *
@@ -8,11 +9,19 @@ import { readPackageUp, } from 'read-package-up';
8
9
  * @throws Will throw an error if the `package.json` file is not found.
9
10
  */
10
11
  export const resolvePackage = async (options) => {
11
- const pkg = await readPackageUp(options);
12
+ const pkg = await readPackageUp({ ...options, normalize: false });
12
13
  if (!pkg) {
13
- throw Error('failed to find package.json');
14
+ throw new Error('failed to find package.json');
14
15
  }
15
- return { ...pkg, root: dirname(pkg.path) };
16
+ // normalizePackageData mutates its argument and returns void, so clone first
17
+ const normalizedPackageJson = { ...pkg.packageJson };
18
+ normalizePackageData(normalizedPackageJson);
19
+ const packageJson = { ...normalizedPackageJson, version: pkg.packageJson.version };
20
+ return {
21
+ packageJson,
22
+ path: pkg.path,
23
+ root: dirname(pkg.path),
24
+ };
16
25
  };
17
26
  export default resolvePackage;
18
27
  //# sourceMappingURL=resolve-package.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"resolve-package.js","sourceRoot":"","sources":["../../../../src/lib/utils/resolve-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,aAAa,GAGd,MAAM,iBAAiB,CAAC;AAQzB;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,OAA+B,EAA4B,EAAE;IAChG,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,OAAO,CAAC,CAAC;IACzC,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,KAAK,CAAC,6BAA6B,CAAC,CAAC;IAC7C,CAAC;IACD,OAAO,EAAE,GAAG,GAAG,EAAE,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC,EAAqB,CAAC;AAChE,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
1
+ {"version":3,"file":"resolve-package.js","sourceRoot":"","sources":["../../../../src/lib/utils/resolve-package.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,OAAO,EACL,aAAa,GAGd,MAAM,iBAAiB,CAAC;AAEzB,OAAO,oBAAoB,MAAM,wBAAwB,CAAC,CAAC,4CAA4C;AAQvG;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,KAAK,EAAE,OAA+B,EAA4B,EAAE;IAChG,MAAM,GAAG,GAAG,MAAM,aAAa,CAAC,EAAE,GAAG,OAAO,EAAE,SAAS,EAAE,KAAK,EAAE,CAAC,CAAC;IAClE,IAAI,CAAC,GAAG,EAAE,CAAC;QACT,MAAM,IAAI,KAAK,CAAC,6BAA6B,CAAC,CAAC;IACjD,CAAC;IACD,6EAA6E;IAC7E,MAAM,qBAAqB,GAAG,EAAE,GAAG,GAAG,CAAC,WAAW,EAAE,CAAC;IACrD,oBAAoB,CAAC,qBAAqB,CAAC,CAAC;IAC5C,MAAM,WAAW,GAAG,EAAE,GAAG,qBAAqB,EAAE,OAAO,EAAE,GAAG,CAAC,WAAW,CAAC,OAAO,EAAE,CAAC;IACnF,OAAO;QACL,WAAW;QACX,IAAI,EAAE,GAAG,CAAC,IAAI;QACd,IAAI,EAAE,OAAO,CAAC,GAAG,CAAC,IAAI,CAAC;KACL,CAAC;AACvB,CAAC,CAAC;AAEF,eAAe,cAAc,CAAC"}
@@ -1,3 +1,3 @@
1
1
  // Generated by genversion.
2
- export const version = '11.1.3';
2
+ export const version = '11.1.4';
3
3
  //# sourceMappingURL=version.js.map
@@ -1 +1 @@
1
- export declare const version = "11.1.3";
1
+ export declare const version = "11.1.4";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@equinor/fusion-framework-cli",
3
- "version": "11.1.3",
3
+ "version": "11.1.4",
4
4
  "keywords": [
5
5
  "Fusion",
6
6
  "Fusion Framework",
@@ -112,10 +112,12 @@
112
112
  "@rollup/plugin-node-resolve": "^16.0.1",
113
113
  "@rollup/plugin-replace": "^6.0.2",
114
114
  "@types/adm-zip": "^0.5.0",
115
+ "@types/normalize-package-data": "^2.4.4",
115
116
  "adm-zip": "^0.5.10",
116
117
  "ajv": "^8.17.1",
117
118
  "chalk": "^5.6.0",
118
119
  "is-ci": "^4.1.0",
120
+ "normalize-package-data": "^8.0.0",
119
121
  "open": "^10.1.1",
120
122
  "pretty-bytes": "^7.0.0",
121
123
  "rollup": "^4.46.3",
@@ -123,9 +125,9 @@
123
125
  "rxjs": "^7.8.1",
124
126
  "type-fest": "^4.40.0",
125
127
  "typescript": "^5.8.2",
126
- "@equinor/fusion-framework-module-app": "^6.1.17",
127
- "@equinor/fusion-framework-module-http": "^6.3.4",
128
128
  "@equinor/fusion-framework-module": "^5.0.0",
129
+ "@equinor/fusion-framework-module-app": "^6.1.18",
130
+ "@equinor/fusion-framework-module-http": "^6.3.4",
129
131
  "@equinor/fusion-framework-module-service-discovery": "^8.0.18"
130
132
  },
131
133
  "peerDependenciesMeta": {