norn-cli 1.3.9 → 1.3.11
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/.norn-cache/validation-results.json +2 -2
- package/CHANGELOG.md +18 -0
- package/dist/cli.js +31 -9
- package/package.json +1 -1
|
@@ -6,14 +6,14 @@
|
|
|
6
6
|
"sourceFile": "tests/Regression/15-contract-validation.norn",
|
|
7
7
|
"assertionLine": 15,
|
|
8
8
|
"status": "pass",
|
|
9
|
-
"lastRunTime": "2026-02-
|
|
9
|
+
"lastRunTime": "2026-02-09T20:01:50.112Z"
|
|
10
10
|
},
|
|
11
11
|
"tests/Regression/15-contract-validation.norn:25": {
|
|
12
12
|
"schemaPath": "tests/Regression/schemas/GET-users-1.schema.json",
|
|
13
13
|
"sourceFile": "tests/Regression/15-contract-validation.norn",
|
|
14
14
|
"assertionLine": 25,
|
|
15
15
|
"status": "pass",
|
|
16
|
-
"lastRunTime": "2026-02-
|
|
16
|
+
"lastRunTime": "2026-02-09T20:01:54.179Z"
|
|
17
17
|
},
|
|
18
18
|
"tests/Regression/15-contract-validation.norn:35": {
|
|
19
19
|
"schemaPath": "tests/Regression/schemas/GET-todos-1.schema.json",
|
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to the "Norn" extension will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [1.3.11] - 2026-02-09
|
|
6
|
+
|
|
7
|
+
### Fixed
|
|
8
|
+
- **Syntax Highlighting**: Fixed header value colors in sequences
|
|
9
|
+
- `Content-Type: application/json` now correctly colors the entire value
|
|
10
|
+
- `/json` part no longer incorrectly highlighted as URL
|
|
11
|
+
- **Syntax Highlighting**: Fixed numbers in variable names being highlighted separately
|
|
12
|
+
- `item3.status` now shows as single variable color instead of `item` + `3` in different colors
|
|
13
|
+
- Added proper variable pattern matching in assert statements
|
|
14
|
+
|
|
15
|
+
## [1.3.10] - 2026-02-09
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
- **Type Preservation in Property Assignments**: Bare variables now preserve their original type
|
|
19
|
+
- `payload.userId = myNumericVar` keeps the number type instead of converting to string
|
|
20
|
+
- Script outputs that are valid JSON (numbers, booleans, objects) are now properly typed
|
|
21
|
+
- Use `payload.field = "{{var}}"` to force string type when needed
|
|
22
|
+
|
|
5
23
|
## [1.3.9] - 2026-02-09
|
|
6
24
|
|
|
7
25
|
### Added
|
package/dist/cli.js
CHANGED
|
@@ -28072,12 +28072,36 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
|
|
|
28072
28072
|
duration: Date.now() - startTime
|
|
28073
28073
|
};
|
|
28074
28074
|
}
|
|
28075
|
-
const
|
|
28076
|
-
const
|
|
28077
|
-
let newValue
|
|
28078
|
-
|
|
28079
|
-
|
|
28080
|
-
|
|
28075
|
+
const valueTrimmed = parsed.value.trim();
|
|
28076
|
+
const bareVarMatch = valueTrimmed.match(/^([a-zA-Z_][a-zA-Z0-9_]*)((?:\.[a-zA-Z_][a-zA-Z0-9_]*|\[\d+\])*)$/);
|
|
28077
|
+
let newValue;
|
|
28078
|
+
if (bareVarMatch && bareVarMatch[1] in runtimeVariables) {
|
|
28079
|
+
const varName = bareVarMatch[1];
|
|
28080
|
+
const pathPart = bareVarMatch[2] || "";
|
|
28081
|
+
let value = runtimeVariables[varName];
|
|
28082
|
+
if (typeof value === "string") {
|
|
28083
|
+
try {
|
|
28084
|
+
const parsed2 = JSON.parse(value);
|
|
28085
|
+
if (typeof parsed2 === "object" && parsed2 !== null) {
|
|
28086
|
+
value = parsed2;
|
|
28087
|
+
}
|
|
28088
|
+
} catch {
|
|
28089
|
+
}
|
|
28090
|
+
}
|
|
28091
|
+
if (pathPart) {
|
|
28092
|
+
const path5 = pathPart.replace(/^\./, "");
|
|
28093
|
+
newValue = getNestedValueFromObject(value, path5);
|
|
28094
|
+
} else {
|
|
28095
|
+
newValue = value;
|
|
28096
|
+
}
|
|
28097
|
+
} else {
|
|
28098
|
+
const bareResolvedValue = resolveBareVariables(parsed.value, runtimeVariables);
|
|
28099
|
+
const resolvedValue = substituteVariables(bareResolvedValue, runtimeVariables);
|
|
28100
|
+
newValue = resolvedValue;
|
|
28101
|
+
try {
|
|
28102
|
+
newValue = JSON.parse(resolvedValue);
|
|
28103
|
+
} catch {
|
|
28104
|
+
}
|
|
28081
28105
|
}
|
|
28082
28106
|
const success = setNestedValue(jsonObj, parsed.propertyPath, newValue);
|
|
28083
28107
|
if (!success) {
|
|
@@ -28314,9 +28338,7 @@ async function runSequenceWithJar(sequenceContent, fileVariables, cookieJar, wor
|
|
|
28314
28338
|
let outputValue = result.output;
|
|
28315
28339
|
try {
|
|
28316
28340
|
const jsonParsed = JSON.parse(result.output);
|
|
28317
|
-
|
|
28318
|
-
outputValue = jsonParsed;
|
|
28319
|
-
}
|
|
28341
|
+
outputValue = jsonParsed;
|
|
28320
28342
|
} catch {
|
|
28321
28343
|
}
|
|
28322
28344
|
runtimeVariables[parsed.captureAs] = outputValue;
|
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.11",
|
|
6
6
|
"publisher": "Norn-PeterKrustanov",
|
|
7
7
|
"author": {
|
|
8
8
|
"name": "Peter Krastanov"
|