@kirrosh/zond 0.12.3 → 0.12.4

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kirrosh/zond",
3
- "version": "0.12.3",
3
+ "version": "0.12.4",
4
4
  "description": "API testing platform — define tests in YAML, run from CLI or WebUI, generate from OpenAPI specs",
5
5
  "license": "MIT",
6
6
  "module": "index.ts",
@@ -24,7 +24,7 @@ function escapeRegex(s: string): string {
24
24
  function getExpectedStatus(ep: EndpointInfo): number {
25
25
  const success = ep.responses.find(r => r.statusCode >= 200 && r.statusCode < 300);
26
26
  if (success) return success.statusCode;
27
- if (ep.responses.length > 0) return ep.responses[0].statusCode;
27
+ if (ep.responses.length > 0) return ep.responses[0]!.statusCode;
28
28
  return 200;
29
29
  }
30
30
 
@@ -182,10 +182,10 @@ export function detectCrudGroups(endpoints: EndpointInfo[]): CrudGroup[] {
182
182
 
183
183
  if (itemEndpoints.length === 0) continue;
184
184
 
185
- const itemPath = itemEndpoints[0].path;
185
+ const itemPath = itemEndpoints[0]!.path;
186
186
  const idMatch = itemPath.match(/\{([^}]+)\}$/);
187
187
  if (!idMatch) continue;
188
- const idParam = idMatch[1];
188
+ const idParam = idMatch[1]!;
189
189
 
190
190
  const read = itemEndpoints.find(ep => ep.method.toUpperCase() === "GET");
191
191
  if (!read) continue; // Minimum: POST + GET/{id}
@@ -316,7 +316,7 @@ export function findUnresolvedVars(suite: RawSuite, envKeys?: Set<string>): stri
316
316
  const scan = (obj: unknown) => {
317
317
  if (typeof obj === "string") {
318
318
  for (const m of obj.matchAll(/\{\{([^$}][^}]*)\}\}/g)) {
319
- if (!KNOWN.has(m[1]) && !captured.has(m[1])) vars.add(m[1]);
319
+ if (!KNOWN.has(m[1]!) && !captured.has(m[1]!)) vars.add(m[1]!);
320
320
  }
321
321
  } else if (obj && typeof obj === "object") {
322
322
  for (const v of Object.values(obj)) scan(v);
@@ -101,7 +101,7 @@ export function registerGenerateAndSaveTool(server: McpServer) {
101
101
  (effectiveMode === "guide"
102
102
  ? `Pass includeFormat: false for subsequent chunks to save tokens. `
103
103
  : "") +
104
- `Example: generate_and_save(specPath: '${specPath}', tag: '${plan.chunks[0].tag}'` +
104
+ `Example: generate_and_save(specPath: '${specPath}', tag: '${plan.chunks[0]!.tag}'` +
105
105
  (effectiveMode === "guide" ? `, mode: 'guide'` : "") + `)`,
106
106
  };
107
107
  if (coverageInfo) {