@testsmith/api-spector 0.2.7 → 0.2.9

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/index.js CHANGED
@@ -4596,26 +4596,18 @@ function registerContractHandlers(ipc) {
4596
4596
  await snapshots.deleteSnapshot(dir, relPath);
4597
4597
  });
4598
4598
  }
4599
- const GIT_BLOCK_TIMEOUT_MS = 6e4;
4600
4599
  function git() {
4601
4600
  const dir = getWorkspaceDir();
4602
4601
  if (!dir) throw new Error("No workspace open");
4603
- return simpleGit.simpleGit(dir, {
4604
- timeout: { block: GIT_BLOCK_TIMEOUT_MS },
4605
- unsafe: { allowUnsafeAskPass: true }
4606
- }).env({
4607
- ...process.env,
4608
- GIT_TERMINAL_PROMPT: "0",
4609
- GIT_ASKPASS: "echo",
4610
- SSH_ASKPASS: "echo",
4611
- GCM_INTERACTIVE: "Never"
4612
- });
4602
+ return simpleGit.simpleGit(dir);
4613
4603
  }
4614
4604
  function registerGitHandlers(ipc) {
4615
4605
  ipc.handle("git:isRepo", async () => {
4606
+ const dir = getWorkspaceDir();
4607
+ if (!dir) return false;
4616
4608
  try {
4617
- await git().revparse(["--git-dir"]);
4618
- return true;
4609
+ const s = await promises.stat(path.join(dir, ".git"));
4610
+ return s.isDirectory() || s.isFile();
4619
4611
  } catch {
4620
4612
  return false;
4621
4613
  }
@@ -632,7 +632,7 @@ async function main() {
632
632
  if (envName && !env) {
633
633
  console.warn(color(`Warning: environment "${envName}" not found. Running without environment.`, C.yellow));
634
634
  }
635
- const version = `v${"0.2.7"}`;
635
+ const version = `v${"0.2.9"}`;
636
636
  console.log("");
637
637
  console.log(color(" API Test Runner" + (version ? ` ${version}` : ""), C.bold, C.white));
638
638
  console.log(color(` Workspace: ${wsPath}`, C.gray));
@@ -70982,7 +70982,7 @@ function App() {
70982
70982
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { style: { color: "#6aa3c8" }, children: "Spector" }),
70983
70983
  /* @__PURE__ */ jsxRuntimeExports.jsxs("span", { className: "ml-2 text-[10px] font-normal opacity-50", children: [
70984
70984
  "v",
70985
- "0.2.7"
70985
+ "0.2.9"
70986
70986
  ] }),
70987
70987
  /* @__PURE__ */ jsxRuntimeExports.jsx("span", { className: "mx-2 opacity-30", children: "·" }),
70988
70988
  /* @__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-WH-P4X-L.js"></script>
8
+ <script type="module" crossorigin src="./assets/index-Cnfxm3Z2.js"></script>
9
9
  <link rel="stylesheet" crossorigin href="./assets/index-DfkLUeA1.css">
10
10
  </head>
11
11
 
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@testsmith/api-spector",
3
3
  "productName": "API Spector",
4
- "version": "0.2.7",
4
+ "version": "0.2.9",
5
5
  "description": "Local-first API testing tool to inspect, test and mock APIs",
6
6
  "repository": {
7
7
  "type": "git",