norn-cli 1.3.0 → 1.3.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 (4) hide show
  1. package/CHANGELOG.md +18 -2
  2. package/README.md +32 -0
  3. package/dist/cli.js +6685 -171
  4. package/package.json +2 -1
package/CHANGELOG.md CHANGED
@@ -2,10 +2,26 @@
2
2
 
3
3
  All notable changes to the "Norn" extension will be documented in this file.
4
4
 
5
+ ## [1.3.1] - 2026-02-08
6
+
7
+ - **Clickable JSON Properties**: Click any JSON value in the response panel to generate an assertion
8
+ - Hover over any value (string, number, boolean, null) to highlight it
9
+ - Click to automatically insert `assert $var.body.path == value` at the end of the sequence
10
+ - Works with nested objects and arrays (e.g., `body.user.address.city`, `body.items[0].name`)
11
+ - String values are properly escaped with quotes
12
+ - Toast notification confirms assertion added
13
+
14
+ - **Response Comparison**: Compare any two API responses with VS Code's built-in diff view
15
+ - New "⇄ Compare" button next to "📋 Copy" on response bodies
16
+ - Click on first response, then click another to open side-by-side diff
17
+ - Responses are pretty-printed JSON for easy comparison
18
+ - Toast notification guides user: "Select another response to compare"
19
+ - Works in both sequence results and single request views
20
+ - State resets automatically after diff opens
21
+
5
22
  ## [1.3.0] - 2026-02-07
6
23
 
7
- ### Added
8
- - **Retry and Backoff**: Automatically retry failed HTTP requests with configurable backoff
24
+ ### Added- **Retry and Backoff**: Automatically retry failed HTTP requests with configurable backoff
9
25
  - Syntax: `GET url retry 3 backoff 200 ms` (retry up to 3 times with 200ms linear backoff)
10
26
  - Works with direct URLs, named endpoints, and named requests
11
27
  - Supports time units: `ms`, `s`, `seconds`, `milliseconds`
package/README.md CHANGED
@@ -22,6 +22,7 @@ A powerful REST client extension for VS Code with sequences, assertions, environ
22
22
  - **Named Requests**: Define reusable requests with `[RequestName]` and call them with `run RequestName`
23
23
  - **Conditionals**: Control flow with `if/end if` blocks based on response data
24
24
  - **Wait Commands**: Add delays between requests with `wait 1s` or `wait 500ms`
25
+ - **Retry and Backoff**: Automatically retry failed requests with `retry 3 backoff 200 ms`
25
26
  - **JSON File Loading**: Load test data from JSON files with `run readJson ./file.json`
26
27
  - **Property Updates**: Modify loaded JSON data inline with `config.property = value`
27
28
  - **Script Execution**: Run bash, PowerShell, or JavaScript scripts within sequences
@@ -606,6 +607,37 @@ sequence RateLimitedFlow
606
607
  end sequence
607
608
  ```
608
609
 
610
+ ### Retry and Backoff
611
+
612
+ Automatically retry failed HTTP requests with configurable backoff:
613
+
614
+ ```bash
615
+ sequence RetryExample
616
+ # Retry up to 3 times with 200ms linear backoff (200ms, 400ms, 600ms)
617
+ var result = GET "https://api.example.com/flaky-endpoint" retry 3 backoff 200 ms
618
+
619
+ # Works with named endpoints from .nornapi files
620
+ var user = GET UserEndpoint retry 2 backoff 500 ms
621
+
622
+ # Works with named requests
623
+ var data = run FlakyRequest retry 3 backoff 100 ms
624
+
625
+ # Retry only (uses default 1 second backoff)
626
+ var simple = GET "https://api.example.com/status" retry 2
627
+ end sequence
628
+ ```
629
+
630
+ **Retries trigger on:**
631
+ - 5xx server errors (500, 502, 503, etc.)
632
+ - 429 rate limiting
633
+ - Network failures and timeouts
634
+
635
+ **Time units:**
636
+ - `ms` or `milliseconds` - e.g., `backoff 200 ms`
637
+ - `s` or `seconds` - e.g., `backoff 2 s`
638
+
639
+ The response panel shows a retry indicator (🔄 retried 2x) when retries occurred.
640
+
609
641
  ### JSON File Loading
610
642
 
611
643
  Load test data from external JSON files: