Skip to content

Commit 2c65c58

Browse files
committed
sync main
* origin/main: docs: Auto-generate vimdocs + vimtags (#808) Weekly Updates (#801)
2 parents 76def0e + ad51fbc commit 2c65c58

File tree

7 files changed

+17
-6
lines changed

7 files changed

+17
-6
lines changed

doc/kulala.NEWS.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,12 @@ ENHANCEMENT: HTTP-CLIENT.ENV.JSON AND HTTP-CLIENT.PRIVATE.ENV.JSON FILES WILL BE
6565
ENHANCEMENT: SHARE HEADERS AND POST REQUEST SCRIPTS IN SHARED BLOCKS SHARED BLOCKS |kulala.shared-blocks.txt|
6666

6767

68+
ENHANCEMENT: SUPPORT USING KULALA_HTTP PARSER WITHOUT NVIM-TREESITTER, I.E. INSTALLED BY NIX.
69+
70+
71+
ENHANCEMENT: SUPPORT DOT NOTATION IN ACCESSING DEEP OBJECTS FROM JS SCRIPTS JS |kulala.request-reference.txt|
72+
73+
6874
VERSION 5.3.3 *kulala.NEWS-kulala-news-version-5.3.3*
6975

7076

doc/kulala.client-reference.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ Variables are persisted across script runs and Neovim restarts.
2727

2828
>javascript
2929
client.global.set("SOME_TOKEN", "123");
30+
client.global.set("SOME.DEEP.VAR", "123");
3031
<
3132

3233

@@ -37,7 +38,8 @@ Get a variable.
3738
Variables are persisted across script runs and Neovim restarts.
3839

3940
>javascript
40-
client.log(client.global.get("SOME_TOKEN"));
41+
client.global.get("SOME_TOKEN");
42+
client.global.get("SOME.DEEP.VAR");
4143
<
4244

4345

doc/kulala.request-reference.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ Get a request variable.
3232
Request variables are only available for the duration of the request.
3333

3434
>javascript
35-
client.log(request.variables.get("SOME_TOKEN"));
35+
request.variables.get("SOME_TOKEN");
36+
request.variables.get("SOME.DEEP.VAR");
3637
<
3738

3839

@@ -44,7 +45,7 @@ Request variables are only available for the duration of the request.
4445

4546
>javascript
4647
request.variables.set("SOME_TOKEN, "123");
47-
client.log(request.variables.get("SOME_TOKEN"));
48+
request.variables.set("SOME.DEEP.VAR, "123");
4849
<
4950

5051

lua/kulala/parser/scripts/engines/javascript/lib/src/lib/PostRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const Request = {
132132
const updatedReqVariables = setObjectValueByPath(
133133
reqVariables,
134134
key,
135-
value,
135+
value as unknown as Record<string, unknown>,
136136
);
137137
fs.writeFileSync(
138138
_REQUEST_VARIABLES_FILEPATH,

lua/kulala/parser/scripts/engines/javascript/lib/src/lib/PostRequestResponse.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
import * as fs from "fs";
33
import * as path from "path";
44

5+
import { getObjectValueByPath, setObjectValueByPath } from "./Utils";
6+
57
const _RESPONSE_HEADERS_FILEPATH = path.join(
68
__dirname,
79
"..",

lua/kulala/parser/scripts/engines/javascript/lib/src/lib/PreRequestRequest.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,7 +132,7 @@ export const Request = {
132132
const updatedReqVariables = setObjectValueByPath(
133133
reqVariables,
134134
key,
135-
value,
135+
value as unknown as Record<string, unknown>,
136136
);
137137
fs.writeFileSync(
138138
_REQUEST_VARIABLES_FILEPATH,

lua/kulala/parser/scripts/engines/javascript/lib/src/lib/Utils.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const setObjectValueByPath = function (
6161
return currentObj;
6262
}
6363
const pathParts = path.split(".");
64-
const newObj: Record<string, unknown> = structuredClone(currentObj);
64+
const newObj: Record<string, unknown> = { ...currentObj };
6565
let tempObj: Record<string, unknown> = newObj;
6666
for (let i = ZERO_INDEX; i < pathParts.length; i++) {
6767
const part = pathParts[i];

0 commit comments

Comments
 (0)