@iobroker/adapter-react-v5 7.6.0 → 7.6.1
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.
|
@@ -25,6 +25,7 @@ export function moduleFederationShared(packageJson) {
|
|
|
25
25
|
'@mui/material',
|
|
26
26
|
'@mui/x-date-pickers',
|
|
27
27
|
'date-fns',
|
|
28
|
+
'date-fns/locale',
|
|
28
29
|
'leaflet',
|
|
29
30
|
'leaflet-geosearch',
|
|
30
31
|
'react',
|
|
@@ -37,7 +38,7 @@ export function moduleFederationShared(packageJson) {
|
|
|
37
38
|
return makeShared(list.filter(packageName => packageJson.includes(packageName)));
|
|
38
39
|
}
|
|
39
40
|
if (packageJson && (packageJson.dependencies || packageJson.devDependencies)) {
|
|
40
|
-
return makeShared(list.filter(packageName => packageJson.dependencies[packageName] || packageJson.devDependencies[packageName]));
|
|
41
|
+
return makeShared(list.filter(packageName => packageJson.dependencies?.[packageName] || packageJson.devDependencies?.[packageName]));
|
|
41
42
|
}
|
|
42
43
|
return makeShared(list);
|
|
43
44
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"modulefederation.admin.config.js","sourceRoot":"./src/","sources":["modulefederation.admin.config.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAC,IAAc,EAA6D,EAAE;IAC7F,MAAM,MAAM,GAA8D,EAAE,CAAC;IAC7E,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QACvB,MAAM,CAAC,WAAW,CAAC,GAAG;YAClB,eAAe,EAAE,GAAG;YACpB,SAAS,EAAE,IAAI;SAClB,CAAC;IACN,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,
|
|
1
|
+
{"version":3,"file":"modulefederation.admin.config.js","sourceRoot":"./src/","sources":["modulefederation.admin.config.ts"],"names":[],"mappings":"AAAA,MAAM,UAAU,GAAG,CAAC,IAAc,EAA6D,EAAE;IAC7F,MAAM,MAAM,GAA8D,EAAE,CAAC;IAC7E,IAAI,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE;QACvB,MAAM,CAAC,WAAW,CAAC,GAAG;YAClB,eAAe,EAAE,GAAG;YACpB,SAAS,EAAE,IAAI;SAClB,CAAC;IACN,CAAC,CAAC,CAAC;IACH,OAAO,MAAM,CAAC;AAClB,CAAC,CAAC;AAEF;;;;;GAKG;AACH,MAAM,UAAU,sBAAsB,CAClC,WAKc;IAEd,MAAM,IAAI,GAAa;QACnB,gBAAgB;QAChB,iBAAiB;QACjB,4BAA4B;QAC5B,uBAAuB;QACvB,6BAA6B;QAC7B,qBAAqB;QACrB,eAAe;QACf,qBAAqB;QACrB,UAAU;QACV,iBAAiB;QACjB,SAAS;QACT,mBAAmB;QACnB,OAAO;QACP,WAAW;QACX,WAAW;QACX,gBAAgB;QAChB,QAAQ;KACX,CAAC;IAEF,IAAI,KAAK,CAAC,OAAO,CAAC,WAAW,CAAC,EAAE,CAAC;QAC7B,OAAO,UAAU,CAAC,IAAI,CAAC,MAAM,CAAC,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,QAAQ,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC;IACrF,CAAC;IAED,IAAI,WAAW,IAAI,CAAC,WAAW,CAAC,YAAY,IAAI,WAAW,CAAC,eAAe,CAAC,EAAE,CAAC;QAC3E,OAAO,UAAU,CACb,IAAI,CAAC,MAAM,CACP,WAAW,CAAC,EAAE,CAAC,WAAW,CAAC,YAAY,EAAE,CAAC,WAAW,CAAC,IAAI,WAAW,CAAC,eAAe,EAAE,CAAC,WAAW,CAAC,CACvG,CACJ,CAAC;IACN,CAAC;IAED,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC;AAC5B,CAAC","sourcesContent":["const makeShared = (pkgs: string[]): Record<string, { requiredVersion: '*'; singleton: true }> => {\n const result: Record<string, { requiredVersion: '*'; singleton: true }> = {};\n pkgs.forEach(packageName => {\n result[packageName] = {\n requiredVersion: '*',\n singleton: true,\n };\n });\n return result;\n};\n\n/**\n * Admin shares these modules for all components\n *\n * @param packageJson - package.json or list of modules that used in component\n * @return Object with shared modules for \"federation\"\n */\nexport function moduleFederationShared(\n packageJson?:\n | {\n dependencies: Record<string, string>;\n devDependencies?: Record<string, string>;\n }\n | string[],\n): Record<string, { requiredVersion: '*'; singleton: true }> {\n const list: string[] = [\n '@emotion/react',\n '@emotion/styled',\n '@iobroker/adapter-react-v5',\n '@iobroker/json-config',\n '@iobroker/dm-gui-components',\n '@mui/icons-material',\n '@mui/material',\n '@mui/x-date-pickers',\n 'date-fns',\n 'date-fns/locale',\n 'leaflet',\n 'leaflet-geosearch',\n 'react',\n 'react-ace',\n 'react-dom',\n 'react-dropzone',\n 'semver',\n ];\n\n if (Array.isArray(packageJson)) {\n return makeShared(list.filter(packageName => packageJson.includes(packageName)));\n }\n\n if (packageJson && (packageJson.dependencies || packageJson.devDependencies)) {\n return makeShared(\n list.filter(\n packageName => packageJson.dependencies?.[packageName] || packageJson.devDependencies?.[packageName],\n ),\n );\n }\n\n return makeShared(list);\n}\n"]}
|
|
@@ -4,10 +4,17 @@
|
|
|
4
4
|
* @param packageJson - package.json or list of modules that used in component
|
|
5
5
|
* @return Object with shared modules for "federation"
|
|
6
6
|
*/
|
|
7
|
-
export declare const moduleFederationShared: (
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
7
|
+
export declare const moduleFederationShared: (
|
|
8
|
+
packageJson?:
|
|
9
|
+
| {
|
|
10
|
+
dependencies: Record<string, string>;
|
|
11
|
+
devDependencies?: Record<string, string>;
|
|
12
|
+
}
|
|
13
|
+
| string[],
|
|
14
|
+
) => Record<
|
|
15
|
+
string,
|
|
16
|
+
{
|
|
17
|
+
requiredVersion: '*';
|
|
18
|
+
singleton: true;
|
|
19
|
+
}
|
|
20
|
+
>;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
const makeShared =
|
|
1
|
+
const makeShared = pkgs => {
|
|
2
2
|
const result = {};
|
|
3
3
|
pkgs.forEach(packageName => {
|
|
4
4
|
result[packageName] = {
|
|
@@ -14,7 +14,7 @@ const makeShared = (pkgs) => {
|
|
|
14
14
|
* @param packageJson - package.json or list of modules that used in component
|
|
15
15
|
* @return Object with shared modules for "federation"
|
|
16
16
|
*/
|
|
17
|
-
const moduleFederationShared =
|
|
17
|
+
const moduleFederationShared = packageJson => {
|
|
18
18
|
const list = [
|
|
19
19
|
'@emotion/react',
|
|
20
20
|
'@emotion/styled',
|
|
@@ -25,8 +25,10 @@ const moduleFederationShared = (packageJson) => {
|
|
|
25
25
|
'@mui/material',
|
|
26
26
|
'@mui/x-date-pickers',
|
|
27
27
|
'date-fns',
|
|
28
|
+
'date-fns/locale',
|
|
28
29
|
'leaflet',
|
|
29
30
|
'leaflet-geosearch',
|
|
31
|
+
'prop-types',
|
|
30
32
|
'react',
|
|
31
33
|
'react-ace',
|
|
32
34
|
'react-dom',
|
|
@@ -37,7 +39,11 @@ const moduleFederationShared = (packageJson) => {
|
|
|
37
39
|
return makeShared(list.filter(packageName => packageJson.includes(packageName)));
|
|
38
40
|
}
|
|
39
41
|
if (packageJson && (packageJson.dependencies || packageJson.devDependencies)) {
|
|
40
|
-
return makeShared(
|
|
42
|
+
return makeShared(
|
|
43
|
+
list.filter(
|
|
44
|
+
packageName => packageJson.dependencies?.[packageName] || packageJson.devDependencies?.[packageName],
|
|
45
|
+
),
|
|
46
|
+
);
|
|
41
47
|
}
|
|
42
48
|
return makeShared(list);
|
|
43
49
|
};
|
|
@@ -45,4 +51,4 @@ const moduleFederationShared = (packageJson) => {
|
|
|
45
51
|
|
|
46
52
|
module.exports = {
|
|
47
53
|
moduleFederationShared,
|
|
48
|
-
}
|
|
54
|
+
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iobroker/adapter-react-v5",
|
|
3
|
-
"version": "7.6.
|
|
3
|
+
"version": "7.6.1",
|
|
4
4
|
"description": "React components to develop ioBroker interfaces with react.",
|
|
5
5
|
"author": {
|
|
6
6
|
"name": "bluefox",
|
|
@@ -88,5 +88,5 @@
|
|
|
88
88
|
"ts-node": "^10.9.2",
|
|
89
89
|
"typescript": "~5.7.3"
|
|
90
90
|
},
|
|
91
|
-
"gitHead": "
|
|
91
|
+
"gitHead": "1c8d30e57aa8358e2172da15c47bc617a4cee5e1"
|
|
92
92
|
}
|