@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.
Files changed (255) hide show
  1. package/dist/cjs/components/CalculationSelector/CalculationSelector.js +1 -1
  2. package/dist/cjs/components/DatasourceEditorForm/DatasourceEditorForm.js +8 -8
  3. package/dist/cjs/components/DatasourceSelect.js +11 -9
  4. package/dist/cjs/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
  5. package/dist/cjs/components/OptionsEditorRadios/OptionsEditorRadios.js +3 -3
  6. package/dist/cjs/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
  7. package/dist/cjs/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
  8. package/dist/cjs/components/PanelSpecEditor/PanelSpecEditor.js +49 -11
  9. package/dist/cjs/components/PluginEditor/PluginEditor.js +2 -3
  10. package/dist/cjs/components/PluginEditor/plugin-editor-api.js +3 -3
  11. package/dist/cjs/components/PluginKindSelect/PluginKindSelect.js +2 -2
  12. package/dist/cjs/components/PluginRegistry/PluginRegistry.js +1 -1
  13. package/dist/cjs/components/PluginRegistry/plugin-indexes.js +4 -4
  14. package/dist/cjs/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
  15. package/dist/cjs/components/ProjectSelect.js +2 -2
  16. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +3 -3
  17. package/dist/cjs/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +3 -3
  18. package/dist/cjs/components/TraceQueryEditor/TraceQueryEditor.js +143 -0
  19. package/dist/cjs/components/TraceQueryEditor/TraceQueryInput.js +96 -0
  20. package/dist/cjs/components/TraceQueryEditor/index.js +30 -0
  21. package/dist/cjs/components/Variables/VariableEditorForm/VariableEditorForm.js +29 -23
  22. package/dist/cjs/components/Variables/VariableEditorForm/VariablePreview.js +10 -8
  23. package/dist/cjs/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
  24. package/dist/cjs/components/Variables/variable-model.js +12 -13
  25. package/dist/cjs/context/ProjectStoreProvider.js +5 -5
  26. package/dist/cjs/model/legend.js +5 -5
  27. package/dist/cjs/runtime/DataQueriesProvider/DataQueriesProvider.js +6 -6
  28. package/dist/cjs/runtime/DataQueriesProvider/model.js +3 -3
  29. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProvider.js +8 -6
  30. package/dist/cjs/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +3 -3
  31. package/dist/cjs/runtime/TimeRangeProvider/query-params.js +16 -16
  32. package/dist/cjs/runtime/builtin-variables.js +5 -5
  33. package/dist/cjs/runtime/datasources.js +7 -7
  34. package/dist/cjs/runtime/plugin-registry.js +12 -12
  35. package/dist/cjs/runtime/template-variables.js +15 -7
  36. package/dist/cjs/runtime/time-series-queries.js +14 -14
  37. package/dist/cjs/runtime/trace-queries.js +24 -7
  38. package/dist/cjs/stories/shared-utils/decorators/WithPluginRegistry.js +3 -1
  39. package/dist/cjs/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +1 -1
  40. package/dist/cjs/test/test-plugins/bert/index.js +2 -2
  41. package/dist/cjs/test/test-plugins/ernie/index.js +2 -2
  42. package/dist/cjs/test/test-plugins/index.js +3 -1
  43. package/dist/cjs/test-utils/mock-plugin-registry.js +4 -4
  44. package/dist/cjs/utils/action.js +3 -3
  45. package/dist/cjs/utils/variables.js +4 -4
  46. package/dist/cjs/validation/role.js +3 -3
  47. package/dist/cjs/validation/secret.js +3 -3
  48. package/dist/components/CalculationSelector/CalculationSelector.d.ts +1 -2
  49. package/dist/components/CalculationSelector/CalculationSelector.d.ts.map +1 -1
  50. package/dist/components/CalculationSelector/CalculationSelector.js +1 -1
  51. package/dist/components/CalculationSelector/CalculationSelector.js.map +1 -1
  52. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts +1 -1
  53. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.d.ts.map +1 -1
  54. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js +8 -8
  55. package/dist/components/DatasourceEditorForm/DatasourceEditorForm.js.map +1 -1
  56. package/dist/components/DatasourceSelect.d.ts +3 -4
  57. package/dist/components/DatasourceSelect.d.ts.map +1 -1
  58. package/dist/components/DatasourceSelect.js +8 -6
  59. package/dist/components/DatasourceSelect.js.map +1 -1
  60. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts +1 -2
  61. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.d.ts.map +1 -1
  62. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js +1 -1
  63. package/dist/components/LegendOptionsEditor/LegendOptionsEditor.js.map +1 -1
  64. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts +3 -3
  65. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.d.ts.map +1 -1
  66. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js +3 -3
  67. package/dist/components/OptionsEditorRadios/OptionsEditorRadios.js.map +1 -1
  68. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts +1 -1
  69. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.d.ts.map +1 -1
  70. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js +1 -1
  71. package/dist/components/OptionsEditorTabPanel/OptionsEditorTabPanel.js.map +1 -1
  72. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts +3 -3
  73. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.d.ts.map +1 -1
  74. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js +3 -3
  75. package/dist/components/OptionsEditorTabs/OptionsEditorTabs.js.map +1 -1
  76. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts +1 -2
  77. package/dist/components/PanelSpecEditor/PanelSpecEditor.d.ts.map +1 -1
  78. package/dist/components/PanelSpecEditor/PanelSpecEditor.js +49 -11
  79. package/dist/components/PanelSpecEditor/PanelSpecEditor.js.map +1 -1
  80. package/dist/components/PluginEditor/PluginEditor.d.ts +1 -2
  81. package/dist/components/PluginEditor/PluginEditor.d.ts.map +1 -1
  82. package/dist/components/PluginEditor/PluginEditor.js +2 -3
  83. package/dist/components/PluginEditor/PluginEditor.js.map +1 -1
  84. package/dist/components/PluginEditor/plugin-editor-api.d.ts +3 -3
  85. package/dist/components/PluginEditor/plugin-editor-api.d.ts.map +1 -1
  86. package/dist/components/PluginEditor/plugin-editor-api.js +3 -3
  87. package/dist/components/PluginEditor/plugin-editor-api.js.map +1 -1
  88. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts +1 -1
  89. package/dist/components/PluginKindSelect/PluginKindSelect.d.ts.map +1 -1
  90. package/dist/components/PluginKindSelect/PluginKindSelect.js +2 -2
  91. package/dist/components/PluginKindSelect/PluginKindSelect.js.map +1 -1
  92. package/dist/components/PluginRegistry/PluginRegistry.d.ts +1 -1
  93. package/dist/components/PluginRegistry/PluginRegistry.d.ts.map +1 -1
  94. package/dist/components/PluginRegistry/PluginRegistry.js +1 -1
  95. package/dist/components/PluginRegistry/PluginRegistry.js.map +1 -1
  96. package/dist/components/PluginRegistry/plugin-indexes.js +1 -1
  97. package/dist/components/PluginRegistry/plugin-indexes.js.map +1 -1
  98. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts +1 -2
  99. package/dist/components/PluginSpecEditor/PluginSpecEditor.d.ts.map +1 -1
  100. package/dist/components/PluginSpecEditor/PluginSpecEditor.js +3 -3
  101. package/dist/components/PluginSpecEditor/PluginSpecEditor.js.map +1 -1
  102. package/dist/components/ProjectSelect.d.ts +2 -3
  103. package/dist/components/ProjectSelect.d.ts.map +1 -1
  104. package/dist/components/ProjectSelect.js +2 -2
  105. package/dist/components/ProjectSelect.js.map +1 -1
  106. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts +1 -2
  107. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.d.ts.map +1 -1
  108. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js +3 -3
  109. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryEditor.js.map +1 -1
  110. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts +1 -2
  111. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.d.ts.map +1 -1
  112. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js +3 -3
  113. package/dist/components/TimeSeriesQueryEditor/TimeSeriesQueryInput.js.map +1 -1
  114. package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts +8 -0
  115. package/dist/components/TraceQueryEditor/TraceQueryEditor.d.ts.map +1 -0
  116. package/dist/components/TraceQueryEditor/TraceQueryEditor.js +130 -0
  117. package/dist/components/TraceQueryEditor/TraceQueryEditor.js.map +1 -0
  118. package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts +12 -0
  119. package/dist/components/TraceQueryEditor/TraceQueryInput.d.ts.map +1 -0
  120. package/dist/components/TraceQueryEditor/TraceQueryInput.js +83 -0
  121. package/dist/components/TraceQueryEditor/TraceQueryInput.js.map +1 -0
  122. package/dist/components/TraceQueryEditor/index.d.ts +2 -0
  123. package/dist/components/TraceQueryEditor/index.d.ts.map +1 -0
  124. package/dist/components/TraceQueryEditor/index.js +15 -0
  125. package/dist/components/TraceQueryEditor/index.js.map +1 -0
  126. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts +1 -1
  127. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.d.ts.map +1 -1
  128. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js +26 -22
  129. package/dist/components/Variables/VariableEditorForm/VariableEditorForm.js.map +1 -1
  130. package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts +2 -3
  131. package/dist/components/Variables/VariableEditorForm/VariablePreview.d.ts.map +1 -1
  132. package/dist/components/Variables/VariableEditorForm/VariablePreview.js +4 -4
  133. package/dist/components/Variables/VariableEditorForm/VariablePreview.js.map +1 -1
  134. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts +1 -1
  135. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.d.ts.map +1 -1
  136. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js +1 -1
  137. package/dist/components/Variables/VariableEditorForm/variable-editor-form-model.js.map +1 -1
  138. package/dist/components/Variables/variable-model.d.ts.map +1 -1
  139. package/dist/components/Variables/variable-model.js +6 -7
  140. package/dist/components/Variables/variable-model.js.map +1 -1
  141. package/dist/context/ProjectStoreProvider.d.ts +1 -1
  142. package/dist/context/ProjectStoreProvider.d.ts.map +1 -1
  143. package/dist/context/ProjectStoreProvider.js +2 -2
  144. package/dist/context/ProjectStoreProvider.js.map +1 -1
  145. package/dist/context/query-params.js.map +1 -1
  146. package/dist/model/datasource.js +3 -1
  147. package/dist/model/datasource.js.map +1 -1
  148. package/dist/model/legend.d.ts +2 -2
  149. package/dist/model/legend.d.ts.map +1 -1
  150. package/dist/model/legend.js.map +1 -1
  151. package/dist/model/panels.d.ts +3 -2
  152. package/dist/model/panels.d.ts.map +1 -1
  153. package/dist/model/panels.js.map +1 -1
  154. package/dist/model/plugin-loading.js.map +1 -1
  155. package/dist/model/plugins.d.ts +4 -4
  156. package/dist/model/plugins.d.ts.map +1 -1
  157. package/dist/model/plugins.js.map +1 -1
  158. package/dist/model/time-series-queries.d.ts +2 -2
  159. package/dist/model/time-series-queries.d.ts.map +1 -1
  160. package/dist/model/time-series-queries.js.map +1 -1
  161. package/dist/model/trace-queries.d.ts +3 -2
  162. package/dist/model/trace-queries.d.ts.map +1 -1
  163. package/dist/model/trace-queries.js.map +1 -1
  164. package/dist/model/variables.d.ts +2 -2
  165. package/dist/model/variables.d.ts.map +1 -1
  166. package/dist/model/variables.js +3 -1
  167. package/dist/model/variables.js.map +1 -1
  168. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts +1 -1
  169. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.d.ts.map +1 -1
  170. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js +2 -2
  171. package/dist/runtime/DataQueriesProvider/DataQueriesProvider.js.map +1 -1
  172. package/dist/runtime/DataQueriesProvider/model.d.ts +2 -2
  173. package/dist/runtime/DataQueriesProvider/model.d.ts.map +1 -1
  174. package/dist/runtime/DataQueriesProvider/model.js +3 -3
  175. package/dist/runtime/DataQueriesProvider/model.js.map +1 -1
  176. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts +1 -1
  177. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.d.ts.map +1 -1
  178. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js +1 -1
  179. package/dist/runtime/TimeRangeProvider/TimeRangeProvider.js.map +1 -1
  180. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts +1 -1
  181. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.d.ts.map +1 -1
  182. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js +3 -3
  183. package/dist/runtime/TimeRangeProvider/TimeRangeProviderWithQueryParams.js.map +1 -1
  184. package/dist/runtime/TimeRangeProvider/query-params.d.ts +1 -1
  185. package/dist/runtime/TimeRangeProvider/query-params.d.ts.map +1 -1
  186. package/dist/runtime/TimeRangeProvider/query-params.js +4 -4
  187. package/dist/runtime/TimeRangeProvider/query-params.js.map +1 -1
  188. package/dist/runtime/builtin-variables.d.ts +1 -1
  189. package/dist/runtime/builtin-variables.d.ts.map +1 -1
  190. package/dist/runtime/builtin-variables.js +2 -2
  191. package/dist/runtime/builtin-variables.js.map +1 -1
  192. package/dist/runtime/datasources.js +1 -1
  193. package/dist/runtime/datasources.js.map +1 -1
  194. package/dist/runtime/plugin-registry.d.ts +2 -2
  195. package/dist/runtime/plugin-registry.d.ts.map +1 -1
  196. package/dist/runtime/plugin-registry.js +4 -4
  197. package/dist/runtime/plugin-registry.js.map +1 -1
  198. package/dist/runtime/template-variables.d.ts +4 -4
  199. package/dist/runtime/template-variables.d.ts.map +1 -1
  200. package/dist/runtime/template-variables.js +10 -2
  201. package/dist/runtime/template-variables.js.map +1 -1
  202. package/dist/runtime/time-series-queries.js +7 -7
  203. package/dist/runtime/time-series-queries.js.map +1 -1
  204. package/dist/runtime/trace-queries.d.ts +6 -2
  205. package/dist/runtime/trace-queries.d.ts.map +1 -1
  206. package/dist/runtime/trace-queries.js +21 -7
  207. package/dist/runtime/trace-queries.js.map +1 -1
  208. package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts +2 -3
  209. package/dist/stories/shared-utils/decorators/WithDataQueries.d.ts.map +1 -1
  210. package/dist/stories/shared-utils/decorators/WithDataQueries.js.map +1 -1
  211. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts +1 -2
  212. package/dist/stories/shared-utils/decorators/WithPluginRegistry.d.ts.map +1 -1
  213. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts +2 -3
  214. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.d.ts.map +1 -1
  215. package/dist/stories/shared-utils/decorators/WithPluginSystemBuiltinVariables.js.map +1 -1
  216. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts +2 -3
  217. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.d.ts.map +1 -1
  218. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js +1 -1
  219. package/dist/stories/shared-utils/decorators/WithPluginSystemDatasourceStore.js.map +1 -1
  220. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts +2 -3
  221. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.d.ts.map +1 -1
  222. package/dist/stories/shared-utils/decorators/WithPluginSystemTemplateVariables.js.map +1 -1
  223. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts +2 -3
  224. package/dist/stories/shared-utils/decorators/WithTimeRange.d.ts.map +1 -1
  225. package/dist/stories/shared-utils/decorators/WithTimeRange.js.map +1 -1
  226. package/dist/test/render.d.ts +1 -1
  227. package/dist/test/render.d.ts.map +1 -1
  228. package/dist/test/render.js.map +1 -1
  229. package/dist/test/setup-tests.js.map +1 -1
  230. package/dist/test/test-plugins/bert/index.js +2 -2
  231. package/dist/test/test-plugins/bert/index.js.map +1 -1
  232. package/dist/test/test-plugins/ernie/index.js +2 -2
  233. package/dist/test/test-plugins/ernie/index.js.map +1 -1
  234. package/dist/test-utils/mock-plugin-registry.d.ts +1 -1
  235. package/dist/test-utils/mock-plugin-registry.d.ts.map +1 -1
  236. package/dist/test-utils/mock-plugin-registry.js +1 -1
  237. package/dist/test-utils/mock-plugin-registry.js.map +1 -1
  238. package/dist/utils/variables.js.map +1 -1
  239. package/dist/validation/datasource.d.ts +1 -1
  240. package/dist/validation/datasource.d.ts.map +1 -1
  241. package/dist/validation/datasource.js.map +1 -1
  242. package/dist/validation/resource.js.map +1 -1
  243. package/dist/validation/role.d.ts +43 -43
  244. package/dist/validation/role.d.ts.map +1 -1
  245. package/dist/validation/role.js.map +1 -1
  246. package/dist/validation/rolebinding.d.ts +10 -10
  247. package/dist/validation/rolebinding.d.ts.map +1 -1
  248. package/dist/validation/rolebinding.js.map +1 -1
  249. package/dist/validation/secret.d.ts +19 -19
  250. package/dist/validation/secret.d.ts.map +1 -1
  251. package/dist/validation/secret.js.map +1 -1
  252. package/dist/validation/variable.d.ts +1 -1
  253. package/dist/validation/variable.d.ts.map +1 -1
  254. package/dist/validation/variable.js.map +1 -1
  255. 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 declare type SecretsEditorValidationType = z.infer<typeof secretsEditorValidationSchema>;
