@perses-dev/plugin-system 0.51.0-rc.1 → 0.51.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.
|
@@ -135,36 +135,44 @@ const getPluginRuntime = ()=>{
|
|
|
135
135
|
requiredVersion: '^5.5.0'
|
|
136
136
|
}
|
|
137
137
|
},
|
|
138
|
+
'@perses-dev/core': {
|
|
139
|
+
version: '0.51.0-rc.1',
|
|
140
|
+
lib: ()=>require('@perses-dev/core'),
|
|
141
|
+
shareConfig: {
|
|
142
|
+
singleton: true,
|
|
143
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
144
|
+
}
|
|
145
|
+
},
|
|
138
146
|
'@perses-dev/components': {
|
|
139
|
-
version: '0.51.0-
|
|
147
|
+
version: '0.51.0-rc.1',
|
|
140
148
|
lib: ()=>require('@perses-dev/components'),
|
|
141
149
|
shareConfig: {
|
|
142
150
|
singleton: true,
|
|
143
|
-
requiredVersion: '^0.51.0-rc.
|
|
151
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
144
152
|
}
|
|
145
153
|
},
|
|
146
154
|
'@perses-dev/plugin-system': {
|
|
147
|
-
version: '0.51.0-
|
|
155
|
+
version: '0.51.0-rc.1',
|
|
148
156
|
lib: ()=>require('@perses-dev/plugin-system'),
|
|
149
157
|
shareConfig: {
|
|
150
158
|
singleton: true,
|
|
151
|
-
requiredVersion: '^0.51.0-rc.
|
|
159
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
152
160
|
}
|
|
153
161
|
},
|
|
154
162
|
'@perses-dev/explore': {
|
|
155
|
-
version: '0.51.0-
|
|
163
|
+
version: '0.51.0-rc.1',
|
|
156
164
|
lib: ()=>require('@perses-dev/explore'),
|
|
157
165
|
shareConfig: {
|
|
158
166
|
singleton: true,
|
|
159
|
-
requiredVersion: '^0.51.0-rc.
|
|
167
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
160
168
|
}
|
|
161
169
|
},
|
|
162
170
|
'@perses-dev/dashboards': {
|
|
163
|
-
version: '0.51.0-
|
|
171
|
+
version: '0.51.0-rc.1',
|
|
164
172
|
lib: ()=>require('@perses-dev/dashboards'),
|
|
165
173
|
shareConfig: {
|
|
166
174
|
singleton: true,
|
|
167
|
-
requiredVersion: '^0.51.0-rc.
|
|
175
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
168
176
|
}
|
|
169
177
|
},
|
|
170
178
|
// Below are the shared modules that are used by the plugins, this can be part of the SDK
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"PluginRuntime.d.ts","sourceRoot":"","sources":["../../src/remote/PluginRuntime.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAoB,MAAM,qCAAqC,CAAC;AAMvF,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;
|
|
1
|
+
{"version":3,"file":"PluginRuntime.d.ts","sourceRoot":"","sources":["../../src/remote/PluginRuntime.tsx"],"names":[],"mappings":"AAcA,OAAO,EAAE,cAAc,EAAoB,MAAM,qCAAqC,CAAC;AAMvF,OAAO,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAoMxE,eAAO,MAAM,UAAU,eACT,MAAM,cACN,MAAM,YACR,MAAM,KACf,QAAQ,kBAAkB,GAAG,IAAI,CAInC,CAAC;AAEF,wBAAgB,gBAAgB,CAAC,EAAE,MAAM,EAAE,EAAE;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG;IACtE,aAAa,EAAE,cAAc,CAAC;IAC9B,UAAU,EAAE,MAAM,OAAO,CAAC,kBAAkB,GAAG,IAAI,CAAC,CAAC;CACtD,CAKA"}
|
|
@@ -71,36 +71,44 @@ const getPluginRuntime = ()=>{
|
|
|
71
71
|
requiredVersion: '^5.5.0'
|
|
72
72
|
}
|
|
73
73
|
},
|
|
74
|
+
'@perses-dev/core': {
|
|
75
|
+
version: '0.51.0-rc.1',
|
|
76
|
+
lib: ()=>require('@perses-dev/core'),
|
|
77
|
+
shareConfig: {
|
|
78
|
+
singleton: true,
|
|
79
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
80
|
+
}
|
|
81
|
+
},
|
|
74
82
|
'@perses-dev/components': {
|
|
75
|
-
version: '0.51.0-
|
|
83
|
+
version: '0.51.0-rc.1',
|
|
76
84
|
lib: ()=>require('@perses-dev/components'),
|
|
77
85
|
shareConfig: {
|
|
78
86
|
singleton: true,
|
|
79
|
-
requiredVersion: '^0.51.0-rc.
|
|
87
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
80
88
|
}
|
|
81
89
|
},
|
|
82
90
|
'@perses-dev/plugin-system': {
|
|
83
|
-
version: '0.51.0-
|
|
91
|
+
version: '0.51.0-rc.1',
|
|
84
92
|
lib: ()=>require('@perses-dev/plugin-system'),
|
|
85
93
|
shareConfig: {
|
|
86
94
|
singleton: true,
|
|
87
|
-
requiredVersion: '^0.51.0-rc.
|
|
95
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
88
96
|
}
|
|
89
97
|
},
|
|
90
98
|
'@perses-dev/explore': {
|
|
91
|
-
version: '0.51.0-
|
|
99
|
+
version: '0.51.0-rc.1',
|
|
92
100
|
lib: ()=>require('@perses-dev/explore'),
|
|
93
101
|
shareConfig: {
|
|
94
102
|
singleton: true,
|
|
95
|
-
requiredVersion: '^0.51.0-rc.
|
|
103
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
96
104
|
}
|
|
97
105
|
},
|
|
98
106
|
'@perses-dev/dashboards': {
|
|
99
|
-
version: '0.51.0-
|
|
107
|
+
version: '0.51.0-rc.1',
|
|
100
108
|
lib: ()=>require('@perses-dev/dashboards'),
|
|
101
109
|
shareConfig: {
|
|
102
110
|
singleton: true,
|
|
103
|
-
requiredVersion: '^0.51.0-rc.
|
|
111
|
+
requiredVersion: '^0.51.0-rc.1'
|
|
104
112
|
}
|
|
105
113
|
},
|
|
106
114
|
// Below are the shared modules that are used by the plugins, this can be part of the SDK
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/remote/PluginRuntime.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-require-imports */\n// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { FederationHost, init, loadRemote } from '@module-federation/enhanced/runtime';\nimport * as ReactQuery from '@tanstack/react-query';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport * as ReactHookForm from 'react-hook-form';\nimport * as ReactRouterDOM from 'react-router-dom';\nimport { PersesPlugin, RemotePluginModule } from './PersesPlugin.types';\n\nlet instance: FederationHost | null = null;\n\nconst getPluginRuntime = (): FederationHost => {\n if (instance === null) {\n const pluginRuntime = init({\n name: '@perses/perses-ui-host',\n remotes: [], // all remotes are loaded dynamically\n shared: {\n react: {\n version: React.version,\n lib: () => React,\n shareConfig: {\n singleton: true,\n requiredVersion: `^${React.version}`,\n },\n },\n 'react-dom': {\n version: '18.3.1',\n lib: () => ReactDOM,\n shareConfig: {\n singleton: true,\n requiredVersion: `^18.3.1`,\n },\n },\n 'react-router-dom': {\n version: '6.26.0',\n lib: () => ReactRouterDOM,\n shareConfig: {\n singleton: true,\n requiredVersion: '^6.26.0',\n },\n },\n '@tanstack/react-query': {\n version: '4.39.1',\n lib: () => ReactQuery,\n shareConfig: {\n singleton: true,\n requiredVersion: '^4.39.1',\n },\n },\n 'react-hook-form': {\n version: '7.52.2',\n lib: () => ReactHookForm,\n shareConfig: {\n singleton: true,\n requiredVersion: '^7.52.2',\n },\n },\n echarts: {\n version: '5.5.0',\n lib: () => require('echarts'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^5.5.0',\n },\n },\n '@perses-dev/components': {\n version: '0.51.0-beta.0',\n lib: () => require('@perses-dev/components'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.0',\n },\n },\n '@perses-dev/plugin-system': {\n version: '0.51.0-beta.0',\n lib: () => require('@perses-dev/plugin-system'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.0',\n },\n },\n '@perses-dev/explore': {\n version: '0.51.0-beta.0',\n lib: () => require('@perses-dev/explore'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.0',\n },\n },\n '@perses-dev/dashboards': {\n version: '0.51.0-beta.0',\n lib: () => require('@perses-dev/dashboards'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.0',\n },\n },\n // Below are the shared modules that are used by the plugins, this can be part of the SDK\n 'date-fns': {\n version: '4.1.0',\n lib: () => require('date-fns'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^4.1.0',\n },\n },\n 'date-fns-tz': {\n version: '3.2.0',\n lib: () => require('date-fns-tz'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^3.2.0',\n },\n },\n lodash: {\n version: '4.17.21',\n lib: () => require('lodash'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^4.17.21',\n },\n },\n '@emotion/react': {\n version: '11.11.3',\n lib: () => require('@emotion/react'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^11.11.3',\n },\n },\n '@emotion/styled': {\n version: '11.11.0',\n lib: () => require('@emotion/styled'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^11.11.0',\n },\n },\n '@hookform/resolvers/zod': {\n version: '3.3.4',\n lib: () => require('@hookform/resolvers/zod'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^3.3.4',\n },\n },\n 'use-resize-observer': {\n version: '9.1.0',\n lib: () => require('use-resize-observer'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^9.1.0',\n },\n },\n 'mdi-material-ui': {\n version: '7.4.0',\n lib: () => require('mdi-material-ui'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^7.4.0',\n },\n },\n immer: {\n version: '10.1.1',\n lib: () => require('immer'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^10.1.1',\n },\n },\n },\n });\n\n instance = pluginRuntime;\n\n return instance;\n }\n return instance;\n};\n\nconst registerRemote = (name: string, baseURL?: string): void => {\n const pluginRuntime = getPluginRuntime();\n const existingRemote = pluginRuntime.options.remotes.find((remote) => remote.name === name);\n if (!existingRemote) {\n const remoteEntryURL = baseURL ? `${baseURL}/${name}/mf-manifest.json` : `/plugins/${name}/mf-manifest.json`;\n pluginRuntime.registerRemotes([\n {\n name,\n entry: remoteEntryURL,\n alias: name,\n },\n ]);\n }\n};\n\nexport const loadPlugin = async (\n moduleName: string,\n pluginName: string,\n baseURL?: string\n): Promise<RemotePluginModule | null> => {\n registerRemote(moduleName, baseURL);\n\n return loadRemote<RemotePluginModule>(`${moduleName}/${pluginName}`);\n};\n\nexport function usePluginRuntime({ plugin }: { plugin: PersesPlugin }): {\n pluginRuntime: FederationHost;\n loadPlugin: () => Promise<RemotePluginModule | null>;\n} {\n return {\n pluginRuntime: getPluginRuntime(),\n loadPlugin: () => loadPlugin(plugin.moduleName, plugin.name, plugin.baseURL),\n };\n}\n"],"names":["init","loadRemote","ReactQuery","React","ReactDOM","ReactHookForm","ReactRouterDOM","instance","getPluginRuntime","pluginRuntime","name","remotes","shared","react","version","lib","shareConfig","singleton","requiredVersion","echarts","require","lodash","immer","registerRemote","baseURL","existingRemote","options","find","remote","remoteEntryURL","registerRemotes","entry","alias","loadPlugin","moduleName","pluginName","usePluginRuntime","plugin"],"mappings":"AAAA,wDAAwD,GACxD,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AA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,KAAK,IAAMK,QAAQ;oBACnBJ,aAAa;wBACXC,WAAW;wBACXC,iBAAiB;oBACnB;gBACF;YACF;QACF;QAEAX,WAAWE;QAEX,OAAOF;IACT;IACA,OAAOA;AACT;AAEA,MAAMgB,iBAAiB,CAACb,MAAcc;IACpC,MAAMf,gBAAgBD;IACtB,MAAMiB,iBAAiBhB,cAAciB,OAAO,CAACf,OAAO,CAACgB,IAAI,CAAC,CAACC,SAAWA,OAAOlB,IAAI,KAAKA;IACtF,IAAI,CAACe,gBAAgB;QACnB,MAAMI,iBAAiBL,UAAU,GAAGA,QAAQ,CAAC,EAAEd,KAAK,iBAAiB,CAAC,GAAG,CAAC,SAAS,EAAEA,KAAK,iBAAiB,CAAC;QAC5GD,cAAcqB,eAAe,CAAC;YAC5B;gBACEpB;gBACAqB,OAAOF;gBACPG,OAAOtB;YACT;SACD;IACH;AACF;AAEA,OAAO,MAAMuB,aAAa,OACxBC,YACAC,YACAX;IAEAD,eAAeW,YAAYV;IAE3B,OAAOvB,WAA+B,GAAGiC,WAAW,CAAC,EAAEC,YAAY;AACrE,EAAE;AAEF,OAAO,SAASC,iBAAiB,EAAEC,MAAM,EAA4B;IAInE,OAAO;QACL5B,eAAeD;QACfyB,YAAY,IAAMA,WAAWI,OAAOH,UAAU,EAAEG,OAAO3B,IAAI,EAAE2B,OAAOb,OAAO;IAC7E;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../src/remote/PluginRuntime.tsx"],"sourcesContent":["/* eslint-disable @typescript-eslint/no-require-imports */\n// Copyright 2024 The Perses Authors\n// Licensed under the Apache License, Version 2.0 (the \"License\");\n// you may not use this file except in compliance with the License.\n// You may obtain a copy of the License at\n//\n// http://www.apache.org/licenses/LICENSE-2.0\n//\n// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nimport { FederationHost, init, loadRemote } from '@module-federation/enhanced/runtime';\nimport * as ReactQuery from '@tanstack/react-query';\nimport React from 'react';\nimport ReactDOM from 'react-dom';\nimport * as ReactHookForm from 'react-hook-form';\nimport * as ReactRouterDOM from 'react-router-dom';\nimport { PersesPlugin, RemotePluginModule } from './PersesPlugin.types';\n\nlet instance: FederationHost | null = null;\n\nconst getPluginRuntime = (): FederationHost => {\n if (instance === null) {\n const pluginRuntime = init({\n name: '@perses/perses-ui-host',\n remotes: [], // all remotes are loaded dynamically\n shared: {\n react: {\n version: React.version,\n lib: () => React,\n shareConfig: {\n singleton: true,\n requiredVersion: `^${React.version}`,\n },\n },\n 'react-dom': {\n version: '18.3.1',\n lib: () => ReactDOM,\n shareConfig: {\n singleton: true,\n requiredVersion: `^18.3.1`,\n },\n },\n 'react-router-dom': {\n version: '6.26.0',\n lib: () => ReactRouterDOM,\n shareConfig: {\n singleton: true,\n requiredVersion: '^6.26.0',\n },\n },\n '@tanstack/react-query': {\n version: '4.39.1',\n lib: () => ReactQuery,\n shareConfig: {\n singleton: true,\n requiredVersion: '^4.39.1',\n },\n },\n 'react-hook-form': {\n version: '7.52.2',\n lib: () => ReactHookForm,\n shareConfig: {\n singleton: true,\n requiredVersion: '^7.52.2',\n },\n },\n echarts: {\n version: '5.5.0',\n lib: () => require('echarts'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^5.5.0',\n },\n },\n '@perses-dev/core': {\n version: '0.51.0-rc.1',\n lib: () => require('@perses-dev/core'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.1',\n },\n },\n '@perses-dev/components': {\n version: '0.51.0-rc.1',\n lib: () => require('@perses-dev/components'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.1',\n },\n },\n '@perses-dev/plugin-system': {\n version: '0.51.0-rc.1',\n lib: () => require('@perses-dev/plugin-system'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.1',\n },\n },\n '@perses-dev/explore': {\n version: '0.51.0-rc.1',\n lib: () => require('@perses-dev/explore'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.1',\n },\n },\n '@perses-dev/dashboards': {\n version: '0.51.0-rc.1',\n lib: () => require('@perses-dev/dashboards'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^0.51.0-rc.1',\n },\n },\n // Below are the shared modules that are used by the plugins, this can be part of the SDK\n 'date-fns': {\n version: '4.1.0',\n lib: () => require('date-fns'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^4.1.0',\n },\n },\n 'date-fns-tz': {\n version: '3.2.0',\n lib: () => require('date-fns-tz'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^3.2.0',\n },\n },\n lodash: {\n version: '4.17.21',\n lib: () => require('lodash'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^4.17.21',\n },\n },\n '@emotion/react': {\n version: '11.11.3',\n lib: () => require('@emotion/react'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^11.11.3',\n },\n },\n '@emotion/styled': {\n version: '11.11.0',\n lib: () => require('@emotion/styled'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^11.11.0',\n },\n },\n '@hookform/resolvers/zod': {\n version: '3.3.4',\n lib: () => require('@hookform/resolvers/zod'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^3.3.4',\n },\n },\n 'use-resize-observer': {\n version: '9.1.0',\n lib: () => require('use-resize-observer'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^9.1.0',\n },\n },\n 'mdi-material-ui': {\n version: '7.4.0',\n lib: () => require('mdi-material-ui'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^7.4.0',\n },\n },\n immer: {\n version: '10.1.1',\n lib: () => require('immer'),\n shareConfig: {\n singleton: true,\n requiredVersion: '^10.1.1',\n },\n },\n },\n });\n\n instance = pluginRuntime;\n\n return instance;\n }\n return instance;\n};\n\nconst registerRemote = (name: string, baseURL?: string): void => {\n const pluginRuntime = getPluginRuntime();\n const existingRemote = pluginRuntime.options.remotes.find((remote) => remote.name === name);\n if (!existingRemote) {\n const remoteEntryURL = baseURL ? `${baseURL}/${name}/mf-manifest.json` : `/plugins/${name}/mf-manifest.json`;\n pluginRuntime.registerRemotes([\n {\n name,\n entry: remoteEntryURL,\n alias: name,\n },\n ]);\n }\n};\n\nexport const loadPlugin = async (\n moduleName: string,\n pluginName: string,\n baseURL?: string\n): Promise<RemotePluginModule | null> => {\n registerRemote(moduleName, baseURL);\n\n return loadRemote<RemotePluginModule>(`${moduleName}/${pluginName}`);\n};\n\nexport function usePluginRuntime({ plugin }: { plugin: PersesPlugin }): {\n pluginRuntime: FederationHost;\n loadPlugin: () => Promise<RemotePluginModule | null>;\n} {\n return {\n pluginRuntime: getPluginRuntime(),\n loadPlugin: () => loadPlugin(plugin.moduleName, plugin.name, plugin.baseURL),\n };\n}\n"],"names":["init","loadRemote","ReactQuery","React","ReactDOM","ReactHookForm","ReactRouterDOM","instance","getPluginRuntime","pluginRuntime","name","remotes","shared","react","version","lib","shareConfig","singleton","requiredVersion","echarts","require","lodash","immer","registerRemote","baseURL","existingRemote","options","find","remote","remoteEntryURL","registerRemotes","entry","alias","loadPlugin","moduleName","pluginName","usePluginRuntime","plugin"],"mappings":"AAAA,wDAAwD,GACxD,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAAyBA,IAAI,EAAEC,UAAU,QAAQ,sCAAsC;AACvF,YAAYC,gBAAgB,wBAAwB;AACpD,OAAOC,WAAW,QAAQ;AAC1B,OAAOC,cAAc,YAAY;AACjC,YAAYC,mBAAmB,kBAAkB;AACjD,YAAYC,oBAAoB,mBAAmB;AAGnD,IAAIC,WAAkC;AAEtC,MAAMC,mBAAmB;IACvB,IAAID,aAAa,MAAM;QACrB,MAAME,gBAAgBT,KAAK;YAC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IACpC,MAAMf,gBAAgBD;IACtB,MAAMiB,iBAAiBhB,cAAciB,OAAO,CAACf,OAAO,CAACgB,IAAI,CAAC,CAACC,SAAWA,OAAOlB,IAAI,KAAKA;IACtF,IAAI,CAACe,gBAAgB;QACnB,MAAMI,iBAAiBL,UAAU,GAAGA,QAAQ,CAAC,EAAEd,KAAK,iBAAiB,CAAC,GAAG,CAAC,SAAS,EAAEA,KAAK,iBAAiB,CAAC;QAC5GD,cAAcqB,eAAe,CAAC;YAC5B;gBACEpB;gBACAqB,OAAOF;gBACPG,OAAOtB;YACT;SACD;IACH;AACF;AAEA,OAAO,MAAMuB,aAAa,OACxBC,YACAC,YACAX;IAEAD,eAAeW,YAAYV;IAE3B,OAAOvB,WAA+B,GAAGiC,WAAW,CAAC,EAAEC,YAAY;AACrE,EAAE;AAEF,OAAO,SAASC,iBAAiB,EAAEC,MAAM,EAA4B;IAInE,OAAO;QACL5B,eAAeD;QACfyB,YAAY,IAAMA,WAAWI,OAAOH,UAAU,EAAEG,OAAO3B,IAAI,EAAE2B,OAAOb,OAAO;IAC7E;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/plugin-system",
|
|
3
|
-
"version": "0.51.0
|
|
3
|
+
"version": "0.51.0",
|
|
4
4
|
"description": "The plugin feature in Pereses",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"homepage": "https://github.com/perses/perses/blob/main/README.md",
|
|
@@ -29,8 +29,8 @@
|
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
31
|
"@module-federation/enhanced": "^0.14.3",
|
|
32
|
-
"@perses-dev/components": "0.51.0
|
|
33
|
-
"@perses-dev/core": "0.51.0
|
|
32
|
+
"@perses-dev/components": "0.51.0",
|
|
33
|
+
"@perses-dev/core": "0.51.0",
|
|
34
34
|
"date-fns": "^4.1.0",
|
|
35
35
|
"date-fns-tz": "^3.2.0",
|
|
36
36
|
"immer": "^10.1.1",
|