norn-cli 1.6.0 → 1.6.1

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.
Files changed (3) hide show
  1. package/CHANGELOG.md +11 -0
  2. package/dist/cli.js +85 -21
  3. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -4,6 +4,17 @@ All notable changes to the "Norn" extension will be documented in this file.
4
4
 
5
5
  ## [Unreleased]
6
6
 
7
+ ## [1.6.1] - 2026-03-04
8
+
9
+ ### Fixed
10
+ - **Parameterized Debug Launch (VS Code)**:
11
+ - Fixed `Debug Sequence` launch from editor/CodeLens so `@data` / `@theory` case arguments are passed into the debug session.
12
+ - Added case selection prompt when multiple parameterized cases exist, so a single concrete case is debugged without unresolved placeholders.
13
+
14
+ - **CLI `--sequence` Parameterized Execution**:
15
+ - Fixed `node ./dist/cli.js <file> -s <sequence>` to execute `@data` / `@theory` cases (instead of ignoring case args and failing on unresolved variables).
16
+ - Aligned `--sequence` behavior with full test execution mode for parameterized sequences.
17
+
7
18
  ## [1.6.0] - 2026-03-04
8
19
 
9
20
  ### Added
package/dist/cli.js CHANGED
@@ -32376,34 +32376,98 @@ ${fileContent}` : fileContent;
32376
32376
  }
32377
32377
  }
32378
32378
  }
32379
- const seqResult = await runSequenceWithJar(
32380
- targetSeq.content,
32381
- variables,
32382
- cookieJar,
32383
- workingDir,
32384
- fileContentWithImports,
32385
- void 0,
32386
- void 0,
32387
- defaultArgs,
32388
- apiDefinitions,
32389
- tagFilterOptions,
32390
- importResult.sequenceSources,
32391
- { filePath, sequenceName: targetSeq.name, environment: envValidationContext }
32392
- );
32393
- seqResult.name = targetSeq.name;
32379
+ let theoryData = targetSeq.theoryData;
32380
+ if (theoryData?.source && theoryData.cases.length === 0) {
32381
+ try {
32382
+ const cases = await loadTheoryFile(theoryData.source, workingDir);
32383
+ theoryData = { ...theoryData, cases };
32384
+ } catch (error) {
32385
+ const message = `Failed to load theory file '${theoryData.source}': ${error instanceof Error ? error.message : String(error)}`;
32386
+ const failedResult = {
32387
+ name: targetSeq.name,
32388
+ success: false,
32389
+ responses: [],
32390
+ scriptResults: [],
32391
+ assertionResults: [],
32392
+ steps: [],
32393
+ errors: [message],
32394
+ duration: 0
32395
+ };
32396
+ if (options.output === "json") {
32397
+ console.log(JSON.stringify({ success: false, results: [failedResult] }, null, 2));
32398
+ } else {
32399
+ const lines = formatSequenceResult(failedResult, { colors, verbose: options.verbose, redaction: redaction2 });
32400
+ for (const line2 of lines) {
32401
+ console.log(line2);
32402
+ }
32403
+ const summaryLines = formatRunSummary([failedResult], Date.now() - startTime, colors);
32404
+ for (const line2 of summaryLines) {
32405
+ console.log(line2);
32406
+ }
32407
+ }
32408
+ process.exit(1);
32409
+ }
32410
+ }
32411
+ const sequenceResults = [];
32412
+ if (theoryData && theoryData.cases.length > 0) {
32413
+ for (let caseIdx = 0; caseIdx < theoryData.cases.length; caseIdx++) {
32414
+ const caseParams = theoryData.cases[caseIdx];
32415
+ const caseLabel = formatCaseLabel(caseParams);
32416
+ const caseArgs = { ...defaultArgs };
32417
+ for (const [key, value] of Object.entries(caseParams)) {
32418
+ caseArgs[key] = String(value);
32419
+ }
32420
+ const caseResult = await runSequenceWithJar(
32421
+ targetSeq.content,
32422
+ variables,
32423
+ cookieJar,
32424
+ workingDir,
32425
+ fileContentWithImports,
32426
+ void 0,
32427
+ void 0,
32428
+ caseArgs,
32429
+ apiDefinitions,
32430
+ tagFilterOptions,
32431
+ importResult.sequenceSources,
32432
+ { filePath, sequenceName: targetSeq.name, environment: envValidationContext }
32433
+ );
32434
+ caseResult.name = `${targetSeq.name}${caseLabel}`;
32435
+ sequenceResults.push(caseResult);
32436
+ }
32437
+ } else {
32438
+ const seqResult = await runSequenceWithJar(
32439
+ targetSeq.content,
32440
+ variables,
32441
+ cookieJar,
32442
+ workingDir,
32443
+ fileContentWithImports,
32444
+ void 0,
32445
+ void 0,
32446
+ defaultArgs,
32447
+ apiDefinitions,
32448
+ tagFilterOptions,
32449
+ importResult.sequenceSources,
32450
+ { filePath, sequenceName: targetSeq.name, environment: envValidationContext }
32451
+ );
32452
+ seqResult.name = targetSeq.name;
32453
+ sequenceResults.push(seqResult);
32454
+ }
32394
32455
  if (options.output === "json") {
32395
- console.log(JSON.stringify({ success: seqResult.success, results: [seqResult] }, null, 2));
32456
+ const success = sequenceResults.every((result2) => result2.success);
32457
+ console.log(JSON.stringify({ success, results: sequenceResults }, null, 2));
32396
32458
  } else {
32397
- const lines = formatSequenceResult(seqResult, { colors, verbose: options.verbose, redaction: redaction2 });
32398
- for (const line2 of lines) {
32399
- console.log(line2);
32459
+ for (const result2 of sequenceResults) {
32460
+ const lines = formatSequenceResult(result2, { colors, verbose: options.verbose, redaction: redaction2 });
32461
+ for (const line2 of lines) {
32462
+ console.log(line2);
32463
+ }
32400
32464
  }
32401
- const summaryLines = formatRunSummary([seqResult], Date.now() - startTime, colors);
32465
+ const summaryLines = formatRunSummary(sequenceResults, Date.now() - startTime, colors);
32402
32466
  for (const line2 of summaryLines) {
32403
32467
  console.log(line2);
32404
32468
  }
32405
32469
  }
32406
- process.exit(seqResult.success ? 0 : 1);
32470
+ process.exit(sequenceResults.every((result2) => result2.success) ? 0 : 1);
32407
32471
  }
32408
32472
  }
32409
32473
  let totalTestCount = 0;
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.6.0",
5
+ "version": "1.6.1",
6
6
  "publisher": "Norn-PeterKrustanov",
7
7
  "author": {
8
8
  "name": "Peter Krastanov"