@testsmith/api-spector 0.5.4 → 0.5.5

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.
@@ -14492,7 +14492,7 @@ const useStore = create()(
14492
14492
  })
14493
14493
  }))
14494
14494
  );
14495
- const { electron: electron$x } = window;
14495
+ const { electron: electron$y } = window;
14496
14496
  function useAutoSave() {
14497
14497
  const collections = useStore((s) => s.collections);
14498
14498
  useStore((s) => s.environments);
@@ -14508,7 +14508,7 @@ function useAutoSave() {
14508
14508
  for (const { relPath, data, dirty } of dirtyCollections) {
14509
14509
  if (!dirty) continue;
14510
14510
  try {
14511
- await electron$x.saveCollection(relPath, data);
14511
+ await electron$y.saveCollection(relPath, data);
14512
14512
  markCollectionClean(data.id);
14513
14513
  } catch (e) {
14514
14514
  console.error("Auto-save failed for", relPath, e);
@@ -14524,7 +14524,7 @@ function useAutoSave() {
14524
14524
  if (wsTimerRef.current) clearTimeout(wsTimerRef.current);
14525
14525
  wsTimerRef.current = setTimeout(async () => {
14526
14526
  try {
14527
- await electron$x.saveWorkspace(workspace);
14527
+ await electron$y.saveWorkspace(workspace);
14528
14528
  } catch {
14529
14529
  }
14530
14530
  }, 300);
@@ -14533,7 +14533,7 @@ function useAutoSave() {
14533
14533
  };
14534
14534
  }, [workspace]);
14535
14535
  }
14536
- const { electron: electron$w } = window;
14536
+ const { electron: electron$x } = window;
14537
14537
  function useWorkspaceLoader() {
14538
14538
  const loadCollection = useStore((s) => s.loadCollection);
14539
14539
  const loadEnvironment = useStore((s) => s.loadEnvironment);
@@ -14557,7 +14557,7 @@ function useWorkspaceLoader() {
14557
14557
  if (typeof ws2.settings?.zoom === "number") setZoom(ws2.settings.zoom);
14558
14558
  if (ws2.settings?.persistHistory) {
14559
14559
  try {
14560
- const entries = await electron$w.loadHistory();
14560
+ const entries = await electron$x.loadHistory();
14561
14561
  useStore.getState().setHistory(entries);
14562
14562
  } catch {
14563
14563
  }
@@ -14566,14 +14566,14 @@ function useWorkspaceLoader() {
14566
14566
  }
14567
14567
  for (const colPath of ws2.collections ?? []) {
14568
14568
  try {
14569
- const col = await electron$w.loadCollection(colPath);
14569
+ const col = await electron$x.loadCollection(colPath);
14570
14570
  loadCollection(colPath, col);
14571
14571
  } catch {
14572
14572
  }
14573
14573
  }
14574
14574
  for (const envPath of ws2.environments ?? []) {
14575
14575
  try {
14576
- const env2 = await electron$w.loadEnvironment(envPath);
14576
+ const env2 = await electron$x.loadEnvironment(envPath);
14577
14577
  loadEnvironment(envPath, env2);
14578
14578
  } catch {
14579
14579
  }
@@ -14592,19 +14592,19 @@ function useWorkspaceLoader() {
14592
14592
  }
14593
14593
  for (const relPath of ws2.mocks ?? []) {
14594
14594
  try {
14595
- const mockData = await electron$w.loadMock(relPath);
14595
+ const mockData = await electron$x.loadMock(relPath);
14596
14596
  loadMock(relPath, mockData);
14597
14597
  } catch {
14598
14598
  }
14599
14599
  }
14600
14600
  try {
14601
- const snapshots = await electron$w.listContractSnapshots(ws2.contracts ?? []);
14601
+ const snapshots = await electron$x.listContractSnapshots(ws2.contracts ?? []);
14602
14602
  for (const { relPath, snapshot } of snapshots) loadContractSnapshot(relPath, snapshot);
14603
14603
  } catch {
14604
14604
  }
14605
14605
  if ((ws2.collections ?? []).length > 0) {
14606
14606
  try {
14607
- const firstCol = await electron$w.loadCollection(ws2.collections[0]);
14607
+ const firstCol = await electron$x.loadCollection(ws2.collections[0]);
14608
14608
  setActiveCollection(firstCol.id);
14609
14609
  } catch {
14610
14610
  }
@@ -35409,6 +35409,9 @@ const fuzz$6 = "fuzz";
35409
35409
  const Flow$6 = "Flow";
35410
35410
  const Scopes$6 = "Scopes";
35411
35411
  const field$6 = "field";
35412
+ const Dismiss$6 = "Dismiss";
35413
+ const Copied$6 = "Copied";
35414
+ const Later$6 = "Later";
35412
35415
  const en = {
35413
35416
  "Close tab": "Close tab",
35414
35417
  Collections: Collections$6,
@@ -36420,7 +36423,15 @@ const en = {
36420
36423
  "Token:": "Token:",
36421
36424
  "Loading editor…": "Loading editor…",
36422
36425
  "No request body.": "No request body.",
36423
- field: field$6
36426
+ field: field$6,
36427
+ "The response view hit an error": "The response view hit an error",
36428
+ Dismiss: Dismiss$6,
36429
+ "Update available": "Update available",
36430
+ "API Spector :latest is available. You have :current.": "API Spector :latest is available. You have :current.",
36431
+ "Update with": "Update with",
36432
+ Copied: Copied$6,
36433
+ "Skip this version": "Skip this version",
36434
+ Later: Later$6
36424
36435
  };
36425
36436
  const Collections$5 = "Sammlungen";
36426
36437
  const History$5 = "Verlauf";
@@ -36612,6 +36623,9 @@ const fuzz$5 = "fuzz";
36612
36623
  const Flow$5 = "Flow";
36613
36624
  const Scopes$5 = "Scopes";
36614
36625
  const field$5 = "Feld";
36626
+ const Dismiss$5 = "Schließen";
36627
+ const Copied$5 = "Kopiert";
36628
+ const Later$5 = "Später";
36615
36629
  const de = {
36616
36630
  "Close tab": "Tab schließen",
36617
36631
  Collections: Collections$5,
@@ -37623,7 +37637,15 @@ const de = {
37623
37637
  "Token:": "Token:",
37624
37638
  "Loading editor…": "Lade Editor…",
37625
37639
  "No request body.": "Kein Request-Body.",
37626
- field: field$5
37640
+ field: field$5,
37641
+ "The response view hit an error": "In der Antwortansicht ist ein Fehler aufgetreten",
37642
+ Dismiss: Dismiss$5,
37643
+ "Update available": "Update verfügbar",
37644
+ "API Spector :latest is available. You have :current.": "API Spector :latest ist verfügbar. Sie haben :current.",
37645
+ "Update with": "Aktualisieren mit",
37646
+ Copied: Copied$5,
37647
+ "Skip this version": "Diese Version überspringen",
37648
+ Later: Later$5
37627
37649
  };
37628
37650
  const Collections$4 = "Collections";
37629
37651
  const History$4 = "Historique";
@@ -37815,6 +37837,9 @@ const fuzz$4 = "fuzz";
37815
37837
  const Flow$4 = "Flux";
37816
37838
  const Scopes$4 = "Portées";
37817
37839
  const field$4 = "champ";
37840
+ const Dismiss$4 = "Ignorer";
37841
+ const Copied$4 = "Copié";
37842
+ const Later$4 = "Plus tard";
37818
37843
  const fr = {
37819
37844
  "Close tab": "Fermer l'onglet",
37820
37845
  Collections: Collections$4,
@@ -38826,7 +38851,15 @@ const fr = {
38826
38851
  "Token:": "Token :",
38827
38852
  "Loading editor…": "Chargement de l'éditeur…",
38828
38853
  "No request body.": "Aucun corps de requête.",
38829
- field: field$4
38854
+ field: field$4,
38855
+ "The response view hit an error": "La vue de réponse a rencontré une erreur",
38856
+ Dismiss: Dismiss$4,
38857
+ "Update available": "Mise à jour disponible",
38858
+ "API Spector :latest is available. You have :current.": "API Spector :latest est disponible. Vous avez la :current.",
38859
+ "Update with": "Mettre à jour avec",
38860
+ Copied: Copied$4,
38861
+ "Skip this version": "Ignorer cette version",
38862
+ Later: Later$4
38830
38863
  };
38831
38864
  const Collections$3 = "Colecciones";
38832
38865
  const History$3 = "Historial";
@@ -39018,6 +39051,9 @@ const fuzz$3 = "fuzz";
39018
39051
  const Flow$3 = "Flujo";
39019
39052
  const Scopes$3 = "Ámbitos";
39020
39053
  const field$3 = "campo";
39054
+ const Dismiss$3 = "Descartar";
39055
+ const Copied$3 = "Copiado";
39056
+ const Later$3 = "Más tarde";
39021
39057
  const es = {
39022
39058
  "Close tab": "Cerrar pestaña",
39023
39059
  Collections: Collections$3,
@@ -40029,7 +40065,15 @@ const es = {
40029
40065
  "Token:": "Token:",
40030
40066
  "Loading editor…": "Cargando editor…",
40031
40067
  "No request body.": "Sin cuerpo de petición.",
40032
- field: field$3
40068
+ field: field$3,
40069
+ "The response view hit an error": "La vista de respuesta encontró un error",
40070
+ Dismiss: Dismiss$3,
40071
+ "Update available": "Actualización disponible",
40072
+ "API Spector :latest is available. You have :current.": "API Spector :latest está disponible. Tienes la :current.",
40073
+ "Update with": "Actualiza con",
40074
+ Copied: Copied$3,
40075
+ "Skip this version": "Omitir esta versión",
40076
+ Later: Later$3
40033
40077
  };
40034
40078
  const Collections$2 = "Raccolte";
40035
40079
  const History$2 = "Cronologia";
@@ -40221,6 +40265,9 @@ const fuzz$2 = "fuzz";
40221
40265
  const Flow$2 = "Flusso";
40222
40266
  const Scopes$2 = "Scope";
40223
40267
  const field$2 = "campo";
40268
+ const Dismiss$2 = "Ignora";
40269
+ const Copied$2 = "Copiato";
40270
+ const Later$2 = "Più tardi";
40224
40271
  const it = {
40225
40272
  "Close tab": "Chiudi scheda",
40226
40273
  Collections: Collections$2,
@@ -41232,7 +41279,15 @@ const it = {
41232
41279
  "Token:": "Token:",
41233
41280
  "Loading editor…": "Caricamento editor…",
41234
41281
  "No request body.": "Nessun body della richiesta.",
41235
- field: field$2
41282
+ field: field$2,
41283
+ "The response view hit an error": "La vista della risposta ha riscontrato un errore",
41284
+ Dismiss: Dismiss$2,
41285
+ "Update available": "Aggiornamento disponibile",
41286
+ "API Spector :latest is available. You have :current.": "API Spector :latest è disponibile. Hai la :current.",
41287
+ "Update with": "Aggiorna con",
41288
+ Copied: Copied$2,
41289
+ "Skip this version": "Salta questa versione",
41290
+ Later: Later$2
41236
41291
  };
41237
41292
  const Collections$1 = "Collecties";
41238
41293
  const History$1 = "Geschiedenis";
@@ -41424,6 +41479,9 @@ const fuzz$1 = "fuzz";
41424
41479
  const Flow$1 = "Flow";
41425
41480
  const Scopes$1 = "Scopes";
41426
41481
  const field$1 = "veld";
41482
+ const Dismiss$1 = "Sluiten";
41483
+ const Copied$1 = "Gekopieerd";
41484
+ const Later$1 = "Later";
41427
41485
  const nl = {
41428
41486
  "Close tab": "Tabblad sluiten",
41429
41487
  Collections: Collections$1,
@@ -42435,7 +42493,15 @@ const nl = {
42435
42493
  "Token:": "Token:",
42436
42494
  "Loading editor…": "Editor laden…",
42437
42495
  "No request body.": "Geen verzoekbody.",
42438
- field: field$1
42496
+ field: field$1,
42497
+ "The response view hit an error": "De responsweergave liep tegen een fout aan",
42498
+ Dismiss: Dismiss$1,
42499
+ "Update available": "Update beschikbaar",
42500
+ "API Spector :latest is available. You have :current.": "API Spector :latest is beschikbaar. Je hebt :current.",
42501
+ "Update with": "Bijwerken met",
42502
+ Copied: Copied$1,
42503
+ "Skip this version": "Deze versie overslaan",
42504
+ Later: Later$1
42439
42505
  };
42440
42506
  const Collections = "Coleções";
42441
42507
  const History = "Histórico";
@@ -42627,6 +42693,9 @@ const fuzz = "fuzz";
42627
42693
  const Flow = "Fluxo";
42628
42694
  const Scopes = "Âmbitos";
42629
42695
  const field = "campo";
42696
+ const Dismiss = "Dispensar";
42697
+ const Copied = "Copiado";
42698
+ const Later = "Mais tarde";
42630
42699
  const pt = {
42631
42700
  "Close tab": "Fechar separador",
42632
42701
  Collections,
@@ -43638,7 +43707,15 @@ const pt = {
43638
43707
  "Token:": "Token:",
43639
43708
  "Loading editor…": "A carregar editor…",
43640
43709
  "No request body.": "Sem corpo de pedido.",
43641
- field
43710
+ field,
43711
+ "The response view hit an error": "A vista de resposta encontrou um erro",
43712
+ Dismiss,
43713
+ "Update available": "Atualização disponível",
43714
+ "API Spector :latest is available. You have :current.": "API Spector :latest está disponível. Tem a :current.",
43715
+ "Update with": "Atualizar com",
43716
+ Copied,
43717
+ "Skip this version": "Ignorar esta versão",
43718
+ Later
43642
43719
  };
43643
43720
  const CATALOGS = { en, de, fr, es, it, nl, pt };
43644
43721
  const LOCALES = {
@@ -44980,7 +45057,7 @@ function CollectionSettingsModal({ collection: collection2, onClose }) {
44980
45057
  }
44981
45058
  );
44982
45059
  }
44983
- const { electron: electron$v } = window;
45060
+ const { electron: electron$w } = window;
44984
45061
  function normalisePath(url) {
44985
45062
  let path = url.replace(/^\{\{[^}]+\}\}/, "").replace(/^https?:\/\/[^/]+/, "");
44986
45063
  if (!path.startsWith("/")) path = "/" + path;
@@ -45068,7 +45145,7 @@ function SchemaSyncModal({
45068
45145
  setLoading(true);
45069
45146
  setError(null);
45070
45147
  try {
45071
- const entries = await electron$v.extractOpenApiSchemas();
45148
+ const entries = await electron$w.extractOpenApiSchemas();
45072
45149
  if (!entries) {
45073
45150
  setLoading(false);
45074
45151
  return;
@@ -45087,7 +45164,7 @@ function SchemaSyncModal({
45087
45164
  setLoading(true);
45088
45165
  setError(null);
45089
45166
  try {
45090
- const entries = await electron$v.extractOpenApiSchemasFromUrl(trimmed);
45167
+ const entries = await electron$w.extractOpenApiSchemasFromUrl(trimmed);
45091
45168
  setSpecEntries(entries);
45092
45169
  autoSelectChanged(entries);
45093
45170
  } catch (err) {
@@ -45120,7 +45197,7 @@ function SchemaSyncModal({
45120
45197
  }
45121
45198
  const entry = useStore.getState().collections[collectionId];
45122
45199
  if (entry) {
45123
- await electron$v.saveCollection(entry.relPath, entry.data);
45200
+ await electron$w.saveCollection(entry.relPath, entry.data);
45124
45201
  markCollectionClean(collectionId);
45125
45202
  }
45126
45203
  onClose();
@@ -45513,7 +45590,7 @@ function hasContract(r) {
45513
45590
  const c = r.contract;
45514
45591
  return !!c && (c.statusCode != null || !!c.bodySchema || !!c.bodyMatcher || (c.headers?.length ?? 0) > 0 || (c.providerStates?.length ?? 0) > 0);
45515
45592
  }
45516
- const { electron: electron$u } = window;
45593
+ const { electron: electron$v } = window;
45517
45594
  function cloudEnabled() {
45518
45595
  return Boolean(useStore.getState().workspace?.settings?.cloud?.enabled);
45519
45596
  }
@@ -45522,7 +45599,7 @@ function assertEnabled() {
45522
45599
  }
45523
45600
  async function pushContractToCloud(requests, opts) {
45524
45601
  assertEnabled();
45525
- return electron$u.cloudPushPact({
45602
+ return electron$v.cloudPushPact({
45526
45603
  consumer: opts.consumer,
45527
45604
  provider: opts.provider,
45528
45605
  consumerVersion: opts.version,
@@ -45531,15 +45608,15 @@ async function pushContractToCloud(requests, opts) {
45531
45608
  }
45532
45609
  async function pushProviderSpecToCloud(opts) {
45533
45610
  assertEnabled();
45534
- return electron$u.cloudPushSpec(opts);
45611
+ return electron$v.cloudPushSpec(opts);
45535
45612
  }
45536
45613
  function openCloudMatrix() {
45537
- void electron$u.cloudOpenMatrix();
45614
+ void electron$v.cloudOpenMatrix();
45538
45615
  }
45539
45616
  async function getCloudMockRoutes(name2) {
45540
45617
  if (!cloudEnabled()) return null;
45541
45618
  try {
45542
- const res = await electron$u.cloudGetMock(name2);
45619
+ const res = await electron$v.cloudGetMock(name2);
45543
45620
  return res.exists ? res.routes ?? [] : null;
45544
45621
  } catch {
45545
45622
  return null;
@@ -45548,7 +45625,7 @@ async function getCloudMockRoutes(name2) {
45548
45625
  async function pushMockToCloud(server, routeIds) {
45549
45626
  assertEnabled();
45550
45627
  const routes = routeIds ? (server.routes ?? []).filter((r) => routeIds.includes(r.id)) : server.routes ?? [];
45551
- return electron$u.cloudPushMock({ ...server, routes });
45628
+ return electron$v.cloudPushMock({ ...server, routes });
45552
45629
  }
45553
45630
  async function pushRequestAsMonitor(request2, opts) {
45554
45631
  assertEnabled();
@@ -45569,7 +45646,7 @@ async function pushRequestAsMonitor(request2, opts) {
45569
45646
  ...request2.headers
45570
45647
  ];
45571
45648
  const mergedRequest = { ...request2, auth: mergedAuth, headers: mergedHeaders };
45572
- return electron$u.cloudPushMonitor(
45649
+ return electron$v.cloudPushMonitor(
45573
45650
  {
45574
45651
  request: mergedRequest,
45575
45652
  setup,
@@ -52737,8 +52814,8 @@ function jsonWithComments() {
52737
52814
  function xmlWithComments() {
52738
52815
  return [xml(), commentKeymap];
52739
52816
  }
52740
- const GraphQLEditor = reactExports.lazy(() => __vitePreload(() => import("./GraphQLEditor-B5bSe2ot.js"), true ? [] : void 0, import.meta.url).then((m) => ({ default: m.GraphQLEditor })));
52741
- const SoapEditor = reactExports.lazy(() => __vitePreload(() => import("./SoapEditor-B-4NwGjp.js"), true ? [] : void 0, import.meta.url).then((m) => ({ default: m.SoapEditor })));
52817
+ const GraphQLEditor = reactExports.lazy(() => __vitePreload(() => import("./GraphQLEditor-CegyHBoY.js"), true ? [] : void 0, import.meta.url).then((m) => ({ default: m.GraphQLEditor })));
52818
+ const SoapEditor = reactExports.lazy(() => __vitePreload(() => import("./SoapEditor-BjZHo7Xf.js"), true ? [] : void 0, import.meta.url).then((m) => ({ default: m.SoapEditor })));
52742
52819
  function BodyTab({ request: request2, onChange }) {
52743
52820
  const t2 = useT();
52744
52821
  const editorFallback = /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "p-4 text-xs text-surface-500", children: t2("Loading editor…") });
@@ -52836,7 +52913,7 @@ function BodyTab({ request: request2, onChange }) {
52836
52913
  mode === "soap" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(reactExports.Suspense, { fallback: editorFallback, children: /* @__PURE__ */ jsxRuntimeExports.jsx(SoapEditor, { request: request2, onChange }) }) })
52837
52914
  ] });
52838
52915
  }
52839
- const { electron: electron$t } = window;
52916
+ const { electron: electron$u } = window;
52840
52917
  const AUTH_TYPES = ["none", "bearer", "basic", "digest", "ntlm", "apikey", "oauth2"];
52841
52918
  function AuthTab({ request: request2, onChange }) {
52842
52919
  const t2 = useT();
@@ -52851,7 +52928,7 @@ function AuthTab({ request: request2, onChange }) {
52851
52928
  }
52852
52929
  async function saveSecret(ref2) {
52853
52930
  if (!secretValue || !ref2) return;
52854
- await electron$t.setSecret(ref2, secretValue);
52931
+ await electron$u.setSecret(ref2, secretValue);
52855
52932
  setSaved(true);
52856
52933
  setSecretValue("");
52857
52934
  setTimeout(() => setSaved(false), 2e3);
@@ -52863,7 +52940,7 @@ function AuthTab({ request: request2, onChange }) {
52863
52940
  setOauth2Error("");
52864
52941
  try {
52865
52942
  const vars = {};
52866
- const result = await electron$t.oauth2StartFlow(oauth2Auth, vars);
52943
+ const result = await electron$u.oauth2StartFlow(oauth2Auth, vars);
52867
52944
  setAuth({
52868
52945
  oauth2CachedToken: result.accessToken,
52869
52946
  oauth2TokenExpiry: result.expiresAt
@@ -52881,7 +52958,7 @@ function AuthTab({ request: request2, onChange }) {
52881
52958
  setOauth2Status("fetching");
52882
52959
  setOauth2Error("");
52883
52960
  try {
52884
- const result = await electron$t.oauth2RefreshToken(oauth2Auth, {}, oauth2RefreshToken);
52961
+ const result = await electron$u.oauth2RefreshToken(oauth2Auth, {}, oauth2RefreshToken);
52885
52962
  setAuth({
52886
52963
  oauth2CachedToken: result.accessToken,
52887
52964
  oauth2TokenExpiry: result.expiresAt
@@ -60209,7 +60286,7 @@ function SchemaTab({ request: request2, onChange }) {
60209
60286
  ] }) })
60210
60287
  ] });
60211
60288
  }
60212
- const { electron: electron$s } = window;
60289
+ const { electron: electron$t } = window;
60213
60290
  const EMPTY = { statusCode: 200, headers: [], bodySchema: "" };
60214
60291
  function ContractTab({ request: request2, onChange }) {
60215
60292
  const t2 = useT();
@@ -60224,7 +60301,7 @@ function ContractTab({ request: request2, onChange }) {
60224
60301
  if (!lastResponse?.body) return;
60225
60302
  setInferring(true);
60226
60303
  try {
60227
- const schema = await electron$s.inferContractSchema(lastResponse.body);
60304
+ const schema = await electron$t.inferContractSchema(lastResponse.body);
60228
60305
  if (schema) update({ bodySchema: schema });
60229
60306
  } finally {
60230
60307
  setInferring(false);
@@ -60432,7 +60509,7 @@ function StreamTab({ request: request2, onChange }) {
60432
60509
  ] })
60433
60510
  ] });
60434
60511
  }
60435
- const { electron: electron$r } = window;
60512
+ const { electron: electron$s } = window;
60436
60513
  function formatTime$2(ts) {
60437
60514
  const d = new Date(ts);
60438
60515
  const hh = String(d.getHours()).padStart(2, "0");
@@ -60453,14 +60530,14 @@ function WebSocketPanel({ request: request2 }) {
60453
60530
  const [sendText, setSendText] = reactExports.useState("");
60454
60531
  const logEndRef = reactExports.useRef(null);
60455
60532
  reactExports.useEffect(() => {
60456
- electron$r.onWsMessage(({ requestId, message }) => {
60533
+ electron$s.onWsMessage(({ requestId, message }) => {
60457
60534
  addWsMessage(requestId, message);
60458
60535
  });
60459
- electron$r.onWsStatus(({ requestId, status, error: error2 }) => {
60536
+ electron$s.onWsStatus(({ requestId, status, error: error2 }) => {
60460
60537
  setWsStatus(requestId, status, error2);
60461
60538
  });
60462
60539
  return () => {
60463
- electron$r.offWsEvents();
60540
+ electron$s.offWsEvents();
60464
60541
  };
60465
60542
  }, [addWsMessage, setWsStatus]);
60466
60543
  reactExports.useEffect(() => {
@@ -60473,19 +60550,19 @@ function WebSocketPanel({ request: request2 }) {
60473
60550
  if (h.enabled && h.key) headers[h.key] = h.value;
60474
60551
  }
60475
60552
  try {
60476
- await electron$r.wsConnect(request2.id, request2.url, headers);
60553
+ await electron$s.wsConnect(request2.id, request2.url, headers);
60477
60554
  } catch (err) {
60478
60555
  setWsStatus(request2.id, "error", err instanceof Error ? err.message : String(err));
60479
60556
  }
60480
60557
  }
60481
60558
  async function disconnect() {
60482
- await electron$r.wsDisconnect(request2.id);
60559
+ await electron$s.wsDisconnect(request2.id);
60483
60560
  }
60484
60561
  async function sendMessage() {
60485
60562
  const text = sendText.trim();
60486
60563
  if (!text || !isConnected) return;
60487
60564
  try {
60488
- await electron$r.wsSend(request2.id, text);
60565
+ await electron$s.wsSend(request2.id, text);
60489
60566
  const msg = {
60490
60567
  id: crypto.randomUUID(),
60491
60568
  direction: "sent",
@@ -60588,7 +60665,7 @@ function WebSocketPanel({ request: request2 }) {
60588
60665
  ] })
60589
60666
  ] });
60590
60667
  }
60591
- const { electron: electron$q } = window;
60668
+ const { electron: electron$r } = window;
60592
60669
  function formatTime$1(ts) {
60593
60670
  const d = new Date(ts);
60594
60671
  const p = (n, w = 2) => String(n).padStart(w, "0");
@@ -60624,13 +60701,13 @@ function GrpcPanel({ request: request2, onChange }) {
60624
60701
  onChange({ body: { ...request2.body, mode: "grpc", grpc: { ...grpc, ...changes } } });
60625
60702
  }
60626
60703
  reactExports.useEffect(() => {
60627
- electron$q.onGrpcMessage(({ requestId, message }) => {
60704
+ electron$r.onGrpcMessage(({ requestId, message }) => {
60628
60705
  addGrpcMessage(requestId, message);
60629
60706
  });
60630
- electron$q.onGrpcStatus(({ requestId, status, code: code2, codeName, error: error2 }) => {
60707
+ electron$r.onGrpcStatus(({ requestId, status, code: code2, codeName, error: error2 }) => {
60631
60708
  setGrpcStatus(requestId, status, { code: code2, codeName, error: error2 });
60632
60709
  });
60633
- return () => electron$q.offGrpcEvents();
60710
+ return () => electron$r.offGrpcEvents();
60634
60711
  }, [addGrpcMessage, setGrpcStatus]);
60635
60712
  reactExports.useEffect(() => {
60636
60713
  logEndRef.current?.scrollIntoView({ behavior: "smooth" });
@@ -60643,7 +60720,7 @@ function GrpcPanel({ request: request2, onChange }) {
60643
60720
  if (!grpc.protoSource?.trim() && !grpc.protoPath?.trim()) return;
60644
60721
  setLoadingProto(true);
60645
60722
  try {
60646
- const result = await electron$q.grpcLoadProto({ protoSource: grpc.protoSource, protoPath: grpc.protoPath });
60723
+ const result = await electron$r.grpcLoadProto({ protoSource: grpc.protoSource, protoPath: grpc.protoPath });
60647
60724
  const services = result.services;
60648
60725
  setGrpcServices(request2.id, services);
60649
60726
  if (services.length && !services.some((s) => s.name === grpc.serviceName)) {
@@ -60662,7 +60739,7 @@ function GrpcPanel({ request: request2, onChange }) {
60662
60739
  const metadata2 = {};
60663
60740
  for (const m of grpc.metadata ?? []) if (m.enabled && m.key) metadata2[m.key] = m.value;
60664
60741
  try {
60665
- await electron$q.grpcInvoke(request2.id, {
60742
+ await electron$r.grpcInvoke(request2.id, {
60666
60743
  target: request2.url,
60667
60744
  serviceName: grpc.serviceName,
60668
60745
  methodName: grpc.methodName,
@@ -60677,7 +60754,7 @@ function GrpcPanel({ request: request2, onChange }) {
60677
60754
  }
60678
60755
  }
60679
60756
  function cancel() {
60680
- electron$q.grpcCancel(request2.id);
60757
+ electron$r.grpcCancel(request2.id);
60681
60758
  }
60682
60759
  const statusColors = {
60683
60760
  running: "bg-amber-400",
@@ -61009,7 +61086,7 @@ function FuzzResultsPanel({ report, onClear }) {
61009
61086
  ] }) })
61010
61087
  ] });
61011
61088
  }
61012
- const { electron: electron$p } = window;
61089
+ const { electron: electron$q } = window;
61013
61090
  const WRITE_METHODS = /* @__PURE__ */ new Set(["POST", "PUT", "PATCH", "DELETE"]);
61014
61091
  function FuzzModal({ request: request2, onClose }) {
61015
61092
  const t2 = useT();
@@ -61036,7 +61113,7 @@ function FuzzModal({ request: request2, onClose }) {
61036
61113
  const env2 = resolveEnvironmentById(environments, activeEnvironmentId);
61037
61114
  const envVars = env2 ? Object.fromEntries(env2.variables.filter((v) => v.enabled).map((v) => [v.key, v.value])) : {};
61038
61115
  const collectionVars = activeCollectionId ? collections[activeCollectionId]?.data.collectionVariables ?? {} : {};
61039
- const result = await electron$p.fuzzContracts({
61116
+ const result = await electron$q.fuzzContracts({
61040
61117
  requests: [request2],
61041
61118
  envVars,
61042
61119
  collectionVars,
@@ -61125,7 +61202,7 @@ function FuzzModal({ request: request2, onClose }) {
61125
61202
  }
61126
61203
  );
61127
61204
  }
61128
- const { electron: electron$o } = window;
61205
+ const { electron: electron$p } = window;
61129
61206
  const METHODS = ["GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "QUERY"];
61130
61207
  const METHOD_COLORS = {
61131
61208
  GET: "text-emerald-400",
@@ -61251,7 +61328,7 @@ function RequestBuilder({ request: request2 }) {
61251
61328
  activeEnvironmentId
61252
61329
  );
61253
61330
  const hookSessionVars = useStore.getState().sessionVars;
61254
- const r = await electron$o.sendRequest({
61331
+ const r = await electron$p.sendRequest({
61255
61332
  ...basePayload,
61256
61333
  environment: hookEnv,
61257
61334
  request: hook,
@@ -61299,7 +61376,7 @@ function RequestBuilder({ request: request2 }) {
61299
61376
  startLiveStream(activeTabId, streamId);
61300
61377
  let result;
61301
61378
  try {
61302
- result = await electron$o.sendRequest({
61379
+ result = await electron$p.sendRequest({
61303
61380
  ...basePayload,
61304
61381
  environment: freshEnv,
61305
61382
  request: mergedRequest,
@@ -61331,7 +61408,7 @@ function RequestBuilder({ request: request2 }) {
61331
61408
  activeEnvironmentId
61332
61409
  );
61333
61410
  const hookSessionVars = useStore.getState().sessionVars;
61334
- const r = await electron$o.sendRequest({
61411
+ const r = await electron$p.sendRequest({
61335
61412
  ...basePayload,
61336
61413
  environment: hookEnv,
61337
61414
  request: hook,
@@ -62345,7 +62422,7 @@ function Cell({ value: value2, onDrill }) {
62345
62422
  const text = String(value2);
62346
62423
  return /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "inline-block max-w-[26rem] truncate align-bottom text-surface-300", title: text.length > 40 ? text : void 0, children: text });
62347
62424
  }
62348
- const { electron: electron$n } = window;
62425
+ const { electron: electron$o } = window;
62349
62426
  const RENDER_TAIL = 500;
62350
62427
  const CLOSE_LABEL = {
62351
62428
  complete: "closed",
@@ -62387,7 +62464,7 @@ function StreamView({ events, streaming: streaming2, streamId, streamClose, firs
62387
62464
  if (!streamId) return;
62388
62465
  setStopping(true);
62389
62466
  try {
62390
- await electron$n.stopStream(streamId);
62467
+ await electron$o.stopStream(streamId);
62391
62468
  } catch {
62392
62469
  }
62393
62470
  }
@@ -62530,7 +62607,7 @@ function HookResultsPanel({ results }) {
62530
62607
  }) })
62531
62608
  ] });
62532
62609
  }
62533
- const { electron: electron$m } = window;
62610
+ const { electron: electron$n } = window;
62534
62611
  function extractPath(url) {
62535
62612
  try {
62536
62613
  return new URL(url).pathname || "/";
@@ -62585,14 +62662,14 @@ function SaveAsMockModal({ onClose }) {
62585
62662
  const entry = state.mocks[serverId];
62586
62663
  const updated = { ...entry.data, name: newServerName, port: Number(newServerPort), routes: [route] };
62587
62664
  updateMock(serverId, updated);
62588
- await electron$m.saveMock(entry.relPath, updated);
62665
+ await electron$n.saveMock(entry.relPath, updated);
62589
62666
  const ws2 = useStore.getState().workspace;
62590
- if (ws2) await electron$m.saveWorkspace(ws2);
62667
+ if (ws2) await electron$n.saveWorkspace(ws2);
62591
62668
  } else {
62592
62669
  const entry = useStore.getState().mocks[serverId];
62593
62670
  const updated = { ...entry.data, routes: [...entry.data.routes, route] };
62594
62671
  updateMock(serverId, updated);
62595
- await electron$m.saveMock(entry.relPath, updated);
62672
+ await electron$n.saveMock(entry.relPath, updated);
62596
62673
  }
62597
62674
  onClose();
62598
62675
  } finally {
@@ -63027,7 +63104,7 @@ function validateHttpSemantics(res, opts = {}) {
63027
63104
  const order = { error: 0, warning: 1, hint: 2 };
63028
63105
  return f.sort((a, b) => order[a.severity] - order[b.severity]);
63029
63106
  }
63030
- const { electron: electron$l } = window;
63107
+ const { electron: electron$m } = window;
63031
63108
  function xmlWellFormed(body) {
63032
63109
  try {
63033
63110
  const doc2 = new DOMParser().parseFromString(body, "application/xml");
@@ -63169,7 +63246,7 @@ function ResponseViewer() {
63169
63246
  const contractToast = useToast(2500);
63170
63247
  async function saveAsContract() {
63171
63248
  if (!response || !requestId || !activeTabId) return;
63172
- const schema = response.body ? await electron$l.inferContractSchema(response.body) : null;
63249
+ const schema = response.body ? await electron$m.inferContractSchema(response.body) : null;
63173
63250
  const contentType2 = response.headers["content-type"];
63174
63251
  const headers = contentType2 ? [{ key: "content-type", value: contentType2, required: true }] : [];
63175
63252
  updateRequest(requestId, {
@@ -63492,7 +63569,64 @@ function ResponseViewer() {
63492
63569
  ] }) })
63493
63570
  ] });
63494
63571
  }
63495
- const { electron: electron$k } = window;
63572
+ class ErrorBoundary extends React$2.Component {
63573
+ constructor() {
63574
+ super(...arguments);
63575
+ this.state = { error: null };
63576
+ this.reset = () => this.setState({ error: null });
63577
+ }
63578
+ static getDerivedStateFromError(error2) {
63579
+ return { error: error2 };
63580
+ }
63581
+ componentDidCatch(error2, info) {
63582
+ console.error("[renderer] uncaught error:", error2, info.componentStack);
63583
+ }
63584
+ componentDidUpdate(prev) {
63585
+ if (this.state.error && prev.resetKey !== this.props.resetKey) {
63586
+ this.setState({ error: null });
63587
+ }
63588
+ }
63589
+ render() {
63590
+ const { error: error2 } = this.state;
63591
+ if (!error2) return this.props.children;
63592
+ if (this.props.fallback) return this.props.fallback(error2, this.reset);
63593
+ return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: {
63594
+ display: "flex",
63595
+ flexDirection: "column",
63596
+ alignItems: "center",
63597
+ justifyContent: "center",
63598
+ gap: 16,
63599
+ height: "100vh",
63600
+ padding: 24,
63601
+ textAlign: "center",
63602
+ background: "#0b0f14",
63603
+ color: "#e5e7eb",
63604
+ fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif'
63605
+ }, children: [
63606
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { fontSize: 15, fontWeight: 600 }, children: "Something went wrong" }),
63607
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { style: { fontSize: 12, color: "#9ca3af", maxWidth: 520, whiteSpace: "pre-wrap", wordBreak: "break-word" }, children: error2.message || String(error2) }),
63608
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { style: { display: "flex", gap: 8 }, children: [
63609
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
63610
+ "button",
63611
+ {
63612
+ onClick: this.reset,
63613
+ style: { padding: "6px 14px", fontSize: 13, borderRadius: 8, border: "1px solid #374151", background: "transparent", color: "#e5e7eb", cursor: "pointer" },
63614
+ children: "Try again"
63615
+ }
63616
+ ),
63617
+ /* @__PURE__ */ jsxRuntimeExports.jsx(
63618
+ "button",
63619
+ {
63620
+ onClick: () => window.location.reload(),
63621
+ style: { padding: "6px 14px", fontSize: 13, borderRadius: 8, border: "none", background: "#2563eb", color: "#fff", cursor: "pointer" },
63622
+ children: "Reload"
63623
+ }
63624
+ )
63625
+ ] })
63626
+ ] });
63627
+ }
63628
+ }
63629
+ const { electron: electron$l } = window;
63496
63630
  const TARGETS = [
63497
63631
  { id: "robot_framework", label: "Robot Framework", description: "Python RequestsLibrary keywords + test suite" },
63498
63632
  { id: "playwright_ts", label: "Playwright TS", description: "TypeScript page-object API classes + spec files" },
@@ -63534,7 +63668,7 @@ function GeneratorPanel() {
63534
63668
  try {
63535
63669
  const col = collections[selectedCollectionId]?.data;
63536
63670
  const env2 = resolveEnvironmentById(environments, activeEnvironmentId);
63537
- const generated = await electron$k.generateCode({ collection: col, environment: env2, target });
63671
+ const generated = await electron$l.generateCode({ collection: col, environment: env2, target });
63538
63672
  setFiles(generated);
63539
63673
  setSelectedFile(generated[0]?.path ?? null);
63540
63674
  } catch (e) {
@@ -63546,7 +63680,7 @@ function GeneratorPanel() {
63546
63680
  async function saveZip() {
63547
63681
  if (files.length === 0) return;
63548
63682
  const col = collections[selectedCollectionId]?.data;
63549
- await electron$k.saveGeneratedFilesAsZip(files, col?.name ?? "api-tests", target);
63683
+ await electron$l.saveGeneratedFilesAsZip(files, col?.name ?? "api-tests", target);
63550
63684
  }
63551
63685
  const selectedContent = files.find((f) => f.path === selectedFile)?.content ?? "";
63552
63686
  const activeTarget = TARGETS.find((tgt) => tgt.id === target);
@@ -63730,7 +63864,7 @@ function historyToHar(entries, creatorVersion = "1.0") {
63730
63864
  }
63731
63865
  }, null, 2);
63732
63866
  }
63733
- const { electron: electron$j } = window;
63867
+ const { electron: electron$k } = window;
63734
63868
  const STATUS_COLOR = {
63735
63869
  "2": "text-emerald-400",
63736
63870
  "3": "text-amber-400",
@@ -63779,7 +63913,7 @@ function HistoryPanel() {
63779
63913
  }
63780
63914
  async function downloadHar() {
63781
63915
  const stamp = (/* @__PURE__ */ new Date()).toISOString().slice(0, 19).replace(/[:T]/g, "-");
63782
- await electron$j.saveResults(historyToHar(history2), `api-spector-history-${stamp}.har`);
63916
+ await electron$k.saveResults(historyToHar(history2), `api-spector-history-${stamp}.har`);
63783
63917
  }
63784
63918
  function open2(entry) {
63785
63919
  setSelected(entry);
@@ -63908,7 +64042,7 @@ function HistoryRow({
63908
64042
  }
63909
64043
  );
63910
64044
  }
63911
- const { electron: electron$i } = window;
64045
+ const { electron: electron$j } = window;
63912
64046
  function WelcomeScreen() {
63913
64047
  const t2 = useT();
63914
64048
  const { applyWorkspace } = useWorkspaceLoader();
@@ -63919,19 +64053,19 @@ function WelcomeScreen() {
63919
64053
  const [gitBusy, setGitBusy] = reactExports.useState(false);
63920
64054
  const [gitError, setGitError] = reactExports.useState(null);
63921
64055
  reactExports.useEffect(() => {
63922
- electron$i.getRecentWorkspaces().then(setRecents).catch(() => setRecents([]));
63923
- electron$i.checkForUpdate().then((info) => {
64056
+ electron$j.getRecentWorkspaces().then(setRecents).catch(() => setRecents([]));
64057
+ electron$j.checkForUpdate().then((info) => {
63924
64058
  if (info?.updateAvailable) setUpdate(info);
63925
64059
  }).catch(() => {
63926
64060
  });
63927
64061
  }, []);
63928
64062
  async function openWorkspace() {
63929
- const result = await electron$i.openWorkspace();
64063
+ const result = await electron$j.openWorkspace();
63930
64064
  if (!result) return;
63931
64065
  await applyWorkspace(result.workspace, result.workspacePath);
63932
64066
  }
63933
64067
  async function newWorkspace() {
63934
- const result = await electron$i.newWorkspace();
64068
+ const result = await electron$j.newWorkspace();
63935
64069
  if (!result) return;
63936
64070
  await applyWorkspace(result.workspace, result.workspacePath);
63937
64071
  }
@@ -63941,7 +64075,7 @@ function WelcomeScreen() {
63941
64075
  setGitBusy(true);
63942
64076
  setGitError(null);
63943
64077
  try {
63944
- const result = await electron$i.openFromGit(url);
64078
+ const result = await electron$j.openFromGit(url);
63945
64079
  if (!result) return;
63946
64080
  await applyWorkspace(result.workspace, result.workspacePath);
63947
64081
  } catch (err) {
@@ -63951,7 +64085,7 @@ function WelcomeScreen() {
63951
64085
  }
63952
64086
  }
63953
64087
  async function openRecent(path) {
63954
- const result = await electron$i.openWorkspacePath(path);
64088
+ const result = await electron$j.openWorkspacePath(path);
63955
64089
  if (!result) {
63956
64090
  setRecents((prev) => prev.filter((r) => r.path !== path));
63957
64091
  return;
@@ -63983,7 +64117,7 @@ function WelcomeScreen() {
63983
64117
  )
63984
64118
  ] }),
63985
64119
  /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-surface-400 text-sm max-w-sm", children: t2("Local-first API testing with Robot Framework & Playwright code generation. Secrets stay on your machine.") }),
63986
- /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] mt-3", style: { color: "var(--text-muted)" }, children: t2("version :version", { version: "0.5.4" }) })
64120
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-[11px] mt-3", style: { color: "var(--text-muted)" }, children: t2("version :version", { version: "0.5.5" }) })
63987
64121
  ] }),
63988
64122
  /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex flex-col gap-3 w-64", children: [
63989
64123
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -64062,7 +64196,7 @@ function WelcomeScreen() {
64062
64196
  ] })
64063
64197
  ] });
64064
64198
  }
64065
- const { electron: electron$h } = window;
64199
+ const { electron: electron$i } = window;
64066
64200
  const EXAMPLES = [
64067
64201
  {
64068
64202
  label: "macOS / Linux (~/.zshrc or ~/.bashrc)",
@@ -64087,7 +64221,7 @@ function MasterKeyModal({ onSuccess, onCancel }) {
64087
64221
  setError(t2("Password cannot be empty."));
64088
64222
  return;
64089
64223
  }
64090
- await electron$h.setMasterKey(password);
64224
+ await electron$i.setMasterKey(password);
64091
64225
  onSuccess(password);
64092
64226
  }
64093
64227
  function copy2(idx, text) {
@@ -64171,7 +64305,7 @@ function MasterKeyModal({ onSuccess, onCancel }) {
64171
64305
  }
64172
64306
  );
64173
64307
  }
64174
- const { electron: electron$g } = window;
64308
+ const { electron: electron$h } = window;
64175
64309
  async function shortHash(value2) {
64176
64310
  const buf = await crypto.subtle.digest("SHA-256", new TextEncoder().encode(value2));
64177
64311
  return Array.from(new Uint8Array(buf)).map((b) => b.toString(16).padStart(2, "0")).join("").slice(0, 8);
@@ -64299,7 +64433,7 @@ function EnvironmentEditor({ onClose }) {
64299
64433
  async function saveEncrypted(idx) {
64300
64434
  const plaintext = secretInputs[idx] ?? "";
64301
64435
  if (!plaintext) return;
64302
- const { set: set2 } = await electron$g.checkMasterKey();
64436
+ const { set: set2 } = await electron$h.checkMasterKey();
64303
64437
  if (!set2) {
64304
64438
  setPendingEncryptIdx(idx);
64305
64439
  return;
@@ -64336,9 +64470,9 @@ function EnvironmentEditor({ onClose }) {
64336
64470
  } : state.workspace
64337
64471
  }));
64338
64472
  const ws2 = useStore.getState().workspace;
64339
- if (ws2) await electron$g.saveWorkspace(ws2);
64473
+ if (ws2) await electron$h.saveWorkspace(ws2);
64340
64474
  }
64341
- await electron$g.saveEnvironment(newRelPath, env2);
64475
+ await electron$h.saveEnvironment(newRelPath, env2);
64342
64476
  }
64343
64477
  return /* @__PURE__ */ jsxRuntimeExports.jsxs(jsxRuntimeExports.Fragment, { children: [
64344
64478
  pendingEncryptIdx !== null && /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -64651,7 +64785,7 @@ function EnvironmentEditor({ onClose }) {
64651
64785
  )
64652
64786
  ] });
64653
64787
  }
64654
- const { electron: electron$f } = window;
64788
+ const { electron: electron$g } = window;
64655
64789
  function EnvironmentBar({ inline = false }) {
64656
64790
  const t2 = useT();
64657
64791
  const environments = useStore((s) => s.environments);
@@ -64667,7 +64801,7 @@ function EnvironmentBar({ inline = false }) {
64667
64801
  if (id2) {
64668
64802
  const hasSecrets = environments[id2]?.data.variables.some((v) => v.enabled && v.secret);
64669
64803
  if (hasSecrets) {
64670
- const { set: set2 } = await electron$f.checkMasterKey();
64804
+ const { set: set2 } = await electron$g.checkMasterKey();
64671
64805
  if (!set2) {
64672
64806
  setPendingEnvId(id2);
64673
64807
  return;
@@ -64717,7 +64851,7 @@ function EnvironmentBar({ inline = false }) {
64717
64851
  controls
64718
64852
  ] });
64719
64853
  }
64720
- const { electron: electron$e } = window;
64854
+ const { electron: electron$f } = window;
64721
64855
  const DEFAULT_PII_PATTERNS = ["authorization", "password", "token", "secret", "api-key", "x-api-key"];
64722
64856
  const ZOOM_STEPS = [0.75, 0.9, 1, 1.1, 1.25, 1.5];
64723
64857
  function WorkspaceSettingsModal({ onClose }) {
@@ -64751,8 +64885,8 @@ function WorkspaceSettingsModal({ onClose }) {
64751
64885
  async function testCloud() {
64752
64886
  setCloudTest({ status: "testing" });
64753
64887
  try {
64754
- if (cloudToken.trim()) await electron$e.setSecret("cloud:token", cloudToken.trim());
64755
- const me = await electron$e.cloudTest();
64888
+ if (cloudToken.trim()) await electron$f.setSecret("cloud:token", cloudToken.trim());
64889
+ const me = await electron$f.cloudTest();
64756
64890
  setCloudTest({ status: "ok", msg: t2("Connected as :email · :organization (:plan)", { email: me.email, organization: me.organization, plan: me.plan }) });
64757
64891
  } catch (e) {
64758
64892
  setCloudTest({ status: "err", msg: e.message });
@@ -64776,7 +64910,7 @@ function WorkspaceSettingsModal({ onClose }) {
64776
64910
  async function vaultOidcLogin() {
64777
64911
  setOidc({ status: "busy", msg: t2("Complete the sign-in in your browser…") });
64778
64912
  try {
64779
- const r = await electron$e.vaultOidcLogin({
64913
+ const r = await electron$f.vaultOidcLogin({
64780
64914
  address: vAddress.trim(),
64781
64915
  mount: vLoginMount.trim() || void 0,
64782
64916
  role: vJwtRole.trim() || void 0,
@@ -64828,7 +64962,7 @@ function WorkspaceSettingsModal({ onClose }) {
64828
64962
  } else {
64829
64963
  delete settings.cloud;
64830
64964
  }
64831
- if (cloudToken.trim()) await electron$e.setSecret("cloud:token", cloudToken.trim());
64965
+ if (cloudToken.trim()) await electron$f.setSecret("cloud:token", cloudToken.trim());
64832
64966
  if (defaultEnvironment) settings.defaultEnvironment = defaultEnvironment;
64833
64967
  else delete settings.defaultEnvironment;
64834
64968
  if (persistHistory) settings.persistHistory = true;
@@ -64855,9 +64989,9 @@ function WorkspaceSettingsModal({ onClose }) {
64855
64989
  else delete settings.secrets;
64856
64990
  updateWorkspaceSettings(settings);
64857
64991
  const updated = useStore.getState().workspace;
64858
- if (updated) await electron$e.saveWorkspace(updated);
64992
+ if (updated) await electron$f.saveWorkspace(updated);
64859
64993
  if (persistHistory) {
64860
- await electron$e.saveHistory(useStore.getState().history).catch(() => {
64994
+ await electron$f.saveHistory(useStore.getState().history).catch(() => {
64861
64995
  });
64862
64996
  }
64863
64997
  onClose();
@@ -65394,7 +65528,7 @@ function WorkspaceSettingsModal({ onClose }) {
65394
65528
  }
65395
65529
  );
65396
65530
  }
65397
- const { electron: electron$d } = window;
65531
+ const { electron: electron$e } = window;
65398
65532
  function DocsGeneratorModal({ onClose }) {
65399
65533
  const t2 = useT();
65400
65534
  const collections = useStore((s) => s.collections);
@@ -65435,9 +65569,9 @@ function DocsGeneratorModal({ onClose }) {
65435
65569
  setGenerating(true);
65436
65570
  setError(null);
65437
65571
  try {
65438
- const content2 = await electron$d.generateDocs(buildPayload());
65572
+ const content2 = await electron$e.generateDocs(buildPayload());
65439
65573
  const filename = format2 === "html" ? "api-docs.html" : "api-docs.md";
65440
- await electron$d.saveResults(content2, filename);
65574
+ await electron$e.saveResults(content2, filename);
65441
65575
  } catch (err) {
65442
65576
  setError(err instanceof Error ? err.message : String(err));
65443
65577
  } finally {
@@ -65448,7 +65582,7 @@ function DocsGeneratorModal({ onClose }) {
65448
65582
  setGenerating(true);
65449
65583
  setError(null);
65450
65584
  try {
65451
- const content2 = await electron$d.generateDocs(buildPayload());
65585
+ const content2 = await electron$e.generateDocs(buildPayload());
65452
65586
  setPreview(content2);
65453
65587
  } catch (err) {
65454
65588
  setError(err instanceof Error ? err.message : String(err));
@@ -65793,7 +65927,7 @@ function parseCurl(command2) {
65793
65927
  }
65794
65928
  return { name: name2, method: resolvedMethod, url, headers, params: [], auth, body };
65795
65929
  }
65796
- const { electron: electron$c } = window;
65930
+ const { electron: electron$d } = window;
65797
65931
  const OPTIONS = [
65798
65932
  { id: "postman", label: "Postman", description: "Collection v2.1 JSON" },
65799
65933
  { id: "openapi", label: "OpenAPI", description: "JSON or YAML (v3.x)", supportsUrl: true },
@@ -65869,12 +66003,12 @@ function ImportModal({ onImport, onClose }) {
65869
66003
  setError(null);
65870
66004
  try {
65871
66005
  let col = null;
65872
- if (opt.id === "postman") col = await electron$c.importPostman();
65873
- if (opt.id === "openapi") col = await electron$c.importOpenApi();
65874
- if (opt.id === "insomnia") col = await electron$c.importInsomnia();
65875
- if (opt.id === "bruno") col = await electron$c.importBruno();
65876
- if (opt.id === "http") col = await electron$c.importHttpFile();
65877
- if (opt.id === "spector") col = await electron$c.importSpectorCollection();
66006
+ if (opt.id === "postman") col = await electron$d.importPostman();
66007
+ if (opt.id === "openapi") col = await electron$d.importOpenApi();
66008
+ if (opt.id === "insomnia") col = await electron$d.importInsomnia();
66009
+ if (opt.id === "bruno") col = await electron$d.importBruno();
66010
+ if (opt.id === "http") col = await electron$d.importHttpFile();
66011
+ if (opt.id === "spector") col = await electron$d.importSpectorCollection();
65878
66012
  if (!col) {
65879
66013
  setLoading(false);
65880
66014
  return;
@@ -65897,7 +66031,7 @@ function ImportModal({ onImport, onClose }) {
65897
66031
  setLoading(true);
65898
66032
  setError(null);
65899
66033
  try {
65900
- const col = await electron$c.importOpenApiFromUrl(trimmed);
66034
+ const col = await electron$d.importOpenApiFromUrl(trimmed);
65901
66035
  if (col) enterPreview(col);
65902
66036
  } catch (err) {
65903
66037
  setError(err instanceof Error ? err.message : String(err));
@@ -66004,7 +66138,7 @@ function ImportModal({ onImport, onClose }) {
66004
66138
  mergeIntoCollection(target, prunedRoot, prunedRequests);
66005
66139
  const entry = useStore.getState().collections[target];
66006
66140
  if (entry) {
66007
- await electron$c.saveCollection(entry.relPath, entry.data);
66141
+ await electron$d.saveCollection(entry.relPath, entry.data);
66008
66142
  markCollectionClean(target);
66009
66143
  }
66010
66144
  setActiveCollection(target);
@@ -66031,7 +66165,7 @@ function ImportModal({ onImport, onClose }) {
66031
66165
  variables: [{ key: name2, value: value2, enabled: true }]
66032
66166
  };
66033
66167
  const relPath = envRelPath(finalName, envId);
66034
- await electron$c.saveEnvironment(relPath, env2);
66168
+ await electron$d.saveEnvironment(relPath, env2);
66035
66169
  useStore.setState((s) => {
66036
66170
  s.environments[envId] = { relPath, data: env2 };
66037
66171
  if (!s.activeEnvironmentId) s.activeEnvironmentId = envId;
@@ -66041,7 +66175,7 @@ function ImportModal({ onImport, onClose }) {
66041
66175
  return s;
66042
66176
  });
66043
66177
  const ws2 = useStore.getState().workspace;
66044
- if (ws2) await electron$c.saveWorkspace(ws2);
66178
+ if (ws2) await electron$d.saveWorkspace(ws2);
66045
66179
  } else {
66046
66180
  const entry = state.environments[envTarget];
66047
66181
  if (!entry) throw new Error(t2("Target environment not found"));
@@ -66056,7 +66190,7 @@ function ImportModal({ onImport, onClose }) {
66056
66190
  } else {
66057
66191
  updated.variables = [...updated.variables, { key: name2, value: value2, enabled: true }];
66058
66192
  }
66059
- await electron$c.saveEnvironment(entry.relPath, updated);
66193
+ await electron$d.saveEnvironment(entry.relPath, updated);
66060
66194
  useStore.getState().updateEnvironment(envTarget, updated);
66061
66195
  }
66062
66196
  }
@@ -66423,7 +66557,7 @@ function collectRequestsByFolder(folder2, src) {
66423
66557
  walk2(folder2);
66424
66558
  return out;
66425
66559
  }
66426
- const { electron: electron$b } = window;
66560
+ const { electron: electron$c } = window;
66427
66561
  function Toolbar({ onOpenDocs: _onOpenDocs }) {
66428
66562
  const t2 = useT();
66429
66563
  const { applyWorkspace } = useWorkspaceLoader();
@@ -66447,13 +66581,13 @@ function Toolbar({ onOpenDocs: _onOpenDocs }) {
66447
66581
  try {
66448
66582
  for (const { relPath, data, dirty } of Object.values(collections)) {
66449
66583
  if (!dirty) continue;
66450
- await electron$b.saveCollection(relPath, data);
66584
+ await electron$c.saveCollection(relPath, data);
66451
66585
  markCollectionClean(data.id);
66452
66586
  }
66453
66587
  for (const { relPath, data } of Object.values(environments)) {
66454
- await electron$b.saveEnvironment(relPath, data);
66588
+ await electron$c.saveEnvironment(relPath, data);
66455
66589
  }
66456
- if (workspace) await electron$b.saveWorkspace(workspace);
66590
+ if (workspace) await electron$c.saveWorkspace(workspace);
66457
66591
  } finally {
66458
66592
  setSaving(false);
66459
66593
  }
@@ -66461,14 +66595,14 @@ function Toolbar({ onOpenDocs: _onOpenDocs }) {
66461
66595
  async function afterImport(col) {
66462
66596
  if (!col) return;
66463
66597
  const relPath = colRelPath(col.name, col.id);
66464
- await electron$b.saveCollection(relPath, col);
66598
+ await electron$c.saveCollection(relPath, col);
66465
66599
  loadCollection(relPath, col);
66466
66600
  setActiveCollection(col.id);
66467
66601
  const ws2 = useStore.getState().workspace;
66468
66602
  if (ws2 && !ws2.collections.includes(relPath)) {
66469
66603
  const updated = { ...ws2, collections: [...ws2.collections, relPath] };
66470
66604
  useStore.setState({ workspace: updated });
66471
- await electron$b.saveWorkspace(updated);
66605
+ await electron$c.saveWorkspace(updated);
66472
66606
  }
66473
66607
  }
66474
66608
  if (!workspace) return null;
@@ -66557,7 +66691,7 @@ function Toolbar({ onOpenDocs: _onOpenDocs }) {
66557
66691
  "button",
66558
66692
  {
66559
66693
  onClick: async () => {
66560
- const result = await electron$b.openWorkspace();
66694
+ const result = await electron$c.openWorkspace();
66561
66695
  if (result) await applyWorkspace(result.workspace, result.workspacePath);
66562
66696
  },
66563
66697
  className: "px-2.5 py-1 text-xs bg-surface-800 hover:bg-surface-700 rounded transition-colors",
@@ -66569,7 +66703,7 @@ function Toolbar({ onOpenDocs: _onOpenDocs }) {
66569
66703
  "button",
66570
66704
  {
66571
66705
  onClick: async () => {
66572
- const result = await electron$b.newWorkspace();
66706
+ const result = await electron$c.newWorkspace();
66573
66707
  if (result) await applyWorkspace(result.workspace, result.workspacePath);
66574
66708
  },
66575
66709
  className: "px-2.5 py-1 text-xs bg-surface-800 hover:bg-surface-700 rounded transition-colors",
@@ -66581,7 +66715,7 @@ function Toolbar({ onOpenDocs: _onOpenDocs }) {
66581
66715
  "button",
66582
66716
  {
66583
66717
  onClick: async () => {
66584
- await electron$b.closeWorkspace();
66718
+ await electron$c.closeWorkspace();
66585
66719
  closeWorkspace();
66586
66720
  },
66587
66721
  className: "px-2.5 py-1 text-xs bg-surface-800 hover:bg-surface-700 rounded transition-colors",
@@ -67032,7 +67166,7 @@ api-tests:
67032
67166
  function EmptyState({ message }) {
67033
67167
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex items-center justify-center h-24 text-surface-400 text-xs", children: message });
67034
67168
  }
67035
- const { electron: electron$a } = window;
67169
+ const { electron: electron$b } = window;
67036
67170
  const HOOK_BADGE = {
67037
67171
  beforeAll: { label: "BEFORE ALL", cls: "bg-violet-700 text-white" },
67038
67172
  before: { label: "BEFORE", cls: "bg-violet-600 text-white" },
@@ -67153,13 +67287,13 @@ function RunnerModal() {
67153
67287
  setSummary(null);
67154
67288
  setRunnerRunning(true);
67155
67289
  progressIdxRef.current = 0;
67156
- electron$a.onRunProgress((result) => {
67290
+ electron$b.onRunProgress((result) => {
67157
67291
  const idx = progressIdxRef.current;
67158
67292
  patchRunnerResult(idx, result);
67159
67293
  if (result.status !== "running") progressIdxRef.current++;
67160
67294
  });
67161
67295
  try {
67162
- const s = await electron$a.runCollection({
67296
+ const s = await electron$b.runCollection({
67163
67297
  items: items2,
67164
67298
  environment: env2,
67165
67299
  globals,
@@ -67170,7 +67304,7 @@ function RunnerModal() {
67170
67304
  });
67171
67305
  setSummary(s);
67172
67306
  } finally {
67173
- electron$a.offRunProgress();
67307
+ electron$b.offRunProgress();
67174
67308
  setRunnerRunning(false);
67175
67309
  }
67176
67310
  }, [collectionId, folderId, filterTags, selectedEnvId, environments, globals, colEntry, requestDelay, workspaceSettings, setRunnerResults, patchRunnerResult, setRunnerRunning]);
@@ -67370,7 +67504,7 @@ function RunnerModal() {
67370
67504
  };
67371
67505
  const content2 = exportFormat === "junit" ? buildJUnitReport(runnerResults, summary, meta2) : exportFormat === "html" ? buildHtmlReport(runnerResults, summary, meta2) : buildJsonReport(runnerResults, summary, meta2);
67372
67506
  const ext = exportFormat === "junit" ? "xml" : exportFormat === "html" ? "html" : "json";
67373
- electron$a.saveResults(content2, `spector-results.${ext}`);
67507
+ electron$b.saveResults(content2, `spector-results.${ext}`);
67374
67508
  },
67375
67509
  className: "px-2.5 py-0.5 bg-surface-800 hover:bg-surface-700 rounded transition-colors text-[11px] whitespace-nowrap",
67376
67510
  children: t2("Export results")
@@ -67734,7 +67868,7 @@ function toApiRequest(test, id2) {
67734
67868
  meta: { tags: [test.category] }
67735
67869
  };
67736
67870
  }
67737
- const { electron: electron$9 } = window;
67871
+ const { electron: electron$a } = window;
67738
67872
  function Bar({ pct }) {
67739
67873
  const color = pct >= 80 ? "bg-emerald-500" : pct >= 50 ? "bg-amber-500" : "bg-red-500";
67740
67874
  return /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "h-2 w-full rounded bg-surface-800 overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: `h-full ${color}`, style: { width: `${pct}%` } }) });
@@ -67787,7 +67921,7 @@ function CoverageModal() {
67787
67921
  setError(null);
67788
67922
  try {
67789
67923
  const isUrl = /^https?:\/\//i.test(source.trim());
67790
- const spec22 = await electron$9.coverageLoadSpec(
67924
+ const spec22 = await electron$a.coverageLoadSpec(
67791
67925
  pasted.trim() ? { text: pasted } : isUrl ? { url: source.trim() } : { path: source.trim() }
67792
67926
  );
67793
67927
  if (source.trim() && !pasted.trim()) setCoverageSpec(source.trim());
@@ -68061,7 +68195,7 @@ function summarizeDiff(changes) {
68061
68195
  nonBreaking: changes.filter((c) => !c.breaking).length
68062
68196
  };
68063
68197
  }
68064
- const { electron: electron$8 } = window;
68198
+ const { electron: electron$9 } = window;
68065
68199
  function SpecField({ label, value: value2, onSource, onText }) {
68066
68200
  const t2 = useT();
68067
68201
  return /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1", children: [
@@ -68110,7 +68244,7 @@ function CompareModal() {
68110
68244
  }
68111
68245
  return out;
68112
68246
  }, [collections]);
68113
- const load2 = (i) => electron$8.coverageLoadSpec(i.text.trim() ? { text: i.text } : /^https?:\/\//i.test(i.source.trim()) ? { url: i.source.trim() } : { path: i.source.trim() });
68247
+ const load2 = (i) => electron$9.coverageLoadSpec(i.text.trim() ? { text: i.text } : /^https?:\/\//i.test(i.source.trim()) ? { url: i.source.trim() } : { path: i.source.trim() });
68114
68248
  async function run() {
68115
68249
  setBusy(true);
68116
68250
  setError(null);
@@ -68391,7 +68525,7 @@ function PushToCloudModal({ mock, onClose }) {
68391
68525
  }
68392
68526
  );
68393
68527
  }
68394
- const { electron: electron$7 } = window;
68528
+ const { electron: electron$8 } = window;
68395
68529
  function MockPanel() {
68396
68530
  const t2 = useT();
68397
68531
  const [pushTarget, setPushTarget] = reactExports.useState(null);
@@ -68422,15 +68556,15 @@ function MockPanel() {
68422
68556
  setWsdlImporting(true);
68423
68557
  try {
68424
68558
  const existingPorts = mockList.map((m) => m.data.port);
68425
- const { mock } = await electron$7.wsdlImport({ url: wsdlUrl.trim(), existingMockPorts: existingPorts });
68559
+ const { mock } = await electron$8.wsdlImport({ url: wsdlUrl.trim(), existingMockPorts: existingPorts });
68426
68560
  const relPath = `mocks/${mock.id}.mock.json`;
68427
68561
  loadMock(relPath, mock);
68428
- await electron$7.saveMock(relPath, mock);
68562
+ await electron$8.saveMock(relPath, mock);
68429
68563
  const ws2 = useStore.getState().workspace;
68430
68564
  if (ws2) {
68431
68565
  if (!ws2.mocks) ws2.mocks = [];
68432
68566
  ws2.mocks.push(relPath);
68433
- await electron$7.saveWorkspace(ws2);
68567
+ await electron$8.saveWorkspace(ws2);
68434
68568
  }
68435
68569
  setActiveMock(mock.id);
68436
68570
  setWsdlOpen(false);
@@ -68444,12 +68578,12 @@ function MockPanel() {
68444
68578
  async function handleAddMock() {
68445
68579
  addMock();
68446
68580
  const ws2 = useStore.getState().workspace;
68447
- if (ws2) await electron$7.saveWorkspace(ws2);
68581
+ if (ws2) await electron$8.saveWorkspace(ws2);
68448
68582
  const state = useStore.getState();
68449
68583
  const newId = state.activeMockId;
68450
68584
  if (newId) {
68451
68585
  const entry = state.mocks[newId];
68452
- await electron$7.saveMock(entry.relPath, entry.data);
68586
+ await electron$8.saveMock(entry.relPath, entry.data);
68453
68587
  setActiveMock(newId);
68454
68588
  }
68455
68589
  }
@@ -68457,15 +68591,15 @@ function MockPanel() {
68457
68591
  e.stopPropagation();
68458
68592
  const entry = useStore.getState().mocks[mockId];
68459
68593
  if (!entry) return;
68460
- if (entry.running) await electron$7.mockStop(mockId);
68594
+ if (entry.running) await electron$8.mockStop(mockId);
68461
68595
  deleteMock(mockId);
68462
68596
  const ws2 = useStore.getState().workspace;
68463
- if (ws2) await electron$7.saveWorkspace(ws2);
68597
+ if (ws2) await electron$8.saveWorkspace(ws2);
68464
68598
  }
68465
68599
  async function handleStartRecorder() {
68466
68600
  setRecorderError("");
68467
68601
  try {
68468
- await electron$7.recordStart({ upstream: recorderUpstream, port: recorderPort });
68602
+ await electron$8.recordStart({ upstream: recorderUpstream, port: recorderPort });
68469
68603
  setRecorderRunning(true);
68470
68604
  } catch (err) {
68471
68605
  setRecorderError(err instanceof Error ? err.message : String(err));
@@ -68477,12 +68611,12 @@ function MockPanel() {
68477
68611
  if (!entry) return;
68478
68612
  try {
68479
68613
  if (entry.running) {
68480
- await electron$7.mockStop(mockId);
68614
+ await electron$8.mockStop(mockId);
68481
68615
  setRunning(mockId, false);
68482
68616
  } else {
68483
68617
  const latest2 = useStore.getState().mocks[mockId].data;
68484
- await electron$7.saveMock(entry.relPath, latest2);
68485
- await electron$7.mockStart(latest2);
68618
+ await electron$8.saveMock(entry.relPath, latest2);
68619
+ await electron$8.mockStart(latest2);
68486
68620
  setRunning(mockId, true);
68487
68621
  }
68488
68622
  } catch {
@@ -68682,7 +68816,7 @@ function MockPanel() {
68682
68816
  }) })
68683
68817
  ] });
68684
68818
  }
68685
- const { electron: electron$6 } = window;
68819
+ const { electron: electron$7 } = window;
68686
68820
  const METHODS_PLUS_ANY = ["ANY", "GET", "POST", "PUT", "PATCH", "DELETE", "HEAD", "OPTIONS", "QUERY"];
68687
68821
  function RouteRow({
68688
68822
  route,
@@ -69101,20 +69235,20 @@ function MockDetailPanel({ mockId }) {
69101
69235
  const routes = mock.routes ?? [];
69102
69236
  async function save(updated) {
69103
69237
  updateMock(mock.id, updated);
69104
- await electron$6.saveMock(entry.relPath, updated);
69105
- if (running) await electron$6.mockUpdateRoutes(mock.id, updated.routes ?? []);
69106
- if (workspace) await electron$6.saveWorkspace(workspace);
69238
+ await electron$7.saveMock(entry.relPath, updated);
69239
+ if (running) await electron$7.mockUpdateRoutes(mock.id, updated.routes ?? []);
69240
+ if (workspace) await electron$7.saveWorkspace(workspace);
69107
69241
  }
69108
69242
  async function toggleRunning() {
69109
69243
  setError(null);
69110
69244
  try {
69111
69245
  if (running) {
69112
- await electron$6.mockStop(mock.id);
69246
+ await electron$7.mockStop(mock.id);
69113
69247
  setRunning(mock.id, false);
69114
69248
  } else {
69115
69249
  const latest2 = useStore.getState().mocks[mock.id].data;
69116
- await electron$6.saveMock(entry.relPath, latest2);
69117
- await electron$6.mockStart(latest2);
69250
+ await electron$7.saveMock(entry.relPath, latest2);
69251
+ await electron$7.mockStart(latest2);
69118
69252
  setRunning(mock.id, true);
69119
69253
  }
69120
69254
  } catch (e) {
@@ -69240,7 +69374,7 @@ function MockDetailPanel({ mockId }) {
69240
69374
  "button",
69241
69375
  {
69242
69376
  onClick: () => {
69243
- if (running) electron$6.mockStop(mock.id);
69377
+ if (running) electron$7.mockStop(mock.id);
69244
69378
  deleteMock(mock.id);
69245
69379
  setActive2(null);
69246
69380
  },
@@ -69307,7 +69441,7 @@ function MockDetailPanel({ mockId }) {
69307
69441
  ] })
69308
69442
  ] });
69309
69443
  }
69310
- const { electron: electron$5 } = window;
69444
+ const { electron: electron$6 } = window;
69311
69445
  function statusColor$1(status) {
69312
69446
  if (status === 0) return "text-yellow-400";
69313
69447
  if (status < 300) return "text-emerald-400";
@@ -69341,7 +69475,7 @@ function RecorderPanel({ onImportMock, onClose, defaultTargetMockId }) {
69341
69475
  const upstream = useStore((s) => s.recorderUpstream);
69342
69476
  const mockList = Object.values(useStore((s) => s.mocks));
69343
69477
  reactExports.useEffect(() => {
69344
- electron$5.onRecordHit((entry) => {
69478
+ electron$6.onRecordHit((entry) => {
69345
69479
  setEntries((prev) => {
69346
69480
  const next = [...prev, entry];
69347
69481
  setTimeout(() => {
@@ -69351,12 +69485,12 @@ function RecorderPanel({ onImportMock, onClose, defaultTargetMockId }) {
69351
69485
  });
69352
69486
  });
69353
69487
  return () => {
69354
- electron$5.offRecordHit();
69488
+ electron$6.offRecordHit();
69355
69489
  };
69356
69490
  }, []);
69357
69491
  async function handleStop() {
69358
69492
  try {
69359
- const s = await electron$5.recordStop();
69493
+ const s = await electron$6.recordStop();
69360
69494
  setSession(s);
69361
69495
  setStopped(true);
69362
69496
  } catch {
@@ -69591,7 +69725,7 @@ function designContractToMock(cc, port = 4100) {
69591
69725
  routes
69592
69726
  };
69593
69727
  }
69594
- const { electron: electron$4 } = window;
69728
+ const { electron: electron$5 } = window;
69595
69729
  function uid() {
69596
69730
  try {
69597
69731
  return crypto.randomUUID();
@@ -69661,7 +69795,7 @@ function ContractDesignerModal({ onClose }) {
69661
69795
  const updated = { ...workspace, designContracts: next };
69662
69796
  setWorkspace(updated, workspacePath ?? "");
69663
69797
  try {
69664
- await electron$4.saveWorkspace(updated);
69798
+ await electron$5.saveWorkspace(updated);
69665
69799
  } catch (e) {
69666
69800
  show(e.message, false);
69667
69801
  }
@@ -69689,7 +69823,7 @@ function ContractDesignerModal({ onClose }) {
69689
69823
  async function saveLocally() {
69690
69824
  if (!selected) return;
69691
69825
  try {
69692
- const relPath = await electron$4.exportDesignPact(selected);
69826
+ const relPath = await electron$5.exportDesignPact(selected);
69693
69827
  if (relPath) show(t2("Saved :path in the workspace", { path: relPath }), true);
69694
69828
  } catch (e) {
69695
69829
  show(e.message, false);
@@ -69708,9 +69842,9 @@ function ContractDesignerModal({ onClose }) {
69708
69842
  }
69709
69843
  const mock = { ...designContractToMock(selected), id: id2, name: t2(":consumer → :provider (contract mock)", { consumer: selected.consumer, provider: selected.provider }) };
69710
69844
  updateMock(id2, mock);
69711
- await electron$4.saveMock(entry.relPath, mock);
69845
+ await electron$5.saveMock(entry.relPath, mock);
69712
69846
  const ws2 = useStore.getState().workspace;
69713
- if (ws2) await electron$4.saveWorkspace(ws2);
69847
+ if (ws2) await electron$5.saveWorkspace(ws2);
69714
69848
  show(t2("Created mock with :count route — open the Mocks panel to run it|Created mock with :count routes — open the Mocks panel to run it", { count: mock.routes.length }), true);
69715
69849
  } catch (e) {
69716
69850
  show(e.message, false);
@@ -69720,7 +69854,7 @@ function ContractDesignerModal({ onClose }) {
69720
69854
  if (!selected) return;
69721
69855
  setBusy(true);
69722
69856
  try {
69723
- const res = await electron$4.cloudPushDesignContract({ contract: selected, consumerVersion: version });
69857
+ const res = await electron$5.cloudPushDesignContract({ contract: selected, consumerVersion: version });
69724
69858
  const v = res.verification;
69725
69859
  if (v && !v.success) {
69726
69860
  const failed = v.checks.filter((c) => !c.passed).map((c) => c.interaction).join(", ");
@@ -70031,7 +70165,7 @@ function ContractDesignerModal({ onClose }) {
70031
70165
  }
70032
70166
  );
70033
70167
  }
70034
- const { electron: electron$3 } = window;
70168
+ const { electron: electron$4 } = window;
70035
70169
  function ContractPanel({ fuzzReport, setFuzzReport }) {
70036
70170
  const collections = useStore((s) => s.collections);
70037
70171
  const environments = useStore((s) => s.environments);
@@ -70058,7 +70192,7 @@ function ContractPanel({ fuzzReport, setFuzzReport }) {
70058
70192
  setPublishNote(null);
70059
70193
  setPublishingSpec(true);
70060
70194
  try {
70061
- const res = await electron$3.cloudPushSpec({
70195
+ const res = await electron$4.cloudPushSpec({
70062
70196
  pacticipant: providerName.trim(),
70063
70197
  version: specVersion.trim(),
70064
70198
  specUrl: specUrl.trim()
@@ -70113,7 +70247,7 @@ function ContractPanel({ fuzzReport, setFuzzReport }) {
70113
70247
  setReport(null);
70114
70248
  try {
70115
70249
  const requests = mode === "provider" ? allRequests : contractRequests;
70116
- const result = await electron$3.runContracts({
70250
+ const result = await electron$4.runContracts({
70117
70251
  mode,
70118
70252
  requests,
70119
70253
  // Let the main process add design-first contracts (Designer + pacts/) for
@@ -70148,7 +70282,7 @@ function ContractPanel({ fuzzReport, setFuzzReport }) {
70148
70282
  setError(null);
70149
70283
  setFuzzReport(null);
70150
70284
  try {
70151
- const result = await electron$3.fuzzContracts({
70285
+ const result = await electron$4.fuzzContracts({
70152
70286
  requests: allRequests,
70153
70287
  // fuzz every request in the workspace, like provider mode
70154
70288
  envVars,
@@ -70179,11 +70313,11 @@ function ContractPanel({ fuzzReport, setFuzzReport }) {
70179
70313
  setCapturing(true);
70180
70314
  setError(null);
70181
70315
  try {
70182
- const { relPath, snapshot } = await electron$3.captureContractSnapshot({ specUrl: specUrl.trim() });
70316
+ const { relPath, snapshot } = await electron$4.captureContractSnapshot({ specUrl: specUrl.trim() });
70183
70317
  loadContractSnapshot(relPath, snapshot);
70184
70318
  setActiveSnapshot(relPath);
70185
70319
  const ws2 = useStore.getState().workspace;
70186
- if (ws2) await electron$3.saveWorkspace(ws2);
70320
+ if (ws2) await electron$4.saveWorkspace(ws2);
70187
70321
  } catch (e) {
70188
70322
  setError(e instanceof Error ? e.message : String(e));
70189
70323
  } finally {
@@ -70194,10 +70328,10 @@ function ContractPanel({ fuzzReport, setFuzzReport }) {
70194
70328
  if (!activeSnapshotRelPath) return;
70195
70329
  const relPath = activeSnapshotRelPath;
70196
70330
  try {
70197
- await electron$3.deleteContractSnapshot(relPath);
70331
+ await electron$4.deleteContractSnapshot(relPath);
70198
70332
  removeContractSnapshot(relPath);
70199
70333
  const ws2 = useStore.getState().workspace;
70200
- if (ws2) await electron$3.saveWorkspace(ws2);
70334
+ if (ws2) await electron$4.saveWorkspace(ws2);
70201
70335
  } catch (e) {
70202
70336
  setError(e instanceof Error ? e.message : String(e));
70203
70337
  }
@@ -70854,7 +70988,7 @@ function ciFilePath(platform) {
70854
70988
  if (platform === "azure") return "azure-pipelines.yml";
70855
70989
  return "ci.yml";
70856
70990
  }
70857
- const { electron: electron$2 } = window;
70991
+ const { electron: electron$3 } = window;
70858
70992
  function StatusBadge({ status }) {
70859
70993
  const map = {
70860
70994
  modified: { label: "M", color: "text-amber-400" },
@@ -70889,7 +71023,7 @@ function ChangesTab({ status, onRefresh }) {
70889
71023
  setDiffStaged(staged);
70890
71024
  useStore.getState().setActiveGitDiff({ path: file.path, staged });
70891
71025
  try {
70892
- const d = staged ? await electron$2.gitDiffStaged(file.path) : await electron$2.gitDiff(file.path);
71026
+ const d = staged ? await electron$3.gitDiffStaged(file.path) : await electron$3.gitDiff(file.path);
70893
71027
  setDiff(d);
70894
71028
  } catch {
70895
71029
  setDiff("");
@@ -70897,7 +71031,7 @@ function ChangesTab({ status, onRefresh }) {
70897
71031
  }
70898
71032
  async function stage(paths) {
70899
71033
  try {
70900
- await electron$2.gitStage(paths);
71034
+ await electron$3.gitStage(paths);
70901
71035
  onRefresh();
70902
71036
  } catch (e) {
70903
71037
  setError(String(e));
@@ -70905,7 +71039,7 @@ function ChangesTab({ status, onRefresh }) {
70905
71039
  }
70906
71040
  async function unstage(paths) {
70907
71041
  try {
70908
- await electron$2.gitUnstage(paths);
71042
+ await electron$3.gitUnstage(paths);
70909
71043
  onRefresh();
70910
71044
  } catch (e) {
70911
71045
  setError(String(e));
@@ -70913,7 +71047,7 @@ function ChangesTab({ status, onRefresh }) {
70913
71047
  }
70914
71048
  async function stageAll() {
70915
71049
  try {
70916
- await electron$2.gitStageAll();
71050
+ await electron$3.gitStageAll();
70917
71051
  onRefresh();
70918
71052
  } catch (e) {
70919
71053
  setError(String(e));
@@ -70923,7 +71057,7 @@ function ChangesTab({ status, onRefresh }) {
70923
71057
  if (!message.trim()) return;
70924
71058
  try {
70925
71059
  setError(null);
70926
- await electron$2.gitCommit(message.trim());
71060
+ await electron$3.gitCommit(message.trim());
70927
71061
  setMessage("");
70928
71062
  onRefresh();
70929
71063
  } catch (e) {
@@ -70933,7 +71067,7 @@ function ChangesTab({ status, onRefresh }) {
70933
71067
  async function pull() {
70934
71068
  setPulling(true);
70935
71069
  try {
70936
- await electron$2.gitPull();
71070
+ await electron$3.gitPull();
70937
71071
  showToast(t2("Pull successful"), true);
70938
71072
  onRefresh();
70939
71073
  } catch (e) {
@@ -70945,7 +71079,7 @@ function ChangesTab({ status, onRefresh }) {
70945
71079
  async function push2() {
70946
71080
  setPushing(true);
70947
71081
  try {
70948
- await electron$2.gitPush(!status.remote);
71082
+ await electron$3.gitPush(!status.remote);
70949
71083
  showToast(t2("Push successful"), true);
70950
71084
  onRefresh();
70951
71085
  } catch (e) {
@@ -70956,9 +71090,9 @@ function ChangesTab({ status, onRefresh }) {
70956
71090
  }
70957
71091
  async function resolveConflict(path, mode) {
70958
71092
  try {
70959
- if (mode === "ours") await electron$2.gitResolveOurs(path);
70960
- else if (mode === "theirs") await electron$2.gitResolveTheirs(path);
70961
- else await electron$2.gitMarkResolved(path);
71093
+ if (mode === "ours") await electron$3.gitResolveOurs(path);
71094
+ else if (mode === "theirs") await electron$3.gitResolveTheirs(path);
71095
+ else await electron$3.gitMarkResolved(path);
70962
71096
  if (diffFile === path) setDiffFile(null);
70963
71097
  onRefresh();
70964
71098
  } catch (e) {
@@ -71194,7 +71328,7 @@ function LogTab() {
71194
71328
  const [commits, setCommits] = reactExports.useState([]);
71195
71329
  const [loading, setLoading] = reactExports.useState(true);
71196
71330
  reactExports.useEffect(() => {
71197
- electron$2.gitLog(100).then(setCommits).catch(() => setCommits([])).finally(() => setLoading(false));
71331
+ electron$3.gitLog(100).then(setCommits).catch(() => setCommits([])).finally(() => setLoading(false));
71198
71332
  }, []);
71199
71333
  if (loading) return /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-surface-500 px-3 py-4", children: t2("Loading…") });
71200
71334
  if (commits.length === 0) return /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-xs text-surface-500 px-3 py-4", children: t2("No commits yet.") });
@@ -71226,7 +71360,7 @@ function BranchesTab({ onRefresh }) {
71226
71360
  const [filter, setFilter] = reactExports.useState("");
71227
71361
  const load2 = reactExports.useCallback(() => {
71228
71362
  setLoadError(null);
71229
- Promise.all([electron$2.gitBranches(), electron$2.gitRemotes()]).then(([b, r]) => {
71363
+ Promise.all([electron$3.gitBranches(), electron$3.gitRemotes()]).then(([b, r]) => {
71230
71364
  setBranches(b);
71231
71365
  setRemotes(r);
71232
71366
  }).catch((err) => {
@@ -71241,7 +71375,7 @@ function BranchesTab({ onRefresh }) {
71241
71375
  try {
71242
71376
  setError(null);
71243
71377
  const localName = remote2 ? name2.replace(/^origin\//, "") : name2;
71244
- await electron$2.gitCheckout(localName, false);
71378
+ await electron$3.gitCheckout(localName, false);
71245
71379
  load2();
71246
71380
  onRefresh();
71247
71381
  } catch (e) {
@@ -71252,7 +71386,7 @@ function BranchesTab({ onRefresh }) {
71252
71386
  if (!newBranch.trim()) return;
71253
71387
  try {
71254
71388
  setError(null);
71255
- await electron$2.gitCheckout(newBranch.trim(), true);
71389
+ await electron$3.gitCheckout(newBranch.trim(), true);
71256
71390
  setNewBranch("");
71257
71391
  setCreating(false);
71258
71392
  load2();
@@ -71265,7 +71399,7 @@ function BranchesTab({ onRefresh }) {
71265
71399
  if (!remoteName.trim() || !remoteUrl.trim()) return;
71266
71400
  try {
71267
71401
  setError(null);
71268
- await electron$2.gitAddRemote(remoteName.trim(), remoteUrl.trim());
71402
+ await electron$3.gitAddRemote(remoteName.trim(), remoteUrl.trim());
71269
71403
  setRemoteName("origin");
71270
71404
  setRemoteUrl("");
71271
71405
  setAddingRemote(false);
@@ -71282,7 +71416,7 @@ function BranchesTab({ onRefresh }) {
71282
71416
  if (!editUrl.trim()) return;
71283
71417
  try {
71284
71418
  setError(null);
71285
- await electron$2.gitSetRemoteUrl(name2, editUrl.trim());
71419
+ await electron$3.gitSetRemoteUrl(name2, editUrl.trim());
71286
71420
  setEditingRemote(null);
71287
71421
  load2();
71288
71422
  } catch (e) {
@@ -71292,7 +71426,7 @@ function BranchesTab({ onRefresh }) {
71292
71426
  async function removeRemote(name2) {
71293
71427
  try {
71294
71428
  setError(null);
71295
- await electron$2.gitRemoveRemote(name2);
71429
+ await electron$3.gitRemoveRemote(name2);
71296
71430
  load2();
71297
71431
  } catch (e) {
71298
71432
  setError(String(e));
@@ -71303,10 +71437,10 @@ function BranchesTab({ onRefresh }) {
71303
71437
  try {
71304
71438
  setError(null);
71305
71439
  try {
71306
- await electron$2.gitDeleteBranch(name2, false);
71440
+ await electron$3.gitDeleteBranch(name2, false);
71307
71441
  } catch {
71308
71442
  if (!confirm(t2(`":name" isn't fully merged. Force delete?`, { name: name2 }))) return;
71309
- await electron$2.gitDeleteBranch(name2, true);
71443
+ await electron$3.gitDeleteBranch(name2, true);
71310
71444
  }
71311
71445
  load2();
71312
71446
  onRefresh();
@@ -71503,7 +71637,7 @@ function CiTab() {
71503
71637
  const [written, setWritten] = reactExports.useState(false);
71504
71638
  const [error2, setError] = reactExports.useState(null);
71505
71639
  reactExports.useEffect(() => {
71506
- electron$2.gitRemotes().then((r) => {
71640
+ electron$3.gitRemotes().then((r) => {
71507
71641
  setRemotes(r);
71508
71642
  const detected = detectPlatform(r);
71509
71643
  setPlatform(detected);
@@ -71524,7 +71658,7 @@ function CiTab() {
71524
71658
  async function write() {
71525
71659
  try {
71526
71660
  setError(null);
71527
- await electron$2.gitWriteCiFile(ciFilePath(platform), preview2);
71661
+ await electron$3.gitWriteCiFile(ciFilePath(platform), preview2);
71528
71662
  setWritten(true);
71529
71663
  } catch (e) {
71530
71664
  setError(String(e));
@@ -71613,9 +71747,9 @@ function GitPanel() {
71613
71747
  const [loading, setLoading] = reactExports.useState(true);
71614
71748
  const refresh = reactExports.useCallback(async () => {
71615
71749
  try {
71616
- const repo = await electron$2.gitIsRepo();
71750
+ const repo = await electron$3.gitIsRepo();
71617
71751
  setIsRepo(repo);
71618
- if (repo) setStatus(await electron$2.gitStatus());
71752
+ if (repo) setStatus(await electron$3.gitStatus());
71619
71753
  } catch {
71620
71754
  setIsRepo(false);
71621
71755
  } finally {
@@ -71635,7 +71769,7 @@ function GitPanel() {
71635
71769
  "button",
71636
71770
  {
71637
71771
  onClick: async () => {
71638
- await electron$2.gitInit();
71772
+ await electron$3.gitInit();
71639
71773
  refresh();
71640
71774
  },
71641
71775
  className: "px-3 py-1.5 bg-surface-800 hover:bg-surface-700 rounded text-xs transition-colors",
@@ -71675,7 +71809,7 @@ function GitPanel() {
71675
71809
  tab === "ci" && /* @__PURE__ */ jsxRuntimeExports.jsx(CiTab, {})
71676
71810
  ] });
71677
71811
  }
71678
- const { electron: electron$1 } = window;
71812
+ const { electron: electron$2 } = window;
71679
71813
  function GitDiffPane() {
71680
71814
  const t2 = useT();
71681
71815
  const active2 = useStore((s) => s.activeGitDiff);
@@ -71690,7 +71824,7 @@ function GitDiffPane() {
71690
71824
  setError(null);
71691
71825
  (async () => {
71692
71826
  try {
71693
- const d = active2.staged ? await electron$1.gitDiffStaged(active2.path) : await electron$1.gitDiff(active2.path);
71827
+ const d = active2.staged ? await electron$2.gitDiffStaged(active2.path) : await electron$2.gitDiff(active2.path);
71694
71828
  if (!cancelled) setDiff(d);
71695
71829
  } catch (err) {
71696
71830
  if (!cancelled) setError(err instanceof Error ? err.message : String(err));
@@ -71855,6 +71989,67 @@ function CommandPalette() {
71855
71989
  }
71856
71990
  );
71857
71991
  }
71992
+ const { electron: electron$1 } = window;
71993
+ const DISMISS_KEY = "apiSpectorUpdateSkipped";
71994
+ function UpdateModal() {
71995
+ const t2 = useT();
71996
+ const [info, setInfo] = reactExports.useState(null);
71997
+ const [copied, setCopied] = reactExports.useState(false);
71998
+ reactExports.useEffect(() => {
71999
+ let cancelled = false;
72000
+ electron$1.checkForUpdate().then((u) => {
72001
+ if (cancelled || !u?.updateAvailable) return;
72002
+ let skipped2 = "";
72003
+ try {
72004
+ skipped2 = localStorage.getItem(DISMISS_KEY) ?? "";
72005
+ } catch {
72006
+ }
72007
+ if (u.latest !== skipped2) setInfo(u);
72008
+ }).catch(() => {
72009
+ });
72010
+ return () => {
72011
+ cancelled = true;
72012
+ };
72013
+ }, []);
72014
+ if (!info) return null;
72015
+ const later = () => setInfo(null);
72016
+ const skip = () => {
72017
+ try {
72018
+ localStorage.setItem(DISMISS_KEY, info.latest);
72019
+ } catch {
72020
+ }
72021
+ setInfo(null);
72022
+ };
72023
+ const copy2 = () => {
72024
+ navigator.clipboard.writeText(info.command).then(() => {
72025
+ setCopied(true);
72026
+ setTimeout(() => setCopied(false), 1500);
72027
+ }).catch(() => {
72028
+ });
72029
+ };
72030
+ return /* @__PURE__ */ jsxRuntimeExports.jsx(
72031
+ Modal,
72032
+ {
72033
+ onClose: later,
72034
+ title: t2("Update available"),
72035
+ panelClassName: "bg-surface-900 border border-surface-800 rounded-lg shadow-2xl flex flex-col w-[26rem]",
72036
+ children: /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "p-4 flex flex-col gap-3 text-sm", children: [
72037
+ /* @__PURE__ */ jsxRuntimeExports.jsx("p", { className: "text-surface-200", children: t2("API Spector :latest is available. You have :current.", { latest: info.latest, current: info.current }) }),
72038
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { children: [
72039
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-[10px] uppercase tracking-wider text-surface-500 mb-1", children: t2("Update with") }),
72040
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex items-center gap-1", children: [
72041
+ /* @__PURE__ */ jsxRuntimeExports.jsx("code", { className: "flex-1 text-[11px] font-mono text-blue-300 bg-black/40 border border-surface-800 rounded px-2 py-1.5 select-all break-all", children: info.command }),
72042
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: copy2, className: "px-2 py-1.5 text-xs rounded bg-surface-700 hover:bg-surface-600 transition-colors", children: copied ? t2("Copied") : t2("Copy") })
72043
+ ] })
72044
+ ] }),
72045
+ /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex justify-end gap-2 pt-1", children: [
72046
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: skip, className: "px-3 py-1.5 text-xs rounded border border-surface-700 text-surface-300 hover:bg-surface-800 transition-colors", children: t2("Skip this version") }),
72047
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: later, className: "px-3 py-1.5 text-xs rounded bg-blue-700 hover:bg-blue-600 text-white transition-colors", children: t2("Later") })
72048
+ ] })
72049
+ ] })
72050
+ }
72051
+ );
72052
+ }
71858
72053
  const { electron } = window;
71859
72054
  function IconCollections() {
71860
72055
  return /* @__PURE__ */ jsxRuntimeExports.jsx("svg", { viewBox: "0 0 20 20", fill: "currentColor", width: "18", height: "18", children: /* @__PURE__ */ jsxRuntimeExports.jsx("path", { d: "M2 6a2 2 0 012-2h4l2 2h4a2 2 0 012 2v6a2 2 0 01-2 2H4a2 2 0 01-2-2V6z" }) });
@@ -72119,6 +72314,7 @@ function App() {
72119
72314
  /* @__PURE__ */ jsxRuntimeExports.jsx(CoverageModal, {}),
72120
72315
  /* @__PURE__ */ jsxRuntimeExports.jsx(CompareModal, {}),
72121
72316
  /* @__PURE__ */ jsxRuntimeExports.jsx(CommandPalette, {}),
72317
+ /* @__PURE__ */ jsxRuntimeExports.jsx(UpdateModal, {}),
72122
72318
  docsModalOpen && /* @__PURE__ */ jsxRuntimeExports.jsx(DocsGeneratorModal, { onClose: () => setDocsModalOpen(false) }),
72123
72319
  window.electron.platform !== "win32" && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "drag-region flex-shrink-0 bg-surface-950 flex items-center justify-center", children: /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "no-drag text-[11px] font-medium tracking-widest select-none", style: { color: "var(--text-muted)" }, children: [
72124
72320
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "var(--wordmark-muted)" }, children: "API" }),
@@ -72126,7 +72322,7 @@ function App() {
72126
72322
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#6aa3c8" }, children: "Spector" }),
72127
72323
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-2 text-[10px] font-normal opacity-50", children: [
72128
72324
  "v",
72129
- "0.5.4"
72325
+ "0.5.5"
72130
72326
  ] }),
72131
72327
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "mx-2 opacity-30", children: "·" }),
72132
72328
  /* @__PURE__ */ jsxRuntimeExports.jsx(
@@ -72390,7 +72586,18 @@ function App() {
72390
72586
  )
72391
72587
  }
72392
72588
  ),
72393
- responseOpen && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 flex flex-col overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(ResponseViewer, {}) })
72589
+ responseOpen && /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-w-0 flex flex-col overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(
72590
+ ErrorBoundary,
72591
+ {
72592
+ resetKey: activeTabId,
72593
+ fallback: (error2, reset) => /* @__PURE__ */ jsxRuntimeExports.jsxs("div", { className: "flex-1 min-h-0 flex flex-col items-center justify-center gap-3 p-6 text-center", children: [
72594
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-sm font-medium text-red-400", children: t2("The response view hit an error") }),
72595
+ /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "text-xs text-surface-500 max-w-md whitespace-pre-wrap break-words font-mono", children: error2.message }),
72596
+ /* @__PURE__ */ jsxRuntimeExports.jsx("button", { onClick: reset, className: "px-3 py-1 text-xs rounded bg-surface-700 hover:bg-surface-600 transition-colors", children: t2("Dismiss") })
72597
+ ] }),
72598
+ children: /* @__PURE__ */ jsxRuntimeExports.jsx(ResponseViewer, {})
72599
+ }
72600
+ ) })
72394
72601
  ] }) : /* @__PURE__ */ jsxRuntimeExports.jsx("div", { className: "flex-1 min-h-0", children: /* @__PURE__ */ jsxRuntimeExports.jsx(CollectionPanel, {}) })
72395
72602
  ] }),
72396
72603
  showGeneratorPanel && /* @__PURE__ */ jsxRuntimeExports.jsx("aside", { className: "w-[480px] flex-shrink-0 border-l border-surface-800 flex flex-col overflow-hidden", children: /* @__PURE__ */ jsxRuntimeExports.jsx(GeneratorPanel, {}) })
@@ -72409,7 +72616,7 @@ if (savedTheme === "light") {
72409
72616
  const savedZoom = localStorage.getItem("zoom");
72410
72617
  if (savedZoom) window.electron.setZoomFactor(parseFloat(savedZoom));
72411
72618
  ReactDOM.createRoot(document.getElementById("root")).render(
72412
- /* @__PURE__ */ jsxRuntimeExports.jsx(React$2.StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(I18nProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(App, {}) }) })
72619
+ /* @__PURE__ */ jsxRuntimeExports.jsx(React$2.StrictMode, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(I18nProvider, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(ErrorBoundary, { children: /* @__PURE__ */ jsxRuntimeExports.jsx(App, {}) }) }) })
72413
72620
  );
72414
72621
  export {
72415
72622
  EditorView as E,