@awsless/cli 0.1.40 → 0.1.41

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 (2) hide show
  1. package/dist/bin.js +916 -343
  2. package/package.json +18 -18
package/dist/bin.js CHANGED
@@ -188726,7 +188726,7 @@ var TERM_STOP = /* @__PURE__ */ new Set([
188726
188726
  "{",
188727
188727
  "}"
188728
188728
  ]);
188729
- var Parser = class {
188729
+ var Parser$1 = class {
188730
188730
  text;
188731
188731
  defaultOperator;
188732
188732
  pos = 0;
@@ -188985,7 +188985,7 @@ var Parser = class {
188985
188985
  };
188986
188986
  var unescape3 = (text2) => text2.replace(/\\(.)/g, "$1");
188987
188987
  var parseQueryString = (text2, defaultOperator) => {
188988
- const parser2 = new Parser(text2, defaultOperator);
188988
+ const parser2 = new Parser$1(text2, defaultOperator);
188989
188989
  const clauses = parser2.parseClauses();
188990
188990
  parser2.skipSpace();
188991
188991
  if (!parser2.eof())
@@ -190238,6 +190238,507 @@ var compileStringNode = (ctx, node, settings2) => {
190238
190238
  });
190239
190239
  }
190240
190240
  };
190241
+ var DocField = class {
190242
+ values;
190243
+ constructor(values) {
190244
+ this.values = values;
190245
+ }
190246
+ };
190247
+ var ParamsBag = class {
190248
+ params;
190249
+ constructor(params) {
190250
+ this.params = params;
190251
+ }
190252
+ };
190253
+ var OPERATORS = [
190254
+ "&&",
190255
+ "||",
190256
+ "==",
190257
+ "!=",
190258
+ "<=",
190259
+ ">=",
190260
+ "?",
190261
+ ":",
190262
+ "!",
190263
+ "<",
190264
+ ">",
190265
+ "+",
190266
+ "-",
190267
+ "*",
190268
+ "/",
190269
+ "%",
190270
+ "(",
190271
+ ")",
190272
+ "[",
190273
+ "]",
190274
+ ".",
190275
+ ",",
190276
+ ";"
190277
+ ];
190278
+ var REJECTED_BEFORE = [
190279
+ "<<<",
190280
+ ">>>",
190281
+ "<<",
190282
+ ">>",
190283
+ "++",
190284
+ "--",
190285
+ "+=",
190286
+ "-=",
190287
+ "*=",
190288
+ "/=",
190289
+ "%=",
190290
+ "===",
190291
+ "!==",
190292
+ "?:",
190293
+ "->",
190294
+ "::"
190295
+ ];
190296
+ var REJECTED_AFTER = [
190297
+ "&",
190298
+ "|",
190299
+ "^",
190300
+ "~",
190301
+ "=",
190302
+ "{",
190303
+ "}"
190304
+ ];
190305
+ var tokenize = (source) => {
190306
+ const tokens = [];
190307
+ let i4 = 0;
190308
+ while (i4 < source.length) {
190309
+ const char = source[i4];
190310
+ if (/\s/.test(char)) {
190311
+ i4++;
190312
+ continue;
190313
+ }
190314
+ if (/[0-9]/.test(char) || char === "." && /[0-9]/.test(source[i4 + 1] ?? "")) {
190315
+ const match2 = /^[0-9]*\.?[0-9]+(?:[eE][+-]?[0-9]+)?[lLfFdD]?/.exec(source.slice(i4));
190316
+ tokens.push({
190317
+ kind: "number",
190318
+ value: Number.parseFloat(match2[0].replace(/[lLfFdD]$/, ""))
190319
+ });
190320
+ i4 += match2[0].length;
190321
+ continue;
190322
+ }
190323
+ if (char === "'" || char === '"') {
190324
+ let j4 = i4 + 1;
190325
+ let text2 = "";
190326
+ while (j4 < source.length && source[j4] !== char) {
190327
+ if (source[j4] === "\\")
190328
+ j4++;
190329
+ text2 += source[j4];
190330
+ j4++;
190331
+ }
190332
+ if (j4 >= source.length)
190333
+ throw illegalArgument(`Unterminated string in script: ${source}`);
190334
+ tokens.push({
190335
+ kind: "string",
190336
+ value: text2
190337
+ });
190338
+ i4 = j4 + 1;
190339
+ continue;
190340
+ }
190341
+ if (/[A-Za-z_$]/.test(char)) {
190342
+ const match2 = /^[A-Za-z_$][A-Za-z0-9_$]*/.exec(source.slice(i4));
190343
+ tokens.push({
190344
+ kind: "name",
190345
+ value: match2[0]
190346
+ });
190347
+ i4 += match2[0].length;
190348
+ continue;
190349
+ }
190350
+ const rejected = REJECTED_BEFORE.find((candidate) => source.startsWith(candidate, i4)) ?? (OPERATORS.some((candidate) => source.startsWith(candidate, i4)) ? undefined : REJECTED_AFTER.find((candidate) => source.startsWith(candidate, i4)));
190351
+ if (rejected)
190352
+ throw unsupported2(`the "${rejected}" operator in scripts`);
190353
+ const op = OPERATORS.find((candidate) => source.startsWith(candidate, i4));
190354
+ if (!op)
190355
+ throw unsupported2(`the "${char}" character in scripts`);
190356
+ tokens.push({
190357
+ kind: "op",
190358
+ value: op
190359
+ });
190360
+ i4 += op.length;
190361
+ }
190362
+ tokens.push({ kind: "end" });
190363
+ return tokens;
190364
+ };
190365
+ var truthy = (value) => {
190366
+ if (typeof value !== "boolean")
190367
+ throw illegalArgument("Script conditions must evaluate to a boolean");
190368
+ return value;
190369
+ };
190370
+ var number4 = (value, what) => {
190371
+ if (typeof value === "number")
190372
+ return value;
190373
+ if (typeof value === "boolean")
190374
+ return value ? 1 : 0;
190375
+ throw illegalArgument(`Script operator ${what} needs numbers, got ${describe3(value)}`);
190376
+ };
190377
+ var describe3 = (value) => {
190378
+ if (value === null)
190379
+ return "null";
190380
+ if (value instanceof DocField)
190381
+ return "doc field";
190382
+ if (value instanceof ParamsBag)
190383
+ return "params";
190384
+ if (Array.isArray(value))
190385
+ return "list";
190386
+ return typeof value;
190387
+ };
190388
+ var equal = (a4, b3) => {
190389
+ if (a4 instanceof DocField || b3 instanceof DocField)
190390
+ throw illegalArgument("Compare doc['field'].value, not the field itself");
190391
+ return a4 === b3;
190392
+ };
190393
+ var contains = (list2, value) => list2.some((entry) => equal(entry, value));
190394
+ var member = (target2, name, args, source) => {
190395
+ if (target2 instanceof ParamsBag) {
190396
+ if (args)
190397
+ throw unsupported2(`calling "${name}" on params`);
190398
+ const value = target2.params[name];
190399
+ return value === undefined ? null : value;
190400
+ }
190401
+ if (target2 instanceof DocField) {
190402
+ switch (name) {
190403
+ case "value":
190404
+ if (args)
190405
+ break;
190406
+ return target2.values[0] ?? null;
190407
+ case "values":
190408
+ if (args)
190409
+ break;
190410
+ return target2.values;
190411
+ case "length":
190412
+ case "size":
190413
+ return target2.values.length;
190414
+ case "empty":
190415
+ case "isEmpty":
190416
+ return target2.values.length === 0;
190417
+ case "contains":
190418
+ if (args?.length !== 1)
190419
+ break;
190420
+ return contains(target2.values, args[0]);
190421
+ }
190422
+ throw unsupported2(`"${name}" on a doc field in scripts (${source})`);
190423
+ }
190424
+ if (Array.isArray(target2)) {
190425
+ switch (name) {
190426
+ case "length":
190427
+ case "size":
190428
+ return target2.length;
190429
+ case "empty":
190430
+ case "isEmpty":
190431
+ return target2.length === 0;
190432
+ case "contains":
190433
+ if (args?.length !== 1)
190434
+ break;
190435
+ return contains(target2, args[0]);
190436
+ }
190437
+ throw unsupported2(`"${name}" on a list in scripts (${source})`);
190438
+ }
190439
+ if (typeof target2 === "string") {
190440
+ switch (name) {
190441
+ case "length":
190442
+ return target2.length;
190443
+ case "isEmpty":
190444
+ case "empty":
190445
+ return target2.length === 0;
190446
+ case "toLowerCase":
190447
+ return target2.toLowerCase();
190448
+ case "toUpperCase":
190449
+ return target2.toUpperCase();
190450
+ case "contains":
190451
+ case "startsWith":
190452
+ case "endsWith":
190453
+ case "equals":
190454
+ if (args?.length !== 1 || typeof args[0] !== "string")
190455
+ break;
190456
+ if (name === "equals")
190457
+ return target2 === args[0];
190458
+ if (name === "contains")
190459
+ return target2.includes(args[0]);
190460
+ return name === "startsWith" ? target2.startsWith(args[0]) : target2.endsWith(args[0]);
190461
+ }
190462
+ throw unsupported2(`"${name}" on a string in scripts (${source})`);
190463
+ }
190464
+ if (target2 === null)
190465
+ throw illegalArgument(`Cannot access "${name}" on null in script: ${source}`);
190466
+ throw unsupported2(`"${name}" on a ${describe3(target2)} in scripts (${source})`);
190467
+ };
190468
+ var mathFunction = (name, args) => {
190469
+ switch (name) {
190470
+ case "max":
190471
+ return Math.max(...args);
190472
+ case "min":
190473
+ return Math.min(...args);
190474
+ case "abs":
190475
+ return Math.abs(args[0]);
190476
+ case "floor":
190477
+ return Math.floor(args[0]);
190478
+ case "ceil":
190479
+ return Math.ceil(args[0]);
190480
+ case "round":
190481
+ return Math.round(args[0]);
190482
+ case "sqrt":
190483
+ return Math.sqrt(args[0]);
190484
+ case "pow":
190485
+ return Math.pow(args[0], args[1]);
190486
+ case "log":
190487
+ return Math.log(args[0]);
190488
+ }
190489
+ throw unsupported2(`"Math.${name}" in scripts`);
190490
+ };
190491
+ var Parser = class {
190492
+ tokens;
190493
+ source;
190494
+ pos = 0;
190495
+ constructor(tokens, source) {
190496
+ this.tokens = tokens;
190497
+ this.source = source;
190498
+ }
190499
+ parse() {
190500
+ if (this.isName("return"))
190501
+ this.pos++;
190502
+ const node = this.ternary();
190503
+ if (this.isOp(";"))
190504
+ this.pos++;
190505
+ if (this.peek().kind !== "end")
190506
+ throw unsupported2(`multi-statement scripts (${this.source})`);
190507
+ return node;
190508
+ }
190509
+ peek() {
190510
+ return this.tokens[this.pos];
190511
+ }
190512
+ isOp(value) {
190513
+ const token = this.peek();
190514
+ return token.kind === "op" && token.value === value;
190515
+ }
190516
+ isName(value) {
190517
+ const token = this.peek();
190518
+ return token.kind === "name" && token.value === value;
190519
+ }
190520
+ expectOp(value) {
190521
+ if (!this.isOp(value))
190522
+ throw illegalArgument(`Expected "${value}" in script: ${this.source}`);
190523
+ this.pos++;
190524
+ }
190525
+ ternary() {
190526
+ const condition = this.or();
190527
+ if (!this.isOp("?"))
190528
+ return condition;
190529
+ this.pos++;
190530
+ const whenTrue = this.ternary();
190531
+ this.expectOp(":");
190532
+ const whenFalse = this.ternary();
190533
+ return (scope) => truthy(condition(scope)) ? whenTrue(scope) : whenFalse(scope);
190534
+ }
190535
+ or() {
190536
+ let left = this.and();
190537
+ while (this.isOp("||")) {
190538
+ this.pos++;
190539
+ const right = this.and();
190540
+ const current = left;
190541
+ left = (scope) => truthy(current(scope)) || truthy(right(scope));
190542
+ }
190543
+ return left;
190544
+ }
190545
+ and() {
190546
+ let left = this.equality();
190547
+ while (this.isOp("&&")) {
190548
+ this.pos++;
190549
+ const right = this.equality();
190550
+ const current = left;
190551
+ left = (scope) => truthy(current(scope)) && truthy(right(scope));
190552
+ }
190553
+ return left;
190554
+ }
190555
+ equality() {
190556
+ let left = this.relational();
190557
+ while (this.isOp("==") || this.isOp("!=")) {
190558
+ const op = this.peek().value;
190559
+ this.pos++;
190560
+ const right = this.relational();
190561
+ const current = left;
190562
+ left = (scope) => op === "==" === equal(current(scope), right(scope));
190563
+ }
190564
+ return left;
190565
+ }
190566
+ relational() {
190567
+ let left = this.additive();
190568
+ while (this.isOp("<") || this.isOp("<=") || this.isOp(">") || this.isOp(">=")) {
190569
+ const op = this.peek().value;
190570
+ this.pos++;
190571
+ const right = this.additive();
190572
+ const current = left;
190573
+ left = (scope) => {
190574
+ const a4 = number4(current(scope), op);
190575
+ const b3 = number4(right(scope), op);
190576
+ return op === "<" ? a4 < b3 : op === "<=" ? a4 <= b3 : op === ">" ? a4 > b3 : a4 >= b3;
190577
+ };
190578
+ }
190579
+ return left;
190580
+ }
190581
+ additive() {
190582
+ let left = this.multiplicative();
190583
+ while (this.isOp("+") || this.isOp("-")) {
190584
+ const op = this.peek().value;
190585
+ this.pos++;
190586
+ const right = this.multiplicative();
190587
+ const current = left;
190588
+ left = (scope) => {
190589
+ const a4 = current(scope);
190590
+ const b3 = right(scope);
190591
+ if (op === "+" && (typeof a4 === "string" || typeof b3 === "string"))
190592
+ return `${String(a4)}${String(b3)}`;
190593
+ return op === "+" ? number4(a4, op) + number4(b3, op) : number4(a4, op) - number4(b3, op);
190594
+ };
190595
+ }
190596
+ return left;
190597
+ }
190598
+ multiplicative() {
190599
+ let left = this.unary();
190600
+ while (this.isOp("*") || this.isOp("/") || this.isOp("%")) {
190601
+ const op = this.peek().value;
190602
+ this.pos++;
190603
+ const right = this.unary();
190604
+ const current = left;
190605
+ left = (scope) => {
190606
+ const a4 = number4(current(scope), op);
190607
+ const b3 = number4(right(scope), op);
190608
+ return op === "*" ? a4 * b3 : op === "/" ? a4 / b3 : a4 % b3;
190609
+ };
190610
+ }
190611
+ return left;
190612
+ }
190613
+ unary() {
190614
+ if (this.isOp("!")) {
190615
+ this.pos++;
190616
+ const operand = this.unary();
190617
+ return (scope) => !truthy(operand(scope));
190618
+ }
190619
+ if (this.isOp("-")) {
190620
+ this.pos++;
190621
+ const operand = this.unary();
190622
+ return (scope) => -number4(operand(scope), "-");
190623
+ }
190624
+ return this.postfix();
190625
+ }
190626
+ postfix() {
190627
+ let node = this.primary();
190628
+ while (true) {
190629
+ if (this.isOp(".")) {
190630
+ this.pos++;
190631
+ const token = this.peek();
190632
+ if (token.kind !== "name")
190633
+ throw illegalArgument(`Expected a member name in script: ${this.source}`);
190634
+ this.pos++;
190635
+ const name = token.value;
190636
+ const args = this.isOp("(") ? this.arguments() : undefined;
190637
+ const target2 = node;
190638
+ node = (scope) => member(target2(scope), name, args?.map((arg) => arg(scope)), this.source);
190639
+ continue;
190640
+ }
190641
+ if (this.isOp("[")) {
190642
+ this.pos++;
190643
+ const key = this.ternary();
190644
+ this.expectOp("]");
190645
+ const target2 = node;
190646
+ node = (scope) => index(target2(scope), key(scope), this.source);
190647
+ continue;
190648
+ }
190649
+ break;
190650
+ }
190651
+ return node;
190652
+ }
190653
+ arguments() {
190654
+ this.expectOp("(");
190655
+ const args = [];
190656
+ if (!this.isOp(")")) {
190657
+ args.push(this.ternary());
190658
+ while (this.isOp(",")) {
190659
+ this.pos++;
190660
+ args.push(this.ternary());
190661
+ }
190662
+ }
190663
+ this.expectOp(")");
190664
+ return args;
190665
+ }
190666
+ primary() {
190667
+ const token = this.peek();
190668
+ if (token.kind === "number") {
190669
+ this.pos++;
190670
+ return () => token.value;
190671
+ }
190672
+ if (token.kind === "string") {
190673
+ this.pos++;
190674
+ return () => token.value;
190675
+ }
190676
+ if (token.kind === "op" && token.value === "(") {
190677
+ this.pos++;
190678
+ const inner = this.ternary();
190679
+ this.expectOp(")");
190680
+ return inner;
190681
+ }
190682
+ if (token.kind === "name") {
190683
+ this.pos++;
190684
+ switch (token.value) {
190685
+ case "true":
190686
+ return () => true;
190687
+ case "false":
190688
+ return () => false;
190689
+ case "null":
190690
+ return () => null;
190691
+ case "params":
190692
+ return (scope) => new ParamsBag(scope.params);
190693
+ case "doc": {
190694
+ this.expectOp("[");
190695
+ const key = this.ternary();
190696
+ this.expectOp("]");
190697
+ return (scope) => {
190698
+ const name = key(scope);
190699
+ if (typeof name !== "string")
190700
+ throw illegalArgument(`doc[] needs a field name in script: ${this.source}`);
190701
+ return new DocField(scope.field(name));
190702
+ };
190703
+ }
190704
+ case "Math": {
190705
+ this.expectOp(".");
190706
+ const name = this.peek();
190707
+ if (name.kind !== "name")
190708
+ throw illegalArgument(`Expected a Math function in script: ${this.source}`);
190709
+ this.pos++;
190710
+ const args = this.arguments();
190711
+ return (scope) => mathFunction(name.value, args.map((arg) => number4(arg(scope), `Math.${name.value}`)));
190712
+ }
190713
+ }
190714
+ throw unsupported2(`the "${token.value}" identifier in scripts (${this.source})`);
190715
+ }
190716
+ throw illegalArgument(`Unexpected token in script: ${this.source}`);
190717
+ }
190718
+ };
190719
+ var index = (target2, key, source) => {
190720
+ if (Array.isArray(target2)) {
190721
+ if (typeof key !== "number")
190722
+ throw illegalArgument(`List index must be a number in script: ${source}`);
190723
+ return target2[key] ?? null;
190724
+ }
190725
+ if (target2 instanceof ParamsBag) {
190726
+ if (typeof key !== "string")
190727
+ throw illegalArgument(`params key must be a string in script: ${source}`);
190728
+ const value = target2.params[key];
190729
+ return value === undefined ? null : value;
190730
+ }
190731
+ throw unsupported2(`indexing a ${describe3(target2)} in scripts (${source})`);
190732
+ };
190733
+ var cache3 = /* @__PURE__ */ new Map;
190734
+ var compileScript = (source) => {
190735
+ const cached2 = cache3.get(source);
190736
+ if (cached2)
190737
+ return cached2;
190738
+ const node = new Parser(tokenize(source), source).parse();
190739
+ cache3.set(source, node);
190740
+ return node;
190741
+ };
190241
190742
  var LONG_MAX = 2 ** 63;
