norn-cli 1.2.1 → 1.2.2

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/CHANGELOG.md CHANGED
@@ -2,6 +2,16 @@
2
2
 
3
3
  All notable changes to the "Norn" extension will be documented in this file.
4
4
 
5
+ ## [1.2.2] - 2026-02-05
6
+
7
+ ### Added
8
+ - **Coverage for sub-sequences**: Coverage now follows `run SequenceName` calls to track API calls in nested sequences
9
+ - **Coverage for named request blocks**: Named request blocks (`[RequestName]`) with hardcoded URLs are now matched to swagger endpoints by URL path
10
+ - **Auto-refresh coverage on save**: Coverage panel updates automatically when `.norn` or `.nornapi` files are saved
11
+
12
+ ### Improved
13
+ - **IntelliSense for .nornapi files**: Content-Type header completions now work in `.nornapi` files (previously only worked in `.norn`)
14
+
5
15
  ## [1.2.1] - 2026-02-03
6
16
 
7
17
  ### Added
package/dist/cli.js CHANGED
@@ -21228,14 +21228,28 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
21228
21228
  if (endpoint && apiDefinitions) {
21229
21229
  const paramsStr = endpointMatch[2] || "";
21230
21230
  const headerGroupsStr = endpointMatch[3]?.trim() || "";
21231
- const paramValues = paramsStr ? paramsStr.split(",").map((p) => p.trim().replace(/^["']|["']$/g, "")) : [];
21231
+ const paramTokens = paramsStr ? paramsStr.split(",").map((p) => p.trim()) : [];
21232
21232
  const params = {};
21233
- endpoint.parameters.forEach((paramName, idx) => {
21234
- if (paramValues[idx] !== void 0) {
21235
- const bareResolved = resolveBareVariables(paramValues[idx], runtimeVariables);
21236
- params[paramName] = substituteVariables(bareResolved, runtimeVariables);
21233
+ const isNamedSyntax = paramTokens.length > 0 && paramTokens[0].includes(":");
21234
+ if (isNamedSyntax) {
21235
+ for (const token of paramTokens) {
21236
+ const kvMatch = token.match(/^([a-zA-Z_][a-zA-Z0-9_]*)\s*:\s*(.+)$/);
21237
+ if (kvMatch) {
21238
+ const paramName = kvMatch[1];
21239
+ let paramValue = kvMatch[2].trim().replace(/^["']|["']$/g, "");
21240
+ const bareResolved = resolveBareVariables(paramValue, runtimeVariables);
21241
+ params[paramName] = substituteVariables(bareResolved, runtimeVariables);
21242
+ }
21237
21243
  }
21238
- });
21244
+ } else {
21245
+ endpoint.parameters.forEach((paramName, idx) => {
21246
+ if (paramTokens[idx] !== void 0) {
21247
+ let paramValue = paramTokens[idx].replace(/^["']|["']$/g, "");
21248
+ const bareResolved = resolveBareVariables(paramValue, runtimeVariables);
21249
+ params[paramName] = substituteVariables(bareResolved, runtimeVariables);
21250
+ }
21251
+ });
21252
+ }
21239
21253
  let pathWithVars = substituteVariables(endpoint.path, runtimeVariables);
21240
21254
  for (const paramName of endpoint.parameters) {
21241
21255
  const value = params[paramName];
@@ -21257,7 +21271,7 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
21257
21271
  }
21258
21272
  }
21259
21273
  }
21260
- requestDescription = `${potentialEndpointName}(${paramValues.join(", ")}) \u2192 ${parsed.method} ${resolvedUrl}`;
21274
+ requestDescription = `${potentialEndpointName}(${paramTokens.join(", ")}) \u2192 ${parsed.method} ${resolvedUrl}`;
21261
21275
  } else {
21262
21276
  resolvedUrl = substituteVariables(parsed.url, runtimeVariables);
21263
21277
  requestDescription = `${parsed.method} ${resolvedUrl}`;
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "norn-cli",
3
3
  "displayName": "Norn - REST Client",
4
4
  "description": "A powerful REST client for making HTTP requests with sequences, variables, scripts, and cookie support",
5
- "version": "1.2.1",
5
+ "version": "1.2.2",
6
6
  "publisher": "Norn-PeterKrustanov",
7
7
  "author": {
8
8
  "name": "Peter Krastanov"
package/norn-1.2.0.vsix DELETED
Binary file