webpipe-js 2.0.36 → 2.0.38

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 CHANGED
@@ -1063,9 +1063,10 @@ var Parser = class {
1063
1063
  this.skipInlineSpaces();
1064
1064
  this.expect("pipeline");
1065
1065
  this.skipInlineSpaces();
1066
+ const nameStart = this.pos;
1066
1067
  const name = this.parseIdentifier();
1067
1068
  const end = this.pos;
1068
- return { kind: "ExecutingPipeline", name, start, end };
1069
+ return { kind: "ExecutingPipeline", name, nameStart, start, end };
1069
1070
  });
1070
1071
  if (executingPipeline) return executingPipeline;
1071
1072
  const executingVariable = this.tryParse(() => {
@@ -1076,9 +1077,10 @@ var Parser = class {
1076
1077
  this.skipInlineSpaces();
1077
1078
  const varType = this.parseIdentifier();
1078
1079
  this.skipInlineSpaces();
1080
+ const nameStart = this.pos;
1079
1081
  const name = this.parseIdentifier();
1080
1082
  const end = this.pos;
1081
- return { kind: "ExecutingVariable", varType, name, start, end };
1083
+ return { kind: "ExecutingVariable", varType, name, nameStart, start, end };
1082
1084
  });
1083
1085
  if (executingVariable) return executingVariable;
1084
1086
  throw new ParseFailure("when", this.pos);
@@ -1246,6 +1248,7 @@ var Parser = class {
1246
1248
  this.skipInlineSpaces();
1247
1249
  this.expect("mock");
1248
1250
  this.skipInlineSpaces();
1251
+ const targetStart = this.pos;
1249
1252
  let target;
1250
1253
  if (this.text.startsWith("query ", this.pos) || this.text.startsWith("mutation ", this.pos)) {
1251
1254
  const type = this.consumeWhile((c) => c !== " ");
@@ -1261,7 +1264,7 @@ var Parser = class {
1261
1264
  const returnValue = this.parseBacktickString();
1262
1265
  this.skipSpaces();
1263
1266
  const end = this.pos;
1264
- return { target, returnValue, start, end };
1267
+ return { target, targetStart, returnValue, start, end };
1265
1268
  }
1266
1269
  parseMock() {
1267
1270
  return this.parseMockHead("with");
package/dist/index.d.cts CHANGED
@@ -220,6 +220,7 @@ interface Describe {
220
220
  }
221
221
  interface Mock {
222
222
  target: string;
223
+ targetStart: number;
223
224
  returnValue: string;
224
225
  start: number;
225
226
  end: number;
@@ -246,12 +247,14 @@ type When = {
246
247
  } | {
247
248
  kind: 'ExecutingPipeline';
248
249
  name: string;
250
+ nameStart: number;
249
251
  start: number;
250
252
  end: number;
251
253
  } | {
252
254
  kind: 'ExecutingVariable';
253
255
  varType: string;
254
256
  name: string;
257
+ nameStart: number;
255
258
  start: number;
256
259
  end: number;
257
260
  };
package/dist/index.d.ts CHANGED
@@ -220,6 +220,7 @@ interface Describe {
220
220
  }
221
221
  interface Mock {
222
222
  target: string;
223
+ targetStart: number;
223
224
  returnValue: string;
224
225
  start: number;
225
226
  end: number;
@@ -246,12 +247,14 @@ type When = {
246
247
  } | {
247
248
  kind: 'ExecutingPipeline';
248
249
  name: string;
250
+ nameStart: number;
249
251
  start: number;
250
252
  end: number;
251
253
  } | {
252
254
  kind: 'ExecutingVariable';
253
255
  varType: string;
254
256
  name: string;
257
+ nameStart: number;
255
258
  start: number;
256
259
  end: number;
257
260
  };
package/dist/index.mjs CHANGED
@@ -1010,9 +1010,10 @@ var Parser = class {
1010
1010
  this.skipInlineSpaces();
1011
1011
  this.expect("pipeline");
1012
1012
  this.skipInlineSpaces();
1013
+ const nameStart = this.pos;
1013
1014
  const name = this.parseIdentifier();
1014
1015
  const end = this.pos;
1015
- return { kind: "ExecutingPipeline", name, start, end };
1016
+ return { kind: "ExecutingPipeline", name, nameStart, start, end };
1016
1017
  });
1017
1018
  if (executingPipeline) return executingPipeline;
1018
1019
  const executingVariable = this.tryParse(() => {
@@ -1023,9 +1024,10 @@ var Parser = class {
1023
1024
  this.skipInlineSpaces();
1024
1025
  const varType = this.parseIdentifier();
1025
1026
  this.skipInlineSpaces();
1027
+ const nameStart = this.pos;
1026
1028
  const name = this.parseIdentifier();
1027
1029
  const end = this.pos;
1028
- return { kind: "ExecutingVariable", varType, name, start, end };
1030
+ return { kind: "ExecutingVariable", varType, name, nameStart, start, end };
1029
1031
  });
1030
1032
  if (executingVariable) return executingVariable;
1031
1033
  throw new ParseFailure("when", this.pos);
@@ -1193,6 +1195,7 @@ var Parser = class {
1193
1195
  this.skipInlineSpaces();
1194
1196
  this.expect("mock");
1195
1197
  this.skipInlineSpaces();
1198
+ const targetStart = this.pos;
1196
1199
  let target;
1197
1200
  if (this.text.startsWith("query ", this.pos) || this.text.startsWith("mutation ", this.pos)) {
1198
1201
  const type = this.consumeWhile((c) => c !== " ");
@@ -1208,7 +1211,7 @@ var Parser = class {
1208
1211
  const returnValue = this.parseBacktickString();
1209
1212
  this.skipSpaces();
1210
1213
  const end = this.pos;
1211
- return { target, returnValue, start, end };
1214
+ return { target, targetStart, returnValue, start, end };
1212
1215
  }
1213
1216
  parseMock() {
1214
1217
  return this.parseMockHead("with");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpipe-js",
3
- "version": "2.0.36",
3
+ "version": "2.0.38",
4
4
  "description": "Web Pipe parser",
5
5
  "license": "ISC",
6
6
  "author": "William Cotton",