963
+ export type SecretsEditorValidationType = z.infer<typeof secretsEditorValidationSchema>;
964
964
  //# sourceMappingURL=secret.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"secret.d.ts","sourceRoot":"","sources":["../../src/validation/secret.ts"],"names":[],"mappings":"AAaA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAmHxB,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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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,OAAO;IACNC,WAAWJ,EACRG,OAAO;QACNE,UAAUL,EAAEM,SAASC,IAAI;QACzBC,UAAUR,EAAEM,SAASG;QACrBC,cAAcV,EAAEM,SAASG;IAC3B,GACCE,YAAY,CAACC,KAAKC;QACjB,IAAID,IAAIJ,YAAYI,IAAIJ,SAASM,SAAS,KAAKF,IAAIF,gBAAgBE,IAAIF,aAAaI,SAAS,GAAG;YAC9FD,IAAIE,SAAS;gBACXC,MAAMhB,EAAEiB,aAAaC;gBACrBC,SAAS;gBACTC,MAAM;oBAAC;iBAAW;YACpB;YACAP,IAAIE,SAAS;gBACXC,MAAMhB,EAAEiB,aAAaC;gBACrBC,SAAS;gBACTC,MAAM;oBAAC;iBAAe;YACxB;QACF;IACF,GACCX;IACHY,eAAerB,EACZG,OAAO;QACNmB,MAAMtB,EAAEM,SAASG;QACjBc,aAAavB,EAAEM,SAASG;QAC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ACrBC,SAAS;gBACTC,MAAM;oBAAC;iBAAW;YACpB;QACF;QAEA,IAAIR,IAAIgB,OAAOhB,IAAIgB,IAAId,SAAS,KAAKF,IAAImB,WAAWnB,IAAImB,QAAQjB,SAAS,GAAG;YAC1ED,IAAIE,SAAS;gBACXC,MAAMhB,EAAEiB,aAAaC;gBACrBC,SAAS;gBACTC,MAAM;oBAAC;iBAAM;YACf;YACAP,IAAIE,SAAS;gBACXC,MAAMhB,EAAEiB,aAAaC;gBACrBC,SAAS;gBACTC,MAAM;oBAAC;iBAAU;YACnB;QACF;IACF,GACCX;AACL,GACCE,YAAY,CAACC,KAAKC;IACjB,IAAID,IAAIR,aAAaQ,IAAIS,eAAe;QACtCR,IAAIE,SAAS;YACXC,MAAMhB,EAAEiB,aAAaC;YACrBC,SAAS;YACTC,MAAM;gBAAC;aAAY;QACrB;QACAP,IAAIE,SAAS;YACXC,MAAMhB,EAAEiB,aAAaC;YACrBC,SAAS;YACTC,MAAM;gBAAC;aAAgB;QACzB;IACF;AACF;AAEF,OAAO,MAAMe,yBAAyBnC,EAAEG,OAAO;IAC7CiC,MAAMpC,EAAEqC,QAAQ;IAChBC,UAAUtC,EAAEG,OAAO;QACjBoC,MAAMtC;QACNuC,SAASvC;IACX;IACAwC,MAAMvC;AACR,GAAG;AAEH,OAAO,MAAMwC,+BAA+B1C,EAAEG,OAAO;IACnDiC,MAAMpC,EAAEqC,QAAQ;IAChBC,UAAUtC,EAAEG,OAAO;QACjBoC,MAAMtC;IACR;IACAwC,MAAMvC;AACR,GAAG;AAEH,OAAO,MAAMyC,gCAAgC3C,EAAE4C,mBAAmB,QAAQ;IACxET;IACAO;CACD,EAAE"}
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;AAC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,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 declare type VariableEditorValidationType = z.infer<typeof variableEditorValidationSchema>;
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,oBAAY,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,8BAA8B,CAAC,CAAC"}
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,OAAO;IACrDC,MAAMH,EACHI,SACAC,SAAS,YACTC,MAAM,SAAS,gEACfC,OAAO,CAACC,MAAQ,CAACA,IAAIC,WAAW,OAAO;IAC1CC,OAAOV,EAAEI,SAASO;IAClBC,aAAaZ,EAAEI,SAASO;IACxBE,MAAMb,EAAEc,KAAK;QAAC;QAAgB;QAAgB;KAAkB;IAChEC,oBAAoBf,EAAEE,OAAO;QAC3Bc,OAAOhB,EAAEI;QACTa,UAAUjB,EAAEkB;IACd;IACAC,oBAAoBnB,EAAEE,OAAO;QAC3BkB,eAAepB,EAAEkB;QACjBG,eAAerB,EAAEkB;QACjBI,gBAAgBtB,EAAEI,SAASO;QAC3BY,iBAAiBvB,EAAEI,SAASO;QAC5Ba,MAAMxB,EAAEI,SAASO;QACjBc,QAAQzB,EAAEE,OAAO;YACfW,MAAMb,EAAEI;YACRsB,MAAM1B,EAAEE,OAAO,CAAC;QAClB;IACF;AACF,GAAG"}
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.43.0-rc2",
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.43.0-rc2",
32
- "@perses-dev/core": "0.43.0-rc2",
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.43.0-rc2"
41
+ "@perses-dev/storybook": "0.44.0-rc0"
42
42
  },
43
43
  "peerDependencies": {
44
44
  "@mui/material": "^5.10.0",