webpipe-js 2.0.35 → 2.0.37

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
@@ -524,18 +524,22 @@ var Parser = class {
524
524
  this.skipInlineSpaces();
525
525
  let config = "";
526
526
  let configType = "quoted";
527
+ let configStart = void 0;
528
+ let configEnd = void 0;
527
529
  if (this.cur() === ":") {
528
530
  this.pos++;
529
531
  this.skipInlineSpaces();
532
+ configStart = this.pos;
530
533
  const res = this.parseStepConfig();
531
534
  config = res.config;
532
535
  configType = res.configType;
536
+ configEnd = this.pos;
533
537
  }
534
538
  const condition = this.parseStepCondition();
535
539
  const parsedJoinTargets = name === "join" ? this.parseJoinTaskNames(config) : void 0;
536
540
  this.skipWhitespaceOnly();
537
541
  const end = this.pos;
538
- return { kind: "Regular", name, args, config, configType, condition, parsedJoinTargets, start, end };
542
+ return { kind: "Regular", name, args, config, configType, configStart, configEnd, condition, parsedJoinTargets, start, end };
539
543
  }
540
544
  /**
541
545
  * Parse optional step condition (tag expression after the config)
@@ -1059,9 +1063,10 @@ var Parser = class {
1059
1063
  this.skipInlineSpaces();
1060
1064
  this.expect("pipeline");
1061
1065
  this.skipInlineSpaces();
1066
+ const nameStart = this.pos;
1062
1067
  const name = this.parseIdentifier();
1063
1068
  const end = this.pos;
1064
- return { kind: "ExecutingPipeline", name, start, end };
1069
+ return { kind: "ExecutingPipeline", name, nameStart, start, end };
1065
1070
  });
1066
1071
  if (executingPipeline) return executingPipeline;
1067
1072
  const executingVariable = this.tryParse(() => {
@@ -1072,9 +1077,10 @@ var Parser = class {
1072
1077
  this.skipInlineSpaces();
1073
1078
  const varType = this.parseIdentifier();
1074
1079
  this.skipInlineSpaces();
1080
+ const nameStart = this.pos;
1075
1081
  const name = this.parseIdentifier();
1076
1082
  const end = this.pos;
1077
- return { kind: "ExecutingVariable", varType, name, start, end };
1083
+ return { kind: "ExecutingVariable", varType, name, nameStart, start, end };
1078
1084
  });
1079
1085
  if (executingVariable) return executingVariable;
1080
1086
  throw new ParseFailure("when", this.pos);
package/dist/index.d.cts CHANGED
@@ -156,6 +156,8 @@ type PipelineStep = {
156
156
  args: string[];
157
157
  config: string;
158
158
  configType: ConfigType;
159
+ configStart?: number;
160
+ configEnd?: number;
159
161
  condition?: TagExpr;
160
162
  parsedJoinTargets?: string[];
161
163
  start: number;
@@ -244,12 +246,14 @@ type When = {
244
246
  } | {
245
247
  kind: 'ExecutingPipeline';
246
248
  name: string;
249
+ nameStart: number;
247
250
  start: number;
248
251
  end: number;
249
252
  } | {
250
253
  kind: 'ExecutingVariable';
251
254
  varType: string;
252
255
  name: string;
256
+ nameStart: number;
253
257
  start: number;
254
258
  end: number;
255
259
  };
package/dist/index.d.ts CHANGED
@@ -156,6 +156,8 @@ type PipelineStep = {
156
156
  args: string[];
157
157
  config: string;
158
158
  configType: ConfigType;
159
+ configStart?: number;
160
+ configEnd?: number;
159
161
  condition?: TagExpr;
160
162
  parsedJoinTargets?: string[];
161
163
  start: number;
@@ -244,12 +246,14 @@ type When = {
244
246
  } | {
245
247
  kind: 'ExecutingPipeline';
246
248
  name: string;
249
+ nameStart: number;
247
250
  start: number;
248
251
  end: number;
249
252
  } | {
250
253
  kind: 'ExecutingVariable';
251
254
  varType: string;
252
255
  name: string;
256
+ nameStart: number;
253
257
  start: number;
254
258
  end: number;
255
259
  };
package/dist/index.mjs CHANGED
@@ -471,18 +471,22 @@ var Parser = class {
471
471
  this.skipInlineSpaces();
472
472
  let config = "";
473
473
  let configType = "quoted";
474
+ let configStart = void 0;
475
+ let configEnd = void 0;
474
476
  if (this.cur() === ":") {
475
477
  this.pos++;
476
478
  this.skipInlineSpaces();
479
+ configStart = this.pos;
477
480
  const res = this.parseStepConfig();
478
481
  config = res.config;
479
482
  configType = res.configType;
483
+ configEnd = this.pos;
480
484
  }
481
485
  const condition = this.parseStepCondition();
482
486
  const parsedJoinTargets = name === "join" ? this.parseJoinTaskNames(config) : void 0;
483
487
  this.skipWhitespaceOnly();
484
488
  const end = this.pos;
485
- return { kind: "Regular", name, args, config, configType, condition, parsedJoinTargets, start, end };
489
+ return { kind: "Regular", name, args, config, configType, configStart, configEnd, condition, parsedJoinTargets, start, end };
486
490
  }
487
491
  /**
488
492
  * Parse optional step condition (tag expression after the config)
@@ -1006,9 +1010,10 @@ var Parser = class {
1006
1010
  this.skipInlineSpaces();
1007
1011
  this.expect("pipeline");
1008
1012
  this.skipInlineSpaces();
1013
+ const nameStart = this.pos;
1009
1014
  const name = this.parseIdentifier();
1010
1015
  const end = this.pos;
1011
- return { kind: "ExecutingPipeline", name, start, end };
1016
+ return { kind: "ExecutingPipeline", name, nameStart, start, end };
1012
1017
  });
1013
1018
  if (executingPipeline) return executingPipeline;
1014
1019
  const executingVariable = this.tryParse(() => {
@@ -1019,9 +1024,10 @@ var Parser = class {
1019
1024
  this.skipInlineSpaces();
1020
1025
  const varType = this.parseIdentifier();
1021
1026
  this.skipInlineSpaces();
1027
+ const nameStart = this.pos;
1022
1028
  const name = this.parseIdentifier();
1023
1029
  const end = this.pos;
1024
- return { kind: "ExecutingVariable", varType, name, start, end };
1030
+ return { kind: "ExecutingVariable", varType, name, nameStart, start, end };
1025
1031
  });
1026
1032
  if (executingVariable) return executingVariable;
1027
1033
  throw new ParseFailure("when", this.pos);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "webpipe-js",
3
- "version": "2.0.35",
3
+ "version": "2.0.37",
4
4
  "description": "Web Pipe parser",
5
5
  "license": "ISC",
6
6
  "author": "William Cotton",