@perses-dev/plugin-system 0.43.0-rc2 → 0.44.0-rc0
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/cjs/components/CalculationSelector/CalculationSelector.js +1 -1
- package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +8 -8
- package/dist/cjs/components/DatasourceSelect.js +11 -9
- package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
- package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +3 -3
- package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
- package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
- package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +49 -11
- package/dist/cjs/components/PluginEditor/PluginEditor.js +2 -3
- package/dist/cjs/components/PluginEditor/plugin-editor-api.js +3 -3
- package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +2 -2
- package/dist/cjs/components/PluginRegistry/PluginRegistry.js +1 -1
- package/dist/cjs/components/PluginRegistry/plugin-indexes.js +4 -4
- package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
- package/dist/cjs/components/ProjectSelect.js +2 -2
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +3 -3
- package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +3 -3
- package/dist/cjs/components/TraceQueryEditor/TraceQueryEditor.js +143 -0
- package/dist/cjs/components/TraceQueryEditor/TraceQueryInput.js +96 -0
- package/dist/cjs/components/TraceQueryEditor/index.js +30 -0
- package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +29 -23
- package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +10 -8
- package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/cjs/components/Variables/variable-model.js +12 -13
- package/dist/cjs/context/ProjectStoreProvider.js +5 -5
- package/dist/cjs/model/legend.js +5 -5
- package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +6 -6
- package/dist/cjs/runtime/DataQueriesProvider/model.js +3 -3
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +8 -6
- package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +3 -3
- package/dist/cjs/runtime/TimeRangeProvider/query-params.js +16 -16
- package/dist/cjs/runtime/builtin-variables.js +5 -5
- package/dist/cjs/runtime/datasources.js +7 -7
- package/dist/cjs/runtime/plugin-registry.js +12 -12
- package/dist/cjs/runtime/template-variables.js +15 -7
- package/dist/cjs/runtime/time-series-queries.js +14 -14
- package/dist/cjs/runtime/trace-queries.js +24 -7
- package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +3 -1
- package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +1 -1
- package/dist/cjs/test/test-plugins/bert/index.js +2 -2
- package/dist/cjs/test/test-plugins/ernie/index.js +2 -2
- package/dist/cjs/test/test-plugins/index.js +3 -1
- package/dist/cjs/test-utils/mock-plugin-registry.js +4 -4
- package/dist/cjs/utils/action.js +3 -3
- package/dist/cjs/utils/variables.js +4 -4
- package/dist/cjs/validation/role.js +3 -3
- package/dist/cjs/validation/secret.js +3 -3
- package/dist/components/CalculationSelector/CalculationSelector.d.ts +1 -2
- package/dist/components/CalculationSelector/CalculationSelector.d.ts.map +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
- package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -1
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +8 -8
- package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -1
- package/dist/components/DatasourceSelect.d.ts +3 -4
- package/dist/components/DatasourceSelect.d.ts.map +1 -1
- package/dist/components/DatasourceSelect.js +8 -6
- package/dist/components/DatasourceSelect.js.map +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts +1 -2
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
- package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +3 -3
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -1
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +3 -3
- package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts.map +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
- package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts +3 -3
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts.map +1 -1
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
- package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +1 -2
- package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js +49 -11
- package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.d.ts +1 -2
- package/dist/components/PluginEditor/PluginEditor.d.ts.map +1 -1
- package/dist/components/PluginEditor/PluginEditor.js +2 -3
- package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.d.ts +3 -3
- package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
- package/dist/components/PluginEditor/plugin-editor-api.js +3 -3
- package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
- package/dist/components/PluginKindSelect/PluginKindSelect.js +2 -2
- package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.d.ts +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js +1 -1
- package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
- package/dist/components/PluginRegistry/plugin-indexes.js +1 -1
- package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts +1 -2
- package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
- package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
- package/dist/components/ProjectSelect.d.ts +2 -3
- package/dist/components/ProjectSelect.d.ts.map +1 -1
- package/dist/components/ProjectSelect.js +2 -2
- package/dist/components/ProjectSelect.js.map +1 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +1 -2
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +1 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +3 -3
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +1 -2
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts.map +1 -1
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +3 -3
- package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +1 -1
- package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts +8 -0
- package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts.map +1 -0
- package/dist/components/TraceQueryEditor/TraceQueryEditor.js +130 -0
- package/dist/components/TraceQueryEditor/TraceQueryEditor.js.map +1 -0
- package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts +12 -0
- package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts.map +1 -0
- package/dist/components/TraceQueryEditor/TraceQueryInput.js +83 -0
- package/dist/components/TraceQueryEditor/TraceQueryInput.js.map +1 -0
- package/dist/components/TraceQueryEditor/index.d.ts +2 -0
- package/dist/components/TraceQueryEditor/index.d.ts.map +1 -0
- package/dist/components/TraceQueryEditor/index.js +15 -0
- package/dist/components/TraceQueryEditor/index.js.map +1 -0
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +26 -22
- package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts +2 -3
- package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js +4 -4
- package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
- package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
- package/dist/components/Variables/variable-model.d.ts.map +1 -1
- package/dist/components/Variables/variable-model.js +6 -7
- package/dist/components/Variables/variable-model.js.map +1 -1
- package/dist/context/ProjectStoreProvider.d.ts +1 -1
- package/dist/context/ProjectStoreProvider.d.ts.map +1 -1
- package/dist/context/ProjectStoreProvider.js +2 -2
- package/dist/context/ProjectStoreProvider.js.map +1 -1
- package/dist/context/query-params.js.map +1 -1
- package/dist/model/datasource.js +3 -1
- package/dist/model/datasource.js.map +1 -1
- package/dist/model/legend.d.ts +2 -2
- package/dist/model/legend.d.ts.map +1 -1
- package/dist/model/legend.js.map +1 -1
- package/dist/model/panels.d.ts +3 -2
- package/dist/model/panels.d.ts.map +1 -1
- package/dist/model/panels.js.map +1 -1
- package/dist/model/plugin-loading.js.map +1 -1
- package/dist/model/plugins.d.ts +4 -4
- package/dist/model/plugins.d.ts.map +1 -1
- package/dist/model/plugins.js.map +1 -1
- package/dist/model/time-series-queries.d.ts +2 -2
- package/dist/model/time-series-queries.d.ts.map +1 -1
- package/dist/model/time-series-queries.js.map +1 -1
- package/dist/model/trace-queries.d.ts +3 -2
- package/dist/model/trace-queries.d.ts.map +1 -1
- package/dist/model/trace-queries.js.map +1 -1
- package/dist/model/variables.d.ts +2 -2
- package/dist/model/variables.d.ts.map +1 -1
- package/dist/model/variables.js +3 -1
- package/dist/model/variables.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +2 -2
- package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.d.ts +2 -2
- package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
- package/dist/runtime/DataQueriesProvider/model.js +3 -3
- package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +3 -3
- package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.d.ts +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
- package/dist/runtime/TimeRangeProvider/query-params.js +4 -4
- package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
- package/dist/runtime/builtin-variables.d.ts +1 -1
- package/dist/runtime/builtin-variables.d.ts.map +1 -1
- package/dist/runtime/builtin-variables.js +2 -2
- package/dist/runtime/builtin-variables.js.map +1 -1
- package/dist/runtime/datasources.js +1 -1
- package/dist/runtime/datasources.js.map +1 -1
- package/dist/runtime/plugin-registry.d.ts +2 -2
- package/dist/runtime/plugin-registry.d.ts.map +1 -1
- package/dist/runtime/plugin-registry.js +4 -4
- package/dist/runtime/plugin-registry.js.map +1 -1
- package/dist/runtime/template-variables.d.ts +4 -4
- package/dist/runtime/template-variables.d.ts.map +1 -1
- package/dist/runtime/template-variables.js +10 -2
- package/dist/runtime/template-variables.js.map +1 -1
- package/dist/runtime/time-series-queries.js +7 -7
- package/dist/runtime/time-series-queries.js.map +1 -1
- package/dist/runtime/trace-queries.d.ts +6 -2
- package/dist/runtime/trace-queries.d.ts.map +1 -1
- package/dist/runtime/trace-queries.js +21 -7
- package/dist/runtime/trace-queries.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts +2 -3
- package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts +1 -2
- package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +2 -3
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts +2 -3
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts +2 -3
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js.map +1 -1
- package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts +2 -3
- package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts.map +1 -1
- package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +1 -1
- package/dist/test/render.d.ts +1 -1
- package/dist/test/render.d.ts.map +1 -1
- package/dist/test/render.js.map +1 -1
- package/dist/test/setup-tests.js.map +1 -1
- package/dist/test/test-plugins/bert/index.js +2 -2
- package/dist/test/test-plugins/bert/index.js.map +1 -1
- package/dist/test/test-plugins/ernie/index.js +2 -2
- package/dist/test/test-plugins/ernie/index.js.map +1 -1
- package/dist/test-utils/mock-plugin-registry.d.ts +1 -1
- package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
- package/dist/test-utils/mock-plugin-registry.js +1 -1
- package/dist/test-utils/mock-plugin-registry.js.map +1 -1
- package/dist/utils/variables.js.map +1 -1
- package/dist/validation/datasource.d.ts +1 -1
- package/dist/validation/datasource.d.ts.map +1 -1
- package/dist/validation/datasource.js.map +1 -1
- package/dist/validation/resource.js.map +1 -1
- package/dist/validation/role.d.ts +43 -43
- package/dist/validation/role.d.ts.map +1 -1
- package/dist/validation/role.js.map +1 -1
- package/dist/validation/rolebinding.d.ts +10 -10
- package/dist/validation/rolebinding.d.ts.map +1 -1
- package/dist/validation/rolebinding.js.map +1 -1
- package/dist/validation/secret.d.ts +19 -19
- package/dist/validation/secret.d.ts.map +1 -1
- package/dist/validation/secret.js.map +1 -1
- package/dist/validation/variable.d.ts +1 -1
- package/dist/validation/variable.d.ts.map +1 -1
- package/dist/validation/variable.js.map +1 -1
- package/package.json +4 -4
|
@@ -186,10 +186,6 @@ export declare const secretValidationSchema: z.ZodObject<{
|
|
|
186
186
|
} | undefined;
|
|
187
187
|
}>;
|
|
188
188
|
}, "strip", z.ZodTypeAny, {
|
|
189
|
-
metadata: {
|
|
190
|
-
name: string;
|
|
191
|
-
project: string;
|
|
192
|
-
};
|
|
193
189
|
kind: "Secret";
|
|
194
190
|
spec: {
|
|
195
191
|
basicAuth?: {
|
|
@@ -213,11 +209,11 @@ export declare const secretValidationSchema: z.ZodObject<{
|
|
|
213
209
|
serverName?: string | undefined;
|
|
214
210
|
} | undefined;
|
|
215
211
|
};
|
|
216
|
-
}, {
|
|
217
212
|
metadata: {
|
|
218
213
|
name: string;
|
|
219
214
|
project: string;
|
|
220
215
|
};
|
|
216
|
+
}, {
|
|
221
217
|
kind: "Secret";
|
|
222
218
|
spec: {
|
|
223
219
|
basicAuth?: {
|
|
@@ -241,6 +237,10 @@ export declare const secretValidationSchema: z.ZodObject<{
|
|
|
241
237
|
serverName?: string | undefined;
|
|
242
238
|
} | undefined;
|
|
243
239
|
};
|
|
240
|
+
metadata: {
|
|
241
|
+
name: string;
|
|
242
|
+
project: string;
|
|
243
|
+
};
|
|
244
244
|
}>;
|
|
245
245
|
export declare const globalSecretValidationSchema: z.ZodObject<{
|
|
246
246
|
kind: z.ZodLiteral<"GlobalSecret">;
|
|
@@ -426,9 +426,6 @@ export declare const globalSecretValidationSchema: z.ZodObject<{
|
|
|
426
426
|
} | undefined;
|
|
427
427
|
}>;
|
|
428
428
|
}, "strip", z.ZodTypeAny, {
|
|
429
|
-
metadata: {
|
|
430
|
-
name: string;
|
|
431
|
-
};
|
|
432
429
|
kind: "GlobalSecret";
|
|
433
430
|
spec: {
|
|
434
431
|
basicAuth?: {
|
|
@@ -452,10 +449,10 @@ export declare const globalSecretValidationSchema: z.ZodObject<{
|
|
|
452
449
|
serverName?: string | undefined;
|
|
453
450
|
} | undefined;
|
|
454
451
|
};
|
|
455
|
-
}, {
|
|
456
452
|
metadata: {
|
|
457
453
|
name: string;
|
|
458
454
|
};
|
|
455
|
+
}, {
|
|
459
456
|
kind: "GlobalSecret";
|
|
460
457
|
spec: {
|
|
461
458
|
basicAuth?: {
|
|
@@ -479,6 +476,9 @@ export declare const globalSecretValidationSchema: z.ZodObject<{
|
|
|
479
476
|
serverName?: string | undefined;
|
|
480
477
|
} | undefined;
|
|
481
478
|
};
|
|
479
|
+
metadata: {
|
|
480
|
+
name: string;
|
|
481
|
+
};
|
|
482
482
|
}>;
|
|
483
483
|
export declare const secretsEditorValidationSchema: z.ZodDiscriminatedUnion<"kind", [z.ZodObject<{
|
|
484
484
|
kind: z.ZodLiteral<"Secret">;
|
|
@@ -667,10 +667,6 @@ export declare const secretsEditorValidationSchema: z.ZodDiscriminatedUnion<"kin
|
|
|
667
667
|
} | undefined;
|
|
668
668
|
}>;
|
|
669
669
|
}, "strip", z.ZodTypeAny, {
|
|
670
|
-
metadata: {
|
|
671
|
-
name: string;
|
|
672
|
-
project: string;
|
|
673
|
-
};
|
|
674
670
|
kind: "Secret";
|
|
675
671
|
spec: {
|
|
676
672
|
basicAuth?: {
|
|
@@ -694,11 +690,11 @@ export declare const secretsEditorValidationSchema: z.ZodDiscriminatedUnion<"kin
|
|
|
694
690
|
serverName?: string | undefined;
|
|
695
691
|
} | undefined;
|
|
696
692
|
};
|
|
697
|
-
}, {
|
|
698
693
|
metadata: {
|
|
699
694
|
name: string;
|
|
700
695
|
project: string;
|
|
701
696
|
};
|
|
697
|
+
}, {
|
|
702
698
|
kind: "Secret";
|
|
703
699
|
spec: {
|
|
704
700
|
basicAuth?: {
|
|
@@ -722,6 +718,10 @@ export declare const secretsEditorValidationSchema: z.ZodDiscriminatedUnion<"kin
|
|
|
722
718
|
serverName?: string | undefined;
|
|
723
719
|
} | undefined;
|
|
724
720
|
};
|
|
721
|
+
metadata: {
|
|
722
|
+
name: string;
|
|
723
|
+
project: string;
|
|
724
|
+
};
|
|
725
725
|
}>, z.ZodObject<{
|
|
726
726
|
kind: z.ZodLiteral<"GlobalSecret">;
|
|
727
727
|
metadata: z.ZodObject<{
|
|
@@ -906,9 +906,6 @@ export declare const secretsEditorValidationSchema: z.ZodDiscriminatedUnion<"kin
|
|
|
906
906
|
} | undefined;
|
|
907
907
|
}>;
|
|
908
908
|
}, "strip", z.ZodTypeAny, {
|
|
909
|
-
metadata: {
|
|
910
|
-
name: string;
|
|
911
|
-
};
|
|
912
909
|
kind: "GlobalSecret";
|
|
913
910
|
spec: {
|
|
914
911
|
basicAuth?: {
|
|
@@ -932,10 +929,10 @@ export declare const secretsEditorValidationSchema: z.ZodDiscriminatedUnion<"kin
|
|
|
932
929
|
serverName?: string | undefined;
|
|
933
930
|
} | undefined;
|
|
934
931
|
};
|
|
935
|
-
}, {
|
|
936
932
|
metadata: {
|
|
937
933
|
name: string;
|
|
938
934
|
};
|
|
935
|
+
}, {
|
|
939
936
|
kind: "GlobalSecret";
|
|
940
937
|
spec: {
|
|
941
938
|
basicAuth?: {
|
|
@@ -959,6 +956,9 @@ export declare const secretsEditorValidationSchema: z.ZodDiscriminatedUnion<"kin
|
|
|
959
956
|
serverName?: string | undefined;
|
|
960
957
|
} | undefined;
|
|
961
958
|
};
|
|
959
|
+
metadata: {
|
|
960
|
+
name: string;
|
|
961
|
+
};
|
|
962
962
|
}>]>;
|
|
963
|
-
export
|
|
963
|
+
export type SecretsEditorValidationType = z.infer<typeof secretsEditorValidationSchema>;
|
|
964
964
|
//# sourceMappingURL=secret.d.ts.map
|
|
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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IAGxC,CAAC;AAEH,MAAM,MAAM,2BAA2B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,6BAA6B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/validation/secret.ts"],"sourcesContent":["// Copyright 2023 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 { z } from 'zod';\nimport { resourceIdValidationSchema } from './resource';\n\nconst secretSpecSchema = z\n .object({\n basicAuth: z\n .object({\n username: z.string().min(1),\n password: z.string().optional(),\n passwordFile: z.string().optional(),\n })\n .superRefine((val, ctx) => {\n if (val.password && val.password.length > 0 && val.passwordFile && val.passwordFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['password'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['passwordFile'],\n });\n }\n })\n .optional(),\n authorization: z\n .object({\n type: z.string().optional(),\n credentials: z.string().optional(),\n credentialsFile: z.string().optional(),\n })\n .superRefine((val, ctx) => {\n if (val.credentials && val.credentials.length > 0 && val.credentialsFile && val.credentialsFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['credentials'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['credentialsFile'],\n });\n }\n })\n .optional(),\n tlsConfig: z\n .object({\n ca: z.string().optional(),\n cert: z.string().optional(),\n key: z.string().optional(),\n caFile: z.string().optional(),\n certFile: z.string().optional(),\n keyFile: z.string().optional(),\n serverName: z.string().optional(),\n insecureSkipVerify: z.boolean(),\n })\n .superRefine((val, ctx) => {\n if (val.ca && val.ca.length > 0 && val.caFile && val.caFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['ca'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['caFile'],\n });\n }\n\n if (val.cert && val.cert.length > 0 && val.certFile && val.certFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['cert'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['certFile'],\n });\n }\n\n if (val.key && val.key.length > 0 && val.keyFile && val.keyFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['key'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['keyFile'],\n });\n }\n })\n .optional(),\n })\n .superRefine((val, ctx) => {\n if (val.basicAuth && val.authorization) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['basicAuth'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['authorization'],\n });\n }\n });\n\nexport const secretValidationSchema = z.object({\n kind: z.literal('Secret'),\n metadata: z.object({\n name: resourceIdValidationSchema,\n project: resourceIdValidationSchema,\n }),\n spec: secretSpecSchema,\n});\n\nexport const globalSecretValidationSchema = z.object({\n kind: z.literal('GlobalSecret'),\n metadata: z.object({\n name: resourceIdValidationSchema,\n }),\n spec: secretSpecSchema,\n});\n\nexport const secretsEditorValidationSchema = z.discriminatedUnion('kind', [\n secretValidationSchema,\n globalSecretValidationSchema,\n]);\n\nexport type SecretsEditorValidationType = z.infer<typeof secretsEditorValidationSchema>;\n"],"names":["z","resourceIdValidationSchema","secretSpecSchema","object","basicAuth","username","string","min","password","optional","passwordFile","superRefine","val","ctx","length","addIssue","code","ZodIssueCode","custom","message","path","authorization","type","credentials","credentialsFile","tlsConfig","ca","cert","key","caFile","certFile","keyFile","serverName","insecureSkipVerify","boolean","secretValidationSchema","kind","literal","metadata","name","project","spec","globalSecretValidationSchema","secretsEditorValidationSchema","discriminatedUnion"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AACxB,SAASC,0BAA0B,QAAQ,aAAa;AAExD,MAAMC,mBAAmBF,EACtBG,
|
|
1
|
+
{"version":3,"sources":["../../src/validation/secret.ts"],"sourcesContent":["// Copyright 2023 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 { z } from 'zod';\nimport { resourceIdValidationSchema } from './resource';\n\nconst secretSpecSchema = z\n .object({\n basicAuth: z\n .object({\n username: z.string().min(1),\n password: z.string().optional(),\n passwordFile: z.string().optional(),\n })\n .superRefine((val, ctx) => {\n if (val.password && val.password.length > 0 && val.passwordFile && val.passwordFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['password'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['passwordFile'],\n });\n }\n })\n .optional(),\n authorization: z\n .object({\n type: z.string().optional(),\n credentials: z.string().optional(),\n credentialsFile: z.string().optional(),\n })\n .superRefine((val, ctx) => {\n if (val.credentials && val.credentials.length > 0 && val.credentialsFile && val.credentialsFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['credentials'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['credentialsFile'],\n });\n }\n })\n .optional(),\n tlsConfig: z\n .object({\n ca: z.string().optional(),\n cert: z.string().optional(),\n key: z.string().optional(),\n caFile: z.string().optional(),\n certFile: z.string().optional(),\n keyFile: z.string().optional(),\n serverName: z.string().optional(),\n insecureSkipVerify: z.boolean(),\n })\n .superRefine((val, ctx) => {\n if (val.ca && val.ca.length > 0 && val.caFile && val.caFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['ca'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['caFile'],\n });\n }\n\n if (val.cert && val.cert.length > 0 && val.certFile && val.certFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['cert'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['certFile'],\n });\n }\n\n if (val.key && val.key.length > 0 && val.keyFile && val.keyFile.length > 0) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['key'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['keyFile'],\n });\n }\n })\n .optional(),\n })\n .superRefine((val, ctx) => {\n if (val.basicAuth && val.authorization) {\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['basicAuth'],\n });\n ctx.addIssue({\n code: z.ZodIssueCode.custom,\n message: 'Only one of the fields must be defined',\n path: ['authorization'],\n });\n }\n });\n\nexport const secretValidationSchema = z.object({\n kind: z.literal('Secret'),\n metadata: z.object({\n name: resourceIdValidationSchema,\n project: resourceIdValidationSchema,\n }),\n spec: secretSpecSchema,\n});\n\nexport const globalSecretValidationSchema = z.object({\n kind: z.literal('GlobalSecret'),\n metadata: z.object({\n name: resourceIdValidationSchema,\n }),\n spec: secretSpecSchema,\n});\n\nexport const secretsEditorValidationSchema = z.discriminatedUnion('kind', [\n secretValidationSchema,\n globalSecretValidationSchema,\n]);\n\nexport type SecretsEditorValidationType = z.infer<typeof secretsEditorValidationSchema>;\n"],"names":["z","resourceIdValidationSchema","secretSpecSchema","object","basicAuth","username","string","min","password","optional","passwordFile","superRefine","val","ctx","length","addIssue","code","ZodIssueCode","custom","message","path","authorization","type","credentials","credentialsFile","tlsConfig","ca","cert","key","caFile","certFile","keyFile","serverName","insecureSkipVerify","boolean","secretValidationSchema","kind","literal","metadata","name","project","spec","globalSecretValidationSchema","secretsEditorValidationSchema","discriminatedUnion"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AACxB,SAASC,0BAA0B,QA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G,CAACd,MAAM,GAAG,KAAKF,IAAImB,OAAO,IAAInB,IAAImB,OAAO,CAACjB,MAAM,GAAG,GAAG;YAC1ED,IAAIE,QAAQ,CAAC;gBACXC,MAAMhB,EAAEiB,YAAY,CAACC,MAAM;gBAC3BC,SAAS;gBACTC,MAAM;oBAAC;iBAAM;YACf;YACAP,IAAIE,QAAQ,CAAC;gBACXC,MAAMhB,EAAEiB,YAAY,CAACC,MAAM;gBAC3BC,SAAS;gBACTC,MAAM;oBAAC;iBAAU;YACnB;QACF;IACF,GACCX,QAAQ;AACb,GACCE,WAAW,CAAC,CAACC,KAAKC;IACjB,IAAID,IAAIR,SAAS,IAAIQ,IAAIS,aAAa,EAAE;QACtCR,IAAIE,QAAQ,CAAC;YACXC,MAAMhB,EAAEiB,YAAY,CAACC,MAAM;YAC3BC,SAAS;YACTC,MAAM;gBAAC;aAAY;QACrB;QACAP,IAAIE,QAAQ,CAAC;YACXC,MAAMhB,EAAEiB,YAAY,CAACC,MAAM;YAC3BC,SAAS;YACTC,MAAM;gBAAC;aAAgB;QACzB;IACF;AACF;AAEF,OAAO,MAAMe,yBAAyBnC,EAAEG,MAAM,CAAC;IAC7CiC,MAAMpC,EAAEqC,OAAO,CAAC;IAChBC,UAAUtC,EAAEG,MAAM,CAAC;QACjBoC,MAAMtC;QACNuC,SAASvC;IACX;IACAwC,MAAMvC;AACR,GAAG;AAEH,OAAO,MAAMwC,+BAA+B1C,EAAEG,MAAM,CAAC;IACnDiC,MAAMpC,EAAEqC,OAAO,CAAC;IAChBC,UAAUtC,EAAEG,MAAM,CAAC;QACjBoC,MAAMtC;IACR;IACAwC,MAAMvC;AACR,GAAG;AAEH,OAAO,MAAMyC,gCAAgC3C,EAAE4C,kBAAkB,CAAC,QAAQ;IACxET;IACAO;CACD,EAAE"}
|
|
@@ -92,5 +92,5 @@ export declare const variableEditorValidationSchema: z.ZodObject<{
|
|
|
92
92
|
title?: string | undefined;
|
|
93
93
|
description?: string | undefined;
|
|
94
94
|
}>;
|
|
95
|
-
export
|
|
95
|
+
export type VariableEditorValidationType = z.infer<typeof variableEditorValidationSchema>;
|
|
96
96
|
//# sourceMappingURL=variable.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"variable.d.ts","sourceRoot":"","sources":["../../src/validation/variable.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBzC,CAAC;AAEH,
|
|
1
|
+
{"version":3,"file":"variable.d.ts","sourceRoot":"","sources":["../../src/validation/variable.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,eAAO,MAAM,8BAA8B;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAwBzC,CAAC;AAEH,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/validation/variable.ts"],"sourcesContent":["// Copyright 2023 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 { z } from 'zod';\n\nexport const variableEditorValidationSchema = z.object({\n name: z\n .string()\n .nonempty('Required')\n .regex(/^\\w+$/, 'Must only contains alphanumerical characters and underscores')\n .refine((val) => !val.startsWith('__'), '__ prefix is reserved to builtin variables'),\n title: z.string().optional(),\n description: z.string().optional(),\n kind: z.enum(['TextVariable', 'ListVariable', 'BuiltinVariable']),\n textVariableFields: z.object({\n value: z.string(),\n constant: z.boolean(),\n }),\n listVariableFields: z.object({\n allowMultiple: z.boolean(),\n allowAllValue: z.boolean(),\n customAllValue: z.string().optional(),\n capturingRegexp: z.string().optional(),\n sort: z.string().optional(),\n plugin: z.object({\n kind: z.string(),\n spec: z.object({}),\n }),\n }),\n});\n\nexport type VariableEditorValidationType = z.infer<typeof variableEditorValidationSchema>;\n"],"names":["z","variableEditorValidationSchema","object","name","string","nonempty","regex","refine","val","startsWith","title","optional","description","kind","enum","textVariableFields","value","constant","boolean","listVariableFields","allowMultiple","allowAllValue","customAllValue","capturingRegexp","sort","plugin","spec"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AAExB,OAAO,MAAMC,iCAAiCD,EAAEE,
|
|
1
|
+
{"version":3,"sources":["../../src/validation/variable.ts"],"sourcesContent":["// Copyright 2023 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 { z } from 'zod';\n\nexport const variableEditorValidationSchema = z.object({\n name: z\n .string()\n .nonempty('Required')\n .regex(/^\\w+$/, 'Must only contains alphanumerical characters and underscores')\n .refine((val) => !val.startsWith('__'), '__ prefix is reserved to builtin variables'),\n title: z.string().optional(),\n description: z.string().optional(),\n kind: z.enum(['TextVariable', 'ListVariable', 'BuiltinVariable']),\n textVariableFields: z.object({\n value: z.string(),\n constant: z.boolean(),\n }),\n listVariableFields: z.object({\n allowMultiple: z.boolean(),\n allowAllValue: z.boolean(),\n customAllValue: z.string().optional(),\n capturingRegexp: z.string().optional(),\n sort: z.string().optional(),\n plugin: z.object({\n kind: z.string(),\n spec: z.object({}),\n }),\n }),\n});\n\nexport type VariableEditorValidationType = z.infer<typeof variableEditorValidationSchema>;\n"],"names":["z","variableEditorValidationSchema","object","name","string","nonempty","regex","refine","val","startsWith","title","optional","description","kind","enum","textVariableFields","value","constant","boolean","listVariableFields","allowMultiple","allowAllValue","customAllValue","capturingRegexp","sort","plugin","spec"],"mappings":"AAAA,oCAAoC;AACpC,kEAAkE;AAClE,mEAAmE;AACnE,0CAA0C;AAC1C,EAAE;AACF,6CAA6C;AAC7C,EAAE;AACF,sEAAsE;AACtE,oEAAoE;AACpE,2EAA2E;AAC3E,sEAAsE;AACtE,iCAAiC;AAEjC,SAASA,CAAC,QAAQ,MAAM;AAExB,OAAO,MAAMC,iCAAiCD,EAAEE,MAAM,CAAC;IACrDC,MAAMH,EACHI,MAAM,GACNC,QAAQ,CAAC,YACTC,KAAK,CAAC,SAAS,gEACfC,MAAM,CAAC,CAACC,MAAQ,CAACA,IAAIC,UAAU,CAAC,OAAO;IAC1CC,OAAOV,EAAEI,MAAM,GAAGO,QAAQ;IAC1BC,aAAaZ,EAAEI,MAAM,GAAGO,QAAQ;IAChCE,MAAMb,EAAEc,IAAI,CAAC;QAAC;QAAgB;QAAgB;KAAkB;IAChEC,oBAAoBf,EAAEE,MAAM,CAAC;QAC3Bc,OAAOhB,EAAEI,MAAM;QACfa,UAAUjB,EAAEkB,OAAO;IACrB;IACAC,oBAAoBnB,EAAEE,MAAM,CAAC;QAC3BkB,eAAepB,EAAEkB,OAAO;QACxBG,eAAerB,EAAEkB,OAAO;QACxBI,gBAAgBtB,EAAEI,MAAM,GAAGO,QAAQ;QACnCY,iBAAiBvB,EAAEI,MAAM,GAAGO,QAAQ;QACpCa,MAAMxB,EAAEI,MAAM,GAAGO,QAAQ;QACzBc,QAAQzB,EAAEE,MAAM,CAAC;YACfW,MAAMb,EAAEI,MAAM;YACdsB,MAAM1B,EAAEE,MAAM,CAAC,CAAC;QAClB;IACF;AACF,GAAG"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@perses-dev/plugin-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.44.0-rc0",
|
|
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",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"lint:fix": "eslint --fix src --ext .ts,.tsx"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@perses-dev/components": "0.
|
|
32
|
-
"@perses-dev/core": "0.
|
|
31
|
+
"@perses-dev/components": "0.44.0-rc0",
|
|
32
|
+
"@perses-dev/core": "0.44.0-rc0",
|
|
33
33
|
"date-fns": "^2.30.0",
|
|
34
34
|
"immer": "^9.0.15",
|
|
35
35
|
"react-hook-form": "^7.46.1",
|
|
@@ -38,7 +38,7 @@
|
|
|
38
38
|
"zod": "^3.22.2"
|
|
39
39
|
},
|
|
40
40
|
"devDependencies": {
|
|
41
|
-
"@perses-dev/storybook": "0.
|
|
41
|
+
"@perses-dev/storybook": "0.44.0-rc0"
|
|
42
42
|
},
|
|
43
43
|
"peerDependencies": {
|
|
44
44
|
"@mui/material": "^5.10.0",
|