webpipe-js 2.0.38 → 2.0.40
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/dist/index.cjs +12 -3
- package/dist/index.d.cts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.mjs +12 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -71,7 +71,11 @@ var Parser = class {
|
|
|
71
71
|
return new Map(this.pipelineRanges);
|
|
72
72
|
}
|
|
73
73
|
getVariableRanges() {
|
|
74
|
-
|
|
74
|
+
const copy = /* @__PURE__ */ new Map();
|
|
75
|
+
for (const [varType, byName] of this.variableRanges.entries()) {
|
|
76
|
+
copy.set(varType, new Map(byName));
|
|
77
|
+
}
|
|
78
|
+
return copy;
|
|
75
79
|
}
|
|
76
80
|
getTestLetVariables() {
|
|
77
81
|
return [...this.testLetVariables];
|
|
@@ -964,7 +968,10 @@ var Parser = class {
|
|
|
964
968
|
const value = this.parseBacktickString();
|
|
965
969
|
const inlineComment = this.parseInlineComment();
|
|
966
970
|
const end = this.pos;
|
|
967
|
-
this.variableRanges.
|
|
971
|
+
if (!this.variableRanges.has(varType)) {
|
|
972
|
+
this.variableRanges.set(varType, /* @__PURE__ */ new Map());
|
|
973
|
+
}
|
|
974
|
+
this.variableRanges.get(varType).set(name, { start, end });
|
|
968
975
|
this.skipWhitespaceOnly();
|
|
969
976
|
return { varType, name, value, inlineComment: inlineComment || void 0, start, end };
|
|
970
977
|
}
|
|
@@ -1050,11 +1057,13 @@ var Parser = class {
|
|
|
1050
1057
|
const start = this.pos;
|
|
1051
1058
|
this.expect("calling");
|
|
1052
1059
|
this.skipInlineSpaces();
|
|
1060
|
+
const methodStart = this.pos;
|
|
1053
1061
|
const method = this.parseMethod();
|
|
1054
1062
|
this.skipInlineSpaces();
|
|
1063
|
+
const pathStart = this.pos;
|
|
1055
1064
|
const path = this.consumeWhile((c) => c !== "\n");
|
|
1056
1065
|
const end = this.pos;
|
|
1057
|
-
return { kind: "CallingRoute", method, path, start, end };
|
|
1066
|
+
return { kind: "CallingRoute", method, methodStart, path, pathStart, start, end };
|
|
1058
1067
|
});
|
|
1059
1068
|
if (calling) return calling;
|
|
1060
1069
|
const executingPipeline = this.tryParse(() => {
|
package/dist/index.d.cts
CHANGED
|
@@ -241,7 +241,9 @@ interface It {
|
|
|
241
241
|
type When = {
|
|
242
242
|
kind: 'CallingRoute';
|
|
243
243
|
method: string;
|
|
244
|
+
methodStart: number;
|
|
244
245
|
path: string;
|
|
246
|
+
pathStart: number;
|
|
245
247
|
start: number;
|
|
246
248
|
end: number;
|
|
247
249
|
} | {
|
|
@@ -305,10 +307,10 @@ declare function getPipelineRanges(text: string): Map<string, {
|
|
|
305
307
|
start: number;
|
|
306
308
|
end: number;
|
|
307
309
|
}>;
|
|
308
|
-
declare function getVariableRanges(text: string): Map<string, {
|
|
310
|
+
declare function getVariableRanges(text: string): Map<string, Map<string, {
|
|
309
311
|
start: number;
|
|
310
312
|
end: number;
|
|
311
|
-
}
|
|
313
|
+
}>>;
|
|
312
314
|
declare function getTestLetVariables(text: string): TestLetVariable[];
|
|
313
315
|
declare function getTestLetVariableRanges(text: string): Map<string, {
|
|
314
316
|
start: number;
|
package/dist/index.d.ts
CHANGED
|
@@ -241,7 +241,9 @@ interface It {
|
|
|
241
241
|
type When = {
|
|
242
242
|
kind: 'CallingRoute';
|
|
243
243
|
method: string;
|
|
244
|
+
methodStart: number;
|
|
244
245
|
path: string;
|
|
246
|
+
pathStart: number;
|
|
245
247
|
start: number;
|
|
246
248
|
end: number;
|
|
247
249
|
} | {
|
|
@@ -305,10 +307,10 @@ declare function getPipelineRanges(text: string): Map<string, {
|
|
|
305
307
|
start: number;
|
|
306
308
|
end: number;
|
|
307
309
|
}>;
|
|
308
|
-
declare function getVariableRanges(text: string): Map<string, {
|
|
310
|
+
declare function getVariableRanges(text: string): Map<string, Map<string, {
|
|
309
311
|
start: number;
|
|
310
312
|
end: number;
|
|
311
|
-
}
|
|
313
|
+
}>>;
|
|
312
314
|
declare function getTestLetVariables(text: string): TestLetVariable[];
|
|
313
315
|
declare function getTestLetVariableRanges(text: string): Map<string, {
|
|
314
316
|
start: number;
|
package/dist/index.mjs
CHANGED
|
@@ -18,7 +18,11 @@ var Parser = class {
|
|
|
18
18
|
return new Map(this.pipelineRanges);
|
|
19
19
|
}
|
|
20
20
|
getVariableRanges() {
|
|
21
|
-
|
|
21
|
+
const copy = /* @__PURE__ */ new Map();
|
|
22
|
+
for (const [varType, byName] of this.variableRanges.entries()) {
|
|
23
|
+
copy.set(varType, new Map(byName));
|
|
24
|
+
}
|
|
25
|
+
return copy;
|
|
22
26
|
}
|
|
23
27
|
getTestLetVariables() {
|
|
24
28
|
return [...this.testLetVariables];
|
|
@@ -911,7 +915,10 @@ var Parser = class {
|
|
|
911
915
|
const value = this.parseBacktickString();
|
|
912
916
|
const inlineComment = this.parseInlineComment();
|
|
913
917
|
const end = this.pos;
|
|
914
|
-
this.variableRanges.
|
|
918
|
+
if (!this.variableRanges.has(varType)) {
|
|
919
|
+
this.variableRanges.set(varType, /* @__PURE__ */ new Map());
|
|
920
|
+
}
|
|
921
|
+
this.variableRanges.get(varType).set(name, { start, end });
|
|
915
922
|
this.skipWhitespaceOnly();
|
|
916
923
|
return { varType, name, value, inlineComment: inlineComment || void 0, start, end };
|
|
917
924
|
}
|
|
@@ -997,11 +1004,13 @@ var Parser = class {
|
|
|
997
1004
|
const start = this.pos;
|
|
998
1005
|
this.expect("calling");
|
|
999
1006
|
this.skipInlineSpaces();
|
|
1007
|
+
const methodStart = this.pos;
|
|
1000
1008
|
const method = this.parseMethod();
|
|
1001
1009
|
this.skipInlineSpaces();
|
|
1010
|
+
const pathStart = this.pos;
|
|
1002
1011
|
const path = this.consumeWhile((c) => c !== "\n");
|
|
1003
1012
|
const end = this.pos;
|
|
1004
|
-
return { kind: "CallingRoute", method, path, start, end };
|
|
1013
|
+
return { kind: "CallingRoute", method, methodStart, path, pathStart, start, end };
|
|
1005
1014
|
});
|
|
1006
1015
|
if (calling) return calling;
|
|
1007
1016
|
const executingPipeline = this.tryParse(() => {
|