@perses-dev/plugin-system 0.55.0-beta.13 → 0.55.0-beta.15
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/components/DatasourceSelect/DatasourceSelect.d.ts.map +1 -1
- package/dist/components/DatasourceSelect/DatasourceSelect.js +0 -1
- package/dist/components/DatasourceSelect/DatasourceSelect.js.map +1 -1
- package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.d.ts.map +1 -1
- package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.js +2 -7
- package/dist/components/DatasourceTestConnectionButton/DatasourceTestConnectionButton.js.map +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPProxyOAuthPassthroughEditor.d.ts +11 -0
- package/dist/components/HTTPSettingsEditor/HTTPProxyOAuthPassthroughEditor.d.ts.map +1 -0
- package/dist/components/HTTPSettingsEditor/HTTPProxyOAuthPassthroughEditor.js +62 -0
- package/dist/components/HTTPSettingsEditor/HTTPProxyOAuthPassthroughEditor.js.map +1 -0
- package/dist/components/HTTPSettingsEditor/HTTPProxyTimeoutEditor.d.ts +11 -0
- package/dist/components/HTTPSettingsEditor/HTTPProxyTimeoutEditor.d.ts.map +1 -0
- package/dist/components/HTTPSettingsEditor/HTTPProxyTimeoutEditor.js +58 -0
- package/dist/components/HTTPSettingsEditor/HTTPProxyTimeoutEditor.js.map +1 -0
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.d.ts.map +1 -1
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js +44 -15
- package/dist/components/HTTPSettingsEditor/HTTPSettingsEditor.js.map +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.d.ts.map +1 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js +7 -1
- package/dist/components/ItemSelectionActionsOptionsEditor/ItemSelectionActionsOptionsEditor.js.map +1 -1
- package/dist/components/LinksEditor/LinksEditor.js +5 -0
- package/dist/components/LinksEditor/LinksEditor.js.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js +54 -46
- package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js +5 -3
- package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.d.ts.map +1 -1
- package/dist/components/TimeRangeControls/TimeRangeControls.js +0 -2
- package/dist/components/TimeRangeControls/TimeRangeControls.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
- package/dist/model/datasource.d.ts +3 -0
- package/dist/model/datasource.d.ts.map +1 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/plugin-loading.d.ts +1 -0
- package/dist/model/plugin-loading.d.ts.map +1 -1
- package/dist/model/plugin-loading.js.map +1 -1
- package/dist/remote/PluginLoaderComponent.d.ts.map +1 -1
- package/dist/remote/PluginLoaderComponent.js +28 -15
- package/dist/remote/PluginLoaderComponent.js.map +1 -1
- package/dist/remote/PluginRuntime.d.ts.map +1 -1
- package/dist/remote/PluginRuntime.js +32 -24
- package/dist/remote/PluginRuntime.js.map +1 -1
- package/dist/remote/remotePluginLoader.d.ts.map +1 -1
- package/dist/remote/remotePluginLoader.js +1 -0
- package/dist/remote/remotePluginLoader.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.js +7 -9
- package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
- package/dist/runtime/UsageMetricsProvider.d.ts.map +1 -1
- package/dist/runtime/UsageMetricsProvider.js +24 -20
- package/dist/runtime/UsageMetricsProvider.js.map +1 -1
- package/dist/runtime/plugin-registry.d.ts +1 -0
- package/dist/runtime/plugin-registry.d.ts.map +1 -1
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/package.json +5 -5
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/runtime/UsageMetricsProvider.tsx"],"sourcesContent":["// Copyright 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 type { FetchFn } from '@perses-dev/client';\nimport { useFetch } from '@perses-dev/client';\nimport type { QueryDefinition } from '@perses-dev/spec';\nimport type { ReactElement, ReactNode } from 'react';\nimport { createContext, useContext } from 'react';\n\ntype QueryState = 'pending' | 'success' | 'error';\n\ninterface UsageMetrics {\n project: string;\n dashboard: string;\n startRenderTime: number;\n renderDurationMs: number;\n renderErrorCount: number;\n pendingQueries: Map<string, QueryState>;\n apiPrefix?: string;\n fetchFn: FetchFn;\n}\n\ninterface UsageMetricsProps {\n project: string;\n dashboard: string;\n apiPrefix?: string;\n children: ReactNode;\n}\n\ninterface UseUsageMetricsResults {\n markQuery: (definition: QueryDefinition, state: QueryState) => void;\n}\n\nexport const UsageMetricsContext = createContext<UsageMetrics | undefined>(undefined);\n\nexport const useUsageMetricsContext = (): UsageMetrics | undefined => {\n return useContext(UsageMetricsContext);\n};\n\nexport const useUsageMetrics = (): UseUsageMetricsResults => {\n const ctx = useUsageMetricsContext();\n\n return {\n markQuery: (definition: QueryDefinition, newState: QueryState): void => {\n if (ctx === undefined) {\n return;\n }\n\n
|
|
1
|
+
{"version":3,"sources":["../../src/runtime/UsageMetricsProvider.tsx"],"sourcesContent":["// Copyright 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 type { FetchFn } from '@perses-dev/client';\nimport { useFetch } from '@perses-dev/client';\nimport type { QueryDefinition } from '@perses-dev/spec';\nimport type { ReactElement, ReactNode } from 'react';\nimport { createContext, useContext, useState } from 'react';\n\ntype QueryState = 'pending' | 'success' | 'error';\n\ninterface UsageMetrics {\n project: string;\n dashboard: string;\n startRenderTime: number;\n renderDurationMs: number;\n renderErrorCount: number;\n pendingQueries: Map<string, QueryState>;\n apiPrefix?: string;\n fetchFn: FetchFn;\n}\n\ninterface UsageMetricsProps {\n project: string;\n dashboard: string;\n apiPrefix?: string;\n children: ReactNode;\n}\n\ninterface UseUsageMetricsResults {\n markQuery: (definition: QueryDefinition, state: QueryState) => void;\n}\n\nexport const UsageMetricsContext = createContext<UsageMetrics | undefined>(undefined);\n\nexport const useUsageMetricsContext = (): UsageMetrics | undefined => {\n return useContext(UsageMetricsContext);\n};\n\nexport const useUsageMetrics = (): UseUsageMetricsResults => {\n const ctx = useUsageMetricsContext();\n\n return {\n markQuery: (definition: QueryDefinition, newState: QueryState): void => {\n if (ctx === undefined) {\n return;\n }\n recordQuery(ctx, definition, newState);\n },\n };\n};\n\nfunction recordQuery(ctx: UsageMetrics, definition: QueryDefinition, newState: QueryState): void {\n const definitionKey = JSON.stringify(definition);\n if (ctx.pendingQueries.has(definitionKey) && newState === 'pending') {\n // Never allow transitions back to pending, to avoid re-sending stats on a re-render.\n return;\n }\n\n if (ctx.pendingQueries.get(definitionKey) !== newState) {\n ctx.pendingQueries.set(definitionKey, newState);\n if (newState === 'error') {\n ctx.renderErrorCount += 1;\n }\n\n const allDone = [...ctx.pendingQueries.values()].every((p) => p !== 'pending');\n if (ctx.renderDurationMs === 0 && allDone) {\n ctx.renderDurationMs = Date.now() - ctx.startRenderTime;\n submitMetrics(ctx);\n }\n }\n}\n\nconst submitMetrics = async (stats: UsageMetrics): Promise<void> => {\n await stats.fetchFn(`${stats.apiPrefix ?? ''}/api/v1/view`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n },\n body: JSON.stringify({\n project: stats.project,\n dashboard: stats.dashboard,\n render_time: stats.renderDurationMs / 1000,\n render_errors: stats.renderErrorCount,\n }),\n });\n};\n\nexport const UsageMetricsProvider = ({ apiPrefix, project, dashboard, children }: UsageMetricsProps): ReactElement => {\n const { fetch } = useFetch();\n const [startRenderTime] = useState(() => Date.now());\n\n const ctx: UsageMetrics = {\n project: project,\n dashboard: dashboard,\n renderErrorCount: 0,\n startRenderTime,\n renderDurationMs: 0,\n pendingQueries: new Map(),\n apiPrefix,\n fetchFn: fetch,\n };\n\n return <UsageMetricsContext.Provider value={ctx}>{children}</UsageMetricsContext.Provider>;\n};\n"],"names":["useFetch","createContext","useContext","useState","UsageMetricsContext","undefined","useUsageMetricsContext","useUsageMetrics","ctx","markQuery","definition","newState","recordQuery","definitionKey","JSON","stringify","pendingQueries","has","get","set","renderErrorCount","allDone","values","every","p","renderDurationMs","Date","now","startRenderTime","submitMetrics","stats","fetchFn","apiPrefix","method","headers","body","project","dashboard","render_time","render_errors","UsageMetricsProvider","children","fetch","Map","Provider","value"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;;AAGjC,SAASA,QAAQ,QAAQ,qBAAqB;AAG9C,SAASC,aAAa,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,QAAQ;AA0B5D,OAAO,MAAMC,oCAAsBH,cAAwCI,WAAW;AAEtF,OAAO,MAAMC,yBAAyB;IACpC,OAAOJ,WAAWE;A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AM,EAAEC,KAAK,EAAE,GAAG1C;IAClB,MAAM,CAAC4B,gBAAgB,GAAGzB,SAAS,IAAMuB,KAAKC,GAAG;IAEjD,MAAMnB,MAAoB;QACxB4B,SAASA;QACTC,WAAWA;QACXjB,kBAAkB;QAClBQ;QACAH,kBAAkB;QAClBT,gBAAgB,IAAI2B;QACpBX;QACAD,SAASW;IACX;IAEA,qBAAO,KAACtC,oBAAoBwC,QAAQ;QAACC,OAAOrC;kBAAMiC;;AACpD,EAAE"}
|
|
@@ -5,6 +5,7 @@ export interface PluginRegistryContextType {
|
|
|
5
5
|
getPlugin<T extends PluginType>(compoundKey: PluginCompoundKey<T>): Promise<PluginImplementation<T>>;
|
|
6
6
|
listPluginMetadata(pluginTypes?: PluginType[]): Promise<PluginMetadataWithModule[]>;
|
|
7
7
|
defaultPluginKinds?: DefaultPluginKinds;
|
|
8
|
+
pluginsBaseURL?: string;
|
|
8
9
|
}
|
|
9
10
|
export declare const PluginRegistryContext: import("react").Context<PluginRegistryContextType | undefined>;
|
|
10
11
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"plugin-registry.d.ts","sourceRoot":"","sources":["../../src/runtime/plugin-registry.ts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,yBAAyB,EAAE,wBAAwB,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,KAAK,EAAE,eAAe,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAI7E,OAAO,KAAK,EACV,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,UAAU,EACV,iBAAiB,EAClB,MAAM,UAAU,CAAC;AAElB,MAAM,WAAW,yBAAyB;IACxC,SAAS,CAAC,CAAC,SAAS,UAAU,EAAE,WAAW,EAAE,iBAAiB,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC;IACrG,kBAAkB,CAAC,WAAW,CAAC,EAAE,UAAU,EAAE,G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IACjB,oDAAoD;IACpD,QAAQ,CAAC,EAAE,MAAM,CAAC;CACnB,CAAC;AAEF;;;;;GAKG;AACH,wBAAgB,SAAS,CAAC,CAAC,SAAS,UAAU,EAC5C,UAAU,EAAE,CAAC,GAAG,SAAS,EACzB,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,KAAK,CAAC,CAahD;AAED;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,wBAAwB;IAC9D,IAAI,EAAE,MAAM,CAAC;CACd;AAUD;;GAEG;AACH,wBAAgB,UAAU,CAAC,CAAC,SAAS,UAAU,EAC7C,UAAU,EAAE,CAAC,EACb,OAAO,EAAE,cAAc,EAAE,GACxB,KAAK,CAAC,cAAc,CAAC,oBAAoB,CAAC,CAAC,CAAC,CAAC,CAAC,CA6BhD;AAGD,KAAK,4BAA4B,GAAG,IAAI,CACtC,eAAe,CAAC,wBAAwB,EAAE,EAAE,KAAK,EAAE,wBAAwB,EAAE,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CAAC,EAClG,UAAU,GAAG,SAAS,CACvB,CAAC;AAEF;;;GAGG;AACH,wBAAgB,qBAAqB,CACnC,WAAW,CAAC,EAAE,UAAU,EAAE,EAC1B,OAAO,CAAC,EAAE,4BAA4B,GACrC,cAAc,CAAC,wBAAwB,EAAE,CAAC,CAQ5C;AAED,wBAAgB,mCAAmC,IAAI,cAAc,CAAC,yBAAyB,EAAE,CAAC,CAkBjG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/runtime/plugin-registry.ts"],"sourcesContent":["// Copyright 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 type { BuiltinVariableDefinition, PluginDefinitionMetadata } from '@perses-dev/spec';\nimport type { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';\nimport { useQueries, useQuery } from '@tanstack/react-query';\nimport { createContext, useContext } from 'react';\n\nimport type {\n DefaultPluginKinds,\n PluginImplementation,\n PluginMetadataWithModule,\n PluginType,\n PluginCompoundKey,\n} from '../model';\n\nexport interface PluginRegistryContextType {\n getPlugin<T extends PluginType>(compoundKey: PluginCompoundKey<T>): Promise<PluginImplementation<T>>;\n listPluginMetadata(pluginTypes?: PluginType[]): Promise<PluginMetadataWithModule[]>;\n defaultPluginKinds?: DefaultPluginKinds;\n}\n\nexport const PluginRegistryContext = createContext<PluginRegistryContextType | undefined>(undefined);\n\n/**\n * Use the PluginRegistry context directly. This is meant as an escape hatch for custom async flows. You should probably\n * be using `usePlugin` or `useListPluginMetadata` instead.\n */\nexport function usePluginRegistry(): PluginRegistryContextType {\n const ctx = useContext(PluginRegistryContext);\n if (ctx === undefined) {\n throw new Error('PluginRegistryContext not found. Did you forget a provider?');\n }\n return ctx;\n}\n\ntype UsePluginQueryKey = [string, PluginType | undefined, string, string, string];\n\n// Allows consumers to pass useQuery options from react-query when loading a plugin\ntype UsePluginOptions<T extends PluginType> = Omit<\n UseQueryOptions<PluginImplementation<T>, Error, PluginImplementation<T>, UsePluginQueryKey>,\n 'queryKey' | 'queryFn'\n> & {\n /** Pin resolution to a specific plugin version. When omitted, the latest available version is used. */\n version?: string;\n /** Pin resolution to a specific plugin registry. */\n registry?: string;\n};\n\n/**\n * Loads a plugin and returns the plugin implementation, along with loading/error state.\n *\n * When `options.version` is provided, the plugin is resolved with an exact version match: if that version is not\n * installed, the query fails instead of silently falling back to the latest available version.\n */\nexport function usePlugin<T extends PluginType>(\n pluginType: T | undefined,\n kind: string,\n options?: UsePluginOptions<T>,\n): UseQueryResult<PluginImplementation<T>, Error> {\n const { version, registry, ...queryOptions } = options ?? {};\n // We never want to ask for a plugin when the kind isn't set yet, so disable those queries automatically\n const useQueryOptions = {\n ...queryOptions,\n enabled: (queryOptions.enabled ?? true) && pluginType !== undefined && kind !== '',\n };\n const { getPlugin } = usePluginRegistry();\n return useQuery({\n queryKey: ['getPlugin', pluginType, kind, version ?? '', registry ?? ''],\n queryFn: () => getPlugin({ kind: pluginType!, name: kind, version, registry }),\n ...useQueryOptions,\n });\n}\n\n/**\n * A plugin reference to load, optionally pinned to a specific version/registry.\n */\nexport interface UsePluginsItem extends PluginDefinitionMetadata {\n kind: string;\n}\n\n/**\n * Full identity of a plugin to load. Two definitions pinned to different versions (or registries) of the same kind are\n * distinct plugins and must be loaded independently.\n */\nfunction getUsePluginsItemIdentity(plugin: UsePluginsItem): string {\n return `${plugin.kind}:${plugin.version ?? ''}:${plugin.registry ?? ''}`;\n}\n\n/**\n * Loads a list of plugins and returns the plugin implementation, along with loading/error state.\n */\nexport function usePlugins<T extends PluginType>(\n pluginType: T,\n plugins: UsePluginsItem[],\n): Array<UseQueryResult<PluginImplementation<T>>> {\n const { getPlugin } = usePluginRegistry();\n\n // useQueries() does not support queries with duplicate keys, therefore we de-duplicate the plugins before running useQueries()\n // This resolves the following warning in the JS console: \"[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.\"\n // https://github.com/TanStack/query/issues/8224#issuecomment-2523554831\n // https://github.com/TanStack/query/issues/4187#issuecomment-1256336901\n const uniquePlugins = new Map<string, UsePluginsItem>();\n for (const p of plugins) {\n const key = getUsePluginsItemIdentity(p);\n if (!uniquePlugins.has(key)) {\n uniquePlugins.set(key, p);\n }\n }\n const uniqueKeys = [...uniquePlugins.keys()];\n const uniqueValues = [...uniquePlugins.values()];\n\n const result: Array<UseQueryResult<PluginImplementation<T>>> = useQueries({\n queries: uniqueValues.map((p) => {\n return {\n queryKey: ['getPlugin', pluginType, p.kind, p.version ?? '', p.registry ?? ''],\n queryFn: () => getPlugin({ kind: pluginType, name: p.kind, version: p.version, registry: p.registry }),\n };\n }),\n });\n\n // Re-assemble array in original order. Index lookups go through a Map so this stays linear on large panels.\n const indexByIdentity = new Map(uniqueKeys.map((key, index) => [key, index]));\n return plugins.map((p) => result[indexByIdentity.get(getUsePluginsItemIdentity(p))!]!);\n}\n\n// Allow consumers to pass useQuery options from react-query when listing metadata\ntype UseListPluginMetadataOptions = Omit<\n UseQueryOptions<PluginMetadataWithModule[], Error, PluginMetadataWithModule[], [string, string[]]>,\n 'queryKey' | 'queryFn'\n>;\n\n/**\n * Gets a list of plugin metadata for the specified plugin types and returns it, along with loading/error state. When\n * `pluginTypes` is omitted, the metadata of every installed plugin is returned, whatever its type.\n */\nexport function useListPluginMetadata(\n pluginTypes?: PluginType[],\n options?: UseListPluginMetadataOptions,\n): UseQueryResult<PluginMetadataWithModule[]> {\n const { listPluginMetadata } = usePluginRegistry();\n return useQuery({\n // `['*']` marks the \"every plugin type\" query so it gets its own cache entry.\n queryKey: ['listPluginMetadata', pluginTypes ?? ['*']],\n queryFn: () => listPluginMetadata(pluginTypes),\n ...options,\n });\n}\n\nexport function usePluginBuiltinVariableDefinitions(): UseQueryResult<BuiltinVariableDefinition[]> {\n const { getPlugin, listPluginMetadata } = usePluginRegistry();\n\n return useQuery({\n queryKey: ['usePluginBuiltinVariableDefinitions'],\n queryFn: async () => {\n const datasources = await listPluginMetadata(['Datasource']);\n const datasourceNames = new Set(datasources.map((datasource) => datasource.spec.name));\n const result: BuiltinVariableDefinition[] = [];\n for (const name of datasourceNames) {\n const plugin = await getPlugin({ kind: 'Datasource', name });\n if (plugin.getBuiltinVariableDefinitions) {\n plugin.getBuiltinVariableDefinitions().forEach((definition) => result.push(definition));\n }\n }\n return result;\n },\n });\n}\n"],"names":["useQueries","useQuery","createContext","useContext","PluginRegistryContext","undefined","usePluginRegistry","ctx","Error","usePlugin","pluginType","kind","options","version","registry","queryOptions","useQueryOptions","enabled","getPlugin","queryKey","queryFn","name","getUsePluginsItemIdentity","plugin","usePlugins","plugins","uniquePlugins","Map","p","key","has","set","uniqueKeys","keys","uniqueValues","values","result","queries","map","indexByIdentity","index","get","useListPluginMetadata","pluginTypes","listPluginMetadata","usePluginBuiltinVariableDefinitions","datasources","datasourceNames","Set","datasource","spec","getBuiltinVariableDefinitions","forEach","definition","push"],"mappings":"AAAA,+BAA+B;AAC/B,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAIjC,SAASA,UAAU,EAAEC,QAAQ,QAAQ,wBAAwB;AAC7D,SAASC,aAAa,EAAEC,UAAU,QAAQ,QAAQ;AAgBlD,OAAO,MAAMC,wBAAwBF,cAAqDG,WAAW;AAErG;;;CAGC,GACD,OAAO,SAASC;IACd,MAAMC,MAAMJ,WAAWC;IACvB,IAAIG,QAAQF,WAAW;QACrB,MAAM,IAAIG,MAAM;IAClB;IACA,OAAOD;AACT;AAeA;;;;;CAKC,GACD,OAAO,SAASE,UACdC,UAAyB,EACzBC,IAAY,EACZC,OAA6B;IAE7B,MAAM,EAAEC,OAAO,EAAEC,QAAQ,EAAE,GAAGC,cAAc,GAAGH,WAAW,CAAC;IAC3D,wGAAwG;IACxG,MAAMI,kBAAkB;QACtB,GAAGD,YAAY;QACfE,SAAS,AAACF,CAAAA,aAAaE,OAAO,IAAI,IAAG,KAAMP,eAAeL,aAAaM,SAAS;IAClF;IACA,MAAM,EAAEO,SAAS,EAAE,GAAGZ;IACtB,OAAOL,SAAS;QACdkB,UAAU;YAAC;YAAaT;YAAYC;YAAME,WAAW;YAAIC,YAAY;SAAG;QACxEM,SAAS,IAAMF,UAAU;gBAAEP,MAAMD;gBAAaW,MAAMV;gBAAME;gBAASC;YAAS;QAC5E,GAAGE,eAAe;IACpB;AACF;AASA;;;CAGC,GACD,S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gC,kBAAkB,EAAE,GAAGtC;IAC/B,OAAOL,SAAS;QACd,8EAA8E;QAC9EkB,UAAU;YAAC;YAAsBwB,eAAe;gBAAC;aAAI;SAAC;QACtDvB,SAAS,IAAMwB,mBAAmBD;QAClC,GAAG/B,OAAO;IACZ;AACF;AAEA,OAAO,SAASiC;IACd,MAAM,EAAE3B,SAAS,EAAE0B,kBAAkB,EAAE,GAAGtC;IAE1C,OAAOL,SAAS;QACdkB,UAAU;YAAC;SAAsC;QACjDC,SAAS;YACP,MAAM0B,cAAc,MAAMF,mBAAmB;gBAAC;aAAa;YAC3D,MAAMG,kBAAkB,IAAIC,IAAIF,YAAYR,GAAG,CAAC,CAACW,aAAeA,WAAWC,IAAI,CAAC7B,IAAI;YACpF,MAAMe,SAAsC,EAAE;YAC9C,KAAK,MAAMf,QAAQ0B,gBAAiB;gBAClC,MAAMxB,SAAS,MAAML,UAAU;oBAAEP,MAAM;oBAAcU;gBAAK;gBAC1D,IAAIE,OAAO4B,6BAA6B,EAAE;oBACxC5B,OAAO4B,6BAA6B,GAAGC,OAAO,CAAC,CAACC,aAAejB,OAAOkB,IAAI,CAACD;gBAC7E;YACF;YACA,OAAOjB;QACT;IACF;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../src/runtime/plugin-registry.ts"],"sourcesContent":["// Copyright 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 type { BuiltinVariableDefinition, PluginDefinitionMetadata } from '@perses-dev/spec';\nimport type { UseQueryOptions, UseQueryResult } from '@tanstack/react-query';\nimport { useQueries, useQuery } from '@tanstack/react-query';\nimport { createContext, useContext } from 'react';\n\nimport type {\n DefaultPluginKinds,\n PluginImplementation,\n PluginMetadataWithModule,\n PluginType,\n PluginCompoundKey,\n} from '../model';\n\nexport interface PluginRegistryContextType {\n getPlugin<T extends PluginType>(compoundKey: PluginCompoundKey<T>): Promise<PluginImplementation<T>>;\n listPluginMetadata(pluginTypes?: PluginType[]): Promise<PluginMetadataWithModule[]>;\n defaultPluginKinds?: DefaultPluginKinds;\n pluginsBaseURL?: string;\n}\n\nexport const PluginRegistryContext = createContext<PluginRegistryContextType | undefined>(undefined);\n\n/**\n * Use the PluginRegistry context directly. This is meant as an escape hatch for custom async flows. You should probably\n * be using `usePlugin` or `useListPluginMetadata` instead.\n */\nexport function usePluginRegistry(): PluginRegistryContextType {\n const ctx = useContext(PluginRegistryContext);\n if (ctx === undefined) {\n throw new Error('PluginRegistryContext not found. Did you forget a provider?');\n }\n return ctx;\n}\n\ntype UsePluginQueryKey = [string, PluginType | undefined, string, string, string];\n\n// Allows consumers to pass useQuery options from react-query when loading a plugin\ntype UsePluginOptions<T extends PluginType> = Omit<\n UseQueryOptions<PluginImplementation<T>, Error, PluginImplementation<T>, UsePluginQueryKey>,\n 'queryKey' | 'queryFn'\n> & {\n /** Pin resolution to a specific plugin version. When omitted, the latest available version is used. */\n version?: string;\n /** Pin resolution to a specific plugin registry. */\n registry?: string;\n};\n\n/**\n * Loads a plugin and returns the plugin implementation, along with loading/error state.\n *\n * When `options.version` is provided, the plugin is resolved with an exact version match: if that version is not\n * installed, the query fails instead of silently falling back to the latest available version.\n */\nexport function usePlugin<T extends PluginType>(\n pluginType: T | undefined,\n kind: string,\n options?: UsePluginOptions<T>,\n): UseQueryResult<PluginImplementation<T>, Error> {\n const { version, registry, ...queryOptions } = options ?? {};\n // We never want to ask for a plugin when the kind isn't set yet, so disable those queries automatically\n const useQueryOptions = {\n ...queryOptions,\n enabled: (queryOptions.enabled ?? true) && pluginType !== undefined && kind !== '',\n };\n const { getPlugin } = usePluginRegistry();\n return useQuery({\n queryKey: ['getPlugin', pluginType, kind, version ?? '', registry ?? ''],\n queryFn: () => getPlugin({ kind: pluginType!, name: kind, version, registry }),\n ...useQueryOptions,\n });\n}\n\n/**\n * A plugin reference to load, optionally pinned to a specific version/registry.\n */\nexport interface UsePluginsItem extends PluginDefinitionMetadata {\n kind: string;\n}\n\n/**\n * Full identity of a plugin to load. Two definitions pinned to different versions (or registries) of the same kind are\n * distinct plugins and must be loaded independently.\n */\nfunction getUsePluginsItemIdentity(plugin: UsePluginsItem): string {\n return `${plugin.kind}:${plugin.version ?? ''}:${plugin.registry ?? ''}`;\n}\n\n/**\n * Loads a list of plugins and returns the plugin implementation, along with loading/error state.\n */\nexport function usePlugins<T extends PluginType>(\n pluginType: T,\n plugins: UsePluginsItem[],\n): Array<UseQueryResult<PluginImplementation<T>>> {\n const { getPlugin } = usePluginRegistry();\n\n // useQueries() does not support queries with duplicate keys, therefore we de-duplicate the plugins before running useQueries()\n // This resolves the following warning in the JS console: \"[QueriesObserver]: Duplicate Queries found. This might result in unexpected behavior.\"\n // https://github.com/TanStack/query/issues/8224#issuecomment-2523554831\n // https://github.com/TanStack/query/issues/4187#issuecomment-1256336901\n const uniquePlugins = new Map<string, UsePluginsItem>();\n for (const p of plugins) {\n const key = getUsePluginsItemIdentity(p);\n if (!uniquePlugins.has(key)) {\n uniquePlugins.set(key, p);\n }\n }\n const uniqueKeys = [...uniquePlugins.keys()];\n const uniqueValues = [...uniquePlugins.values()];\n\n const result: Array<UseQueryResult<PluginImplementation<T>>> = useQueries({\n queries: uniqueValues.map((p) => {\n return {\n queryKey: ['getPlugin', pluginType, p.kind, p.version ?? '', p.registry ?? ''],\n queryFn: () => getPlugin({ kind: pluginType, name: p.kind, version: p.version, registry: p.registry }),\n };\n }),\n });\n\n // Re-assemble array in original order. Index lookups go through a Map so this stays linear on large panels.\n const indexByIdentity = new Map(uniqueKeys.map((key, index) => [key, index]));\n return plugins.map((p) => result[indexByIdentity.get(getUsePluginsItemIdentity(p))!]!);\n}\n\n// Allow consumers to pass useQuery options from react-query when listing metadata\ntype UseListPluginMetadataOptions = Omit<\n UseQueryOptions<PluginMetadataWithModule[], Error, PluginMetadataWithModule[], [string, string[]]>,\n 'queryKey' | 'queryFn'\n>;\n\n/**\n * Gets a list of plugin metadata for the specified plugin types and returns it, along with loading/error state. When\n * `pluginTypes` is omitted, the metadata of every installed plugin is returned, whatever its type.\n */\nexport function useListPluginMetadata(\n pluginTypes?: PluginType[],\n options?: UseListPluginMetadataOptions,\n): UseQueryResult<PluginMetadataWithModule[]> {\n const { listPluginMetadata } = usePluginRegistry();\n return useQuery({\n // `['*']` marks the \"every plugin type\" query so it gets its own cache entry.\n queryKey: ['listPluginMetadata', pluginTypes ?? ['*']],\n queryFn: () => listPluginMetadata(pluginTypes),\n ...options,\n });\n}\n\nexport function usePluginBuiltinVariableDefinitions(): UseQueryResult<BuiltinVariableDefinition[]> {\n const { getPlugin, listPluginMetadata } = usePluginRegistry();\n\n return useQuery({\n queryKey: ['usePluginBuiltinVariableDefinitions'],\n queryFn: async () => {\n const datasources = await listPluginMetadata(['Datasource']);\n const datasourceNames = new Set(datasources.map((datasource) => datasource.spec.name));\n const result: BuiltinVariableDefinition[] = [];\n for (const name of datasourceNames) {\n const plugin = await getPlugin({ kind: 'Datasource', name });\n if (plugin.getBuiltinVariableDefinitions) {\n plugin.getBuiltinVariableDefinitions().forEach((definition) => result.push(definition));\n }\n }\n return result;\n },\n });\n}\n"],"names":["useQueries","useQuery","createContext","useContext","PluginRegistryContext","undefined","usePluginRegistry","ctx","Error","usePlugin","pluginType","kind","options","version","registry","queryOptions","useQueryOptions","enabled","getPlugin","queryKey","queryFn","name","getUsePluginsItemIdentity","plugin","usePlugins","plugins","uniquePlugins","Map","p","key","has","set","uniqueKeys","keys","uniqueValues","values","result","queries","map","indexByIdentity","index","get","useListPluginMetadata","pluginTypes","listPluginMetadata","usePluginBuiltinVariableDefinitions","datasources","datasourceNames","Set","datasource","spec","getBuiltinVariableDefinitions","forEach","definition","push"],"mapp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AkB,EAAE,GAAGtC;IAE1C,OAAOL,SAAS;QACdkB,UAAU;YAAC;SAAsC;QACjDC,SAAS;YACP,MAAM0B,cAAc,MAAMF,mBAAmB;gBAAC;aAAa;YAC3D,MAAMG,kBAAkB,IAAIC,IAAIF,YAAYR,GAAG,CAAC,CAACW,aAAeA,WAAWC,IAAI,CAAC7B,IAAI;YACpF,MAAMe,SAAsC,EAAE;YAC9C,KAAK,MAAMf,QAAQ0B,gBAAiB;gBAClC,MAAMxB,SAAS,MAAML,UAAU;oBAAEP,MAAM;oBAAcU;gBAAK;gBAC1D,IAAIE,OAAO4B,6BAA6B,EAAE;oBACxC5B,OAAO4B,6BAA6B,GAAGC,OAAO,CAAC,CAACC,aAAejB,OAAOkB,IAAI,CAACD;gBAC7E;YACF;YACA,OAAOjB;QACT;IACF;AACF"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/plugin-system",
|
|
3
|
-
"version": "0.55.0-beta.
|
|
3
|
+
"version": "0.55.0-beta.15",
|
|
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,10 +29,10 @@
|
|
|
29
29
|
"lint:fix": "oxlint --fix src"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@module-federation/enhanced": "^2.9.
|
|
33
|
-
"@perses-dev/client": "0.55.0-beta.
|
|
34
|
-
"@perses-dev/components": "0.55.0-beta.
|
|
35
|
-
"@perses-dev/spec": "0.3.0-beta.
|
|
32
|
+
"@module-federation/enhanced": "^2.9.1",
|
|
33
|
+
"@perses-dev/client": "0.55.0-beta.15",
|
|
34
|
+
"@perses-dev/components": "0.55.0-beta.15",
|
|
35
|
+
"@perses-dev/spec": "0.3.0-beta.10",
|
|
36
36
|
"date-fns": "^4.1.0",
|
|
37
37
|
"date-fns-tz": "^3.2.0",
|
|
38
38
|
"fast-uri": "3.1.6",
|