norn-cli 1.3.14 → 1.3.16
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 +11 -0
- package/dist/cli.js +26 -31
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,17 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "Norn" extension will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.3.16] - 2026-02-13
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **IntelliSense**: Additional completion fixes and reliability improvements
|
|
9
|
+
|
|
10
|
+
## [1.3.15] - 2026-02-13
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
- **IntelliSense**: Applied fixes to improve completion reliability and keyword suggestions
|
|
14
|
+
- **Regression Stability**: Updated Petstore contract schema for `findByStatus` to handle responses where `photoUrls` may be omitted
|
|
15
|
+
|
|
5
16
|
## [1.3.14] - 2026-02-12
|
|
6
17
|
|
|
7
18
|
### Fixed
|
package/dist/cli.js
CHANGED
|
@@ -20075,50 +20075,45 @@ function getNamedRequest(text, name) {
|
|
|
20075
20075
|
(r) => r.name === name || r.name.toLowerCase() === name.toLowerCase()
|
|
20076
20076
|
);
|
|
20077
20077
|
}
|
|
20078
|
-
|
|
20079
|
-
|
|
20080
|
-
|
|
20081
|
-
|
|
20082
|
-
|
|
20083
|
-
|
|
20084
|
-
|
|
20085
|
-
|
|
20086
|
-
|
|
20087
|
-
|
|
20088
|
-
|
|
20089
|
-
|
|
20090
|
-
|
|
20091
|
-
|
|
20092
|
-
|
|
20093
|
-
|
|
20094
|
-
continue;
|
|
20095
|
-
}
|
|
20096
|
-
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
20097
|
-
value = value.slice(1, -1);
|
|
20098
|
-
}
|
|
20099
|
-
variables[match[1]] = value;
|
|
20100
|
-
}
|
|
20101
|
-
return variables;
|
|
20078
|
+
var RUNTIME_VARIABLE_VALUE_PATTERNS = [
|
|
20079
|
+
/^run\s+/i,
|
|
20080
|
+
// var x = run ... (scripts/sequences)
|
|
20081
|
+
/^\$\d+/,
|
|
20082
|
+
// var x = $1... (response captures)
|
|
20083
|
+
/^(GET|POST|PUT|DELETE|PATCH|HEAD|OPTIONS)\s+/i
|
|
20084
|
+
// var x = METHOD url (request captures)
|
|
20085
|
+
];
|
|
20086
|
+
function isRuntimeComputedVariableValue(value) {
|
|
20087
|
+
return RUNTIME_VARIABLE_VALUE_PATTERNS.some((pattern) => pattern.test(value));
|
|
20088
|
+
}
|
|
20089
|
+
function isSequenceStartDeclaration(line2) {
|
|
20090
|
+
return /^(?:test\s+)?sequence\s+[a-zA-Z_][a-zA-Z0-9_-]*(?:\s*\([^)]*\))?\s*$/i.test(line2);
|
|
20091
|
+
}
|
|
20092
|
+
function isSequenceEndDeclaration(line2) {
|
|
20093
|
+
return /^end\s+sequence\s*$/i.test(line2);
|
|
20102
20094
|
}
|
|
20103
20095
|
function extractFileLevelVariables(text) {
|
|
20104
20096
|
const variables = {};
|
|
20105
20097
|
const lines = text.split("\n");
|
|
20106
20098
|
const variableRegex = /^\s*var\s+([a-zA-Z_][a-zA-Z0-9_]*)\s*=\s*(.+)$/;
|
|
20107
|
-
let
|
|
20099
|
+
let sequenceDepth = 0;
|
|
20108
20100
|
for (const line2 of lines) {
|
|
20109
20101
|
const trimmed = line2.trim();
|
|
20110
|
-
if (
|
|
20111
|
-
|
|
20102
|
+
if (isSequenceStartDeclaration(trimmed)) {
|
|
20103
|
+
sequenceDepth++;
|
|
20112
20104
|
continue;
|
|
20113
20105
|
}
|
|
20114
|
-
if (trimmed
|
|
20115
|
-
|
|
20106
|
+
if (isSequenceEndDeclaration(trimmed)) {
|
|
20107
|
+
sequenceDepth = Math.max(0, sequenceDepth - 1);
|
|
20116
20108
|
continue;
|
|
20117
20109
|
}
|
|
20118
|
-
if (
|
|
20110
|
+
if (sequenceDepth === 0) {
|
|
20119
20111
|
const match = line2.match(variableRegex);
|
|
20120
20112
|
if (match) {
|
|
20121
20113
|
let value = match[2].trim();
|
|
20114
|
+
if (isRuntimeComputedVariableValue(value)) {
|
|
20115
|
+
continue;
|
|
20116
|
+
}
|
|
20122
20117
|
if (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'")) {
|
|
20123
20118
|
value = value.slice(1, -1);
|
|
20124
20119
|
}
|
|
@@ -20367,7 +20362,7 @@ async function resolveImports(text, baseDir, readFile2, alreadyImported = /* @__
|
|
|
20367
20362
|
if (nestedResult.importedContent) {
|
|
20368
20363
|
importedContents.push(nestedResult.importedContent);
|
|
20369
20364
|
}
|
|
20370
|
-
const importedVariables =
|
|
20365
|
+
const importedVariables = extractFileLevelVariables(content);
|
|
20371
20366
|
const importedNamedRequests = extractNamedRequests(content);
|
|
20372
20367
|
const importedSequences = extractSequencesFromText(content);
|
|
20373
20368
|
for (const req of importedNamedRequests) {
|
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.3.
|
|
5
|
+
"version": "1.3.16",
|
|
6
6
|
"publisher": "Norn-PeterKrustanov",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Peter Krastanov"
|