@prorobotech/openapi-k8s-toolkit 0.0.1-alpha.80 → 0.0.1-alpha.82

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.
@@ -26261,7 +26261,13 @@ const getEnrichedColumns = ({
26261
26261
  return /* @__PURE__ */ jsxRuntimeExports.jsx(ShortenedTextWithTooltip, { trimLength: possibleTrimLength, text: possibleUndefinedValue });
26262
26262
  }
26263
26263
  }
26264
- return /* @__PURE__ */ jsxRuntimeExports.jsx(ShortenedTextWithTooltip, { trimLength: possibleTrimLength, text: `Raw: ${JSON.stringify(value)}` });
26264
+ if (value === void 0) {
26265
+ return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { children: "Raw: undefined" });
26266
+ }
26267
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
26268
+ "Raw: ",
26269
+ JSON.stringify(value)
26270
+ ] });
26265
26271
  },
26266
26272
  width: possibleColWidth,
26267
26273
  filterDropdown: ({ setSelectedKeys, selectedKeys, confirm, clearFilters, close }) => /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -45839,42 +45845,50 @@ const parsePartsOfUrl = ({
45839
45845
  };
45840
45846
  const parseMutliqueryText = ({ text, multiQueryData }) => {
45841
45847
  if (!text) return "";
45842
- return text.replace(/\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\]\}/g, (match, reqIndexStr, rawPath) => {
45843
- try {
45844
- const reqIndex = parseInt(reqIndexStr, 10);
45845
- const path = Array.from(rawPath.matchAll(/['"]([^'"]+)['"]/g)).map(
45846
- (m) => m[1]
45847
- );
45848
- const value = _$1.get(multiQueryData[`req${reqIndex}`], path);
45849
- return value != null ? String(value) : "";
45850
- } catch {
45851
- return match;
45848
+ return text.replace(
45849
+ /\{reqs\[(\d+)\]\[((?:\s*['"][^'"]+['"]\s*,?)+)\](?:\[\s*['"]([^'"]+)['"]\s*\])?\}/g,
45850
+ (_match, reqIndexStr, rawPath, fallback) => {
45851
+ try {
45852
+ const reqIndex = parseInt(reqIndexStr, 10);
45853
+ const path = Array.from(rawPath.matchAll(/['"]([^'"]+)['"]/g)).map(
45854
+ (m) => m[1]
45855
+ );
45856
+ const value = _$1.get(multiQueryData[`req${reqIndex}`], path, fallback !== void 0 ? fallback : void 0);
45857
+ if (value == null) {
45858
+ return fallback ?? "Undefined with no fallback";
45859
+ }
45860
+ return String(value);
45861
+ } catch {
45862
+ return _match;
45863
+ }
45852
45864
  }
45853
- });
45865
+ );
45854
45866
  };
45855
45867
  const parseJsonPathTemplate = ({
45856
45868
  text,
45857
45869
  multiQueryData
45858
45870
  }) => {
45859
45871
  if (!text) return "";
45860
- const placeholderRegex = /\{reqsJsonPath\[(\d+)\]\s*\[\s*(['"])([^'"]+)\2\s*\]\}/g;
45861
- return text.replace(placeholderRegex, (match, reqIndexStr, _quote, jsonPathExpr) => {
45862
- try {
45863
- const reqIndex = parseInt(reqIndexStr, 10);
45864
- const jsonRoot = multiQueryData[`req${reqIndex}`];
45865
- if (jsonRoot === void 0) {
45866
- return "";
45867
- }
45868
- const results = jp.query(jsonRoot, `$${jsonPathExpr}`);
45869
- if (results.length === 0) {
45870
- return "";
45872
+ const placeholderRegex = /\{reqsJsonPath\[(\d+)\]\s*\[\s*(['"])([^'"]+)\2\s*\](?:\s*\[\s*(['"])([^'"]*)\4\s*\])?\}/g;
45873
+ return text.replace(
45874
+ placeholderRegex,
45875
+ (match, reqIndexStr, _quote, jsonPathExpr, _smth, fallback = "Undefined with no fallback") => {
45876
+ try {
45877
+ const reqIndex = parseInt(reqIndexStr, 10);
45878
+ const jsonRoot = multiQueryData[`req${reqIndex}`];
45879
+ if (jsonRoot === void 0) {
45880
+ return fallback;
45881
+ }
45882
+ const results = jp.query(jsonRoot, `$${jsonPathExpr}`);
45883
+ if (results.length === 0 || results[0] == null || results[0] === void 0) {
45884
+ return fallback;
45885
+ }
45886
+ return String(results[0]);
45887
+ } catch {
45888
+ return match;
45871
45889
  }
45872
- const value = results[0];
45873
- return value != null ? String(value) : "";
45874
- } catch {
45875
- return match;
45876
45890
  }
45877
- });
45891
+ );
45878
45892
  };
45879
45893
  const parseAll = ({
45880
45894
  text,