@grasp-labs/ds-microfrontends-integration 0.15.0 → 0.17.0
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/dist/lib/schema/testUtils.d.ts +9 -2
- package/dist/mf-common.d.ts +22 -33
- package/dist/mf-common.js +20 -21
- package/package.json +3 -3
|
@@ -1,2 +1,9 @@
|
|
|
1
|
-
import { Schema } from '
|
|
2
|
-
|
|
1
|
+
import { Schema } from '../../types';
|
|
2
|
+
type SchemaType = Pick<Schema, "type">;
|
|
3
|
+
type ExtendedSchemaType = SchemaType["type"] | "ref" | string[];
|
|
4
|
+
export declare function createTestSchema(schema: Omit<Schema, "type"> & {
|
|
5
|
+
type: ExtendedSchemaType;
|
|
6
|
+
}): Schema & {
|
|
7
|
+
type: ExtendedSchemaType;
|
|
8
|
+
};
|
|
9
|
+
export {};
|
package/dist/mf-common.d.ts
CHANGED
|
@@ -1,39 +1,38 @@
|
|
|
1
1
|
import { IconName } from '@grasp-labs/ds-react-components';
|
|
2
2
|
import { ModuleFederationOptions } from '@module-federation/vite/lib/utils/normalizeModuleFederationOptions';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
export type BaseItem = {
|
|
4
|
+
/**
|
|
5
|
+
* Display label used as fallback when translation is not available
|
|
6
|
+
*/
|
|
7
7
|
label: string;
|
|
8
|
+
/**
|
|
9
|
+
* Translation key for internationalization.
|
|
10
|
+
* Must be placed in 'navigation' translation namespace in the host application for it to work.
|
|
11
|
+
*/
|
|
12
|
+
labelKey: string;
|
|
13
|
+
icon: IconName;
|
|
14
|
+
};
|
|
15
|
+
export type RouteConfig = BaseItem & {
|
|
8
16
|
path: string;
|
|
9
|
-
icon?: IconName;
|
|
10
17
|
type?: "hidden" | "visible";
|
|
11
18
|
};
|
|
19
|
+
export type CategoryConfig = BaseItem & {
|
|
20
|
+
type: "category";
|
|
21
|
+
children: Record<string, RouteConfig | CategoryConfig>;
|
|
22
|
+
};
|
|
23
|
+
export type NavigationItem = RouteConfig | CategoryConfig;
|
|
12
24
|
/**
|
|
13
25
|
* INDEX is a mandatory route representing the root of the microfrontend, used as the parent navigation item in the sidebar
|
|
14
|
-
* @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
|
|
15
26
|
*/
|
|
16
27
|
export type IndexNavigationConfig = {
|
|
17
28
|
INDEX: RouteConfig;
|
|
18
29
|
};
|
|
19
|
-
|
|
20
|
-
* @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
|
|
21
|
-
*/
|
|
22
|
-
export type NavigationConfig<TKeys extends string = string> = IndexNavigationConfig & Record<TKeys, RouteConfig>;
|
|
23
|
-
/**
|
|
24
|
-
* @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
|
|
25
|
-
*/
|
|
30
|
+
export type NavigationConfig<TKeys extends string = string> = IndexNavigationConfig & Record<TKeys, NavigationItem>;
|
|
26
31
|
export type MicrofrontendExposes = {
|
|
27
32
|
".": string;
|
|
28
33
|
"./navigationConfig": string;
|
|
29
34
|
} & Record<string, string>;
|
|
30
|
-
/**
|
|
31
|
-
* @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
|
|
32
|
-
*/
|
|
33
35
|
export declare const createModuleFederationConfig: (name: string, overrides?: Partial<ModuleFederationOptions>) => ModuleFederationOptions;
|
|
34
|
-
/**
|
|
35
|
-
* @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
|
|
36
|
-
*/
|
|
37
36
|
export declare const COMMON_SHARED_DEPS: {
|
|
38
37
|
react: {
|
|
39
38
|
singleton: boolean;
|
|
@@ -51,22 +50,12 @@ export declare const COMMON_SHARED_DEPS: {
|
|
|
51
50
|
singleton: boolean;
|
|
52
51
|
requiredVersion: string;
|
|
53
52
|
};
|
|
54
|
-
axios: {
|
|
55
|
-
singleton: boolean;
|
|
56
|
-
requiredVersion: string;
|
|
57
|
-
};
|
|
58
53
|
};
|
|
59
|
-
/**
|
|
60
|
-
* @deprecated Use @grasp-labs/ds-web-microfrontends-common-lib instead
|
|
61
|
-
*/
|
|
62
54
|
export declare const createMicrofrontendsBase: (name: string) => string;
|
|
63
55
|
/**
|
|
64
|
-
*
|
|
65
|
-
*
|
|
66
|
-
*
|
|
67
|
-
*
|
|
68
|
-
* Migration guide:
|
|
69
|
-
* - Replace imports from './mf-common' with '@grasp-labs/ds-web-microfrontends-common-lib'
|
|
70
|
-
* - Install the package: npm install @grasp-labs/ds-web-microfrontends-common-lib
|
|
56
|
+
* Creates a configured Vite Module Federation plugin for Data Science microfrontends
|
|
57
|
+
* @param name - The name of the microfrontend
|
|
58
|
+
* @param overrides - Optional overrides for the Module Federation configuration
|
|
59
|
+
* @returns Configured Vite plugin
|
|
71
60
|
*/
|
|
72
61
|
export declare const dsFederation: (name: string, overrides?: Partial<ModuleFederationOptions>) => import('vite').Plugin<any>[];
|
package/dist/mf-common.js
CHANGED
|
@@ -1,47 +1,46 @@
|
|
|
1
|
-
import { federation as
|
|
2
|
-
const
|
|
3
|
-
|
|
1
|
+
import { federation as o } from "@module-federation/vite";
|
|
2
|
+
const s = "0.16.0", i = { react: "19.2.3", "react-dom": "19.2.3", "react-router": "7.12.0" }, r = {
|
|
3
|
+
version: s,
|
|
4
|
+
peerDependencies: i
|
|
5
|
+
}, c = (e, n = {}) => {
|
|
6
|
+
const t = d(e);
|
|
4
7
|
return {
|
|
5
8
|
name: e,
|
|
6
9
|
manifest: !0,
|
|
7
10
|
filename: "remoteEntry.js",
|
|
8
|
-
getPublicPath: `function() {return "${
|
|
11
|
+
getPublicPath: `function() {return "${t}"}`,
|
|
9
12
|
exposes: {
|
|
10
13
|
".": "./src/App",
|
|
11
14
|
"./navigationConfig": "./src/navigationConfig"
|
|
12
15
|
},
|
|
13
16
|
shared: {
|
|
14
|
-
...
|
|
17
|
+
...a
|
|
15
18
|
},
|
|
16
|
-
...
|
|
19
|
+
...n
|
|
17
20
|
};
|
|
18
|
-
},
|
|
21
|
+
}, a = {
|
|
19
22
|
react: {
|
|
20
23
|
singleton: !0,
|
|
21
|
-
requiredVersion:
|
|
24
|
+
requiredVersion: r.peerDependencies.react
|
|
22
25
|
},
|
|
23
26
|
"react-dom": {
|
|
24
27
|
singleton: !0,
|
|
25
|
-
requiredVersion:
|
|
28
|
+
requiredVersion: r.peerDependencies["react-dom"]
|
|
26
29
|
},
|
|
27
30
|
"react-router": {
|
|
28
31
|
singleton: !0,
|
|
29
|
-
requiredVersion:
|
|
32
|
+
requiredVersion: r.peerDependencies["react-router"]
|
|
30
33
|
},
|
|
31
34
|
"@grasp-labs/ds-microfrontends-integration": {
|
|
32
35
|
singleton: !0,
|
|
33
|
-
requiredVersion:
|
|
34
|
-
},
|
|
35
|
-
axios: {
|
|
36
|
-
singleton: !0,
|
|
37
|
-
requiredVersion: "^1.7.9"
|
|
36
|
+
requiredVersion: r.version
|
|
38
37
|
}
|
|
39
|
-
},
|
|
40
|
-
...
|
|
38
|
+
}, d = (e) => `microfrontends/${e}/`, p = (e, n = {}) => o({
|
|
39
|
+
...c(e, n)
|
|
41
40
|
});
|
|
42
41
|
export {
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
42
|
+
a as COMMON_SHARED_DEPS,
|
|
43
|
+
d as createMicrofrontendsBase,
|
|
44
|
+
c as createModuleFederationConfig,
|
|
45
|
+
p as dsFederation
|
|
47
46
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grasp-labs/ds-microfrontends-integration",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.17.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"type": "module",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"sideEffects": false,
|
|
34
34
|
"scripts": {
|
|
35
|
-
"build": "tsc && vite build",
|
|
35
|
+
"build": "tsc -p tsconfig.app.json && vite build",
|
|
36
36
|
"lint": "eslint .",
|
|
37
37
|
"lint:fix": "eslint . --fix",
|
|
38
38
|
"dev": "npm run build -- --watch",
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"react": "19.2.3",
|
|
51
51
|
"react-dom": "19.2.3",
|
|
52
52
|
"react-hook-form": "^7.0.0",
|
|
53
|
-
"react-router": "7.
|
|
53
|
+
"react-router": "7.12.0",
|
|
54
54
|
"zod": "4.2.1"
|
|
55
55
|
},
|
|
56
56
|
"peerDependenciesMeta": {
|