190242
190743
  var LONG_MIN = -(2 ** 63);
190243
190744
  var parseSort = (sort2) => {
@@ -190254,8 +190755,10 @@ var parseSort = (sort2) => {
190254
190755
  if (!isPlainObject3(entry))
190255
190756
  throw illegalArgument("sort entries must be strings or objects");
190256
190757
  for (const [field, options2] of Object.entries(entry)) {
190257
- if (field === "_script")
190258
- throw unsupported2("script sorting");
190758
+ if (field === "_script") {
190759
+ specs.push(makeScriptSpec(options2));
190760
+ continue;
190761
+ }
190259
190762
  if (field === "_geo_distance")
190260
190763
  throw unsupported2("geo distance sorting");
190261
190764
  specs.push(makeSpec(field, isPlainObject3(options2) ? options2 : { order: options2 }));
@@ -190263,6 +190766,44 @@ var parseSort = (sort2) => {
190263
190766
  }
190264
190767
  return specs;
190265
190768
  };
190769
+ var makeScriptSpec = (options2) => {
190770
+ if (!isPlainObject3(options2))
190771
+ throw illegalArgument("_script sort needs an object");
190772
+ for (const key of Object.keys(options2))
190773
+ if (![
190774
+ "type",
190775
+ "order",
190776
+ "script",
190777
+ "mode",
190778
+ "nested"
190779
+ ].includes(key))
190780
+ throw unsupported2(`the "${key}" _script sort option`);
190781
+ if (options2.nested !== undefined)
190782
+ throw unsupported2("nested script sorting");
190783
+ if (options2.mode !== undefined)
190784
+ throw unsupported2('the "mode" _script sort option');
190785
+ const type = options2.type === undefined ? undefined : String(options2.type);
190786
+ if (type !== "number" && type !== "string")
190787
+ throw illegalArgument(`_script sort needs a type of "number" or "string", got [${String(options2.type)}]`);
190788
+ const script2 = options2.script;
190789
+ if (!isPlainObject3(script2))
190790
+ throw illegalArgument("_script sort needs a script object");
190791
+ if (script2.lang !== undefined && script2.lang !== "painless")
190792
+ throw unsupported2(`the "${String(script2.lang)}" script language`);
190793
+ if (script2.id !== undefined)
190794
+ throw unsupported2("stored scripts");
190795
+ const source = script2.source ?? script2.inline;
190796
+ if (typeof source !== "string")
190797
+ throw illegalArgument("_script sort needs a script source");
190798
+ const params = isPlainObject3(script2.params) ? script2.params : {};
190799
+ const spec = makeSpec("_script", { order: options2.order });
190800
+ spec.script = {
190801
+ run: compileScript(source),
190802
+ type,
190803
+ params
190804
+ };
190805
+ return spec;
190806
+ };
190266
190807
  var makeSpec = (field, options2) => {
190267
190808
  for (const key of Object.keys(options2))
190268
190809
  if (![
@@ -190352,11 +190893,43 @@ var reduce = (values, mode, order) => {
190352
190893
  }
190353
190894
  }
190354
190895
  };
190896
+ var scriptFieldValues = (ctx, doc2) => (name) => {
190897
+ const field = resolveField(ctx.index.mapping, name);
190898
+ if (!field)
190899
+ throw illegalArgument(`No field found for [${name}] in mapping`);
190900
+ if (field.type === "object" || field.type === "nested")
190901
+ throw illegalArgument(`Fielddata is not supported on field [${name}] of type [${field.type}]`);
190902
+ if (field.type === "text" && field.mapping.fielddata !== true)
190903
+ throw illegalArgument(TEXT_SORT_ERROR.replace("FIELD", name));
190904
+ return comparableValues(doc2, field);
190905
+ };
190906
+ var scriptSortValue = (ctx, doc2, spec) => {
190907
+ const { run, type, params } = spec.script;
190908
+ const result = run({
190909
+ field: scriptFieldValues(ctx, doc2),
190910
+ params
190911
+ });
190912
+ if (result === null)
190913
+ return null;
190914
+ if (result instanceof DocField)
190915
+ throw illegalArgument("A script sort must return a value, not doc['field']");
190916
+ if (Array.isArray(result) || typeof result === "object")
190917
+ throw illegalArgument("A script sort must return a number or string");
190918
+ if (type === "string")
190919
+ return String(result);
190920
+ if (typeof result === "boolean")
190921
+ return result ? 1 : 0;
190922
+ if (typeof result === "string")
190923
+ throw illegalArgument(`A script sort of type number returned the string [${result}]`);
190924
+ return result;
190925
+ };
190355
190926
  var sortValueOf = (ctx, doc2, score, spec) => {
190356
190927
  if (spec.field === "_score")
190357
190928
  return score;
190358
190929
  if (spec.field === "_doc")
190359
190930
  return doc2.order;
190931
+ if (spec.script)
190932
+ return scriptSortValue(ctx, doc2, spec);
190360
190933
  const field = requireSortableField(ctx, spec.field, spec.unmappedType);
190361
190934
  if (!field)
190362
190935
  return null;
@@ -190431,7 +191004,7 @@ var isAfter = (hit, cursor3, specs) => {
190431
191004
  var renderSortValue = (ctx, value, spec) => {
190432
191005
  if (value !== null)
190433
191006
  return typeof value === "boolean" ? value ? 1 : 0 : value;
190434
- if (spec.field === "_score" || spec.field === "_doc")
191007
+ if (spec.field === "_score" || spec.field === "_doc" || spec.script)
190435
191008
  return null;
190436
191009
  const field = resolveField(ctx.index.mapping, spec.field);
190437
191010
  if (!(field ? isNumericType(field.type) || field.type === "date" || field.type === "boolean" : spec.unmappedType !== "keyword"))
@@ -190598,13 +191171,13 @@ var subResults = (agg, subAggs, units) => {
190598
191171
  return subAggs === undefined ? {} : runAggregations(agg, subAggs, units);
190599
191172
  };
190600
191173
  var compileFilter = (agg, query) => {
190601
- const cache3 = /* @__PURE__ */ new Map;
191174
+ const cache4 = /* @__PURE__ */ new Map;
190602
191175
  return (unit) => {
190603
- const index = unit.root.index;
190604
- let compiled = cache3.get(index);
191176
+ const index2 = unit.root.index;
191177
+ let compiled = cache4.get(index2);
190605
191178
  if (!compiled) {
190606
- compiled = compileQuery(agg.contextFor(index), query);
190607
- cache3.set(index, compiled);
191179
+ compiled = compileQuery(agg.contextFor(index2), query);
191180
+ cache4.set(index2, compiled);
190608
191181
  }
190609
191182
  return compiled.match(unit) !== undefined;
190610
191183
  };
@@ -191138,10 +191711,10 @@ var readBoolean = (value, what) => {
191138
191711
  var readInteger = (value, what) => {
191139
191712
  if (value === undefined || value === null)
191140
191713
  return;
191141
- const number4 = typeof value === "number" ? value : Number(value);
191142
- if (!Number.isInteger(number4))
191714
+ const number5 = typeof value === "number" ? value : Number(value);
191715
+ if (!Number.isInteger(number5))
191143
191716
  throw illegalArgument(`[${what}] must be an integer`);
191144
- return number4;
191717
+ return number5;
191145
191718
  };
191146
191719
  var queryFromParams = (params) => {
191147
191720
  const q3 = params.get("q");
@@ -191175,16 +191748,16 @@ var resolveQuery = (body, params) => {
191175
191748
  throw illegalArgument("Cannot combine the q parameter with a request body query");
191176
191749
  return fromParams ?? body.query;
191177
191750
  };
191178
- var collectMatches = (index, query, now) => {
191179
- const ctx = createContext(index, now);
191751
+ var collectMatches = (index2, query, now) => {
191752
+ const ctx = createContext(index2, now);
191180
191753
  let compiled;
191181
191754
  try {
191182
191755
  compiled = compileQuery(ctx, query);
191183
191756
  } catch (error53) {
191184
- throw wrapSearchError(error53, index.name);
191757
+ throw wrapSearchError(error53, index2.name);
191185
191758
  }
191186
191759
  const hits = [];
191187
- for (const doc2 of index.docs.values()) {
191760
+ for (const doc2 of index2.docs.values()) {
191188
191761
  const score = compiled.match(doc2);
191189
191762
  if (score !== undefined)
191190
191763
  hits.push({
@@ -191194,7 +191767,7 @@ var collectMatches = (index, query, now) => {
191194
191767
  });
191195
191768
  }
191196
191769
  return {
191197
- index,
191770
+ index: index2,
191198
191771
  ctx,
191199
191772
  hits
191200
191773
  };
@@ -191203,8 +191776,8 @@ var countDocuments = (store2, indices, body, params) => {
191203
191776
  const query = resolveQuery(body ?? {}, params);
191204
191777
  let count = 0;
191205
191778
  const now = Date.now();
191206
- for (const index of store2.resolve(indices))
191207
- count += collectMatches(index, query, now).hits.length;
191779
+ for (const index2 of store2.resolve(indices))
191780
+ count += collectMatches(index2, query, now).hits.length;
191208
191781
  return count;
191209
191782
  };
191210
191783
  var deleteByQuery = (store2, indices, body, params) => {
@@ -191213,9 +191786,9 @@ var deleteByQuery = (store2, indices, body, params) => {
191213
191786
  throw illegalArgument("query is missing");
191214
191787
  let deleted = 0;
191215
191788
  const now = Date.now();
191216
- for (const index of store2.resolve(indices))
191217
- for (const hit of collectMatches(index, query, now).hits) {
191218
- index.delete(hit.doc.id);
191789
+ for (const index2 of store2.resolve(indices))
191790
+ for (const hit of collectMatches(index2, query, now).hits) {
191791
+ index2.delete(hit.doc.id);
191219
191792
  deleted++;
191220
191793
  }
191221
191794
  return deleted;
@@ -191253,15 +191826,15 @@ var search = (store2, request) => {
191253
191826
  const indices = store2.resolve(request.indices);
191254
191827
  const now = started;
191255
191828
  const matches = [];
191256
- for (const index of indices) {
191257
- const matched = collectMatches(index, query, now);
191829
+ for (const index2 of indices) {
191830
+ const matched = collectMatches(index2, query, now);
191258
191831
  if (minScore !== undefined)
191259
191832
  matched.hits = matched.hits.filter((hit) => hit.score >= minScore);
191260
191833
  try {
191261
191834
  for (const hit of matched.hits)
191262
191835
  hit.sort = specs.map((spec) => sortValueOf(matched.ctx, hit.doc, hit.score, spec));
191263
191836
  } catch (error53) {
191264
- throw wrapSearchError(error53, index.name);
191837
+ throw wrapSearchError(error53, index2.name);
191265
191838
  }
191266
191839
  matches.push(matched);
191267
191840
  }
@@ -191345,7 +191918,7 @@ var runAggs = (spec, hits, contexts, indices) => {
191345
191918
  const agg = {
191346
191919
  contextFor: (name) => contexts.get(name),
191347
191920
  scores,
191348
- allDocs: () => indices.flatMap((index) => [...index.docs.values()])
191921
+ allDocs: () => indices.flatMap((index2) => [...index2.docs.values()])
191349
191922
  };
191350
191923
  try {
191351
191924
  return runAggregations(agg, spec, hits.map((h4) => h4.doc));
@@ -191376,8 +191949,8 @@ var optionalBody = (request) => {
191376
191949
  throw illegalArgument("request body must be a JSON object");
191377
191950
  return request.body;
191378
191951
  };
191379
- var writeResponse = (index, result) => ({
191380
- _index: index.name,
191952
+ var writeResponse = (index2, result) => ({
191953
+ _index: index2.name,
191381
191954
  _id: result.doc.id,
191382
191955
  _version: result.doc.version,
191383
191956
  result: result.result,
@@ -191385,17 +191958,17 @@ var writeResponse = (index, result) => ({
191385
191958
  _seq_no: result.doc.seqNo,
191386
191959
  _primary_term: 1
191387
191960
  });
191388
- var getResponse = (index, id, sourceFilter) => {
191389
- const doc2 = index.get(id);
191961
+ var getResponse = (index2, id, sourceFilter) => {
191962
+ const doc2 = index2.get(id);
191390
191963
  if (!doc2)
191391
191964
  return {
191392
- _index: index.name,
191965
+ _index: index2.name,
191393
191966
  _id: id,
191394
191967
  found: false
191395
191968
  };
191396
191969
  const source = applySourceFilter(doc2.source, sourceFilter);
191397
191970
  return {
191398
- _index: index.name,
191971
+ _index: index2.name,
191399
191972
  _id: id,
191400
191973
  _version: doc2.version,
191401
191974
  _seq_no: doc2.seqNo,
@@ -191472,17 +192045,17 @@ var parseBulkBody = (raw, defaultIndex) => {
191472
192045
  }
191473
192046
  return items;
191474
192047
  };
191475
- var bulkError = (error53, index, id) => {
192048
+ var bulkError = (error53, index2, id) => {
191476
192049
  if (!(error53 instanceof OpenSearchError))
191477
192050
  throw error53;
191478
192051
  return {
191479
- _index: index,
192052
+ _index: index2,
191480
192053
  _id: id ?? null,
191481
192054
  status: error53.status,
191482
192055
  error: {
191483
192056
  type: error53.type,
191484
192057
  reason: error53.reason,
191485
- index,
192058
+ index: index2,
191486
192059
  index_uuid: "_na_",
191487
192060
  shard: "0"
191488
192061
  }
@@ -191497,12 +192070,12 @@ var runBulk = (store2, request, defaultIndex) => {
191497
192070
  const id = item.meta._id === undefined ? undefined : String(item.meta._id);
191498
192071
  try {
191499
192072
  if (item.action === "delete") {
191500
- const index2 = store2.indices.get(indexName);
191501
- if (!index2)
192073
+ const index3 = store2.indices.get(indexName);
192074
+ if (!index3)
191502
192075
  throw indexNotFound(indexName);
191503
192076
  if (id === undefined)
191504
192077
  throw illegalArgument("Validation Failed: 1: id is missing;");
191505
- const doc2 = index2.delete(id);
192078
+ const doc2 = index3.delete(id);
191506
192079
  return { delete: {
191507
192080
  _index: indexName,
191508
192081
  _id: id,
@@ -191514,20 +192087,20 @@ var runBulk = (store2, request, defaultIndex) => {
191514
192087
  status: doc2 ? 200 : 404
191515
192088
  } };
191516
192089
  }
191517
- const index = store2.getOrCreate(indexName);
192090
+ const index2 = store2.getOrCreate(indexName);
191518
192091
  if (item.action === "update") {
191519
192092
  if (id === undefined)
191520
192093
  throw illegalArgument("Validation Failed: 1: id is missing;");
191521
- const result2 = index.update(id, item.source);
192094
+ const result2 = index2.update(id, item.source);
191522
192095
  return { update: {
191523
- ...writeResponse(index, result2),
192096
+ ...writeResponse(index2, result2),
191524
192097
  status: 200
191525
192098
  } };
191526
192099
  }
191527
192100
  const create = item.action === "create" || item.meta.op_type === "create";
191528
- const result = index.put(id ?? generateId(), item.source, { create });
192101
+ const result = index2.put(id ?? generateId(), item.source, { create });
191529
192102
  return { [item.action]: {
191530
- ...writeResponse(index, result),
192103
+ ...writeResponse(index2, result),
191531
192104
  status: result.result === "created" ? 201 : 200
191532
192105
  } };
191533
192106
  } catch (error53) {
@@ -191546,14 +192119,14 @@ var catIndices = (store2, params, expression) => {
191546
192119
  if (format3 !== "json")
191547
192120
  throw unsupported2(`the "${format3}" cat format (use format=json)`);
191548
192121
  const indices = expression === undefined ? [...store2.indices.values()] : store2.resolve(expression);
191549
- return ok(indices.map((index) => ({
192122
+ return ok(indices.map((index2) => ({
191550
192123
  health: "green",
191551
192124
  status: "open",
191552
- index: index.name,
191553
- uuid: index.uuid,
192125
+ index: index2.name,
192126
+ uuid: index2.uuid,
191554
192127
  pri: "1",
191555
192128
  rep: "1",
191556
- "docs.count": String(index.docs.size),
192129
+ "docs.count": String(index2.docs.size),
191557
192130
  "docs.deleted": "0",
191558
192131
  "store.size": "0b",
191559
192132
  "pri.store.size": "0b"
@@ -191595,13 +192168,13 @@ var mgetDocs = (store2, request, defaultIndex) => {
191595
192168
  for (const doc2 of body.docs) {
191596
192169
  if (!isPlainObject3(doc2))
191597
192170
  throw illegalArgument("docs entries must be objects");
191598
- const index = doc2._index === undefined ? defaultIndex : String(doc2._index);
191599
- if (index === undefined)
192171
+ const index2 = doc2._index === undefined ? defaultIndex : String(doc2._index);
192172
+ if (index2 === undefined)
191600
192173
  throw illegalArgument("Validation Failed: 1: index is missing;");
191601
192174
  if (doc2._id === undefined)
191602
192175
  throw illegalArgument("Validation Failed: 1: id is missing;");
191603
192176
  entries2.push({
191604
- index,
192177
+ index: index2,
191605
192178
  id: String(doc2._id),
191606
192179
  filter: doc2._source === undefined ? filter2 : parseSourceFilter(doc2._source)
191607
192180
  });
@@ -191609,8 +192182,8 @@ var mgetDocs = (store2, request, defaultIndex) => {
191609
192182
  else
191610
192183
  throw illegalArgument("Validation Failed: 1: no documents to get;");
191611
192184
  return ok({ docs: entries2.map((entry) => {
191612
- const index = store2.indices.get(entry.index);
191613
- if (!index) {
192185
+ const index2 = store2.indices.get(entry.index);
192186
+ if (!index2) {
191614
192187
  const error53 = indexNotFound(entry.index);
191615
192188
  return {
191616
192189
  _index: entry.index,
@@ -191622,17 +192195,17 @@ var mgetDocs = (store2, request, defaultIndex) => {
191622
192195
  }
191623
192196
  };
191624
192197
  }
191625
- return getResponse(index, entry.id, entry.filter);
192198
+ return getResponse(index2, entry.id, entry.filter);
191626
192199
  }) });
191627
192200
  };
191628
192201
  var putDocument = (store2, request, indexName, id, forceCreate) => {
191629
192202
  const source = requireBody(request);
191630
- const index = store2.getOrCreate(indexName);
192203
+ const index2 = store2.getOrCreate(indexName);
191631
192204
  const create = forceCreate || request.params.get("op_type") === "create";
191632
- if (create && id !== undefined && index.get(id))
192205
+ if (create && id !== undefined && index2.get(id))
191633
192206
  throw versionConflict(indexName, id);
191634
- const result = index.put(id ?? generateId(), source, { create });
191635
- return ok(writeResponse(index, result), result.result === "created" ? 201 : 200);
192207
+ const result = index2.put(id ?? generateId(), source, { create });
192208
+ return ok(writeResponse(index2, result), result.result === "created" ? 201 : 200);
191636
192209
  };
191637
192210
  var createRoutes = (store2) => {
191638
192211
  const route = (methods, pattern, handler) => ({
@@ -191721,14 +192294,14 @@ var createRoutes = (store2) => {
191721
192294
  }),
191722
192295
  route("GET", "/_mapping", () => {
191723
192296
  const result = {};
191724
- for (const index of store2.indices.values())
191725
- result[index.name] = { mappings: index.mapping };
192297
+ for (const index2 of store2.indices.values())
192298
+ result[index2.name] = { mappings: index2.mapping };
191726
192299
  return ok(result);
191727
192300
  }),
191728
192301
  route("GET", "/_all", () => {
191729
192302
  const result = {};
191730
- for (const index of store2.indices.values())
191731
- result[index.name] = index.describe();
192303
+ for (const index2 of store2.indices.values())
192304
+ result[index2.name] = index2.describe();
191732
192305
  return ok(result);
191733
192306
  }),
191734
192307
  route("HEAD", "/:index", (_request, path6) => {
@@ -191737,8 +192310,8 @@ var createRoutes = (store2) => {
191737
192310
  }),
191738
192311
  route("GET", "/:index", (_request, path6) => {
191739
192312
  const result = {};
191740
- for (const index of store2.resolve(path6.index))
191741
- result[index.name] = index.describe();
192313
+ for (const index2 of store2.resolve(path6.index))
192314
+ result[index2.name] = index2.describe();
191742
192315
  return ok(result);
191743
192316
  }),
191744
192317
  route("PUT", "/:index", (request, path6) => {
@@ -191765,33 +192338,33 @@ var createRoutes = (store2) => {
191765
192338
  }),
191766
192339
  route("GET", "/:index/_mapping", (_request, path6) => {
191767
192340
  const result = {};
191768
- for (const index of store2.resolve(path6.index))
191769
- result[index.name] = { mappings: index.mapping };
192341
+ for (const index2 of store2.resolve(path6.index))
192342
+ result[index2.name] = { mappings: index2.mapping };
191770
192343
  return ok(result);
191771
192344
  }),
191772
192345
  route("PUT,POST", "/:index/_mapping", (request, path6) => {
191773
192346
  const body = requireBody(request);
191774
- for (const index of store2.resolve(path6.index))
191775
- index.putMapping(body);
192347
+ for (const index2 of store2.resolve(path6.index))
192348
+ index2.putMapping(body);
191776
192349
  return ok({ acknowledged: true });
191777
192350
  }),
191778
192351
  route("GET", "/:index/_settings", (_request, path6) => {
191779
192352
  const result = {};
191780
- for (const index of store2.resolve(path6.index))
191781
- result[index.name] = { settings: index.describe().settings };
192353
+ for (const index2 of store2.resolve(path6.index))
192354
+ result[index2.name] = { settings: index2.describe().settings };
191782
192355
  return ok(result);
191783
192356
  }),
191784
192357
  route("POST", "/:index/_doc", (request, path6) => putDocument(store2, request, path6.index, undefined, false)),
191785
192358
  route("PUT,POST", "/:index/_doc/:id", (request, path6) => putDocument(store2, request, path6.index, path6.id, false)),
191786
192359
  route("PUT,POST", "/:index/_create/:id", (request, path6) => putDocument(store2, request, path6.index, path6.id, true)),
191787
192360
  route("GET", "/:index/_doc/:id", (request, path6) => {
191788
- const index = store2.get(path6.index);
191789
- const response = getResponse(index, path6.id, sourceFilterFromParams(request.params));
192361
+ const index2 = store2.get(path6.index);
192362
+ const response = getResponse(index2, path6.id, sourceFilterFromParams(request.params));
191790
192363
  return ok(response, response.found ? 200 : 404);
191791
192364
  }),
191792
192365
  route("HEAD", "/:index/_doc/:id", (_request, path6) => {
191793
- const index = store2.get(path6.index);
191794
- return ok(undefined, index.get(path6.id) ? 200 : 404);
192366
+ const index2 = store2.get(path6.index);
192367
+ return ok(undefined, index2.get(path6.id) ? 200 : 404);
191795
192368
  }),
191796
192369
  route("GET", "/:index/_source/:id", (request, path6) => {
191797
192370
  const doc2 = store2.get(path6.index).get(path6.id);
@@ -191800,14 +192373,14 @@ var createRoutes = (store2) => {
191800
192373
  return ok(applySourceFilter(doc2.source, sourceFilterFromParams(request.params)) ?? {});
191801
192374
  }),
191802
192375
  route("HEAD", "/:index/_source/:id", (_request, path6) => {
191803
- const index = store2.get(path6.index);
191804
- return ok(undefined, index.get(path6.id) ? 200 : 404);
192376
+ const index2 = store2.get(path6.index);
192377
+ return ok(undefined, index2.get(path6.id) ? 200 : 404);
191805
192378
  }),
191806
192379
  route("DELETE", "/:index/_doc/:id", (_request, path6) => {
191807
- const index = store2.get(path6.index);
191808
- const doc2 = index.delete(path6.id);
192380
+ const index2 = store2.get(path6.index);
192381
+ const doc2 = index2.delete(path6.id);
191809
192382
  return ok({
191810
- _index: index.name,
192383
+ _index: index2.name,
191811
192384
  _id: path6.id,
191812
192385
  _version: doc2 ? doc2.version + 1 : 1,
191813
192386
  result: doc2 ? "deleted" : "not_found",
@@ -191817,10 +192390,10 @@ var createRoutes = (store2) => {
191817
192390
  }, doc2 ? 200 : 404);
191818
192391
  }),
191819
192392
  route("POST", "/:index/_update/:id", (request, path6) => {
191820
- const index = store2.get(path6.index);
192393
+ const index2 = store2.get(path6.index);
191821
192394
  const body = requireBody(request);
191822
- const result = index.update(path6.id, body);
191823
- const response = writeResponse(index, result);
192395
+ const result = index2.update(path6.id, body);
192396
+ const response = writeResponse(index2, result);
191824
192397
  const sourceParam = request.params.get("_source") ?? (body._source === true ? "true" : undefined);
191825
192398
  if (sourceParam !== undefined && sourceParam !== "false")
191826
192399
  response.get = {
@@ -192557,9 +193130,9 @@ ${(errors4.trim() || output.trim()).slice(-2000)}`);
192557
193130
  const hashes = files.map((file3) => $hash(join33(staticDir, file3)));
192558
193131
  const version3 = $combine(...hashes).pipe((hashes2) => {
192559
193132
  const hash3 = createHash19("sha1");
192560
- for (const [index, file3] of files.entries()) {
193133
+ for (const [index2, file3] of files.entries()) {
192561
193134
  hash3.update(file3);
192562
- hash3.update(hashes2[index]);
193135
+ hash3.update(hashes2[index2]);
192563
193136
  }
192564
193137
  return hash3.digest("hex");
192565
193138
  });
@@ -192734,9 +193307,9 @@ var storeFeature = defineFeature({
192734
193307
  for (const [id, props] of Object.entries(ctx.stackConfig.stores ?? {})) {
192735
193308
  const group = new Group(ctx.stack, "store", id);
192736
193309
  const folder = getFeatureFolder("store", ctx.stack.name, id);
192737
- for (const [index, rule] of Object.entries(props.lifecycle ?? [])) {
193310
+ for (const [index2, rule] of Object.entries(props.lifecycle ?? [])) {
192738
193311
  bucket.addLifecycleRule({
192739
- id: `expire-${kebabCase(`${folder}${rule.prefix ?? `rule-${index}`}`)}`,
193312
+ id: `expire-${kebabCase(`${folder}${rule.prefix ?? `rule-${index2}`}`)}`,
192740
193313
  enabled: true,
192741
193314
  prefix: `${folder}${rule.prefix ?? ""}`,
192742
193315
  expiration: { days: toDays11(rule.expiration) }
@@ -192827,12 +193400,12 @@ var createDataReset = (props) => {
192827
193400
  const client2 = new Client5({ node: `http://localhost:${search2.port}` });
192828
193401
  for (const stack of props.stackConfigs) {
192829
193402
  for (const [id, searchProps] of Object.entries(stack.searchs ?? {})) {
192830
- const index = formatSearchIndexName(stack.name, id);
193403
+ const index2 = formatSearchIndexName(stack.name, id);
192831
193404
  try {
192832
- await client2.indices.delete({ index });
193405
+ await client2.indices.delete({ index: index2 });
192833
193406
  } catch {}
192834
193407
  await applySearchIndex(client2, {
192835
- index,
193408
+ index: index2,
192836
193409
  mappings: resolveSearchMappings(searchProps),
192837
193410
  settings: searchProps.settings
192838
193411
  });
@@ -192862,11 +193435,11 @@ var formatTableKeys = (props) => {
192862
193435
  hash: props.hash,
192863
193436
  ...props.sort ? { sort: props.sort } : {},
192864
193437
  ...props.indexes && Object.keys(props.indexes).length > 0 ? {
192865
- indexes: Object.fromEntries(Object.entries(props.indexes).map(([name, index]) => [
193438
+ indexes: Object.fromEntries(Object.entries(props.indexes).map(([name, index2]) => [
192866
193439
  name,
192867
193440
  {
192868
- hash: index.hash,
192869
- ...index.sort ? { sort: index.sort } : {}
193441
+ hash: index2.hash,
193442
+ ...index2.sort ? { sort: index2.sort } : {}
192870
193443
  }
192871
193444
  ]))
192872
193445
  } : {}
@@ -192883,9 +193456,9 @@ var createTableInput = (name, props) => {
192883
193456
  const attributes = new Set([
192884
193457
  props.hash,
192885
193458
  props.sort,
192886
- ...Object.values(props.indexes ?? {}).map((index) => [
192887
- index.hash,
192888
- index.sort
193459
+ ...Object.values(props.indexes ?? {}).map((index2) => [
193460
+ index2.hash,
193461
+ index2.sort
192889
193462
  ])
192890
193463
  ].flat(2).filter((v3) => !!v3));
192891
193464
  return {
@@ -192899,12 +193472,12 @@ var createTableInput = (name, props) => {
192899
193472
  AttributeName: name2,
192900
193473
  AttributeType: attributeTypes[props.fields?.[name2] ?? "string"]
192901
193474
  })),
192902
- GlobalSecondaryIndexes: props.indexes && Object.keys(props.indexes).length > 0 ? Object.entries(props.indexes).map(([name2, index]) => ({
193475
+ GlobalSecondaryIndexes: props.indexes && Object.keys(props.indexes).length > 0 ? Object.entries(props.indexes).map(([name2, index2]) => ({
192903
193476
  IndexName: name2,
192904
- Projection: { ProjectionType: constantCase(index.projection) },
193477
+ Projection: { ProjectionType: constantCase(index2.projection) },
192905
193478
  KeySchema: [
192906
- ...index.hash.map((name3) => ({ AttributeName: name3, KeyType: "HASH" })),
192907
- ...(index.sort ?? []).map((name3) => ({ AttributeName: name3, KeyType: "RANGE" }))
193479
+ ...index2.hash.map((name3) => ({ AttributeName: name3, KeyType: "HASH" })),
193480
+ ...(index2.sort ?? []).map((name3) => ({ AttributeName: name3, KeyType: "RANGE" }))
192908
193481
  ]
192909
193482
  })) : undefined,
192910
193483
  StreamSpecification: props.stream ? {
@@ -193036,9 +193609,9 @@ var tableFeature = defineFeature({
193036
193609
  resourceName: name
193037
193610
  });
193038
193611
  const sort2 = props.sort ? keyValue(props.sort) : "undefined";
193039
- const indexes = props.indexes && Object.keys(props.indexes).length > 0 ? `{ ${Object.entries(props.indexes).map(([indexName, index]) => {
193040
- const indexSort = index.sort ? `; sort: ${keyValue(index.sort)}` : "";
193041
- return `'${indexName}': { hash: ${keyValue(index.hash)}${indexSort} }`;
193612
+ const indexes = props.indexes && Object.keys(props.indexes).length > 0 ? `{ ${Object.entries(props.indexes).map(([indexName, index2]) => {
193613
+ const indexSort = index2.sort ? `; sort: ${keyValue(index2.sort)}` : "";
193614
+ return `'${indexName}': { hash: ${keyValue(index2.hash)}${indexSort} }`;
193042
193615
  }).join("; ")} }` : "undefined";
193043
193616
  list2.addType(name, `{
193044
193617
  readonly name: '${tableName}'
@@ -193100,9 +193673,9 @@ var tableFeature = defineFeature({
193100
193673
  const attributes = new Set([
193101
193674
  props.hash,
193102
193675
  props.sort,
193103
- ...Object.values(props.indexes ?? {}).map((index) => [
193104
- index.hash,
193105
- index.sort
193676
+ ...Object.values(props.indexes ?? {}).map((index2) => [
193677
+ index2.hash,
193678
+ index2.sort
193106
193679
  ])
193107
193680
  ].flat(2).filter((v3) => !!v3));
193108
193681
  const types2 = {
@@ -193131,15 +193704,15 @@ var tableFeature = defineFeature({
193131
193704
  pointInTimeRecovery: {
193132
193705
  enabled: props.pointInTimeRecovery
193133
193706
  },
193134
- globalSecondaryIndex: Object.entries(props.indexes ?? {}).map(([name2, index]) => ({
193707
+ globalSecondaryIndex: Object.entries(props.indexes ?? {}).map(([name2, index2]) => ({
193135
193708
  name: name2,
193136
- projectionType: constantCase(index.projection),
193709
+ projectionType: constantCase(index2.projection),
193137
193710
  keySchema: [
193138
- ...index.hash.map((name3) => ({
193711
+ ...index2.hash.map((name3) => ({
193139
193712
  keyType: "HASH",
193140
193713
  attributeName: name3
193141
193714
  })),
193142
- ...(index.sort ?? []).map((name3) => ({
193715
+ ...(index2.sort ?? []).map((name3) => ({
193143
193716
  keyType: "RANGE",
193144
193717
  attributeName: name3
193145
193718
  }))
@@ -193637,11 +194210,11 @@ var vpcFeature = defineFeature({
193637
194210
  const type = _type;
193638
194211
  const subnetIds = subnetIdsByType[type];
193639
194212
  for (const [i4, zone] of zones.entries()) {
193640
- const index = i4 + 1;
193641
- const id = `${type}-${index}`;
194213
+ const index2 = i4 + 1;
194214
+ const id = `${type}-${index2}`;
193642
194215
  const subnet = new aws.Subnet(group, id, {
193643
194216
  tags: {
193644
- Name: `${ctx.app.name}--${type}-${index}`
194217
+ Name: `${ctx.app.name}--${type}-${index2}`
193645
194218
  },
193646
194219
  vpcId: vpc.id,
193647
194220
  cidrBlock: `10.0.${block2}.0/20`,
@@ -194610,14 +195183,14 @@ var import_aws_cron_expression_validator = __toESM(require_src6(), 1);
194610
195183
  var RateExpressionSchema = exports_external.custom((value) => {
194611
195184
  return exports_external.string().regex(/^[0-9]+ (seconds?|minutes?|hours?|days?)$/).refine((rate) => {
194612
195185
  const [str] = rate.split(" ");
194613
- const number4 = parseInt(str);
194614
- return number4 > 0;
195186
+ const number5 = parseInt(str);
195187
+ return number5 > 0;
194615
195188
  }).safeParse(value).success;
194616
195189
  }, { message: "Invalid rate expression" }).transform((rate) => {
194617
195190
  const [str] = rate.split(" ");
194618
- const number4 = parseInt(str);
195191
+ const number5 = parseInt(str);
194619
195192
  const more = rate.endsWith("s");
194620
- if (more && number4 === 1) {
195193
+ if (more && number5 === 1) {
194621
195194
  return `rate(${rate.substring(0, rate.length - 1)})`;
194622
195195
  }
194623
195196
  return `rate(${rate})`;
@@ -195038,15 +195611,15 @@ function patchErrorMessageFormatter(message2, args) {
195038
195611
  }
195039
195612
  var PatchError = function(_super) {
195040
195613
  __extends(PatchError2, _super);
195041
- function PatchError2(message2, name, index, operation, tree) {
195614
+ function PatchError2(message2, name, index2, operation, tree) {
195042
195615
  var _newTarget = this.constructor;
195043
- var _this = _super.call(this, patchErrorMessageFormatter(message2, { name, index, operation, tree })) || this;
195616
+ var _this = _super.call(this, patchErrorMessageFormatter(message2, { name, index: index2, operation, tree })) || this;
195044
195617
  _this.name = name;
195045
- _this.index = index;
195618
+ _this.index = index2;
195046
195619
  _this.operation = operation;
195047
195620
  _this.tree = tree;
195048
195621
  Object.setPrototypeOf(_this, _newTarget.prototype);
195049
- _this.message = patchErrorMessageFormatter(message2, { name, index, operation, tree });
195622
+ _this.message = patchErrorMessageFormatter(message2, { name, index: index2, operation, tree });
195050
195623
  return _this;
195051
195624
  }
195052
195625
  return PatchError2;
@@ -195123,7 +195696,7 @@ function getValueByPointer(document2, pointer) {
195123
195696
  applyOperation(document2, getOriginalDestination);
195124
195697
  return getOriginalDestination.value;
195125
195698
  }
195126
- function applyOperation(document2, operation, validateOperation, mutateDocument, banPrototypeModifications, index) {
195699
+ function applyOperation(document2, operation, validateOperation, mutateDocument, banPrototypeModifications, index2) {
195127
195700
  if (validateOperation === undefined) {
195128
195701
  validateOperation = false;
195129
195702
  }
@@ -195133,8 +195706,8 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
195133
195706
  if (banPrototypeModifications === undefined) {
195134
195707
  banPrototypeModifications = true;
195135
195708
  }
195136
- if (index === undefined) {
195137
- index = 0;
195709
+ if (index2 === undefined) {
195710
+ index2 = 0;
195138
195711
  }
195139
195712
  if (validateOperation) {
195140
195713
  if (typeof validateOperation == "function") {
@@ -195161,7 +195734,7 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
195161
195734
  } else if (operation.op === "test") {
195162
195735
  returnValue.test = _areEquals(document2, operation.value);
195163
195736
  if (returnValue.test === false) {
195164
- throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document2);
195737
+ throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
195165
195738
  }
195166
195739
  returnValue.newDocument = document2;
195167
195740
  return returnValue;
@@ -195174,7 +195747,7 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
195174
195747
  return returnValue;
195175
195748
  } else {
195176
195749
  if (validateOperation) {
195177
- throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index, operation, document2);
195750
+ throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index2, operation, document2);
195178
195751
  } else {
195179
195752
  return returnValue;
195180
195753
  }
@@ -195222,18 +195795,18 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
195222
195795
  key = obj.length;
195223
195796
  } else {
195224
195797
  if (validateOperation && !isInteger(key)) {
195225
- throw new JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", index, operation, document2);
195798
+ throw new JsonPatchError("Expected an unsigned base-10 integer value, making the new referenced value the array element with the zero-based index", "OPERATION_PATH_ILLEGAL_ARRAY_INDEX", index2, operation, document2);
195226
195799
  } else if (isInteger(key)) {
195227
195800
  key = ~~key;
195228
195801
  }
195229
195802
  }
195230
195803
  if (t2 >= len) {
195231
195804
  if (validateOperation && operation.op === "add" && key > obj.length) {
195232
- throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", index, operation, document2);
195805
+ throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS", index2, operation, document2);
195233
195806
  }
195234
195807
  var returnValue = arrOps[operation.op].call(operation, obj, key, document2);
195235
195808
  if (returnValue.test === false) {
195236
- throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document2);
195809
+ throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
195237
195810
  }
195238
195811
  return returnValue;
195239
195812
  }
@@ -195241,14 +195814,14 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
195241
195814
  if (t2 >= len) {
195242
195815
  var returnValue = objOps[operation.op].call(operation, obj, key, document2);
195243
195816
  if (returnValue.test === false) {
195244
- throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document2);
195817
+ throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
195245
195818
  }
195246
195819
  return returnValue;
195247
195820
  }
195248
195821
  }
195249
195822
  obj = obj[key];
195250
195823
  if (validateOperation && t2 < len && (!obj || typeof obj !== "object")) {
195251
- throw new JsonPatchError("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", index, operation, document2);
195824
+ throw new JsonPatchError("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", index2, operation, document2);
195252
195825
  }
195253
195826
  }
195254
195827
  }
@@ -195276,44 +195849,44 @@ function applyPatch(document2, patch, validateOperation, mutateDocument, banProt
195276
195849
  results.newDocument = document2;
195277
195850
  return results;
195278
195851
  }
195279
- function applyReducer(document2, operation, index) {
195852
+ function applyReducer(document2, operation, index2) {
195280
195853
  var operationResult = applyOperation(document2, operation);
195281
195854
  if (operationResult.test === false) {
195282
- throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index, operation, document2);
195855
+ throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
195283
195856
  }
195284
195857
  return operationResult.newDocument;
195285
195858
  }
195286
- function validator(operation, index, document2, existingPathFragment) {
195859
+ function validator(operation, index2, document2, existingPathFragment) {
195287
195860
  if (typeof operation !== "object" || operation === null || Array.isArray(operation)) {
195288
- throw new JsonPatchError("Operation is not an object", "OPERATION_NOT_AN_OBJECT", index, operation, document2);
195861
+ throw new JsonPatchError("Operation is not an object", "OPERATION_NOT_AN_OBJECT", index2, operation, document2);
195289
195862
  } else if (!objOps[operation.op]) {
195290
- throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index, operation, document2);
195863
+ throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index2, operation, document2);
195291
195864
  } else if (typeof operation.path !== "string") {
195292
- throw new JsonPatchError("Operation `path` property is not a string", "OPERATION_PATH_INVALID", index, operation, document2);
195865
+ throw new JsonPatchError("Operation `path` property is not a string", "OPERATION_PATH_INVALID", index2, operation, document2);
195293
195866
  } else if (operation.path.indexOf("/") !== 0 && operation.path.length > 0) {
195294
- throw new JsonPatchError('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", index, operation, document2);
195867
+ throw new JsonPatchError('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", index2, operation, document2);
195295
195868
  } else if ((operation.op === "move" || operation.op === "copy") && typeof operation.from !== "string") {
195296
- throw new JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", index, operation, document2);
195869
+ throw new JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", index2, operation, document2);
195297
195870
  } else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && operation.value === undefined) {
195298
- throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", index, operation, document2);
195871
+ throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", index2, operation, document2);
195299
195872
  } else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && hasUndefined(operation.value)) {
195300
- throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", index, operation, document2);
195873
+ throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED", index2, operation, document2);
195301
195874
  } else if (document2) {
195302
195875
  if (operation.op == "add") {
195303
195876
  var pathLen = operation.path.split("/").length;
195304
195877
  var existingPathLen = existingPathFragment.split("/").length;
195305
195878
  if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {
195306
- throw new JsonPatchError("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", index, operation, document2);
195879
+ throw new JsonPatchError("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", index2, operation, document2);
195307
195880
  }
195308
195881
  } else if (operation.op === "replace" || operation.op === "remove" || operation.op === "_get") {
195309
195882
  if (operation.path !== existingPathFragment) {
195310
- throw new JsonPatchError("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", index, operation, document2);
195883
+ throw new JsonPatchError("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", index2, operation, document2);
195311
195884
  }
195312
195885
  } else if (operation.op === "move" || operation.op === "copy") {
195313
195886
  var existingValue = { op: "_get", path: operation.from, value: undefined };
195314
195887
  var error53 = validate3([existingValue], document2);
195315
195888
  if (error53 && error53.name === "OPERATION_PATH_UNRESOLVABLE") {
195316
- throw new JsonPatchError("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", index, operation, document2);
195889
+ throw new JsonPatchError("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", index2, operation, document2);
195317
195890
  }
195318
195891
  }
195319
195892
  }
@@ -195859,7 +196432,7 @@ var logConfigError = (error53) => {
195859
196432
  const length2 = issue2.path.length;
195860
196433
  const end = ["}"];
195861
196434
  issue2.path.forEach((path6, i4) => {
195862
- const index = i4 + 1;
196435
+ const index2 = i4 + 1;
195863
196436
  const entry = context[path6];
195864
196437
  if (typeof entry !== "undefined") {
195865
196438
  context = entry;
@@ -195868,30 +196441,30 @@ var logConfigError = (error53) => {
195868
196441
  }
195869
196442
  if (typeof path6 === "string") {
195870
196443
  const key = path6 + `: `;
195871
- if (index === length2 || endType(entry)) {
196444
+ if (index2 === length2 || endType(entry)) {
195872
196445
  const space = " ".repeat(key.length);
195873
196446
  const value = format3(entry);
195874
196447
  const error54 = icon.arrow.top.repeat(value.length);
195875
- message2.push(codeLine(key + color2.warning(value), index));
195876
- message2.push(codeLine(space + color2.error(error54), index));
196448
+ message2.push(codeLine(key + color2.warning(value), index2));
196449
+ message2.push(codeLine(space + color2.error(error54), index2));
195877
196450
  } else if (Array.isArray(entry)) {
195878
- message2.push(codeLine(key + "[", index));
195879
- end.unshift(codeLine("]", index));
196451
+ message2.push(codeLine(key + "[", index2));
196452
+ end.unshift(codeLine("]", index2));
195880
196453
  } else if (typeof entry === "object") {
195881
- if (inStack && index === 3) {
196454
+ if (inStack && index2 === 3) {
195882
196455
  const name = error53.data.stacks[issue2.path[1]].name;
195883
- message2.push(codeLine("name: " + color2.info(`"${name}"`) + ",", index));
196456
+ message2.push(codeLine("name: " + color2.info(`"${name}"`) + ",", index2));
195884
196457
  }
195885
- message2.push(codeLine(key + "{", index));
195886
- end.unshift(codeLine("}", index));
196458
+ message2.push(codeLine(key + "{", index2));
196459
+ end.unshift(codeLine("}", index2));
195887
196460
  }
195888
196461
  } else if (typeof entry === "object") {
195889
- message2.push(codeLine("{", index));
195890
- end.unshift(codeLine("}", index));
196462
+ message2.push(codeLine("{", index2));
196463
+ end.unshift(codeLine("}", index2));
195891
196464
  } else if (typeof entry === "string") {
195892
- message2.push(codeLine(color2.warning(`"${entry}"`), index));
196465
+ message2.push(codeLine(color2.warning(`"${entry}"`), index2));
195893
196466
  const error54 = icon.arrow.top.repeat(entry.length + 2);
195894
- message2.push(codeLine(color2.error(error54), index));
196467
+ message2.push(codeLine(color2.error(error54), index2));
195895
196468
  }
195896
196469
  });
195897
196470
  logs_exports.error([...message2, ...end].join(`
@@ -196591,7 +197164,7 @@ import {
196591
197164
  deleteItem,
196592
197165
  DynamoDBClient,
196593
197166
  getItem,
196594
- number as number4,
197167
+ number as number5,
196595
197168
  object as object2,
196596
197169
  optional as optional2,
196597
197170
  putItem,
@@ -196895,8 +197468,8 @@ function buildLocalizeFn(args) {
196895
197468
  const width = options2?.width ? String(options2.width) : args.defaultWidth;
196896
197469
  valuesArray = args.values[width] || args.values[defaultWidth];
196897
197470
  }
196898
- const index = args.argumentCallback ? args.argumentCallback(value) : value;
196899
- return valuesArray[index];
197471
+ const index2 = args.argumentCallback ? args.argumentCallback(value) : value;
197472
+ return valuesArray[index2];
196900
197473
  };
196901
197474
  }
196902
197475
 
@@ -197021,19 +197594,19 @@ var formattingDayPeriodValues = {
197021
197594
  }
197022
197595
  };
197023
197596
  var ordinalNumber = (dirtyNumber, _options) => {
197024
- const number4 = Number(dirtyNumber);
197025
- const rem100 = number4 % 100;
197597
+ const number5 = Number(dirtyNumber);
197598
+ const rem100 = number5 % 100;
197026
197599
  if (rem100 > 20 || rem100 < 10) {
197027
197600
  switch (rem100 % 10) {
197028
197601
  case 1:
197029
- return number4 + "st";
197602
+ return number5 + "st";
197030
197603
  case 2:
197031
- return number4 + "nd";
197604
+ return number5 + "nd";
197032
197605
  case 3:
197033
- return number4 + "rd";
197606
+ return number5 + "rd";
197034
197607
  }
197035
197608
  }
197036
- return number4 + "th";
197609
+ return number5 + "th";
197037
197610
  };
197038
197611
  var localize = {
197039
197612
  ordinalNumber,
@@ -197212,7 +197785,7 @@ var match2 = {
197212
197785
  defaultMatchWidth: "wide",
197213
197786
  parsePatterns: parseQuarterPatterns,
197214
197787
  defaultParseWidth: "any",
197215
- valueCallback: (index) => index + 1
197788
+ valueCallback: (index2) => index2 + 1
197216
197789
  }),
197217
197790
  month: buildMatchFn({
197218
197791
  matchPatterns: matchMonthPatterns,
@@ -197305,9 +197878,9 @@ function getWeek(date5, options2) {
197305
197878
  }
197306
197879
 
197307
197880
  // ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js
197308
- function addLeadingZeros(number4, targetLength) {
197309
- const sign2 = number4 < 0 ? "-" : "";
197310
- const output = Math.abs(number4).toString().padStart(targetLength, "0");
197881
+ function addLeadingZeros(number5, targetLength) {
197882
+ const sign2 = number5 < 0 ? "-" : "";
197883
+ const output = Math.abs(number5).toString().padStart(targetLength, "0");
197311
197884
  return sign2 + output;
197312
197885
  }
197313
197886
 
@@ -198101,7 +198674,7 @@ var table2 = define2("awsless-deployments", {
198101
198674
  appId: string4(),
198102
198675
  id: string4(),
198103
198676
  branch: string4(),
198104
- seq: number4(),
198677
+ seq: number5(),
198105
198678
  createdAt: string4(),
198106
198679
  user: optional2(string4()),
198107
198680
  commit: optional2(string4()),
@@ -199397,7 +199970,7 @@ var formatFileName = (test, error53) => {
199397
199970
  }
199398
199971
  return name.join("");
199399
199972
  };
199400
- var logTestError = (index, event, test, error53) => {
199973
+ var logTestError = (index2, event, test, error53) => {
199401
199974
  if (error53.stack) {
199402
199975
  debug(`Test error in ${test.file} \u203A ${test.name}: ${error53.message}
199403
199976
  ${error53.stack}`);
@@ -199410,7 +199983,7 @@ ${error53.stack}`);
199410
199983
  ].join(" ");
199411
199984
  logs_exports.error([
199412
199985
  color2.error.inverse.bold(` FAIL `),
199413
- color2.dim(`(${index}/${event.errors.length + event.failed})`),
199986
+ color2.dim(`(${index2}/${event.errors.length + event.failed})`),
199414
199987
  color2.dim(icon.arrow.right),
199415
199988
  formatFileName(test, error53),
199416
199989
  color2.dim(icon.arrow.right),
@@ -199497,7 +200070,7 @@ var runTests = async (tests, stackFilters = [], testFilters = [], opts) => {
199497
200070
  return [dir, fingerprint];
199498
200071
  }))));
199499
200072
  for (const test of selected) {
199500
- for (const [index, dir] of test.paths.entries()) {
200073
+ for (const [index2, dir] of test.paths.entries()) {
199501
200074
  const files = await countTestFiles(dir);
199502
200075
  if (files === 0) {
199503
200076
  continue;
@@ -199517,7 +200090,7 @@ var runTests = async (tests, stackFilters = [], testFilters = [], opts) => {
199517
200090
  continue;
199518
200091
  }
199519
200092
  pending.push({
199520
- name: test.paths.length > 1 ? `${test.name}:${index}` : test.name,
200093
+ name: test.paths.length > 1 ? `${test.name}:${index2}` : test.name,
199521
200094
  stack: test.name,
199522
200095
  dir,
199523
200096
  file: file3,
@@ -200506,9 +201079,9 @@ var createSqsServer = (props) => {
200506
201079
  throw new Error(`Unknown local queue: ${input.QueueUrl}`);
200507
201080
  }
200508
201081
  const store2 = storeOf(queue);
200509
- const index = store2.findIndex((message3) => message3.receipt === input.ReceiptHandle);
200510
- if (index >= 0) {
200511
- store2.splice(index, 1);
201082
+ const index2 = store2.findIndex((message3) => message3.receipt === input.ReceiptHandle);
201083
+ if (index2 >= 0) {
201084
+ store2.splice(index2, 1);
200512
201085
  }
200513
201086
  return {};
200514
201087
  },
@@ -200520,9 +201093,9 @@ var createSqsServer = (props) => {
200520
201093
  const store2 = storeOf(queue);
200521
201094
  return {
200522
201095
  Successful: (input.Entries ?? []).map((entry) => {
200523
- const index = store2.findIndex((message3) => message3.receipt === entry.ReceiptHandle);
200524
- if (index >= 0) {
200525
- store2.splice(index, 1);
201096
+ const index2 = store2.findIndex((message3) => message3.receipt === entry.ReceiptHandle);
201097
+ if (index2 >= 0) {
201098
+ store2.splice(index2, 1);
200526
201099
  }
200527
201100
  return { Id: entry.Id };
200528
201101
  }),
@@ -204016,8 +204589,8 @@ var startDev = async (props) => {
204016
204589
  await mkdir12(join52(directories.output, "local"), { recursive: true });
204017
204590
  await writeFile16(watchdogPath(), WATCHDOG_SOURCE);
204018
204591
  const routerPorts = {};
204019
- Object.keys(appConfig.router ?? {}).forEach((id, index) => {
204020
- routerPorts[id] = props.port + 1 + index;
204592
+ Object.keys(appConfig.router ?? {}).forEach((id, index2) => {
204593
+ routerPorts[id] = props.port + 1 + index2;
204021
204594
  });
204022
204595
  const firstBoot = props.pool.peek("session") === undefined;
204023
204596
  props.pool.begin();
@@ -204788,11 +205361,11 @@ var clearCache = (program3) => {
204788
205361
  });
204789
205362
  await workspace.hydrate(app);
204790
205363
  let distributionId;
204791
- let cache3;
205364
+ let cache4;
204792
205365
  try {
204793
205366
  distributionId = await shared.entry("icon", "distribution-id", name);
204794
205367
  const entry = shared.entry("icon", "cache", name);
204795
- cache3 = { bucket: await entry.bucket, prefix: entry.prefix };
205368
+ cache4 = { bucket: await entry.bucket, prefix: entry.prefix };
204796
205369
  } catch {
204797
205370
  throw new ExpectedError(`The icon resource hasn't been deployed yet.`);
204798
205371
  }
@@ -204812,14 +205385,14 @@ var clearCache = (program3) => {
204812
205385
  let continuationToken;
204813
205386
  while (true) {
204814
205387
  const result = await s3Client.send(new ListObjectsV2Command({
204815
- Bucket: cache3.bucket,
204816
- Prefix: cache3.prefix,
205388
+ Bucket: cache4.bucket,
205389
+ Prefix: cache4.prefix,
204817
205390
  ContinuationToken: continuationToken,
204818
205391
  MaxKeys: 1000
204819
205392
  }));
204820
205393
  if (result.Contents && result.Contents.length > 0) {
204821
205394
  await s3Client.send(new DeleteObjectsCommand({
204822
- Bucket: cache3.bucket,
205395
+ Bucket: cache4.bucket,
204823
205396
  Delete: {
204824
205397
  Objects: result.Contents.map((obj) => ({
204825
205398
  Key: obj.Key
@@ -204915,11 +205488,11 @@ var clearCache2 = (program3) => {
204915
205488
  });
204916
205489
  await workspace.hydrate(app);
204917
205490
  let distributionId;
204918
- let cache3;
205491
+ let cache4;
204919
205492
  try {
204920
205493
  distributionId = await shared.entry("image", "distribution-id", name);
204921
205494
  const entry = shared.entry("image", "cache", name);
204922
- cache3 = { bucket: await entry.bucket, prefix: entry.prefix };
205495
+ cache4 = { bucket: await entry.bucket, prefix: entry.prefix };
204923
205496
  } catch {
204924
205497
  throw new ExpectedError(`The image resource hasn't been deployed yet.`);
204925
205498
  }
@@ -204939,14 +205512,14 @@ var clearCache2 = (program3) => {
204939
205512
  let continuationToken;
204940
205513
  while (true) {
204941
205514
  const result = await s3Client.send(new ListObjectsV2Command2({
204942
- Bucket: cache3.bucket,
204943
- Prefix: cache3.prefix,
205515
+ Bucket: cache4.bucket,
205516
+ Prefix: cache4.prefix,
204944
205517
  ContinuationToken: continuationToken,
204945
205518
  MaxKeys: 1000
204946
205519
  }));
204947
205520
  if (result.Contents && result.Contents.length > 0) {
204948
205521
  await s3Client.send(new DeleteObjectsCommand2({
204949
- Bucket: cache3.bucket,
205522
+ Bucket: cache4.bucket,
204950
205523
  Delete: {
204951
205524
  Objects: result.Contents.map((obj) => ({
204952
205525
  Key: obj.Key
@@ -205212,10 +205785,10 @@ var pruneSiteVersions = async (props) => {
205212
205785
  } while (cursor3);
205213
205786
  const cutoff = subHours(new Date, 24);
205214
205787
  const garbage = [...unreferenced.values()].filter((entry) => isBefore(entry.newest, cutoff)).flatMap((entry) => entry.keys);
205215
- for (let index = 0;index < garbage.length; index += 1000) {
205788
+ for (let index2 = 0;index2 < garbage.length; index2 += 1000) {
205216
205789
  await props.s3.send(new DeleteObjectsCommand3({
205217
205790
  Bucket: props.bucket,
205218
- Delete: { Objects: garbage.slice(index, index + 1000).map((key) => ({ Key: key })) }
205791
+ Delete: { Objects: garbage.slice(index2, index2 + 1000).map((key) => ({ Key: key })) }
205219
205792
  }));
205220
205793
  }
205221
205794
  };
@@ -205939,12 +206512,12 @@ var nodes3 = new Int32Array([
205939
206512
  var bdd3 = import_endpoints5.BinaryDecisionDiagram.from(nodes3, root4, _data3.conditions, _data3.results);
205940
206513
 
205941
206514
  // ../../node_modules/.pnpm/@aws-sdk+client-iot-data-plane@3.1113.0/node_modules/@aws-sdk/client-iot-data-plane/dist-es/endpoint/endpointResolver.js
205942
- var cache3 = new import_endpoints6.EndpointCache({
206515
+ var cache4 = new import_endpoints6.EndpointCache({
205943
206516
  size: 50,
205944
206517
  params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
205945
206518
  });
205946
206519
  var defaultEndpointResolver3 = (endpointParams, context = {}) => {
205947
- return cache3.get(endpointParams, () => import_endpoints6.decideEndpoint(bdd3, {
206520
+ return cache4.get(endpointParams, () => import_endpoints6.decideEndpoint(bdd3, {
205948
206521
  endpointParams,
205949
206522
  logger: context.logger
205950
206523
  }));
@@ -206714,11 +207287,11 @@ var getHttpAuthExtensionConfiguration3 = (runtimeConfig) => {
206714
207287
  let _credentials = runtimeConfig.credentials;
206715
207288
  return {
206716
207289
  setHttpAuthScheme(httpAuthScheme) {
206717
- const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
206718
- if (index === -1) {
207290
+ const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
207291
+ if (index2 === -1) {
206719
207292
  _httpAuthSchemes.push(httpAuthScheme);
206720
207293
  } else {
206721
- _httpAuthSchemes.splice(index, 1, httpAuthScheme);
207294
+ _httpAuthSchemes.splice(index2, 1, httpAuthScheme);
206722
207295
  }
206723
207296
  },
206724
207297
  httpAuthSchemes() {
@@ -207135,9 +207708,9 @@ var sinon;
207135
207708
  }
207136
207709
  function ensureArgs(name, behavior, args) {
207137
207710
  const property = name.replace(/sArg/, "ArgAt");
207138
- const index = behavior[property];
207139
- if (index >= args.length) {
207140
- throw new TypeError(`${name} failed: ${index + 1} arguments required but only ${args.length} present`);
207711
+ const index2 = behavior[property];
207712
+ if (index2 >= args.length) {
207713
+ throw new TypeError(`${name} failed: ${index2 + 1} arguments required but only ${args.length} present`);
207141
207714
  }
207142
207715
  }
207143
207716
  function callCallback(behavior, args) {
@@ -207222,8 +207795,8 @@ var sinon;
207222
207795
  }
207223
207796
  throw new Error("Unable to find wrapped method");
207224
207797
  },
207225
- onCall: function onCall(index) {
207226
- return this.stub.onCall(index);
207798
+ onCall: function onCall(index2) {
207799
+ return this.stub.onCall(index2);
207227
207800
  },
207228
207801
  onFirstCall: function onFirstCall() {
207229
207802
  return this.stub.onFirstCall();
@@ -207412,44 +207985,44 @@ var sinon;
207412
207985
  fake.exceptionCreator = undefined;
207413
207986
  fake.callsThrough = false;
207414
207987
  },
207415
- callsArg: function callsArg(fake, index) {
207416
- if (typeof index !== "number") {
207988
+ callsArg: function callsArg(fake, index2) {
207989
+ if (typeof index2 !== "number") {
207417
207990
  throw new TypeError("argument index is not number");
207418
207991
  }
207419
- fake.callArgAt = index;
207992
+ fake.callArgAt = index2;
207420
207993
  fake.callbackArguments = [];
207421
207994
  fake.callbackContext = undefined;
207422
207995
  fake.callArgProp = undefined;
207423
207996
  fake.callbackAsync = false;
207424
207997
  fake.callsThrough = false;
207425
207998
  },
207426
- callsArgOn: function callsArgOn(fake, index, context) {
207427
- if (typeof index !== "number") {
207999
+ callsArgOn: function callsArgOn(fake, index2, context) {
208000
+ if (typeof index2 !== "number") {
207428
208001
  throw new TypeError("argument index is not number");
207429
208002
  }
207430
- fake.callArgAt = index;
208003
+ fake.callArgAt = index2;
207431
208004
  fake.callbackArguments = [];
207432
208005
  fake.callbackContext = context;
207433
208006
  fake.callArgProp = undefined;
207434
208007
  fake.callbackAsync = false;
207435
208008
  fake.callsThrough = false;
207436
208009
  },
207437
- callsArgWith: function callsArgWith(fake, index) {
207438
- if (typeof index !== "number") {
208010
+ callsArgWith: function callsArgWith(fake, index2) {
208011
+ if (typeof index2 !== "number") {
207439
208012
  throw new TypeError("argument index is not number");
207440
208013
  }
207441
- fake.callArgAt = index;
208014
+ fake.callArgAt = index2;
207442
208015
  fake.callbackArguments = slice(arguments, 2);
207443
208016
  fake.callbackContext = undefined;
207444
208017
  fake.callArgProp = undefined;
207445
208018
  fake.callbackAsync = false;
207446
208019
  fake.callsThrough = false;
207447
208020
  },
207448
- callsArgOnWith: function callsArgWith(fake, index, context) {
207449
- if (typeof index !== "number") {
208021
+ callsArgOnWith: function callsArgWith(fake, index2, context) {
208022
+ if (typeof index2 !== "number") {
207450
208023
  throw new TypeError("argument index is not number");
207451
208024
  }
207452
- fake.callArgAt = index;
208025
+ fake.callArgAt = index2;
207453
208026
  fake.callbackArguments = slice(arguments, 3);
207454
208027
  fake.callbackContext = context;
207455
208028
  fake.callArgProp = undefined;
@@ -207515,19 +208088,19 @@ var sinon;
207515
208088
  fake.exceptionCreator = undefined;
207516
208089
  fake.fakeFn = undefined;
207517
208090
  },
207518
- returnsArg: function returnsArg(fake, index) {
207519
- if (typeof index !== "number") {
208091
+ returnsArg: function returnsArg(fake, index2) {
208092
+ if (typeof index2 !== "number") {
207520
208093
  throw new TypeError("argument index is not number");
207521
208094
  }
207522
208095
  fake.callsThrough = false;
207523
- fake.returnArgAt = index;
208096
+ fake.returnArgAt = index2;
207524
208097
  },
207525
- throwsArg: function throwsArg(fake, index) {
207526
- if (typeof index !== "number") {
208098
+ throwsArg: function throwsArg(fake, index2) {
208099
+ if (typeof index2 !== "number") {
207527
208100
  throw new TypeError("argument index is not number");
207528
208101
  }
207529
208102
  fake.callsThrough = false;
207530
- fake.throwArgAt = index;
208103
+ fake.throwArgAt = index2;
207531
208104
  },
207532
208105
  returnsThis: function returnsThis(fake) {
207533
208106
  fake.returnThis = true;
@@ -207544,11 +208117,11 @@ var sinon;
207544
208117
  fake.fakeFn = undefined;
207545
208118
  fake.callsThrough = false;
207546
208119
  },
207547
- resolvesArg: function resolvesArg(fake, index) {
207548
- if (typeof index !== "number") {
208120
+ resolvesArg: function resolvesArg(fake, index2) {
208121
+ if (typeof index2 !== "number") {
207549
208122
  throw new TypeError("argument index is not number");
207550
208123
  }
207551
- fake.resolveArgAt = index;
208124
+ fake.resolveArgAt = index2;
207552
208125
  fake.returnValue = undefined;
207553
208126
  fake.resolve = true;
207554
208127
  fake.resolveThis = false;
@@ -208450,8 +209023,8 @@ var sinon;
208450
209023
  matchingFakes: function() {
208451
209024
  return emptyFakes;
208452
209025
  },
208453
- getCall: function getCall(index) {
208454
- let i5 = index;
209026
+ getCall: function getCall(index2) {
209027
+ let i5 = index2;
208455
209028
  if (i5 < 0) {
208456
209029
  i5 += this.callCount;
208457
209030
  }
@@ -209403,11 +209976,11 @@ ${join54(calls, `
209403
209976
  this.resetHistory();
209404
209977
  this.resetBehavior();
209405
209978
  },
209406
- onCall: function onCall(index) {
209407
- if (!this.behaviors[index]) {
209408
- this.behaviors[index] = behavior.create(this);
209979
+ onCall: function onCall(index2) {
209980
+ if (!this.behaviors[index2]) {
209981
+ this.behaviors[index2] = behavior.create(this);
209409
209982
  }
209410
- return this.behaviors[index];
209983
+ return this.behaviors[index2];
209411
209984
  },
209412
209985
  onFirstCall: function onFirstCall() {
209413
209986
  return this.onCall(0);
@@ -209947,10 +210520,10 @@ ${wrappedMethodDesc.stackTraceError.stack}`;
209947
210520
  }
209948
210521
  return callMap[spy.id] < spy.callCount;
209949
210522
  }
209950
- function checkAdjacentCalls(callMap, spy, index, spies) {
210523
+ function checkAdjacentCalls(callMap, spy, index2, spies) {
209951
210524
  var calledBeforeNext = true;
209952
- if (index !== spies.length - 1) {
209953
- calledBeforeNext = spy.calledBefore(spies[index + 1]);
210525
+ if (index2 !== spies.length - 1) {
210526
+ calledBeforeNext = spy.calledBefore(spies[index2 + 1]);
209954
210527
  }
209955
210528
  if (hasCallsLeft(callMap, spy) && calledBeforeNext) {
209956
210529
  callMap[spy.id] += 1;
@@ -211392,24 +211965,24 @@ ${job.error.stack.split(`
211392
211965
  createMatcher.array.deepEquals = function(expectation) {
211393
211966
  return createMatcher(function(actual) {
211394
211967
  var sameLength = actual.length === expectation.length;
211395
- return typeOf(actual) === "array" && sameLength && every(actual, function(element, index) {
211396
- var expected = expectation[index];
211968
+ return typeOf(actual) === "array" && sameLength && every(actual, function(element, index2) {
211969
+ var expected = expectation[index2];
211397
211970
  return typeOf(expected) === "array" && typeOf(element) === "array" ? createMatcher.array.deepEquals(expected).test(element) : deepEqual2(expected, element);
211398
211971
  });
211399
211972
  }, `deepEquals([${iterableToString(expectation)}])`);
211400
211973
  };
211401
211974
  createMatcher.array.startsWith = function(expectation) {
211402
211975
  return createMatcher(function(actual) {
211403
- return typeOf(actual) === "array" && every(expectation, function(expectedElement, index) {
211404
- return actual[index] === expectedElement;
211976
+ return typeOf(actual) === "array" && every(expectation, function(expectedElement, index2) {
211977
+ return actual[index2] === expectedElement;
211405
211978
  });
211406
211979
  }, `startsWith([${iterableToString(expectation)}])`);
211407
211980
  };
211408
211981
  createMatcher.array.endsWith = function(expectation) {
211409
211982
  return createMatcher(function(actual) {
211410
211983
  var offset = actual.length - expectation.length;
211411
- return typeOf(actual) === "array" && every(expectation, function(expectedElement, index) {
211412
- return actual[offset + index] === expectedElement;
211984
+ return typeOf(actual) === "array" && every(expectation, function(expectedElement, index2) {
211985
+ return actual[offset + index2] === expectedElement;
211413
211986
  });
211414
211987
  }, `endsWith([${iterableToString(expectation)}])`);
211415
211988
  };
@@ -212043,10 +212616,10 @@ ${job.error.stack.split(`
212043
212616
  }
212044
212617
  return callMap[spy.id] < spy.callCount;
212045
212618
  }
212046
- function checkAdjacentCalls(callMap, spy, index, spies) {
212619
+ function checkAdjacentCalls(callMap, spy, index2, spies) {
212047
212620
  var calledBeforeNext = true;
212048
- if (index !== spies.length - 1) {
212049
- calledBeforeNext = spy.calledBefore(spies[index + 1]);
212621
+ if (index2 !== spies.length - 1) {
212622
+ calledBeforeNext = spy.calledBefore(spies[index2 + 1]);
212050
212623
  }
212051
212624
  if (hasCallsLeft(callMap, spy) && calledBeforeNext) {
212052
212625
  callMap[spy.id] += 1;
@@ -212814,16 +213387,16 @@ ${job.error.stack.split(`
212814
213387
  });
212815
213388
  var encoders = {};
212816
213389
  var decoders = {};
212817
- function indexCodePointFor(pointer, index2) {
212818
- if (!index2)
213390
+ function indexCodePointFor(pointer, index3) {
213391
+ if (!index3)
212819
213392
  return null;
212820
- return index2[pointer] || null;
213393
+ return index3[pointer] || null;
212821
213394
  }
212822
- function indexPointerFor(code_point, index2) {
212823
- var pointer = index2.indexOf(code_point);
213395
+ function indexPointerFor(code_point, index3) {
213396
+ var pointer = index3.indexOf(code_point);
212824
213397
  return pointer === -1 ? null : pointer;
212825
213398
  }
212826
- function index(name) {
213399
+ function index2(name) {
212827
213400
  if (!("encoding-indexes" in global2)) {
212828
213401
  throw Error("Indexes missing." + " Did you forget to include encoding-indexes.js first?");
212829
213402
  }
@@ -212836,7 +213409,7 @@ ${job.error.stack.split(`
212836
213409
  return 59335;
212837
213410
  var offset = 0;
212838
213411
  var code_point_offset = 0;
212839
- var idx = index("gb18030-ranges");
213412
+ var idx = index2("gb18030-ranges");
212840
213413
  var i5;
212841
213414
  for (i5 = 0;i5 < idx.length; ++i5) {
212842
213415
  var entry = idx[i5];
@@ -212854,7 +213427,7 @@ ${job.error.stack.split(`
212854
213427
  return 7457;
212855
213428
  var offset = 0;
212856
213429
  var pointer_offset = 0;
212857
- var idx = index("gb18030-ranges");
213430
+ var idx = index2("gb18030-ranges");
212858
213431
  var i5;
212859
213432
  for (i5 = 0;i5 < idx.length; ++i5) {
212860
213433
  var entry = idx[i5];
@@ -212868,7 +213441,7 @@ ${job.error.stack.split(`
212868
213441
  return pointer_offset + code_point - offset;
212869
213442
  }
212870
213443
  function indexShiftJISPointerFor(code_point) {
212871
- shift_jis_index = shift_jis_index || index("jis0208").map(function(code_point2, pointer) {
213444
+ shift_jis_index = shift_jis_index || index2("jis0208").map(function(code_point2, pointer) {
212872
213445
  return inRange(pointer, 8272, 8835) ? null : code_point2;
212873
213446
  });
212874
213447
  var index_ = shift_jis_index;
@@ -212876,7 +213449,7 @@ ${job.error.stack.split(`
212876
213449
  }
212877
213450
  var shift_jis_index;
212878
213451
  function indexBig5PointerFor(code_point) {
212879
- big5_index_no_hkscs = big5_index_no_hkscs || index("big5").map(function(code_point2, pointer) {
213452
+ big5_index_no_hkscs = big5_index_no_hkscs || index2("big5").map(function(code_point2, pointer) {
212880
213453
  return pointer < (161 - 129) * 157 ? null : code_point2;
212881
213454
  });
212882
213455
  var index_ = big5_index_no_hkscs;
@@ -213153,27 +213726,27 @@ ${job.error.stack.split(`
213153
213726
  decoders["UTF-8"] = function(options2) {
213154
213727
  return new UTF8Decoder(options2);
213155
213728
  };
213156
- function SingleByteDecoder(index2, options2) {
213729
+ function SingleByteDecoder(index3, options2) {
213157
213730
  var fatal = options2.fatal;
213158
213731
  this.handler = function(stream, bite) {
213159
213732
  if (bite === end_of_stream)
213160
213733
  return finished;
213161
213734
  if (isASCIIByte(bite))
213162
213735
  return bite;
213163
- var code_point = index2[bite - 128];
213736
+ var code_point = index3[bite - 128];
213164
213737
  if (code_point === null)
213165
213738
  return decoderError(fatal);
213166
213739
  return code_point;
213167
213740
  };
213168
213741
  }
213169
- function SingleByteEncoder(index2, options2) {
213742
+ function SingleByteEncoder(index3, options2) {
213170
213743
  var fatal = options2.fatal;
213171
213744
  this.handler = function(stream, code_point) {
213172
213745
  if (code_point === end_of_stream)
213173
213746
  return finished;
213174
213747
  if (isASCIICodePoint(code_point))
213175
213748
  return code_point;
213176
- var pointer = indexPointerFor(code_point, index2);
213749
+ var pointer = indexPointerFor(code_point, index3);
213177
213750
  if (pointer === null)
213178
213751
  encoderError(code_point);
213179
213752
  return pointer + 128;
@@ -213187,7 +213760,7 @@ ${job.error.stack.split(`
213187
213760
  return;
213188
213761
  category.encodings.forEach(function(encoding) {
213189
213762
  var name = encoding.name;
213190
- var idx = index(name.toLowerCase());
213763
+ var idx = index2(name.toLowerCase());
213191
213764
  decoders[name] = function(options2) {
213192
213765
  return new SingleByteDecoder(idx, options2);
213193
213766
  };
@@ -213253,7 +213826,7 @@ ${job.error.stack.split(`
213253
213826
  var offset = bite < 127 ? 64 : 65;
213254
213827
  if (inRange(bite, 64, 126) || inRange(bite, 128, 254))
213255
213828
  pointer = (lead - 129) * 190 + (bite - offset);
213256
- code_point = pointer === null ? null : indexCodePointFor(pointer, index("gb18030"));
213829
+ code_point = pointer === null ? null : indexCodePointFor(pointer, index2("gb18030"));
213257
213830
  if (code_point === null && isASCIIByte(bite))
213258
213831
  stream.prepend(bite);
213259
213832
  if (code_point === null)
@@ -213282,7 +213855,7 @@ ${job.error.stack.split(`
213282
213855
  return encoderError(code_point);
213283
213856
  if (gbk_flag && code_point === 8364)
213284
213857
  return 128;
213285
- var pointer = indexPointerFor(code_point, index("gb18030"));
213858
+ var pointer = indexPointerFor(code_point, index2("gb18030"));
213286
213859
  if (pointer !== null) {
213287
213860
  var lead = floor(pointer / 190) + 129;
213288
213861
  var trail = pointer % 190;
@@ -213339,7 +213912,7 @@ ${job.error.stack.split(`
213339
213912
  case 1166:
213340
213913
  return [234, 780];
213341
213914
  }
213342
- var code_point = pointer === null ? null : indexCodePointFor(pointer, index("big5"));
213915
+ var code_point = pointer === null ? null : indexCodePointFor(pointer, index2("big5"));
213343
213916
  if (code_point === null && isASCIIByte(bite))
213344
213917
  stream.prepend(bite);
213345
213918
  if (code_point === null)
@@ -213403,7 +213976,7 @@ ${job.error.stack.split(`
213403
213976
  eucjp_lead = 0;
213404
213977
  var code_point = null;
213405
213978
  if (inRange(lead, 161, 254) && inRange(bite, 161, 254)) {
213406
- code_point = indexCodePointFor((lead - 161) * 94 + (bite - 161), index(!eucjp_jis0212_flag ? "jis0208" : "jis0212"));
213979
+ code_point = indexCodePointFor((lead - 161) * 94 + (bite - 161), index2(!eucjp_jis0212_flag ? "jis0208" : "jis0212"));
213407
213980
  }
213408
213981
  eucjp_jis0212_flag = false;
213409
213982
  if (!inRange(bite, 161, 254))
@@ -213436,7 +214009,7 @@ ${job.error.stack.split(`
213436
214009
  return [142, code_point - 65377 + 161];
213437
214010
  if (code_point === 8722)
213438
214011
  code_point = 65293;
213439
- var pointer = indexPointerFor(code_point, index("jis0208"));
214012
+ var pointer = indexPointerFor(code_point, index2("jis0208"));
213440
214013
  if (pointer === null)
213441
214014
  return encoderError(code_point);
213442
214015
  var lead = floor(pointer / 94) + 161;
@@ -213539,7 +214112,7 @@ ${job.error.stack.split(`
213539
214112
  if (inRange(bite, 33, 126)) {
213540
214113
  iso2022jp_decoder_state = states.LeadByte;
213541
214114
  var pointer = (iso2022jp_lead - 33) * 94 + bite - 33;
213542
- var code_point = indexCodePointFor(pointer, index("jis0208"));
214115
+ var code_point = indexCodePointFor(pointer, index2("jis0208"));
213543
214116
  if (code_point === null)
213544
214117
  return decoderError(fatal);
213545
214118
  return code_point;
@@ -213627,7 +214200,7 @@ ${job.error.stack.split(`
213627
214200
  }
213628
214201
  if (code_point === 8722)
213629
214202
  code_point = 65293;
213630
- var pointer = indexPointerFor(code_point, index("jis0208"));
214203
+ var pointer = indexPointerFor(code_point, index2("jis0208"));
213631
214204
  if (pointer === null)
213632
214205
  return encoderError(code_point);
213633
214206
  if (iso2022jp_state !== states.jis0208) {
@@ -213666,7 +214239,7 @@ ${job.error.stack.split(`
213666
214239
  pointer = (lead - lead_offset) * 188 + bite - offset;
213667
214240
  if (inRange(pointer, 8836, 10715))
213668
214241
  return 57344 - 8836 + pointer;
213669
- var code_point = pointer === null ? null : indexCodePointFor(pointer, index("jis0208"));
214242
+ var code_point = pointer === null ? null : indexCodePointFor(pointer, index2("jis0208"));
213670
214243
  if (code_point === null && isASCIIByte(bite))
213671
214244
  stream.prepend(bite);
213672
214245
  if (code_point === null)
@@ -213731,7 +214304,7 @@ ${job.error.stack.split(`
213731
214304
  euckr_lead = 0;
213732
214305
  if (inRange(bite, 65, 254))
213733
214306
  pointer = (lead - 129) * 190 + (bite - 65);
213734
- var code_point = pointer === null ? null : indexCodePointFor(pointer, index("euc-kr"));
214307
+ var code_point = pointer === null ? null : indexCodePointFor(pointer, index2("euc-kr"));
213735
214308
  if (pointer === null && isASCIIByte(bite))
213736
214309
  stream.prepend(bite);
213737
214310
  if (code_point === null)
@@ -213754,7 +214327,7 @@ ${job.error.stack.split(`
213754
214327
  return finished;
213755
214328
  if (isASCIICodePoint(code_point))
213756
214329
  return code_point;
213757
- var pointer = indexPointerFor(code_point, index("euc-kr"));
214330
+ var pointer = indexPointerFor(code_point, index2("euc-kr"));
213758
214331
  if (pointer === null)
213759
214332
  return encoderError(code_point);
213760
214333
  var lead = floor(pointer / 190) + 129;
@@ -214021,7 +214594,7 @@ ${job.error.stack.split(`
214021
214594
  fail(value, true, message3, "==", assert2.ok);
214022
214595
  }
214023
214596
  assert2.ok = ok2;
214024
- assert2.equal = function equal(actual, expected, message3) {
214597
+ assert2.equal = function equal2(actual, expected, message3) {
214025
214598
  if (actual != expected)
214026
214599
  fail(actual, expected, message3, "==", assert2.equal);
214027
214600
  };
@@ -214924,7 +215497,7 @@ ${job.error.stack.split(`
214924
215497
  castInput: function castInput(value) {
214925
215498
  return value;
214926
215499
  },
214927
- tokenize: function tokenize(value) {
215500
+ tokenize: function tokenize2(value) {
214928
215501
  return value.split("");
214929
215502
  },
214930
215503
  join: function join54(chars) {
@@ -215237,8 +215810,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
215237
215810
  var options2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
215238
215811
  var diffstr = uniDiff.split(/\r\n|[\n\v\f\r\x85]/), delimiters = uniDiff.match(/\r\n|[\n\v\f\r\x85]/g) || [], list4 = [], i5 = 0;
215239
215812
  function parseIndex() {
215240
- var index = {};
215241
- list4.push(index);
215813
+ var index2 = {};
215814
+ list4.push(index2);
215242
215815
  while (i5 < diffstr.length) {
215243
215816
  var line = diffstr[i5];
215244
215817
  if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
@@ -215246,19 +215819,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
215246
215819
  }
215247
215820
  var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
215248
215821
  if (header) {
215249
- index.index = header[1];
215822
+ index2.index = header[1];
215250
215823
  }
215251
215824
  i5++;
215252
215825
  }
215253
- parseFileHeader(index);
215254
- parseFileHeader(index);
215255
- index.hunks = [];
215826
+ parseFileHeader(index2);
215827
+ parseFileHeader(index2);
215828
+ index2.hunks = [];
215256
215829
  while (i5 < diffstr.length) {
215257
215830
  var _line = diffstr[i5];
215258
215831
  if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
215259
215832
  break;
215260
215833
  } else if (/^@@/.test(_line)) {
215261
- index.hunks.push(parseHunk());
215834
+ index2.hunks.push(parseHunk());
215262
215835
  } else if (_line && options2.strict) {
215263
215836
  throw new Error("Unknown line " + (i5 + 1) + " " + JSON.stringify(_line));
215264
215837
  } else {
@@ -215266,7 +215839,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
215266
215839
  }
215267
215840
  }
215268
215841
  }
215269
- function parseFileHeader(index) {
215842
+ function parseFileHeader(index2) {
215270
215843
  var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i5]);
215271
215844
  if (fileHeader) {
215272
215845
  var keyPrefix = fileHeader[1] === "---" ? "old" : "new";
@@ -215275,8 +215848,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
215275
215848
  if (/^".*"$/.test(fileName)) {
215276
215849
  fileName = fileName.substr(1, fileName.length - 2);
215277
215850
  }
215278
- index[keyPrefix + "FileName"] = fileName;
215279
- index[keyPrefix + "Header"] = (data[1] || "").trim();
215851
+ index2[keyPrefix + "FileName"] = fileName;
215852
+ index2[keyPrefix + "Header"] = (data[1] || "").trim();
215280
215853
  i5++;
215281
215854
  }
215282
215855
  }
@@ -215455,16 +216028,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
215455
216028
  }
215456
216029
  var currentIndex = 0;
215457
216030
  function processIndex() {
215458
- var index = uniDiff[currentIndex++];
215459
- if (!index) {
216031
+ var index2 = uniDiff[currentIndex++];
216032
+ if (!index2) {
215460
216033
  return options2.complete();
215461
216034
  }
215462
- options2.loadFile(index, function(err, data) {
216035
+ options2.loadFile(index2, function(err, data) {
215463
216036
  if (err) {
215464
216037
  return options2.complete(err);
215465
216038
  }
215466
- var updatedContent = applyPatch2(data, index, options2);
215467
- options2.patched(index, updatedContent, function(err2) {
216039
+ var updatedContent = applyPatch2(data, index2, options2);
216040
+ options2.patched(index2, updatedContent, function(err2) {
215468
216041
  if (err2) {
215469
216042
  return options2.complete(err2);
215470
216043
  }
@@ -215703,11 +216276,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
215703
216276
  function fileNameChanged(patch) {
215704
216277
  return patch.newFileName && patch.newFileName !== patch.oldFileName;
215705
216278
  }
215706
- function selectField(index, mine, theirs) {
216279
+ function selectField(index2, mine, theirs) {
215707
216280
  if (mine === theirs) {
215708
216281
  return mine;
215709
216282
  } else {
215710
- index.conflict = true;
216283
+ index2.conflict = true;
215711
216284
  return {
215712
216285
  mine,
215713
216286
  theirs
@@ -216318,8 +216891,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
216318
216891
  throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
216319
216892
  }
216320
216893
  var result = [];
216321
- $replace(string5, rePropName, function(match3, number5, quote, subString) {
216322
- result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number5 || match3;
216894
+ $replace(string5, rePropName, function(match3, number6, quote, subString) {
216895
+ result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number6 || match3;
216323
216896
  });
216324
216897
  return result;
216325
216898
  };
@@ -216586,10 +217159,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
216586
217159
  var Map2 = getNative(root5, "Map"), nativeCreate = getNative(Object, "create");
216587
217160
  var symbolProto = Symbol2 ? Symbol2.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined;
216588
217161
  function Hash(entries2) {
216589
- var index = -1, length2 = entries2 ? entries2.length : 0;
217162
+ var index2 = -1, length2 = entries2 ? entries2.length : 0;
216590
217163
  this.clear();
216591
- while (++index < length2) {
216592
- var entry = entries2[index];
217164
+ while (++index2 < length2) {
217165
+ var entry = entries2[index2];
216593
217166
  this.set(entry[0], entry[1]);
216594
217167
  }
216595
217168
  }
@@ -216622,10 +217195,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
216622
217195
  Hash.prototype.has = hashHas;
216623
217196
  Hash.prototype.set = hashSet;
216624
217197
  function ListCache(entries2) {
216625
- var index = -1, length2 = entries2 ? entries2.length : 0;
217198
+ var index2 = -1, length2 = entries2 ? entries2.length : 0;
216626
217199
  this.clear();
216627
- while (++index < length2) {
216628
- var entry = entries2[index];
217200
+ while (++index2 < length2) {
217201
+ var entry = entries2[index2];
216629
217202
  this.set(entry[0], entry[1]);
216630
217203
  }
216631
217204
  }
@@ -216633,31 +217206,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
216633
217206
  this.__data__ = [];
216634
217207
  }
216635
217208
  function listCacheDelete(key) {
216636
- var data = this.__data__, index = assocIndexOf(data, key);
216637
- if (index < 0) {
217209
+ var data = this.__data__, index2 = assocIndexOf(data, key);
217210
+ if (index2 < 0) {
216638
217211
  return false;
216639
217212
  }
216640
217213
  var lastIndex = data.length - 1;
216641
- if (index == lastIndex) {
217214
+ if (index2 == lastIndex) {
216642
217215
  data.pop();
216643
217216
  } else {
216644
- splice.call(data, index, 1);
217217
+ splice.call(data, index2, 1);
216645
217218
  }
216646
217219
  return true;
216647
217220
  }
216648
217221
  function listCacheGet(key) {
216649
- var data = this.__data__, index = assocIndexOf(data, key);
216650
- return index < 0 ? undefined : data[index][1];
217222
+ var data = this.__data__, index2 = assocIndexOf(data, key);
217223
+ return index2 < 0 ? undefined : data[index2][1];
216651
217224
  }
216652
217225
  function listCacheHas(key) {
216653
217226
  return assocIndexOf(this.__data__, key) > -1;
216654
217227
  }
216655
217228
  function listCacheSet(key, value) {
216656
- var data = this.__data__, index = assocIndexOf(data, key);
216657
- if (index < 0) {
217229
+ var data = this.__data__, index2 = assocIndexOf(data, key);
217230
+ if (index2 < 0) {
216658
217231
  data.push([key, value]);
216659
217232
  } else {
216660
- data[index][1] = value;
217233
+ data[index2][1] = value;
216661
217234
  }
216662
217235
  return this;
216663
217236
  }
@@ -216667,10 +217240,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
216667
217240
  ListCache.prototype.has = listCacheHas;
216668
217241
  ListCache.prototype.set = listCacheSet;
216669
217242
  function MapCache(entries2) {
216670
- var index = -1, length2 = entries2 ? entries2.length : 0;
217243
+ var index2 = -1, length2 = entries2 ? entries2.length : 0;
216671
217244
  this.clear();
216672
- while (++index < length2) {
216673
- var entry = entries2[index];
217245
+ while (++index2 < length2) {
217246
+ var entry = entries2[index2];
216674
217247
  this.set(entry[0], entry[1]);
216675
217248
  }
216676
217249
  }
@@ -216710,11 +217283,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
216710
217283
  }
216711
217284
  function baseGet(object3, path6) {
216712
217285
  path6 = isKey(path6, object3) ? [path6] : castPath(path6);
216713
- var index = 0, length2 = path6.length;
216714
- while (object3 != null && index < length2) {
216715
- object3 = object3[toKey(path6[index++])];
217286
+ var index2 = 0, length2 = path6.length;
217287
+ while (object3 != null && index2 < length2) {
217288
+ object3 = object3[toKey(path6[index2++])];
216716
217289
  }
216717
- return index && index == length2 ? object3 : undefined;
217290
+ return index2 && index2 == length2 ? object3 : undefined;
216718
217291
  }
216719
217292
  function baseIsNative(value) {
216720
217293
  if (!isObject2(value) || isMasked(value)) {
@@ -216767,8 +217340,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
216767
217340
  if (reLeadingDot.test(string5)) {
216768
217341
  result.push("");
216769
217342
  }
216770
- string5.replace(rePropName, function(match3, number5, quote, string6) {
216771
- result.push(quote ? string6.replace(reEscapeChar, "$1") : number5 || match3);
217343
+ string5.replace(rePropName, function(match3, number6, quote, string6) {
217344
+ result.push(quote ? string6.replace(reEscapeChar, "$1") : number6 || match3);
216772
217345
  });
216773
217346
  return result;
216774
217347
  });
@@ -216795,12 +217368,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
216795
217368
  throw new TypeError(FUNC_ERROR_TEXT);
216796
217369
  }
216797
217370
  var memoized = function() {
216798
- var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache4 = memoized.cache;
216799
- if (cache4.has(key)) {
216800
- return cache4.get(key);
217371
+ var args = arguments, key = resolver ? resolver.apply(this, args) : args[0], cache5 = memoized.cache;
217372
+ if (cache5.has(key)) {
217373
+ return cache5.get(key);
216801
217374
  }
216802
217375
  var result = func.apply(this, args);
216803
- memoized.cache = cache4.set(key, result);
217376
+ memoized.cache = cache5.set(key, result);
216804
217377
  return result;
216805
217378
  };
216806
217379
  memoized.cache = new (memoize.Cache || MapCache);
@@ -217264,8 +217837,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
217264
217837
  restore: function restore() {
217265
217838
  return this.xhr.restore && this.xhr.restore.apply(this.xhr, arguments);
217266
217839
  },
217267
- getRequest: function getRequest(index) {
217268
- return this.requests[index] || null;
217840
+ getRequest: function getRequest(index2) {
217841
+ return this.requests[index2] || null;
217269
217842
  },
217270
217843
  reset: function reset() {
217271
217844
  this.resetBehavior();
@@ -217860,14 +218433,14 @@ ${inspect2(response)}
217860
218433
  clearResponse(this);
217861
218434
  if (this.async) {
217862
218435
  var chunkSize = this.chunkSize || 10;
217863
- var index = 0;
218436
+ var index2 = 0;
217864
218437
  do {
217865
218438
  this.readyStateChange(FakeXMLHttpRequest.LOADING);
217866
218439
  if (isTextResponse) {
217867
- this.responseText = this.response += body.substring(index, index + chunkSize);
218440
+ this.responseText = this.response += body.substring(index2, index2 + chunkSize);
217868
218441
  }
217869
- index += chunkSize;
217870
- } while (index < body.length);
218442
+ index2 += chunkSize;
218443
+ } while (index2 < body.length);
217871
218444
  }
217872
218445
  this.response = convertResponseBody(this.responseType, contentType2, body);
217873
218446
  if (isTextResponse) {
@@ -218315,8 +218888,8 @@ ${inspect2(response)}
218315
218888
  const value = this.tryConsume(type);
218316
218889
  if (value !== undefined)
218317
218890
  return value;
218318
- const { type: nextType, index } = this.peek();
218319
- throw new TypeError(`Unexpected ${nextType} at ${index}, expected ${type}: ${DEBUG_URL}`);
218891
+ const { type: nextType, index: index2 } = this.peek();
218892
+ throw new TypeError(`Unexpected ${nextType} at ${index2}, expected ${type}: ${DEBUG_URL}`);
218320
218893
  }
218321
218894
  text() {
218322
218895
  let result = "";
@@ -218421,9 +218994,9 @@ ${inspect2(response)}
218421
218994
  throw new TypeError(`Expected "${token.name}" to be a non-empty array`);
218422
218995
  }
218423
218996
  return [
218424
- value.map((value2, index) => {
218997
+ value.map((value2, index2) => {
218425
218998
  if (typeof value2 !== "string") {
218426
- throw new TypeError(`Expected "${token.name}/${index}" to be a string`);
218999
+ throw new TypeError(`Expected "${token.name}/${index2}" to be a string`);
218427
219000
  }
218428
219001
  return encodeValue(value2);
218429
219002
  }).join(delimiter2)
@@ -218486,20 +219059,20 @@ ${inspect2(response)}
218486
219059
  const regexp = new RegExp(pattern, flags);
218487
219060
  return { regexp, keys };
218488
219061
  }
218489
- function* flatten(tokens, index, init) {
218490
- if (index === tokens.length) {
219062
+ function* flatten(tokens, index2, init) {
219063
+ if (index2 === tokens.length) {
218491
219064
  return yield init;
218492
219065
  }
218493
- const token = tokens[index];
219066
+ const token = tokens[index2];
218494
219067
  if (token.type === "group") {
218495
219068
  const fork = init.slice();
218496
219069
  for (const seq of flatten(token.tokens, 0, fork)) {
218497
- yield* flatten(tokens, index + 1, seq);
219070
+ yield* flatten(tokens, index2 + 1, seq);
218498
219071
  }
218499
219072
  } else {
218500
219073
  init.push(token);
218501
219074
  }
218502
- yield* flatten(tokens, index + 1, init);
219075
+ yield* flatten(tokens, index2 + 1, init);
218503
219076
  }
218504
219077
  function sequenceToRegExp(tokens, delimiter2, keys) {
218505
219078
  let result = "";
@@ -218538,13 +219111,13 @@ ${inspect2(response)}
218538
219111
  return `(?:(?!${values.map(escape2).join("|")}).)`;
218539
219112
  }
218540
219113
  function stringify6(data) {
218541
- return data.tokens.map(function stringifyToken(token, index, tokens) {
219114
+ return data.tokens.map(function stringifyToken(token, index2, tokens) {
218542
219115
  if (token.type === "text")
218543
219116
  return escapeText(token.value);
218544
219117
  if (token.type === "group") {
218545
219118
  return `{${token.tokens.map(stringifyToken).join("")}}`;
218546
219119
  }
218547
- const isSafe = isNameSafe(token.name) && isNextNameSafe(tokens[index + 1]);
219120
+ const isSafe = isNameSafe(token.name) && isNextNameSafe(tokens[index2 + 1]);
218548
219121
  const key = isSafe ? token.name : JSON.stringify(token.name);
218549
219122
  if (token.type === "param")
218550
219123
  return `:${key}`;
@@ -219931,10 +220504,10 @@ function requireReactIs() {
219931
220504
  return reactIs.exports;
219932
220505
  }
219933
220506
  var reactIsExports = requireReactIs();
219934
- var index = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports);
220507
+ var index2 = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports);
219935
220508
  var ReactIs18 = /* @__PURE__ */ _mergeNamespaces({
219936
220509
  __proto__: null,
219937
- default: index
220510
+ default: index2
219938
220511
  }, [reactIsExports]);
219939
220512
  var reactIsMethods = [
219940
220513
  "isAsyncMode",
@@ -221253,16 +221826,16 @@ var refresh2 = (program3) => {
221253
221826
  }
221254
221827
  const commitAll = options2.commit === true;
221255
221828
  const commitIndexes = Array.isArray(options2.commit) ? options2.commit.flatMap((value) => value.split(",")).filter((value) => value !== "").map((value) => {
221256
- const index2 = Number(value);
221257
- if (!Number.isInteger(index2) || index2 < 0 || index2 >= result.operations.length) {
221829
+ const index3 = Number(value);
221830
+ if (!Number.isInteger(index3) || index3 < 0 || index3 >= result.operations.length) {
221258
221831
  throw new ExpectedError(`Invalid state change index: ${value}`);
221259
221832
  }
221260
- return index2;
221833
+ return index3;
221261
221834
  }) : [];
221262
221835
  let skipped = 0;
221263
- for (const [index2, entry] of result.operations.entries()) {
221836
+ for (const [index3, entry] of result.operations.entries()) {
221264
221837
  logs_exports.warning([
221265
- `${color2.warning.bold.inverse(` ${capitalCase(entry.operation)} `)} ${color2.dim(`#${index2}`)}`,
221838
+ `${color2.warning.bold.inverse(` ${capitalCase(entry.operation)} `)} ${color2.dim(`#${index3}`)}`,
221266
221839
  entry.urn
221267
221840
  ].join(`
221268
221841
  `));
@@ -221272,7 +221845,7 @@ var refresh2 = (program3) => {
221272
221845
  logs_exports.message(diffResult);
221273
221846
  }
221274
221847
  }
221275
- if (commitAll || commitIndexes.includes(index2)) {
221848
+ if (commitAll || commitIndexes.includes(index3)) {
221276
221849
  entry.commit();
221277
221850
  continue;
221278
221851
  }