@equinor/fusion-framework-cli 11.0.0-next.16 → 11.0.0-next.18
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/CHANGELOG.md +22 -0
- package/bin/build/bin.mjs +1 -1
- package/bin/build/cli.mjs +1 -1
- package/bin/build/{create-auth-client-Ds0jZb_X.js → create-auth-client-CMmpJvcx.js} +1 -1
- package/bin/build/index-BhNlDt-a.js +1 -0
- package/dist/esm/lib/merge-dev-server-config.js +27 -2
- package/dist/esm/lib/merge-dev-server-config.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/dist/types/bin/app-tag.d.ts +1 -1
- package/dist/types/cli/commands/disco/resolve.d.ts +1 -1
- package/dist/types/version.d.ts +1 -1
- package/docs/migration-v10-to-v11.md +1 -1
- package/package.json +5 -6
- package/bin/build/index-DZEz5jYv.js +0 -1
|
@@ -1,4 +1,20 @@
|
|
|
1
1
|
import deepmerge from 'deepmerge';
|
|
2
|
+
/**
|
|
3
|
+
* Merges two arrays of objects by a specified key, ensuring that objects with the same key value
|
|
4
|
+
* are merged, with the `source` array taking precedence over the `target` array for duplicate keys.
|
|
5
|
+
*
|
|
6
|
+
* @template TType - The type of objects contained in the arrays, extending `Record<string, unknown>`.
|
|
7
|
+
* @param key - The property key used to identify and merge objects from both arrays.
|
|
8
|
+
* @param target - The target array of objects to merge.
|
|
9
|
+
* @param source - The source array of objects to merge, whose values take precedence on key conflicts.
|
|
10
|
+
* @returns A new array containing merged objects, with uniqueness determined by the specified key.
|
|
11
|
+
*/
|
|
12
|
+
const keyedArrayMerger = (key, target, source) => {
|
|
13
|
+
const sourceRecords = source.reduce((acc, item) => Object.assign(acc, { [String(item[key])]: item }), {});
|
|
14
|
+
const targetRecords = target.reduce((acc, item) => Object.assign(acc, { [String(item[key])]: item }), {});
|
|
15
|
+
const mergedRecords = { ...targetRecords, ...sourceRecords };
|
|
16
|
+
return Object.values(mergedRecords);
|
|
17
|
+
};
|
|
2
18
|
/**
|
|
3
19
|
* Merges a base development server configuration with an overrides object.
|
|
4
20
|
*
|
|
@@ -12,8 +28,17 @@ import deepmerge from 'deepmerge';
|
|
|
12
28
|
* Inline comments are provided for maintainability and clarity.
|
|
13
29
|
*/
|
|
14
30
|
export const mergeDevServerConfig = (base, overrides) => {
|
|
15
|
-
|
|
16
|
-
|
|
31
|
+
return deepmerge(base, overrides, {
|
|
32
|
+
arrayMerge: (target, source) => {
|
|
33
|
+
// extract the first entry from both arrays to determine the merge strategy
|
|
34
|
+
const entry = source[0] ?? target[0];
|
|
35
|
+
// merge routes by 'match' if the entry is a route object
|
|
36
|
+
if (typeof entry === 'object' && 'match' in entry && 'middleware' in entry) {
|
|
37
|
+
return keyedArrayMerger('match', target, source);
|
|
38
|
+
}
|
|
39
|
+
return [...new Set([...target, ...source])];
|
|
40
|
+
},
|
|
41
|
+
});
|
|
17
42
|
};
|
|
18
43
|
// Export as default for convenience in imports
|
|
19
44
|
export default mergeDevServerConfig;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"merge-dev-server-config.js","sourceRoot":"","sources":["../../../src/lib/merge-dev-server-config.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAKlC;;;;;;;;;;;GAWG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG,CAClC,IAAsB,EACtB,SAA6C,EAC3B,EAAE;IACpB,
|
|
1
|
+
{"version":3,"file":"merge-dev-server-config.js","sourceRoot":"","sources":["../../../src/lib/merge-dev-server-config.ts"],"names":[],"mappings":"AAAA,OAAO,SAAS,MAAM,WAAW,CAAC;AAKlC;;;;;;;;;GASG;AACH,MAAM,gBAAgB,GAAG,CACvB,GAAgB,EAChB,MAAoB,EACpB,MAAoB,EACN,EAAE;IAChB,MAAM,aAAa,GAAG,MAAM,CAAC,MAAM,CACjC,CAAC,GAAG,EAAE,IAAI,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,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ApplicationOptions = {
|
|
|
47
47
|
* @throws If the tag, app key, or version is invalid, or if the tag operation fails.
|
|
48
48
|
* @public
|
|
49
49
|
*/
|
|
50
|
-
export declare const tagApplication: (options: TagApplicationOptions) => Promise<
|
|
50
|
+
export declare const tagApplication: (options: TagApplicationOptions) => Promise<any>;
|
|
51
51
|
export default tagApplication;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*
|
|
8
8
|
* @command resolve
|
|
9
9
|
* @description Resolve and display information about a service registered in Fusion service discovery.
|
|
10
|
-
* @
|
|
10
|
+
* @param {string} service - Name of the service to resolve in Fusion service discovery.
|
|
11
11
|
* @option {string} --env - Environment to use (e.g., prod, test).
|
|
12
12
|
* @option {string} --token - Authentication token.
|
|
13
13
|
* @option {string} --tenantId - Tenant ID for authentication.
|
package/dist/types/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const version = "11.0.0-next.
|
|
1
|
+
export declare const version = "11.0.0-next.18";
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
---
|
|
2
|
-
title: Migration Guide
|
|
2
|
+
title: Migration Guide - v10 to v11 CLI Command Changes
|
|
3
3
|
description: >
|
|
4
4
|
Comprehensive guide to migrating CLI commands from v10 to v11 of the Fusion Framework, including deprecated commands, new command names, authentication changes, and best practices for updating scripts and pipelines.
|
|
5
5
|
category: cli
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@equinor/fusion-framework-cli",
|
|
3
|
-
"version": "11.0.0-next.
|
|
3
|
+
"version": "11.0.0-next.18",
|
|
4
4
|
"homepage": "https://github.com/equinor/fusion-framework",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Fusion",
|
|
@@ -100,10 +100,10 @@
|
|
|
100
100
|
"ora": "^8.0.1",
|
|
101
101
|
"read-package-up": "^11.0.0",
|
|
102
102
|
"vite": "^6.3.5",
|
|
103
|
-
"zod": "^3.25.
|
|
104
|
-
"@equinor/fusion-
|
|
103
|
+
"zod": "^3.25.67",
|
|
104
|
+
"@equinor/fusion-framework-dev-portal": "^1.0.0-next.3",
|
|
105
105
|
"@equinor/fusion-framework-dev-server": "^1.0.0-next.10",
|
|
106
|
-
"@equinor/fusion-
|
|
106
|
+
"@equinor/fusion-imports": "^1.1.1-next.1"
|
|
107
107
|
},
|
|
108
108
|
"devDependencies": {
|
|
109
109
|
"@rollup/plugin-commonjs": "^28.0.3",
|
|
@@ -111,7 +111,6 @@
|
|
|
111
111
|
"@rollup/plugin-node-resolve": "^16.0.1",
|
|
112
112
|
"@rollup/plugin-replace": "^6.0.2",
|
|
113
113
|
"@types/adm-zip": "^0.5.0",
|
|
114
|
-
"@types/node": "^20.11.14",
|
|
115
114
|
"adm-zip": "^0.5.10",
|
|
116
115
|
"ajv": "^8.17.1",
|
|
117
116
|
"chalk": "^5.3.0",
|
|
@@ -124,8 +123,8 @@
|
|
|
124
123
|
"type-fest": "^4.40.0",
|
|
125
124
|
"typescript": "^5.8.2",
|
|
126
125
|
"@equinor/fusion-framework-module": "^4.4.3-next.2",
|
|
127
|
-
"@equinor/fusion-framework-module-http": "^6.3.4-next.0",
|
|
128
126
|
"@equinor/fusion-framework-module-msal-node": "^0.1.1-next.3",
|
|
127
|
+
"@equinor/fusion-framework-module-http": "^6.3.4-next.0",
|
|
129
128
|
"@equinor/fusion-framework-module-app": "^6.1.17-next.0",
|
|
130
129
|
"@equinor/fusion-framework-module-service-discovery": "^8.0.18-next.0"
|
|
131
130
|
},
|