@testsmith/api-spector 0.9.2 → 0.9.3

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/out/main/flow.js CHANGED
@@ -281,7 +281,7 @@ async function main() {
281
281
  const envName = args.environment ?? args.env;
282
282
  const env = environments.selectEnvironment(workspace, environments$1, envName);
283
283
  const verbose = Boolean(args.verbose);
284
- const version = `v${"0.9.2"}`;
284
+ const version = `v${"0.9.3"}`;
285
285
  console.log("");
286
286
  console.log(cliCommon.color(" API Flow Runner" + (version ? ` ${version}` : ""), cliCommon.C.bold, cliCommon.C.white));
287
287
  console.log(cliCommon.color(` Flow: ${flow.name}`, cliCommon.C.gray));
package/out/main/index.js CHANGED
@@ -50,7 +50,7 @@ function isNewer(a, b) {
50
50
  return a2 > b2;
51
51
  }
52
52
  async function checkForUpdate() {
53
- const current = "0.9.2";
53
+ const current = "0.9.3";
54
54
  try {
55
55
  const res = await fetch(REGISTRY_URL, { signal: AbortSignal.timeout(4e3) });
56
56
  if (!res.ok) return null;
package/out/main/perf.js CHANGED
@@ -191,7 +191,7 @@ async function main() {
191
191
  targetLabel = `flow: ${flow.name}`;
192
192
  }
193
193
  const load = perfRun.deriveLoad(plan);
194
- const version = `v${"0.9.2"}`;
194
+ const version = `v${"0.9.3"}`;
195
195
  console.log("");
196
196
  console.log(cliCommon.color(" API Performance" + (version ? ` ${version}` : ""), cliCommon.C.bold, cliCommon.C.white));
197
197
  console.log(cliCommon.color(` Plan: ${plan.name}`, cliCommon.C.gray));
@@ -551,7 +551,7 @@ async function main() {
551
551
  } else if (!envName && workspace.settings?.defaultEnvironment && !env) {
552
552
  console.warn(cliCommon.color(`Warning: default environment "${workspace.settings.defaultEnvironment}" not found. Running without environment.`, cliCommon.C.yellow));
553
553
  }
554
- const version = `v${"0.9.2"}`;
554
+ const version = `v${"0.9.3"}`;
555
555
  console.log("");
556
556
  console.log(cliCommon.color(" API Test Runner" + (version ? ` ${version}` : ""), cliCommon.C.bold, cliCommon.C.white));
557
557
  console.log(cliCommon.color(` Workspace: ${wsPath}`, cliCommon.C.gray));
@@ -1,5 +1,5 @@
1
1
  import { l as linter, E as EditorView, L as LanguageSupport, i as LRLanguage, s as styleTags, m as indentNodeProp, n as delimitedIndent, p as foldNodeProp, q as foldInside, S as StateField, u as LRParser, v as StateEffect, w as tags, a as reactExports, j as jsxRuntimeExports, e as ReactCodeMirror, o as oneDark, d as json } from "./codemirror-BKmwMUlV.js";
2
- import { u as useT, a as useStore, b as useActiveEnvironment, i as isSubscriptionQuery } from "./index-C6_D_4og.js";
2
+ import { u as useT, a as useStore, b as useActiveEnvironment, i as isSubscriptionQuery } from "./index-DXMEqli_.js";
3
3
  import "./ajv-CJPwFjiP.js";
4
4
  function devAssert(condition, message) {
5
5
  const booleanCondition = Boolean(condition);
@@ -1,5 +1,5 @@
1
1
  import { a as reactExports, j as jsxRuntimeExports, e as ReactCodeMirror, o as oneDark, x as xml } from "./codemirror-BKmwMUlV.js";
2
- import { u as useT, c as btnPrimaryCls, d as commentKeymap } from "./index-C6_D_4og.js";
2
+ import { u as useT, c as btnPrimaryCls, d as commentKeymap } from "./index-DXMEqli_.js";
3
3
  import "./ajv-CJPwFjiP.js";
4
4
  const SOAP_11_CONTENT_TYPE = "text/xml; charset=utf-8";
5
5
  const SOAP_12_CONTENT_TYPE = "application/soap+xml; charset=utf-8";
@@ -1,4 +1,4 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GraphQLEditor-RRDuQogA.js","./codemirror-BKmwMUlV.js","./ajv-CJPwFjiP.js","./SoapEditor-BncNQmjP.js"])))=>i.map(i=>d[i]);
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./GraphQLEditor-J-8g0S0P.js","./codemirror-BKmwMUlV.js","./ajv-CJPwFjiP.js","./SoapEditor-CmsqdXhh.js"])))=>i.map(i=>d[i]);
2
2
  import { r as requireReact, g as getDefaultExportFromCjs, R as React, a as reactExports, b as autocompletion, h as hoverTooltip, j as jsxRuntimeExports, V as ViewPlugin, E as EditorView, k as keymap, t as toggleComment, D as Decoration, c as RangeSetBuilder, x as xml, d as json, e as ReactCodeMirror, o as oneDark, f as javascript } from "./codemirror-BKmwMUlV.js";
3
3
  import { r as requireAjv } from "./ajv-CJPwFjiP.js";
4
4
  var client = { exports: {} };
@@ -13203,7 +13203,8 @@ function baseTab(collectionId) {
13203
13203
  lastSentRequest: null,
13204
13204
  lastHookResults: null,
13205
13205
  isSending: false,
13206
- scriptTab: "post"
13206
+ scriptTab: "post",
13207
+ jqExpr: ""
13207
13208
  };
13208
13209
  }
13209
13210
  function makeTab(requestId, collectionId, opts = {}) {
@@ -13337,6 +13338,10 @@ const createTabsSlice = (set2, get2) => ({
13337
13338
  const t = s.tabs.find((x) => x.id === tabId);
13338
13339
  if (t) t.scriptTab = scriptTab;
13339
13340
  }),
13341
+ setTabJqExpr: (tabId, jqExpr) => set2((s) => {
13342
+ const t = s.tabs.find((x) => x.id === tabId);
13343
+ if (t) t.jqExpr = jqExpr;
13344
+ }),
13340
13345
  // ── Navigation ──────────────────────────────────────────────────────────────
13341
13346
  setActiveCollection: (id2) => set2((s) => {
13342
13347
  s.activeCollectionId = id2;
@@ -29933,8 +29938,8 @@ function jsonWithComments() {
29933
29938
  function xmlWithComments() {
29934
29939
  return [xml(), commentKeymap];
29935
29940
  }
29936
- const GraphQLEditor = reactExports.lazy(() => __vitePreload(() => import("./GraphQLEditor-RRDuQogA.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m) => ({ default: m.GraphQLEditor })));
29937
- const SoapEditor = reactExports.lazy(() => __vitePreload(() => import("./SoapEditor-BncNQmjP.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m) => ({ default: m.SoapEditor })));
29941
+ const GraphQLEditor = reactExports.lazy(() => __vitePreload(() => import("./GraphQLEditor-J-8g0S0P.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url).then((m) => ({ default: m.GraphQLEditor })));
29942
+ const SoapEditor = reactExports.lazy(() => __vitePreload(() => import("./SoapEditor-CmsqdXhh.js"), true ? __vite__mapDeps([3,1,2]) : void 0, import.meta.url).then((m) => ({ default: m.SoapEditor })));
29938
29943
  function BodyTab({ request: request2, onChange }) {
29939
29944
  const t = useT();
29940
29945
  const editorFallback = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 text-xs text-surface-500", children: t("Loading editor…") });
@@ -44569,6 +44574,7 @@ function ResponseViewer() {
44569
44574
  const setTabRequestTab = useStore$1((s) => s.setTabRequestTab);
44570
44575
  const openContractDesigner = useStore$1((s) => s.openContractDesigner);
44571
44576
  const setTabScriptTab = useStore$1((s) => s.setTabScriptTab);
44577
+ const setTabJqExpr = useStore$1((s) => s.setTabJqExpr);
44572
44578
  const isSending = activeTab?.isSending ?? false;
44573
44579
  const liveStream = useStore$1((s) => s.liveStream);
44574
44580
  const streamForTab = liveStream?.tabId === activeTabId ? liveStream : null;
@@ -44648,7 +44654,7 @@ function ResponseViewer() {
44648
44654
  const [diffMode, setDiffMode] = reactExports.useState(false);
44649
44655
  const [showMockModal, setShowMockModal] = reactExports.useState(false);
44650
44656
  const [bodyView, setBodyView] = reactExports.useState("raw");
44651
- const [jqExpr, setJqExpr] = reactExports.useState("");
44657
+ const jqExpr = activeTab?.jqExpr ?? "";
44652
44658
  const [jqResult, setJqResult] = reactExports.useState(null);
44653
44659
  const [jqError, setJqError] = reactExports.useState(null);
44654
44660
  reactExports.useEffect(() => {
@@ -44890,7 +44896,9 @@ function ResponseViewer() {
44890
44896
  "input",
44891
44897
  {
44892
44898
  value: jqExpr,
44893
- onChange: (e) => setJqExpr(e.target.value),
44899
+ onChange: (e) => {
44900
+ if (activeTabId) setTabJqExpr(activeTabId, e.target.value);
44901
+ },
44894
44902
  spellCheck: false,
44895
44903
  placeholder: t("jq filter, e.g. .data | map(.id)"),
44896
44904
  title: t("Filter this JSON response with a jq expression"),
@@ -46694,7 +46702,7 @@ function WelcomeScreen() {
46694
46702
  )
46695
46703
  ] }),
46696
46704
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-surface-400 text-sm max-w-sm", children: t("Local-first API testing with Robot Framework & Playwright code generation. Secrets stay on your machine.") }),
46697
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] mt-3", style: { color: "var(--text-muted)" }, children: t("version :version", { version: "0.9.2" }) })
46705
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] mt-3", style: { color: "var(--text-muted)" }, children: t("version :version", { version: "0.9.3" }) })
46698
46706
  ] }),
46699
46707
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3 w-64", children: [
46700
46708
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -58758,7 +58766,7 @@ function App() {
58758
58766
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "var(--wordmark-accent)" }, children: "Spector" }),
58759
58767
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-2 text-[10px] font-normal", style: { color: "var(--text-muted)" }, children: [
58760
58768
  "v",
58761
- "0.9.2"
58769
+ "0.9.3"
58762
58770
  ] }),
58763
58771
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "mx-2 opacity-30", "aria-hidden": "true", children: "·" }),
58764
58772
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -5,7 +5,7 @@
5
5
  <meta charset="UTF-8" />
6
6
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
7
7
  <title>API Spector</title>
8
- <script type="module" crossorigin src="./assets/index-C6_D_4og.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-DXMEqli_.js"></script>
9
9
  <link rel="modulepreload" crossorigin href="./assets/codemirror-BKmwMUlV.js">
10
10
  <link rel="modulepreload" crossorigin href="./assets/ajv-CJPwFjiP.js">
11
11
  <link rel="stylesheet" crossorigin href="./assets/index--T34lt1s.css">
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@testsmith/api-spector",
3
3
  "productName": "API Spector",
4
- "version": "0.9.2",
4
+ "version": "0.9.3",
5
5
  "description": "Local-first API testing tool to inspect, test and mock APIs",
6
6
  "repository": {
7
7
  "type": "git",