@awsless/cli 0.1.39 → 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.
- package/dist/bin.js +942 -349
- package/package.json +15 -15
package/dist/bin.js
CHANGED
|
@@ -126322,6 +126322,24 @@ var program = new Command;
|
|
|
126322
126322
|
var isRemoteAgent = () => {
|
|
126323
126323
|
return !!process.env.AWSLESS_REMOTE_AGENT && process.env.AWSLESS_REMOTE_AGENT !== "0";
|
|
126324
126324
|
};
|
|
126325
|
+
var proxyNames = ["HTTP_PROXY", "HTTPS_PROXY", "http_proxy", "https_proxy"];
|
|
126326
|
+
var childPrefix = "AWSLESS_CHILD_";
|
|
126327
|
+
var applyRemoteAgentEnv = () => {
|
|
126328
|
+
if (!isRemoteAgent()) {
|
|
126329
|
+
return;
|
|
126330
|
+
}
|
|
126331
|
+
process.env.SKIP_PROMPT = "1";
|
|
126332
|
+
for (const name of proxyNames) {
|
|
126333
|
+
const value = process.env[name];
|
|
126334
|
+
if (value) {
|
|
126335
|
+
process.env[`${childPrefix}${name}`] ??= value;
|
|
126336
|
+
delete process.env[name];
|
|
126337
|
+
}
|
|
126338
|
+
}
|
|
126339
|
+
};
|
|
126340
|
+
var childProxyEnv = (name) => {
|
|
126341
|
+
return process.env[`${childPrefix}${name}`] ?? process.env[name];
|
|
126342
|
+
};
|
|
126325
126343
|
|
|
126326
126344
|
// src/cli/command/auth/user/create.ts
|
|
126327
126345
|
import {
|
|
@@ -168063,7 +168081,7 @@ var proxyEnvNames = [
|
|
|
168063
168081
|
var proxyEnv = () => {
|
|
168064
168082
|
const env2 = {};
|
|
168065
168083
|
for (const name of proxyEnvNames) {
|
|
168066
|
-
const value =
|
|
168084
|
+
const value = childProxyEnv(name);
|
|
168067
168085
|
if (value) {
|
|
168068
168086
|
env2[name] = value;
|
|
168069
168087
|
}
|
|
@@ -188708,7 +188726,7 @@ var TERM_STOP = /* @__PURE__ */ new Set([
|
|
|
188708
188726
|
"{",
|
|
188709
188727
|
"}"
|
|
188710
188728
|
]);
|
|
188711
|
-
var Parser = class {
|
|
188729
|
+
var Parser$1 = class {
|
|
188712
188730
|
text;
|
|
188713
188731
|
defaultOperator;
|
|
188714
188732
|
pos = 0;
|
|
@@ -188967,7 +188985,7 @@ var Parser = class {
|
|
|
188967
188985
|
};
|
|
188968
188986
|
var unescape3 = (text2) => text2.replace(/\\(.)/g, "$1");
|
|
188969
188987
|
var parseQueryString = (text2, defaultOperator) => {
|
|
188970
|
-
const parser2 = new Parser(text2, defaultOperator);
|
|
188988
|
+
const parser2 = new Parser$1(text2, defaultOperator);
|
|
188971
188989
|
const clauses = parser2.parseClauses();
|
|
188972
188990
|
parser2.skipSpace();
|
|
188973
188991
|
if (!parser2.eof())
|
|
@@ -190220,6 +190238,507 @@ var compileStringNode = (ctx, node, settings2) => {
|
|
|
190220
190238
|
});
|
|
190221
190239
|
}
|
|
190222
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
|
+
};
|
|
190223
190742
|
var LONG_MAX = 2 ** 63;
|
|
190224
190743
|
var LONG_MIN = -(2 ** 63);
|
|
190225
190744
|
var parseSort = (sort2) => {
|
|
@@ -190236,8 +190755,10 @@ var parseSort = (sort2) => {
|
|
|
190236
190755
|
if (!isPlainObject3(entry))
|
|
190237
190756
|
throw illegalArgument("sort entries must be strings or objects");
|
|
190238
190757
|
for (const [field, options2] of Object.entries(entry)) {
|
|
190239
|
-
if (field === "_script")
|
|
190240
|
-
|
|
190758
|
+
if (field === "_script") {
|
|
190759
|
+
specs.push(makeScriptSpec(options2));
|
|
190760
|
+
continue;
|
|
190761
|
+
}
|
|
190241
190762
|
if (field === "_geo_distance")
|
|
190242
190763
|
throw unsupported2("geo distance sorting");
|
|
190243
190764
|
specs.push(makeSpec(field, isPlainObject3(options2) ? options2 : { order: options2 }));
|
|
@@ -190245,6 +190766,44 @@ var parseSort = (sort2) => {
|
|
|
190245
190766
|
}
|
|
190246
190767
|
return specs;
|
|
190247
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
|
+
};
|
|
190248
190807
|
var makeSpec = (field, options2) => {
|
|
190249
190808
|
for (const key of Object.keys(options2))
|
|
190250
190809
|
if (![
|
|
@@ -190334,11 +190893,43 @@ var reduce = (values, mode, order) => {
|
|
|
190334
190893
|
}
|
|
190335
190894
|
}
|
|
190336
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
|
+
};
|
|
190337
190926
|
var sortValueOf = (ctx, doc2, score, spec) => {
|
|
190338
190927
|
if (spec.field === "_score")
|
|
190339
190928
|
return score;
|
|
190340
190929
|
if (spec.field === "_doc")
|
|
190341
190930
|
return doc2.order;
|
|
190931
|
+
if (spec.script)
|
|
190932
|
+
return scriptSortValue(ctx, doc2, spec);
|
|
190342
190933
|
const field = requireSortableField(ctx, spec.field, spec.unmappedType);
|
|
190343
190934
|
if (!field)
|
|
190344
190935
|
return null;
|
|
@@ -190413,7 +191004,7 @@ var isAfter = (hit, cursor3, specs) => {
|
|
|
190413
191004
|
var renderSortValue = (ctx, value, spec) => {
|
|
190414
191005
|
if (value !== null)
|
|
190415
191006
|
return typeof value === "boolean" ? value ? 1 : 0 : value;
|
|
190416
|
-
if (spec.field === "_score" || spec.field === "_doc")
|
|
191007
|
+
if (spec.field === "_score" || spec.field === "_doc" || spec.script)
|
|
190417
191008
|
return null;
|
|
190418
191009
|
const field = resolveField(ctx.index.mapping, spec.field);
|
|
190419
191010
|
if (!(field ? isNumericType(field.type) || field.type === "date" || field.type === "boolean" : spec.unmappedType !== "keyword"))
|
|
@@ -190580,13 +191171,13 @@ var subResults = (agg, subAggs, units) => {
|
|
|
190580
191171
|
return subAggs === undefined ? {} : runAggregations(agg, subAggs, units);
|
|
190581
191172
|
};
|
|
190582
191173
|
var compileFilter = (agg, query) => {
|
|
190583
|
-
const
|
|
191174
|
+
const cache4 = /* @__PURE__ */ new Map;
|
|
190584
191175
|
return (unit) => {
|
|
190585
|
-
const
|
|
190586
|
-
let compiled =
|
|
191176
|
+
const index2 = unit.root.index;
|
|
191177
|
+
let compiled = cache4.get(index2);
|
|
190587
191178
|
if (!compiled) {
|
|
190588
|
-
compiled = compileQuery(agg.contextFor(
|
|
190589
|
-
|
|
191179
|
+
compiled = compileQuery(agg.contextFor(index2), query);
|
|
191180
|
+
cache4.set(index2, compiled);
|
|
190590
191181
|
}
|
|
190591
191182
|
return compiled.match(unit) !== undefined;
|
|
190592
191183
|
};
|
|
@@ -191120,10 +191711,10 @@ var readBoolean = (value, what) => {
|
|
|
191120
191711
|
var readInteger = (value, what) => {
|
|
191121
191712
|
if (value === undefined || value === null)
|
|
191122
191713
|
return;
|
|
191123
|
-
const
|
|
191124
|
-
if (!Number.isInteger(
|
|
191714
|
+
const number5 = typeof value === "number" ? value : Number(value);
|
|
191715
|
+
if (!Number.isInteger(number5))
|
|
191125
191716
|
throw illegalArgument(`[${what}] must be an integer`);
|
|
191126
|
-
return
|
|
191717
|
+
return number5;
|
|
191127
191718
|
};
|
|
191128
191719
|
var queryFromParams = (params) => {
|
|
191129
191720
|
const q3 = params.get("q");
|
|
@@ -191157,16 +191748,16 @@ var resolveQuery = (body, params) => {
|
|
|
191157
191748
|
throw illegalArgument("Cannot combine the q parameter with a request body query");
|
|
191158
191749
|
return fromParams ?? body.query;
|
|
191159
191750
|
};
|
|
191160
|
-
var collectMatches = (
|
|
191161
|
-
const ctx = createContext(
|
|
191751
|
+
var collectMatches = (index2, query, now) => {
|
|
191752
|
+
const ctx = createContext(index2, now);
|
|
191162
191753
|
let compiled;
|
|
191163
191754
|
try {
|
|
191164
191755
|
compiled = compileQuery(ctx, query);
|
|
191165
191756
|
} catch (error53) {
|
|
191166
|
-
throw wrapSearchError(error53,
|
|
191757
|
+
throw wrapSearchError(error53, index2.name);
|
|
191167
191758
|
}
|
|
191168
191759
|
const hits = [];
|
|
191169
|
-
for (const doc2 of
|
|
191760
|
+
for (const doc2 of index2.docs.values()) {
|
|
191170
191761
|
const score = compiled.match(doc2);
|
|
191171
191762
|
if (score !== undefined)
|
|
191172
191763
|
hits.push({
|
|
@@ -191176,7 +191767,7 @@ var collectMatches = (index, query, now) => {
|
|
|
191176
191767
|
});
|
|
191177
191768
|
}
|
|
191178
191769
|
return {
|
|
191179
|
-
index,
|
|
191770
|
+
index: index2,
|
|
191180
191771
|
ctx,
|
|
191181
191772
|
hits
|
|
191182
191773
|
};
|
|
@@ -191185,8 +191776,8 @@ var countDocuments = (store2, indices, body, params) => {
|
|
|
191185
191776
|
const query = resolveQuery(body ?? {}, params);
|
|
191186
191777
|
let count = 0;
|
|
191187
191778
|
const now = Date.now();
|
|
191188
|
-
for (const
|
|
191189
|
-
count += collectMatches(
|
|
191779
|
+
for (const index2 of store2.resolve(indices))
|
|
191780
|
+
count += collectMatches(index2, query, now).hits.length;
|
|
191190
191781
|
return count;
|
|
191191
191782
|
};
|
|
191192
191783
|
var deleteByQuery = (store2, indices, body, params) => {
|
|
@@ -191195,9 +191786,9 @@ var deleteByQuery = (store2, indices, body, params) => {
|
|
|
191195
191786
|
throw illegalArgument("query is missing");
|
|
191196
191787
|
let deleted = 0;
|
|
191197
191788
|
const now = Date.now();
|
|
191198
|
-
for (const
|
|
191199
|
-
for (const hit of collectMatches(
|
|
191200
|
-
|
|
191789
|
+
for (const index2 of store2.resolve(indices))
|
|
191790
|
+
for (const hit of collectMatches(index2, query, now).hits) {
|
|
191791
|
+
index2.delete(hit.doc.id);
|
|
191201
191792
|
deleted++;
|
|
191202
191793
|
}
|
|
191203
191794
|
return deleted;
|
|
@@ -191235,15 +191826,15 @@ var search = (store2, request) => {
|
|
|
191235
191826
|
const indices = store2.resolve(request.indices);
|
|
191236
191827
|
const now = started;
|
|
191237
191828
|
const matches = [];
|
|
191238
|
-
for (const
|
|
191239
|
-
const matched = collectMatches(
|
|
191829
|
+
for (const index2 of indices) {
|
|
191830
|
+
const matched = collectMatches(index2, query, now);
|
|
191240
191831
|
if (minScore !== undefined)
|
|
191241
191832
|
matched.hits = matched.hits.filter((hit) => hit.score >= minScore);
|
|
191242
191833
|
try {
|
|
191243
191834
|
for (const hit of matched.hits)
|
|
191244
191835
|
hit.sort = specs.map((spec) => sortValueOf(matched.ctx, hit.doc, hit.score, spec));
|
|
191245
191836
|
} catch (error53) {
|
|
191246
|
-
throw wrapSearchError(error53,
|
|
191837
|
+
throw wrapSearchError(error53, index2.name);
|
|
191247
191838
|
}
|
|
191248
191839
|
matches.push(matched);
|
|
191249
191840
|
}
|
|
@@ -191327,7 +191918,7 @@ var runAggs = (spec, hits, contexts, indices) => {
|
|
|
191327
191918
|
const agg = {
|
|
191328
191919
|
contextFor: (name) => contexts.get(name),
|
|
191329
191920
|
scores,
|
|
191330
|
-
allDocs: () => indices.flatMap((
|
|
191921
|
+
allDocs: () => indices.flatMap((index2) => [...index2.docs.values()])
|
|
191331
191922
|
};
|
|
191332
191923
|
try {
|
|
191333
191924
|
return runAggregations(agg, spec, hits.map((h4) => h4.doc));
|
|
@@ -191358,8 +191949,8 @@ var optionalBody = (request) => {
|
|
|
191358
191949
|
throw illegalArgument("request body must be a JSON object");
|
|
191359
191950
|
return request.body;
|
|
191360
191951
|
};
|
|
191361
|
-
var writeResponse = (
|
|
191362
|
-
_index:
|
|
191952
|
+
var writeResponse = (index2, result) => ({
|
|
191953
|
+
_index: index2.name,
|
|
191363
191954
|
_id: result.doc.id,
|
|
191364
191955
|
_version: result.doc.version,
|
|
191365
191956
|
result: result.result,
|
|
@@ -191367,17 +191958,17 @@ var writeResponse = (index, result) => ({
|
|
|
191367
191958
|
_seq_no: result.doc.seqNo,
|
|
191368
191959
|
_primary_term: 1
|
|
191369
191960
|
});
|
|
191370
|
-
var getResponse = (
|
|
191371
|
-
const doc2 =
|
|
191961
|
+
var getResponse = (index2, id, sourceFilter) => {
|
|
191962
|
+
const doc2 = index2.get(id);
|
|
191372
191963
|
if (!doc2)
|
|
191373
191964
|
return {
|
|
191374
|
-
_index:
|
|
191965
|
+
_index: index2.name,
|
|
191375
191966
|
_id: id,
|
|
191376
191967
|
found: false
|
|
191377
191968
|
};
|
|
191378
191969
|
const source = applySourceFilter(doc2.source, sourceFilter);
|
|
191379
191970
|
return {
|
|
191380
|
-
_index:
|
|
191971
|
+
_index: index2.name,
|
|
191381
191972
|
_id: id,
|
|
191382
191973
|
_version: doc2.version,
|
|
191383
191974
|
_seq_no: doc2.seqNo,
|
|
@@ -191454,17 +192045,17 @@ var parseBulkBody = (raw, defaultIndex) => {
|
|
|
191454
192045
|
}
|
|
191455
192046
|
return items;
|
|
191456
192047
|
};
|
|
191457
|
-
var bulkError = (error53,
|
|
192048
|
+
var bulkError = (error53, index2, id) => {
|
|
191458
192049
|
if (!(error53 instanceof OpenSearchError))
|
|
191459
192050
|
throw error53;
|
|
191460
192051
|
return {
|
|
191461
|
-
_index:
|
|
192052
|
+
_index: index2,
|
|
191462
192053
|
_id: id ?? null,
|
|
191463
192054
|
status: error53.status,
|
|
191464
192055
|
error: {
|
|
191465
192056
|
type: error53.type,
|
|
191466
192057
|
reason: error53.reason,
|
|
191467
|
-
index,
|
|
192058
|
+
index: index2,
|
|
191468
192059
|
index_uuid: "_na_",
|
|
191469
192060
|
shard: "0"
|
|
191470
192061
|
}
|
|
@@ -191479,12 +192070,12 @@ var runBulk = (store2, request, defaultIndex) => {
|
|
|
191479
192070
|
const id = item.meta._id === undefined ? undefined : String(item.meta._id);
|
|
191480
192071
|
try {
|
|
191481
192072
|
if (item.action === "delete") {
|
|
191482
|
-
const
|
|
191483
|
-
if (!
|
|
192073
|
+
const index3 = store2.indices.get(indexName);
|
|
192074
|
+
if (!index3)
|
|
191484
192075
|
throw indexNotFound(indexName);
|
|
191485
192076
|
if (id === undefined)
|
|
191486
192077
|
throw illegalArgument("Validation Failed: 1: id is missing;");
|
|
191487
|
-
const doc2 =
|
|
192078
|
+
const doc2 = index3.delete(id);
|
|
191488
192079
|
return { delete: {
|
|
191489
192080
|
_index: indexName,
|
|
191490
192081
|
_id: id,
|
|
@@ -191496,20 +192087,20 @@ var runBulk = (store2, request, defaultIndex) => {
|
|
|
191496
192087
|
status: doc2 ? 200 : 404
|
|
191497
192088
|
} };
|
|
191498
192089
|
}
|
|
191499
|
-
const
|
|
192090
|
+
const index2 = store2.getOrCreate(indexName);
|
|
191500
192091
|
if (item.action === "update") {
|
|
191501
192092
|
if (id === undefined)
|
|
191502
192093
|
throw illegalArgument("Validation Failed: 1: id is missing;");
|
|
191503
|
-
const result2 =
|
|
192094
|
+
const result2 = index2.update(id, item.source);
|
|
191504
192095
|
return { update: {
|
|
191505
|
-
...writeResponse(
|
|
192096
|
+
...writeResponse(index2, result2),
|
|
191506
192097
|
status: 200
|
|
191507
192098
|
} };
|
|
191508
192099
|
}
|
|
191509
192100
|
const create = item.action === "create" || item.meta.op_type === "create";
|
|
191510
|
-
const result =
|
|
192101
|
+
const result = index2.put(id ?? generateId(), item.source, { create });
|
|
191511
192102
|
return { [item.action]: {
|
|
191512
|
-
...writeResponse(
|
|
192103
|
+
...writeResponse(index2, result),
|
|
191513
192104
|
status: result.result === "created" ? 201 : 200
|
|
191514
192105
|
} };
|
|
191515
192106
|
} catch (error53) {
|
|
@@ -191528,14 +192119,14 @@ var catIndices = (store2, params, expression) => {
|
|
|
191528
192119
|
if (format3 !== "json")
|
|
191529
192120
|
throw unsupported2(`the "${format3}" cat format (use format=json)`);
|
|
191530
192121
|
const indices = expression === undefined ? [...store2.indices.values()] : store2.resolve(expression);
|
|
191531
|
-
return ok(indices.map((
|
|
192122
|
+
return ok(indices.map((index2) => ({
|
|
191532
192123
|
health: "green",
|
|
191533
192124
|
status: "open",
|
|
191534
|
-
index:
|
|
191535
|
-
uuid:
|
|
192125
|
+
index: index2.name,
|
|
192126
|
+
uuid: index2.uuid,
|
|
191536
192127
|
pri: "1",
|
|
191537
192128
|
rep: "1",
|
|
191538
|
-
"docs.count": String(
|
|
192129
|
+
"docs.count": String(index2.docs.size),
|
|
191539
192130
|
"docs.deleted": "0",
|
|
191540
192131
|
"store.size": "0b",
|
|
191541
192132
|
"pri.store.size": "0b"
|
|
@@ -191577,13 +192168,13 @@ var mgetDocs = (store2, request, defaultIndex) => {
|
|
|
191577
192168
|
for (const doc2 of body.docs) {
|
|
191578
192169
|
if (!isPlainObject3(doc2))
|
|
191579
192170
|
throw illegalArgument("docs entries must be objects");
|
|
191580
|
-
const
|
|
191581
|
-
if (
|
|
192171
|
+
const index2 = doc2._index === undefined ? defaultIndex : String(doc2._index);
|
|
192172
|
+
if (index2 === undefined)
|
|
191582
192173
|
throw illegalArgument("Validation Failed: 1: index is missing;");
|
|
191583
192174
|
if (doc2._id === undefined)
|
|
191584
192175
|
throw illegalArgument("Validation Failed: 1: id is missing;");
|
|
191585
192176
|
entries2.push({
|
|
191586
|
-
index,
|
|
192177
|
+
index: index2,
|
|
191587
192178
|
id: String(doc2._id),
|
|
191588
192179
|
filter: doc2._source === undefined ? filter2 : parseSourceFilter(doc2._source)
|
|
191589
192180
|
});
|
|
@@ -191591,8 +192182,8 @@ var mgetDocs = (store2, request, defaultIndex) => {
|
|
|
191591
192182
|
else
|
|
191592
192183
|
throw illegalArgument("Validation Failed: 1: no documents to get;");
|
|
191593
192184
|
return ok({ docs: entries2.map((entry) => {
|
|
191594
|
-
const
|
|
191595
|
-
if (!
|
|
192185
|
+
const index2 = store2.indices.get(entry.index);
|
|
192186
|
+
if (!index2) {
|
|
191596
192187
|
const error53 = indexNotFound(entry.index);
|
|
191597
192188
|
return {
|
|
191598
192189
|
_index: entry.index,
|
|
@@ -191604,17 +192195,17 @@ var mgetDocs = (store2, request, defaultIndex) => {
|
|
|
191604
192195
|
}
|
|
191605
192196
|
};
|
|
191606
192197
|
}
|
|
191607
|
-
return getResponse(
|
|
192198
|
+
return getResponse(index2, entry.id, entry.filter);
|
|
191608
192199
|
}) });
|
|
191609
192200
|
};
|
|
191610
192201
|
var putDocument = (store2, request, indexName, id, forceCreate) => {
|
|
191611
192202
|
const source = requireBody(request);
|
|
191612
|
-
const
|
|
192203
|
+
const index2 = store2.getOrCreate(indexName);
|
|
191613
192204
|
const create = forceCreate || request.params.get("op_type") === "create";
|
|
191614
|
-
if (create && id !== undefined &&
|
|
192205
|
+
if (create && id !== undefined && index2.get(id))
|
|
191615
192206
|
throw versionConflict(indexName, id);
|
|
191616
|
-
const result =
|
|
191617
|
-
return ok(writeResponse(
|
|
192207
|
+
const result = index2.put(id ?? generateId(), source, { create });
|
|
192208
|
+
return ok(writeResponse(index2, result), result.result === "created" ? 201 : 200);
|
|
191618
192209
|
};
|
|
191619
192210
|
var createRoutes = (store2) => {
|
|
191620
192211
|
const route = (methods, pattern, handler) => ({
|
|
@@ -191703,14 +192294,14 @@ var createRoutes = (store2) => {
|
|
|
191703
192294
|
}),
|
|
191704
192295
|
route("GET", "/_mapping", () => {
|
|
191705
192296
|
const result = {};
|
|
191706
|
-
for (const
|
|
191707
|
-
result[
|
|
192297
|
+
for (const index2 of store2.indices.values())
|
|
192298
|
+
result[index2.name] = { mappings: index2.mapping };
|
|
191708
192299
|
return ok(result);
|
|
191709
192300
|
}),
|
|
191710
192301
|
route("GET", "/_all", () => {
|
|
191711
192302
|
const result = {};
|
|
191712
|
-
for (const
|
|
191713
|
-
result[
|
|
192303
|
+
for (const index2 of store2.indices.values())
|
|
192304
|
+
result[index2.name] = index2.describe();
|
|
191714
192305
|
return ok(result);
|
|
191715
192306
|
}),
|
|
191716
192307
|
route("HEAD", "/:index", (_request, path6) => {
|
|
@@ -191719,8 +192310,8 @@ var createRoutes = (store2) => {
|
|
|
191719
192310
|
}),
|
|
191720
192311
|
route("GET", "/:index", (_request, path6) => {
|
|
191721
192312
|
const result = {};
|
|
191722
|
-
for (const
|
|
191723
|
-
result[
|
|
192313
|
+
for (const index2 of store2.resolve(path6.index))
|
|
192314
|
+
result[index2.name] = index2.describe();
|
|
191724
192315
|
return ok(result);
|
|
191725
192316
|
}),
|
|
191726
192317
|
route("PUT", "/:index", (request, path6) => {
|
|
@@ -191747,33 +192338,33 @@ var createRoutes = (store2) => {
|
|
|
191747
192338
|
}),
|
|
191748
192339
|
route("GET", "/:index/_mapping", (_request, path6) => {
|
|
191749
192340
|
const result = {};
|
|
191750
|
-
for (const
|
|
191751
|
-
result[
|
|
192341
|
+
for (const index2 of store2.resolve(path6.index))
|
|
192342
|
+
result[index2.name] = { mappings: index2.mapping };
|
|
191752
192343
|
return ok(result);
|
|
191753
192344
|
}),
|
|
191754
192345
|
route("PUT,POST", "/:index/_mapping", (request, path6) => {
|
|
191755
192346
|
const body = requireBody(request);
|
|
191756
|
-
for (const
|
|
191757
|
-
|
|
192347
|
+
for (const index2 of store2.resolve(path6.index))
|
|
192348
|
+
index2.putMapping(body);
|
|
191758
192349
|
return ok({ acknowledged: true });
|
|
191759
192350
|
}),
|
|
191760
192351
|
route("GET", "/:index/_settings", (_request, path6) => {
|
|
191761
192352
|
const result = {};
|
|
191762
|
-
for (const
|
|
191763
|
-
result[
|
|
192353
|
+
for (const index2 of store2.resolve(path6.index))
|
|
192354
|
+
result[index2.name] = { settings: index2.describe().settings };
|
|
191764
192355
|
return ok(result);
|
|
191765
192356
|
}),
|
|
191766
192357
|
route("POST", "/:index/_doc", (request, path6) => putDocument(store2, request, path6.index, undefined, false)),
|
|
191767
192358
|
route("PUT,POST", "/:index/_doc/:id", (request, path6) => putDocument(store2, request, path6.index, path6.id, false)),
|
|
191768
192359
|
route("PUT,POST", "/:index/_create/:id", (request, path6) => putDocument(store2, request, path6.index, path6.id, true)),
|
|
191769
192360
|
route("GET", "/:index/_doc/:id", (request, path6) => {
|
|
191770
|
-
const
|
|
191771
|
-
const response = getResponse(
|
|
192361
|
+
const index2 = store2.get(path6.index);
|
|
192362
|
+
const response = getResponse(index2, path6.id, sourceFilterFromParams(request.params));
|
|
191772
192363
|
return ok(response, response.found ? 200 : 404);
|
|
191773
192364
|
}),
|
|
191774
192365
|
route("HEAD", "/:index/_doc/:id", (_request, path6) => {
|
|
191775
|
-
const
|
|
191776
|
-
return ok(undefined,
|
|
192366
|
+
const index2 = store2.get(path6.index);
|
|
192367
|
+
return ok(undefined, index2.get(path6.id) ? 200 : 404);
|
|
191777
192368
|
}),
|
|
191778
192369
|
route("GET", "/:index/_source/:id", (request, path6) => {
|
|
191779
192370
|
const doc2 = store2.get(path6.index).get(path6.id);
|
|
@@ -191782,14 +192373,14 @@ var createRoutes = (store2) => {
|
|
|
191782
192373
|
return ok(applySourceFilter(doc2.source, sourceFilterFromParams(request.params)) ?? {});
|
|
191783
192374
|
}),
|
|
191784
192375
|
route("HEAD", "/:index/_source/:id", (_request, path6) => {
|
|
191785
|
-
const
|
|
191786
|
-
return ok(undefined,
|
|
192376
|
+
const index2 = store2.get(path6.index);
|
|
192377
|
+
return ok(undefined, index2.get(path6.id) ? 200 : 404);
|
|
191787
192378
|
}),
|
|
191788
192379
|
route("DELETE", "/:index/_doc/:id", (_request, path6) => {
|
|
191789
|
-
const
|
|
191790
|
-
const doc2 =
|
|
192380
|
+
const index2 = store2.get(path6.index);
|
|
192381
|
+
const doc2 = index2.delete(path6.id);
|
|
191791
192382
|
return ok({
|
|
191792
|
-
_index:
|
|
192383
|
+
_index: index2.name,
|
|
191793
192384
|
_id: path6.id,
|
|
191794
192385
|
_version: doc2 ? doc2.version + 1 : 1,
|
|
191795
192386
|
result: doc2 ? "deleted" : "not_found",
|
|
@@ -191799,10 +192390,10 @@ var createRoutes = (store2) => {
|
|
|
191799
192390
|
}, doc2 ? 200 : 404);
|
|
191800
192391
|
}),
|
|
191801
192392
|
route("POST", "/:index/_update/:id", (request, path6) => {
|
|
191802
|
-
const
|
|
192393
|
+
const index2 = store2.get(path6.index);
|
|
191803
192394
|
const body = requireBody(request);
|
|
191804
|
-
const result =
|
|
191805
|
-
const response = writeResponse(
|
|
192395
|
+
const result = index2.update(path6.id, body);
|
|
192396
|
+
const response = writeResponse(index2, result);
|
|
191806
192397
|
const sourceParam = request.params.get("_source") ?? (body._source === true ? "true" : undefined);
|
|
191807
192398
|
if (sourceParam !== undefined && sourceParam !== "false")
|
|
191808
192399
|
response.get = {
|
|
@@ -192539,9 +193130,9 @@ ${(errors4.trim() || output.trim()).slice(-2000)}`);
|
|
|
192539
193130
|
const hashes = files.map((file3) => $hash(join33(staticDir, file3)));
|
|
192540
193131
|
const version3 = $combine(...hashes).pipe((hashes2) => {
|
|
192541
193132
|
const hash3 = createHash19("sha1");
|
|
192542
|
-
for (const [
|
|
193133
|
+
for (const [index2, file3] of files.entries()) {
|
|
192543
193134
|
hash3.update(file3);
|
|
192544
|
-
hash3.update(hashes2[
|
|
193135
|
+
hash3.update(hashes2[index2]);
|
|
192545
193136
|
}
|
|
192546
193137
|
return hash3.digest("hex");
|
|
192547
193138
|
});
|
|
@@ -192716,9 +193307,9 @@ var storeFeature = defineFeature({
|
|
|
192716
193307
|
for (const [id, props] of Object.entries(ctx.stackConfig.stores ?? {})) {
|
|
192717
193308
|
const group = new Group(ctx.stack, "store", id);
|
|
192718
193309
|
const folder = getFeatureFolder("store", ctx.stack.name, id);
|
|
192719
|
-
for (const [
|
|
193310
|
+
for (const [index2, rule] of Object.entries(props.lifecycle ?? [])) {
|
|
192720
193311
|
bucket.addLifecycleRule({
|
|
192721
|
-
id: `expire-${kebabCase(`${folder}${rule.prefix ?? `rule-${
|
|
193312
|
+
id: `expire-${kebabCase(`${folder}${rule.prefix ?? `rule-${index2}`}`)}`,
|
|
192722
193313
|
enabled: true,
|
|
192723
193314
|
prefix: `${folder}${rule.prefix ?? ""}`,
|
|
192724
193315
|
expiration: { days: toDays11(rule.expiration) }
|
|
@@ -192809,12 +193400,12 @@ var createDataReset = (props) => {
|
|
|
192809
193400
|
const client2 = new Client5({ node: `http://localhost:${search2.port}` });
|
|
192810
193401
|
for (const stack of props.stackConfigs) {
|
|
192811
193402
|
for (const [id, searchProps] of Object.entries(stack.searchs ?? {})) {
|
|
192812
|
-
const
|
|
193403
|
+
const index2 = formatSearchIndexName(stack.name, id);
|
|
192813
193404
|
try {
|
|
192814
|
-
await client2.indices.delete({ index });
|
|
193405
|
+
await client2.indices.delete({ index: index2 });
|
|
192815
193406
|
} catch {}
|
|
192816
193407
|
await applySearchIndex(client2, {
|
|
192817
|
-
index,
|
|
193408
|
+
index: index2,
|
|
192818
193409
|
mappings: resolveSearchMappings(searchProps),
|
|
192819
193410
|
settings: searchProps.settings
|
|
192820
193411
|
});
|
|
@@ -192844,11 +193435,11 @@ var formatTableKeys = (props) => {
|
|
|
192844
193435
|
hash: props.hash,
|
|
192845
193436
|
...props.sort ? { sort: props.sort } : {},
|
|
192846
193437
|
...props.indexes && Object.keys(props.indexes).length > 0 ? {
|
|
192847
|
-
indexes: Object.fromEntries(Object.entries(props.indexes).map(([name,
|
|
193438
|
+
indexes: Object.fromEntries(Object.entries(props.indexes).map(([name, index2]) => [
|
|
192848
193439
|
name,
|
|
192849
193440
|
{
|
|
192850
|
-
hash:
|
|
192851
|
-
...
|
|
193441
|
+
hash: index2.hash,
|
|
193442
|
+
...index2.sort ? { sort: index2.sort } : {}
|
|
192852
193443
|
}
|
|
192853
193444
|
]))
|
|
192854
193445
|
} : {}
|
|
@@ -192865,9 +193456,9 @@ var createTableInput = (name, props) => {
|
|
|
192865
193456
|
const attributes = new Set([
|
|
192866
193457
|
props.hash,
|
|
192867
193458
|
props.sort,
|
|
192868
|
-
...Object.values(props.indexes ?? {}).map((
|
|
192869
|
-
|
|
192870
|
-
|
|
193459
|
+
...Object.values(props.indexes ?? {}).map((index2) => [
|
|
193460
|
+
index2.hash,
|
|
193461
|
+
index2.sort
|
|
192871
193462
|
])
|
|
192872
193463
|
].flat(2).filter((v3) => !!v3));
|
|
192873
193464
|
return {
|
|
@@ -192881,12 +193472,12 @@ var createTableInput = (name, props) => {
|
|
|
192881
193472
|
AttributeName: name2,
|
|
192882
193473
|
AttributeType: attributeTypes[props.fields?.[name2] ?? "string"]
|
|
192883
193474
|
})),
|
|
192884
|
-
GlobalSecondaryIndexes: props.indexes && Object.keys(props.indexes).length > 0 ? Object.entries(props.indexes).map(([name2,
|
|
193475
|
+
GlobalSecondaryIndexes: props.indexes && Object.keys(props.indexes).length > 0 ? Object.entries(props.indexes).map(([name2, index2]) => ({
|
|
192885
193476
|
IndexName: name2,
|
|
192886
|
-
Projection: { ProjectionType: constantCase(
|
|
193477
|
+
Projection: { ProjectionType: constantCase(index2.projection) },
|
|
192887
193478
|
KeySchema: [
|
|
192888
|
-
...
|
|
192889
|
-
...(
|
|
193479
|
+
...index2.hash.map((name3) => ({ AttributeName: name3, KeyType: "HASH" })),
|
|
193480
|
+
...(index2.sort ?? []).map((name3) => ({ AttributeName: name3, KeyType: "RANGE" }))
|
|
192890
193481
|
]
|
|
192891
193482
|
})) : undefined,
|
|
192892
193483
|
StreamSpecification: props.stream ? {
|
|
@@ -193018,9 +193609,9 @@ var tableFeature = defineFeature({
|
|
|
193018
193609
|
resourceName: name
|
|
193019
193610
|
});
|
|
193020
193611
|
const sort2 = props.sort ? keyValue(props.sort) : "undefined";
|
|
193021
|
-
const indexes = props.indexes && Object.keys(props.indexes).length > 0 ? `{ ${Object.entries(props.indexes).map(([indexName,
|
|
193022
|
-
const indexSort =
|
|
193023
|
-
return `'${indexName}': { hash: ${keyValue(
|
|
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} }`;
|
|
193024
193615
|
}).join("; ")} }` : "undefined";
|
|
193025
193616
|
list2.addType(name, `{
|
|
193026
193617
|
readonly name: '${tableName}'
|
|
@@ -193082,9 +193673,9 @@ var tableFeature = defineFeature({
|
|
|
193082
193673
|
const attributes = new Set([
|
|
193083
193674
|
props.hash,
|
|
193084
193675
|
props.sort,
|
|
193085
|
-
...Object.values(props.indexes ?? {}).map((
|
|
193086
|
-
|
|
193087
|
-
|
|
193676
|
+
...Object.values(props.indexes ?? {}).map((index2) => [
|
|
193677
|
+
index2.hash,
|
|
193678
|
+
index2.sort
|
|
193088
193679
|
])
|
|
193089
193680
|
].flat(2).filter((v3) => !!v3));
|
|
193090
193681
|
const types2 = {
|
|
@@ -193113,15 +193704,15 @@ var tableFeature = defineFeature({
|
|
|
193113
193704
|
pointInTimeRecovery: {
|
|
193114
193705
|
enabled: props.pointInTimeRecovery
|
|
193115
193706
|
},
|
|
193116
|
-
globalSecondaryIndex: Object.entries(props.indexes ?? {}).map(([name2,
|
|
193707
|
+
globalSecondaryIndex: Object.entries(props.indexes ?? {}).map(([name2, index2]) => ({
|
|
193117
193708
|
name: name2,
|
|
193118
|
-
projectionType: constantCase(
|
|
193709
|
+
projectionType: constantCase(index2.projection),
|
|
193119
193710
|
keySchema: [
|
|
193120
|
-
...
|
|
193711
|
+
...index2.hash.map((name3) => ({
|
|
193121
193712
|
keyType: "HASH",
|
|
193122
193713
|
attributeName: name3
|
|
193123
193714
|
})),
|
|
193124
|
-
...(
|
|
193715
|
+
...(index2.sort ?? []).map((name3) => ({
|
|
193125
193716
|
keyType: "RANGE",
|
|
193126
193717
|
attributeName: name3
|
|
193127
193718
|
}))
|
|
@@ -193619,11 +194210,11 @@ var vpcFeature = defineFeature({
|
|
|
193619
194210
|
const type = _type;
|
|
193620
194211
|
const subnetIds = subnetIdsByType[type];
|
|
193621
194212
|
for (const [i4, zone] of zones.entries()) {
|
|
193622
|
-
const
|
|
193623
|
-
const id = `${type}-${
|
|
194213
|
+
const index2 = i4 + 1;
|
|
194214
|
+
const id = `${type}-${index2}`;
|
|
193624
194215
|
const subnet = new aws.Subnet(group, id, {
|
|
193625
194216
|
tags: {
|
|
193626
|
-
Name: `${ctx.app.name}--${type}-${
|
|
194217
|
+
Name: `${ctx.app.name}--${type}-${index2}`
|
|
193627
194218
|
},
|
|
193628
194219
|
vpcId: vpc.id,
|
|
193629
194220
|
cidrBlock: `10.0.${block2}.0/20`,
|
|
@@ -194592,14 +195183,14 @@ var import_aws_cron_expression_validator = __toESM(require_src6(), 1);
|
|
|
194592
195183
|
var RateExpressionSchema = exports_external.custom((value) => {
|
|
194593
195184
|
return exports_external.string().regex(/^[0-9]+ (seconds?|minutes?|hours?|days?)$/).refine((rate) => {
|
|
194594
195185
|
const [str] = rate.split(" ");
|
|
194595
|
-
const
|
|
194596
|
-
return
|
|
195186
|
+
const number5 = parseInt(str);
|
|
195187
|
+
return number5 > 0;
|
|
194597
195188
|
}).safeParse(value).success;
|
|
194598
195189
|
}, { message: "Invalid rate expression" }).transform((rate) => {
|
|
194599
195190
|
const [str] = rate.split(" ");
|
|
194600
|
-
const
|
|
195191
|
+
const number5 = parseInt(str);
|
|
194601
195192
|
const more = rate.endsWith("s");
|
|
194602
|
-
if (more &&
|
|
195193
|
+
if (more && number5 === 1) {
|
|
194603
195194
|
return `rate(${rate.substring(0, rate.length - 1)})`;
|
|
194604
195195
|
}
|
|
194605
195196
|
return `rate(${rate})`;
|
|
@@ -195020,15 +195611,15 @@ function patchErrorMessageFormatter(message2, args) {
|
|
|
195020
195611
|
}
|
|
195021
195612
|
var PatchError = function(_super) {
|
|
195022
195613
|
__extends(PatchError2, _super);
|
|
195023
|
-
function PatchError2(message2, name,
|
|
195614
|
+
function PatchError2(message2, name, index2, operation, tree) {
|
|
195024
195615
|
var _newTarget = this.constructor;
|
|
195025
|
-
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;
|
|
195026
195617
|
_this.name = name;
|
|
195027
|
-
_this.index =
|
|
195618
|
+
_this.index = index2;
|
|
195028
195619
|
_this.operation = operation;
|
|
195029
195620
|
_this.tree = tree;
|
|
195030
195621
|
Object.setPrototypeOf(_this, _newTarget.prototype);
|
|
195031
|
-
_this.message = patchErrorMessageFormatter(message2, { name, index, operation, tree });
|
|
195622
|
+
_this.message = patchErrorMessageFormatter(message2, { name, index: index2, operation, tree });
|
|
195032
195623
|
return _this;
|
|
195033
195624
|
}
|
|
195034
195625
|
return PatchError2;
|
|
@@ -195105,7 +195696,7 @@ function getValueByPointer(document2, pointer) {
|
|
|
195105
195696
|
applyOperation(document2, getOriginalDestination);
|
|
195106
195697
|
return getOriginalDestination.value;
|
|
195107
195698
|
}
|
|
195108
|
-
function applyOperation(document2, operation, validateOperation, mutateDocument, banPrototypeModifications,
|
|
195699
|
+
function applyOperation(document2, operation, validateOperation, mutateDocument, banPrototypeModifications, index2) {
|
|
195109
195700
|
if (validateOperation === undefined) {
|
|
195110
195701
|
validateOperation = false;
|
|
195111
195702
|
}
|
|
@@ -195115,8 +195706,8 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
|
|
|
195115
195706
|
if (banPrototypeModifications === undefined) {
|
|
195116
195707
|
banPrototypeModifications = true;
|
|
195117
195708
|
}
|
|
195118
|
-
if (
|
|
195119
|
-
|
|
195709
|
+
if (index2 === undefined) {
|
|
195710
|
+
index2 = 0;
|
|
195120
195711
|
}
|
|
195121
195712
|
if (validateOperation) {
|
|
195122
195713
|
if (typeof validateOperation == "function") {
|
|
@@ -195143,7 +195734,7 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
|
|
|
195143
195734
|
} else if (operation.op === "test") {
|
|
195144
195735
|
returnValue.test = _areEquals(document2, operation.value);
|
|
195145
195736
|
if (returnValue.test === false) {
|
|
195146
|
-
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED",
|
|
195737
|
+
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
|
|
195147
195738
|
}
|
|
195148
195739
|
returnValue.newDocument = document2;
|
|
195149
195740
|
return returnValue;
|
|
@@ -195156,7 +195747,7 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
|
|
|
195156
195747
|
return returnValue;
|
|
195157
195748
|
} else {
|
|
195158
195749
|
if (validateOperation) {
|
|
195159
|
-
throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID",
|
|
195750
|
+
throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index2, operation, document2);
|
|
195160
195751
|
} else {
|
|
195161
195752
|
return returnValue;
|
|
195162
195753
|
}
|
|
@@ -195204,18 +195795,18 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
|
|
|
195204
195795
|
key = obj.length;
|
|
195205
195796
|
} else {
|
|
195206
195797
|
if (validateOperation && !isInteger(key)) {
|
|
195207
|
-
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",
|
|
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);
|
|
195208
195799
|
} else if (isInteger(key)) {
|
|
195209
195800
|
key = ~~key;
|
|
195210
195801
|
}
|
|
195211
195802
|
}
|
|
195212
195803
|
if (t2 >= len) {
|
|
195213
195804
|
if (validateOperation && operation.op === "add" && key > obj.length) {
|
|
195214
|
-
throw new JsonPatchError("The specified index MUST NOT be greater than the number of elements in the array", "OPERATION_VALUE_OUT_OF_BOUNDS",
|
|
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);
|
|
195215
195806
|
}
|
|
195216
195807
|
var returnValue = arrOps[operation.op].call(operation, obj, key, document2);
|
|
195217
195808
|
if (returnValue.test === false) {
|
|
195218
|
-
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED",
|
|
195809
|
+
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
|
|
195219
195810
|
}
|
|
195220
195811
|
return returnValue;
|
|
195221
195812
|
}
|
|
@@ -195223,14 +195814,14 @@ function applyOperation(document2, operation, validateOperation, mutateDocument,
|
|
|
195223
195814
|
if (t2 >= len) {
|
|
195224
195815
|
var returnValue = objOps[operation.op].call(operation, obj, key, document2);
|
|
195225
195816
|
if (returnValue.test === false) {
|
|
195226
|
-
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED",
|
|
195817
|
+
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
|
|
195227
195818
|
}
|
|
195228
195819
|
return returnValue;
|
|
195229
195820
|
}
|
|
195230
195821
|
}
|
|
195231
195822
|
obj = obj[key];
|
|
195232
195823
|
if (validateOperation && t2 < len && (!obj || typeof obj !== "object")) {
|
|
195233
|
-
throw new JsonPatchError("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE",
|
|
195824
|
+
throw new JsonPatchError("Cannot perform operation at the desired path", "OPERATION_PATH_UNRESOLVABLE", index2, operation, document2);
|
|
195234
195825
|
}
|
|
195235
195826
|
}
|
|
195236
195827
|
}
|
|
@@ -195258,44 +195849,44 @@ function applyPatch(document2, patch, validateOperation, mutateDocument, banProt
|
|
|
195258
195849
|
results.newDocument = document2;
|
|
195259
195850
|
return results;
|
|
195260
195851
|
}
|
|
195261
|
-
function applyReducer(document2, operation,
|
|
195852
|
+
function applyReducer(document2, operation, index2) {
|
|
195262
195853
|
var operationResult = applyOperation(document2, operation);
|
|
195263
195854
|
if (operationResult.test === false) {
|
|
195264
|
-
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED",
|
|
195855
|
+
throw new JsonPatchError("Test operation failed", "TEST_OPERATION_FAILED", index2, operation, document2);
|
|
195265
195856
|
}
|
|
195266
195857
|
return operationResult.newDocument;
|
|
195267
195858
|
}
|
|
195268
|
-
function validator(operation,
|
|
195859
|
+
function validator(operation, index2, document2, existingPathFragment) {
|
|
195269
195860
|
if (typeof operation !== "object" || operation === null || Array.isArray(operation)) {
|
|
195270
|
-
throw new JsonPatchError("Operation is not an object", "OPERATION_NOT_AN_OBJECT",
|
|
195861
|
+
throw new JsonPatchError("Operation is not an object", "OPERATION_NOT_AN_OBJECT", index2, operation, document2);
|
|
195271
195862
|
} else if (!objOps[operation.op]) {
|
|
195272
|
-
throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID",
|
|
195863
|
+
throw new JsonPatchError("Operation `op` property is not one of operations defined in RFC-6902", "OPERATION_OP_INVALID", index2, operation, document2);
|
|
195273
195864
|
} else if (typeof operation.path !== "string") {
|
|
195274
|
-
throw new JsonPatchError("Operation `path` property is not a string", "OPERATION_PATH_INVALID",
|
|
195865
|
+
throw new JsonPatchError("Operation `path` property is not a string", "OPERATION_PATH_INVALID", index2, operation, document2);
|
|
195275
195866
|
} else if (operation.path.indexOf("/") !== 0 && operation.path.length > 0) {
|
|
195276
|
-
throw new JsonPatchError('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID",
|
|
195867
|
+
throw new JsonPatchError('Operation `path` property must start with "/"', "OPERATION_PATH_INVALID", index2, operation, document2);
|
|
195277
195868
|
} else if ((operation.op === "move" || operation.op === "copy") && typeof operation.from !== "string") {
|
|
195278
|
-
throw new JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED",
|
|
195869
|
+
throw new JsonPatchError("Operation `from` property is not present (applicable in `move` and `copy` operations)", "OPERATION_FROM_REQUIRED", index2, operation, document2);
|
|
195279
195870
|
} else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && operation.value === undefined) {
|
|
195280
|
-
throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED",
|
|
195871
|
+
throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_REQUIRED", index2, operation, document2);
|
|
195281
195872
|
} else if ((operation.op === "add" || operation.op === "replace" || operation.op === "test") && hasUndefined(operation.value)) {
|
|
195282
|
-
throw new JsonPatchError("Operation `value` property is not present (applicable in `add`, `replace` and `test` operations)", "OPERATION_VALUE_CANNOT_CONTAIN_UNDEFINED",
|
|
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);
|
|
195283
195874
|
} else if (document2) {
|
|
195284
195875
|
if (operation.op == "add") {
|
|
195285
195876
|
var pathLen = operation.path.split("/").length;
|
|
195286
195877
|
var existingPathLen = existingPathFragment.split("/").length;
|
|
195287
195878
|
if (pathLen !== existingPathLen + 1 && pathLen !== existingPathLen) {
|
|
195288
|
-
throw new JsonPatchError("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD",
|
|
195879
|
+
throw new JsonPatchError("Cannot perform an `add` operation at the desired path", "OPERATION_PATH_CANNOT_ADD", index2, operation, document2);
|
|
195289
195880
|
}
|
|
195290
195881
|
} else if (operation.op === "replace" || operation.op === "remove" || operation.op === "_get") {
|
|
195291
195882
|
if (operation.path !== existingPathFragment) {
|
|
195292
|
-
throw new JsonPatchError("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE",
|
|
195883
|
+
throw new JsonPatchError("Cannot perform the operation at a path that does not exist", "OPERATION_PATH_UNRESOLVABLE", index2, operation, document2);
|
|
195293
195884
|
}
|
|
195294
195885
|
} else if (operation.op === "move" || operation.op === "copy") {
|
|
195295
195886
|
var existingValue = { op: "_get", path: operation.from, value: undefined };
|
|
195296
195887
|
var error53 = validate3([existingValue], document2);
|
|
195297
195888
|
if (error53 && error53.name === "OPERATION_PATH_UNRESOLVABLE") {
|
|
195298
|
-
throw new JsonPatchError("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE",
|
|
195889
|
+
throw new JsonPatchError("Cannot perform the operation from a path that does not exist", "OPERATION_FROM_UNRESOLVABLE", index2, operation, document2);
|
|
195299
195890
|
}
|
|
195300
195891
|
}
|
|
195301
195892
|
}
|
|
@@ -195841,7 +196432,7 @@ var logConfigError = (error53) => {
|
|
|
195841
196432
|
const length2 = issue2.path.length;
|
|
195842
196433
|
const end = ["}"];
|
|
195843
196434
|
issue2.path.forEach((path6, i4) => {
|
|
195844
|
-
const
|
|
196435
|
+
const index2 = i4 + 1;
|
|
195845
196436
|
const entry = context[path6];
|
|
195846
196437
|
if (typeof entry !== "undefined") {
|
|
195847
196438
|
context = entry;
|
|
@@ -195850,30 +196441,30 @@ var logConfigError = (error53) => {
|
|
|
195850
196441
|
}
|
|
195851
196442
|
if (typeof path6 === "string") {
|
|
195852
196443
|
const key = path6 + `: `;
|
|
195853
|
-
if (
|
|
196444
|
+
if (index2 === length2 || endType(entry)) {
|
|
195854
196445
|
const space = " ".repeat(key.length);
|
|
195855
196446
|
const value = format3(entry);
|
|
195856
196447
|
const error54 = icon.arrow.top.repeat(value.length);
|
|
195857
|
-
message2.push(codeLine(key + color2.warning(value),
|
|
195858
|
-
message2.push(codeLine(space + color2.error(error54),
|
|
196448
|
+
message2.push(codeLine(key + color2.warning(value), index2));
|
|
196449
|
+
message2.push(codeLine(space + color2.error(error54), index2));
|
|
195859
196450
|
} else if (Array.isArray(entry)) {
|
|
195860
|
-
message2.push(codeLine(key + "[",
|
|
195861
|
-
end.unshift(codeLine("]",
|
|
196451
|
+
message2.push(codeLine(key + "[", index2));
|
|
196452
|
+
end.unshift(codeLine("]", index2));
|
|
195862
196453
|
} else if (typeof entry === "object") {
|
|
195863
|
-
if (inStack &&
|
|
196454
|
+
if (inStack && index2 === 3) {
|
|
195864
196455
|
const name = error53.data.stacks[issue2.path[1]].name;
|
|
195865
|
-
message2.push(codeLine("name: " + color2.info(`"${name}"`) + ",",
|
|
196456
|
+
message2.push(codeLine("name: " + color2.info(`"${name}"`) + ",", index2));
|
|
195866
196457
|
}
|
|
195867
|
-
message2.push(codeLine(key + "{",
|
|
195868
|
-
end.unshift(codeLine("}",
|
|
196458
|
+
message2.push(codeLine(key + "{", index2));
|
|
196459
|
+
end.unshift(codeLine("}", index2));
|
|
195869
196460
|
}
|
|
195870
196461
|
} else if (typeof entry === "object") {
|
|
195871
|
-
message2.push(codeLine("{",
|
|
195872
|
-
end.unshift(codeLine("}",
|
|
196462
|
+
message2.push(codeLine("{", index2));
|
|
196463
|
+
end.unshift(codeLine("}", index2));
|
|
195873
196464
|
} else if (typeof entry === "string") {
|
|
195874
|
-
message2.push(codeLine(color2.warning(`"${entry}"`),
|
|
196465
|
+
message2.push(codeLine(color2.warning(`"${entry}"`), index2));
|
|
195875
196466
|
const error54 = icon.arrow.top.repeat(entry.length + 2);
|
|
195876
|
-
message2.push(codeLine(color2.error(error54),
|
|
196467
|
+
message2.push(codeLine(color2.error(error54), index2));
|
|
195877
196468
|
}
|
|
195878
196469
|
});
|
|
195879
196470
|
logs_exports.error([...message2, ...end].join(`
|
|
@@ -196573,7 +197164,7 @@ import {
|
|
|
196573
197164
|
deleteItem,
|
|
196574
197165
|
DynamoDBClient,
|
|
196575
197166
|
getItem,
|
|
196576
|
-
number as
|
|
197167
|
+
number as number5,
|
|
196577
197168
|
object as object2,
|
|
196578
197169
|
optional as optional2,
|
|
196579
197170
|
putItem,
|
|
@@ -196877,8 +197468,8 @@ function buildLocalizeFn(args) {
|
|
|
196877
197468
|
const width = options2?.width ? String(options2.width) : args.defaultWidth;
|
|
196878
197469
|
valuesArray = args.values[width] || args.values[defaultWidth];
|
|
196879
197470
|
}
|
|
196880
|
-
const
|
|
196881
|
-
return valuesArray[
|
|
197471
|
+
const index2 = args.argumentCallback ? args.argumentCallback(value) : value;
|
|
197472
|
+
return valuesArray[index2];
|
|
196882
197473
|
};
|
|
196883
197474
|
}
|
|
196884
197475
|
|
|
@@ -197003,19 +197594,19 @@ var formattingDayPeriodValues = {
|
|
|
197003
197594
|
}
|
|
197004
197595
|
};
|
|
197005
197596
|
var ordinalNumber = (dirtyNumber, _options) => {
|
|
197006
|
-
const
|
|
197007
|
-
const rem100 =
|
|
197597
|
+
const number5 = Number(dirtyNumber);
|
|
197598
|
+
const rem100 = number5 % 100;
|
|
197008
197599
|
if (rem100 > 20 || rem100 < 10) {
|
|
197009
197600
|
switch (rem100 % 10) {
|
|
197010
197601
|
case 1:
|
|
197011
|
-
return
|
|
197602
|
+
return number5 + "st";
|
|
197012
197603
|
case 2:
|
|
197013
|
-
return
|
|
197604
|
+
return number5 + "nd";
|
|
197014
197605
|
case 3:
|
|
197015
|
-
return
|
|
197606
|
+
return number5 + "rd";
|
|
197016
197607
|
}
|
|
197017
197608
|
}
|
|
197018
|
-
return
|
|
197609
|
+
return number5 + "th";
|
|
197019
197610
|
};
|
|
197020
197611
|
var localize = {
|
|
197021
197612
|
ordinalNumber,
|
|
@@ -197194,7 +197785,7 @@ var match2 = {
|
|
|
197194
197785
|
defaultMatchWidth: "wide",
|
|
197195
197786
|
parsePatterns: parseQuarterPatterns,
|
|
197196
197787
|
defaultParseWidth: "any",
|
|
197197
|
-
valueCallback: (
|
|
197788
|
+
valueCallback: (index2) => index2 + 1
|
|
197198
197789
|
}),
|
|
197199
197790
|
month: buildMatchFn({
|
|
197200
197791
|
matchPatterns: matchMonthPatterns,
|
|
@@ -197287,9 +197878,9 @@ function getWeek(date5, options2) {
|
|
|
197287
197878
|
}
|
|
197288
197879
|
|
|
197289
197880
|
// ../../node_modules/.pnpm/date-fns@4.4.0/node_modules/date-fns/_lib/addLeadingZeros.js
|
|
197290
|
-
function addLeadingZeros(
|
|
197291
|
-
const sign2 =
|
|
197292
|
-
const output = Math.abs(
|
|
197881
|
+
function addLeadingZeros(number5, targetLength) {
|
|
197882
|
+
const sign2 = number5 < 0 ? "-" : "";
|
|
197883
|
+
const output = Math.abs(number5).toString().padStart(targetLength, "0");
|
|
197293
197884
|
return sign2 + output;
|
|
197294
197885
|
}
|
|
197295
197886
|
|
|
@@ -198083,7 +198674,7 @@ var table2 = define2("awsless-deployments", {
|
|
|
198083
198674
|
appId: string4(),
|
|
198084
198675
|
id: string4(),
|
|
198085
198676
|
branch: string4(),
|
|
198086
|
-
seq:
|
|
198677
|
+
seq: number5(),
|
|
198087
198678
|
createdAt: string4(),
|
|
198088
198679
|
user: optional2(string4()),
|
|
198089
198680
|
commit: optional2(string4()),
|
|
@@ -199379,7 +199970,7 @@ var formatFileName = (test, error53) => {
|
|
|
199379
199970
|
}
|
|
199380
199971
|
return name.join("");
|
|
199381
199972
|
};
|
|
199382
|
-
var logTestError = (
|
|
199973
|
+
var logTestError = (index2, event, test, error53) => {
|
|
199383
199974
|
if (error53.stack) {
|
|
199384
199975
|
debug(`Test error in ${test.file} \u203A ${test.name}: ${error53.message}
|
|
199385
199976
|
${error53.stack}`);
|
|
@@ -199392,7 +199983,7 @@ ${error53.stack}`);
|
|
|
199392
199983
|
].join(" ");
|
|
199393
199984
|
logs_exports.error([
|
|
199394
199985
|
color2.error.inverse.bold(` FAIL `),
|
|
199395
|
-
color2.dim(`(${
|
|
199986
|
+
color2.dim(`(${index2}/${event.errors.length + event.failed})`),
|
|
199396
199987
|
color2.dim(icon.arrow.right),
|
|
199397
199988
|
formatFileName(test, error53),
|
|
199398
199989
|
color2.dim(icon.arrow.right),
|
|
@@ -199479,7 +200070,7 @@ var runTests = async (tests, stackFilters = [], testFilters = [], opts) => {
|
|
|
199479
200070
|
return [dir, fingerprint];
|
|
199480
200071
|
}))));
|
|
199481
200072
|
for (const test of selected) {
|
|
199482
|
-
for (const [
|
|
200073
|
+
for (const [index2, dir] of test.paths.entries()) {
|
|
199483
200074
|
const files = await countTestFiles(dir);
|
|
199484
200075
|
if (files === 0) {
|
|
199485
200076
|
continue;
|
|
@@ -199499,7 +200090,7 @@ var runTests = async (tests, stackFilters = [], testFilters = [], opts) => {
|
|
|
199499
200090
|
continue;
|
|
199500
200091
|
}
|
|
199501
200092
|
pending.push({
|
|
199502
|
-
name: test.paths.length > 1 ? `${test.name}:${
|
|
200093
|
+
name: test.paths.length > 1 ? `${test.name}:${index2}` : test.name,
|
|
199503
200094
|
stack: test.name,
|
|
199504
200095
|
dir,
|
|
199505
200096
|
file: file3,
|
|
@@ -200488,9 +201079,9 @@ var createSqsServer = (props) => {
|
|
|
200488
201079
|
throw new Error(`Unknown local queue: ${input.QueueUrl}`);
|
|
200489
201080
|
}
|
|
200490
201081
|
const store2 = storeOf(queue);
|
|
200491
|
-
const
|
|
200492
|
-
if (
|
|
200493
|
-
store2.splice(
|
|
201082
|
+
const index2 = store2.findIndex((message3) => message3.receipt === input.ReceiptHandle);
|
|
201083
|
+
if (index2 >= 0) {
|
|
201084
|
+
store2.splice(index2, 1);
|
|
200494
201085
|
}
|
|
200495
201086
|
return {};
|
|
200496
201087
|
},
|
|
@@ -200502,9 +201093,9 @@ var createSqsServer = (props) => {
|
|
|
200502
201093
|
const store2 = storeOf(queue);
|
|
200503
201094
|
return {
|
|
200504
201095
|
Successful: (input.Entries ?? []).map((entry) => {
|
|
200505
|
-
const
|
|
200506
|
-
if (
|
|
200507
|
-
store2.splice(
|
|
201096
|
+
const index2 = store2.findIndex((message3) => message3.receipt === entry.ReceiptHandle);
|
|
201097
|
+
if (index2 >= 0) {
|
|
201098
|
+
store2.splice(index2, 1);
|
|
200508
201099
|
}
|
|
200509
201100
|
return { Id: entry.Id };
|
|
200510
201101
|
}),
|
|
@@ -203998,8 +204589,8 @@ var startDev = async (props) => {
|
|
|
203998
204589
|
await mkdir12(join52(directories.output, "local"), { recursive: true });
|
|
203999
204590
|
await writeFile16(watchdogPath(), WATCHDOG_SOURCE);
|
|
204000
204591
|
const routerPorts = {};
|
|
204001
|
-
Object.keys(appConfig.router ?? {}).forEach((id,
|
|
204002
|
-
routerPorts[id] = props.port + 1 +
|
|
204592
|
+
Object.keys(appConfig.router ?? {}).forEach((id, index2) => {
|
|
204593
|
+
routerPorts[id] = props.port + 1 + index2;
|
|
204003
204594
|
});
|
|
204004
204595
|
const firstBoot = props.pool.peek("session") === undefined;
|
|
204005
204596
|
props.pool.begin();
|
|
@@ -204770,11 +205361,11 @@ var clearCache = (program3) => {
|
|
|
204770
205361
|
});
|
|
204771
205362
|
await workspace.hydrate(app);
|
|
204772
205363
|
let distributionId;
|
|
204773
|
-
let
|
|
205364
|
+
let cache4;
|
|
204774
205365
|
try {
|
|
204775
205366
|
distributionId = await shared.entry("icon", "distribution-id", name);
|
|
204776
205367
|
const entry = shared.entry("icon", "cache", name);
|
|
204777
|
-
|
|
205368
|
+
cache4 = { bucket: await entry.bucket, prefix: entry.prefix };
|
|
204778
205369
|
} catch {
|
|
204779
205370
|
throw new ExpectedError(`The icon resource hasn't been deployed yet.`);
|
|
204780
205371
|
}
|
|
@@ -204794,14 +205385,14 @@ var clearCache = (program3) => {
|
|
|
204794
205385
|
let continuationToken;
|
|
204795
205386
|
while (true) {
|
|
204796
205387
|
const result = await s3Client.send(new ListObjectsV2Command({
|
|
204797
|
-
Bucket:
|
|
204798
|
-
Prefix:
|
|
205388
|
+
Bucket: cache4.bucket,
|
|
205389
|
+
Prefix: cache4.prefix,
|
|
204799
205390
|
ContinuationToken: continuationToken,
|
|
204800
205391
|
MaxKeys: 1000
|
|
204801
205392
|
}));
|
|
204802
205393
|
if (result.Contents && result.Contents.length > 0) {
|
|
204803
205394
|
await s3Client.send(new DeleteObjectsCommand({
|
|
204804
|
-
Bucket:
|
|
205395
|
+
Bucket: cache4.bucket,
|
|
204805
205396
|
Delete: {
|
|
204806
205397
|
Objects: result.Contents.map((obj) => ({
|
|
204807
205398
|
Key: obj.Key
|
|
@@ -204897,11 +205488,11 @@ var clearCache2 = (program3) => {
|
|
|
204897
205488
|
});
|
|
204898
205489
|
await workspace.hydrate(app);
|
|
204899
205490
|
let distributionId;
|
|
204900
|
-
let
|
|
205491
|
+
let cache4;
|
|
204901
205492
|
try {
|
|
204902
205493
|
distributionId = await shared.entry("image", "distribution-id", name);
|
|
204903
205494
|
const entry = shared.entry("image", "cache", name);
|
|
204904
|
-
|
|
205495
|
+
cache4 = { bucket: await entry.bucket, prefix: entry.prefix };
|
|
204905
205496
|
} catch {
|
|
204906
205497
|
throw new ExpectedError(`The image resource hasn't been deployed yet.`);
|
|
204907
205498
|
}
|
|
@@ -204921,14 +205512,14 @@ var clearCache2 = (program3) => {
|
|
|
204921
205512
|
let continuationToken;
|
|
204922
205513
|
while (true) {
|
|
204923
205514
|
const result = await s3Client.send(new ListObjectsV2Command2({
|
|
204924
|
-
Bucket:
|
|
204925
|
-
Prefix:
|
|
205515
|
+
Bucket: cache4.bucket,
|
|
205516
|
+
Prefix: cache4.prefix,
|
|
204926
205517
|
ContinuationToken: continuationToken,
|
|
204927
205518
|
MaxKeys: 1000
|
|
204928
205519
|
}));
|
|
204929
205520
|
if (result.Contents && result.Contents.length > 0) {
|
|
204930
205521
|
await s3Client.send(new DeleteObjectsCommand2({
|
|
204931
|
-
Bucket:
|
|
205522
|
+
Bucket: cache4.bucket,
|
|
204932
205523
|
Delete: {
|
|
204933
205524
|
Objects: result.Contents.map((obj) => ({
|
|
204934
205525
|
Key: obj.Key
|
|
@@ -205194,10 +205785,10 @@ var pruneSiteVersions = async (props) => {
|
|
|
205194
205785
|
} while (cursor3);
|
|
205195
205786
|
const cutoff = subHours(new Date, 24);
|
|
205196
205787
|
const garbage = [...unreferenced.values()].filter((entry) => isBefore(entry.newest, cutoff)).flatMap((entry) => entry.keys);
|
|
205197
|
-
for (let
|
|
205788
|
+
for (let index2 = 0;index2 < garbage.length; index2 += 1000) {
|
|
205198
205789
|
await props.s3.send(new DeleteObjectsCommand3({
|
|
205199
205790
|
Bucket: props.bucket,
|
|
205200
|
-
Delete: { Objects: garbage.slice(
|
|
205791
|
+
Delete: { Objects: garbage.slice(index2, index2 + 1000).map((key) => ({ Key: key })) }
|
|
205201
205792
|
}));
|
|
205202
205793
|
}
|
|
205203
205794
|
};
|
|
@@ -205312,7 +205903,10 @@ var buildRemoteAgentPolicy = ({ appName, region, accountId, auth: auth2 }) => {
|
|
|
205312
205903
|
Sid: "ReadConfig",
|
|
205313
205904
|
Effect: "Allow",
|
|
205314
205905
|
Action: ["ssm:GetParametersByPath", "ssm:GetParameter", "ssm:GetParameters"],
|
|
205315
|
-
Resource:
|
|
205906
|
+
Resource: [
|
|
205907
|
+
`arn:aws:ssm:${region}:${accountId}:parameter${configParameterPrefix(appName)}`,
|
|
205908
|
+
`arn:aws:ssm:${region}:${accountId}:parameter${configParameterPrefix(appName)}/*`
|
|
205909
|
+
]
|
|
205316
205910
|
},
|
|
205317
205911
|
{
|
|
205318
205912
|
Sid: "DecryptConfig",
|
|
@@ -205477,7 +206071,8 @@ var create2 = (program3) => {
|
|
|
205477
206071
|
if (keys.length > 0) {
|
|
205478
206072
|
const key2 = keys[0];
|
|
205479
206073
|
const created = key2.createdAt ? ` created ${key2.createdAt.toISOString()}` : "";
|
|
205480
|
-
|
|
206074
|
+
logs_exports.warning(`The ${iam.userName} user already has an access key (${key2.id}${created}). ` + `Its secret can't be shown again - run ${color2.info("awsless remote-agent credentials rotate")} to replace it.`);
|
|
206075
|
+
return;
|
|
205481
206076
|
}
|
|
205482
206077
|
const key = await iam.createKey();
|
|
205483
206078
|
printCredentials(appConfig, key);
|
|
@@ -205917,12 +206512,12 @@ var nodes3 = new Int32Array([
|
|
|
205917
206512
|
var bdd3 = import_endpoints5.BinaryDecisionDiagram.from(nodes3, root4, _data3.conditions, _data3.results);
|
|
205918
206513
|
|
|
205919
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
|
|
205920
|
-
var
|
|
206515
|
+
var cache4 = new import_endpoints6.EndpointCache({
|
|
205921
206516
|
size: 50,
|
|
205922
206517
|
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"]
|
|
205923
206518
|
});
|
|
205924
206519
|
var defaultEndpointResolver3 = (endpointParams, context = {}) => {
|
|
205925
|
-
return
|
|
206520
|
+
return cache4.get(endpointParams, () => import_endpoints6.decideEndpoint(bdd3, {
|
|
205926
206521
|
endpointParams,
|
|
205927
206522
|
logger: context.logger
|
|
205928
206523
|
}));
|
|
@@ -206692,11 +207287,11 @@ var getHttpAuthExtensionConfiguration3 = (runtimeConfig) => {
|
|
|
206692
207287
|
let _credentials = runtimeConfig.credentials;
|
|
206693
207288
|
return {
|
|
206694
207289
|
setHttpAuthScheme(httpAuthScheme) {
|
|
206695
|
-
const
|
|
206696
|
-
if (
|
|
207290
|
+
const index2 = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
207291
|
+
if (index2 === -1) {
|
|
206697
207292
|
_httpAuthSchemes.push(httpAuthScheme);
|
|
206698
207293
|
} else {
|
|
206699
|
-
_httpAuthSchemes.splice(
|
|
207294
|
+
_httpAuthSchemes.splice(index2, 1, httpAuthScheme);
|
|
206700
207295
|
}
|
|
206701
207296
|
},
|
|
206702
207297
|
httpAuthSchemes() {
|
|
@@ -207113,9 +207708,9 @@ var sinon;
|
|
|
207113
207708
|
}
|
|
207114
207709
|
function ensureArgs(name, behavior, args) {
|
|
207115
207710
|
const property = name.replace(/sArg/, "ArgAt");
|
|
207116
|
-
const
|
|
207117
|
-
if (
|
|
207118
|
-
throw new TypeError(`${name} failed: ${
|
|
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`);
|
|
207119
207714
|
}
|
|
207120
207715
|
}
|
|
207121
207716
|
function callCallback(behavior, args) {
|
|
@@ -207200,8 +207795,8 @@ var sinon;
|
|
|
207200
207795
|
}
|
|
207201
207796
|
throw new Error("Unable to find wrapped method");
|
|
207202
207797
|
},
|
|
207203
|
-
onCall: function onCall(
|
|
207204
|
-
return this.stub.onCall(
|
|
207798
|
+
onCall: function onCall(index2) {
|
|
207799
|
+
return this.stub.onCall(index2);
|
|
207205
207800
|
},
|
|
207206
207801
|
onFirstCall: function onFirstCall() {
|
|
207207
207802
|
return this.stub.onFirstCall();
|
|
@@ -207390,44 +207985,44 @@ var sinon;
|
|
|
207390
207985
|
fake.exceptionCreator = undefined;
|
|
207391
207986
|
fake.callsThrough = false;
|
|
207392
207987
|
},
|
|
207393
|
-
callsArg: function callsArg(fake,
|
|
207394
|
-
if (typeof
|
|
207988
|
+
callsArg: function callsArg(fake, index2) {
|
|
207989
|
+
if (typeof index2 !== "number") {
|
|
207395
207990
|
throw new TypeError("argument index is not number");
|
|
207396
207991
|
}
|
|
207397
|
-
fake.callArgAt =
|
|
207992
|
+
fake.callArgAt = index2;
|
|
207398
207993
|
fake.callbackArguments = [];
|
|
207399
207994
|
fake.callbackContext = undefined;
|
|
207400
207995
|
fake.callArgProp = undefined;
|
|
207401
207996
|
fake.callbackAsync = false;
|
|
207402
207997
|
fake.callsThrough = false;
|
|
207403
207998
|
},
|
|
207404
|
-
callsArgOn: function callsArgOn(fake,
|
|
207405
|
-
if (typeof
|
|
207999
|
+
callsArgOn: function callsArgOn(fake, index2, context) {
|
|
208000
|
+
if (typeof index2 !== "number") {
|
|
207406
208001
|
throw new TypeError("argument index is not number");
|
|
207407
208002
|
}
|
|
207408
|
-
fake.callArgAt =
|
|
208003
|
+
fake.callArgAt = index2;
|
|
207409
208004
|
fake.callbackArguments = [];
|
|
207410
208005
|
fake.callbackContext = context;
|
|
207411
208006
|
fake.callArgProp = undefined;
|
|
207412
208007
|
fake.callbackAsync = false;
|
|
207413
208008
|
fake.callsThrough = false;
|
|
207414
208009
|
},
|
|
207415
|
-
callsArgWith: function callsArgWith(fake,
|
|
207416
|
-
if (typeof
|
|
208010
|
+
callsArgWith: function callsArgWith(fake, index2) {
|
|
208011
|
+
if (typeof index2 !== "number") {
|
|
207417
208012
|
throw new TypeError("argument index is not number");
|
|
207418
208013
|
}
|
|
207419
|
-
fake.callArgAt =
|
|
208014
|
+
fake.callArgAt = index2;
|
|
207420
208015
|
fake.callbackArguments = slice(arguments, 2);
|
|
207421
208016
|
fake.callbackContext = undefined;
|
|
207422
208017
|
fake.callArgProp = undefined;
|
|
207423
208018
|
fake.callbackAsync = false;
|
|
207424
208019
|
fake.callsThrough = false;
|
|
207425
208020
|
},
|
|
207426
|
-
callsArgOnWith: function callsArgWith(fake,
|
|
207427
|
-
if (typeof
|
|
208021
|
+
callsArgOnWith: function callsArgWith(fake, index2, context) {
|
|
208022
|
+
if (typeof index2 !== "number") {
|
|
207428
208023
|
throw new TypeError("argument index is not number");
|
|
207429
208024
|
}
|
|
207430
|
-
fake.callArgAt =
|
|
208025
|
+
fake.callArgAt = index2;
|
|
207431
208026
|
fake.callbackArguments = slice(arguments, 3);
|
|
207432
208027
|
fake.callbackContext = context;
|
|
207433
208028
|
fake.callArgProp = undefined;
|
|
@@ -207493,19 +208088,19 @@ var sinon;
|
|
|
207493
208088
|
fake.exceptionCreator = undefined;
|
|
207494
208089
|
fake.fakeFn = undefined;
|
|
207495
208090
|
},
|
|
207496
|
-
returnsArg: function returnsArg(fake,
|
|
207497
|
-
if (typeof
|
|
208091
|
+
returnsArg: function returnsArg(fake, index2) {
|
|
208092
|
+
if (typeof index2 !== "number") {
|
|
207498
208093
|
throw new TypeError("argument index is not number");
|
|
207499
208094
|
}
|
|
207500
208095
|
fake.callsThrough = false;
|
|
207501
|
-
fake.returnArgAt =
|
|
208096
|
+
fake.returnArgAt = index2;
|
|
207502
208097
|
},
|
|
207503
|
-
throwsArg: function throwsArg(fake,
|
|
207504
|
-
if (typeof
|
|
208098
|
+
throwsArg: function throwsArg(fake, index2) {
|
|
208099
|
+
if (typeof index2 !== "number") {
|
|
207505
208100
|
throw new TypeError("argument index is not number");
|
|
207506
208101
|
}
|
|
207507
208102
|
fake.callsThrough = false;
|
|
207508
|
-
fake.throwArgAt =
|
|
208103
|
+
fake.throwArgAt = index2;
|
|
207509
208104
|
},
|
|
207510
208105
|
returnsThis: function returnsThis(fake) {
|
|
207511
208106
|
fake.returnThis = true;
|
|
@@ -207522,11 +208117,11 @@ var sinon;
|
|
|
207522
208117
|
fake.fakeFn = undefined;
|
|
207523
208118
|
fake.callsThrough = false;
|
|
207524
208119
|
},
|
|
207525
|
-
resolvesArg: function resolvesArg(fake,
|
|
207526
|
-
if (typeof
|
|
208120
|
+
resolvesArg: function resolvesArg(fake, index2) {
|
|
208121
|
+
if (typeof index2 !== "number") {
|
|
207527
208122
|
throw new TypeError("argument index is not number");
|
|
207528
208123
|
}
|
|
207529
|
-
fake.resolveArgAt =
|
|
208124
|
+
fake.resolveArgAt = index2;
|
|
207530
208125
|
fake.returnValue = undefined;
|
|
207531
208126
|
fake.resolve = true;
|
|
207532
208127
|
fake.resolveThis = false;
|
|
@@ -208428,8 +209023,8 @@ var sinon;
|
|
|
208428
209023
|
matchingFakes: function() {
|
|
208429
209024
|
return emptyFakes;
|
|
208430
209025
|
},
|
|
208431
|
-
getCall: function getCall(
|
|
208432
|
-
let i5 =
|
|
209026
|
+
getCall: function getCall(index2) {
|
|
209027
|
+
let i5 = index2;
|
|
208433
209028
|
if (i5 < 0) {
|
|
208434
209029
|
i5 += this.callCount;
|
|
208435
209030
|
}
|
|
@@ -209381,11 +209976,11 @@ ${join54(calls, `
|
|
|
209381
209976
|
this.resetHistory();
|
|
209382
209977
|
this.resetBehavior();
|
|
209383
209978
|
},
|
|
209384
|
-
onCall: function onCall(
|
|
209385
|
-
if (!this.behaviors[
|
|
209386
|
-
this.behaviors[
|
|
209979
|
+
onCall: function onCall(index2) {
|
|
209980
|
+
if (!this.behaviors[index2]) {
|
|
209981
|
+
this.behaviors[index2] = behavior.create(this);
|
|
209387
209982
|
}
|
|
209388
|
-
return this.behaviors[
|
|
209983
|
+
return this.behaviors[index2];
|
|
209389
209984
|
},
|
|
209390
209985
|
onFirstCall: function onFirstCall() {
|
|
209391
209986
|
return this.onCall(0);
|
|
@@ -209925,10 +210520,10 @@ ${wrappedMethodDesc.stackTraceError.stack}`;
|
|
|
209925
210520
|
}
|
|
209926
210521
|
return callMap[spy.id] < spy.callCount;
|
|
209927
210522
|
}
|
|
209928
|
-
function checkAdjacentCalls(callMap, spy,
|
|
210523
|
+
function checkAdjacentCalls(callMap, spy, index2, spies) {
|
|
209929
210524
|
var calledBeforeNext = true;
|
|
209930
|
-
if (
|
|
209931
|
-
calledBeforeNext = spy.calledBefore(spies[
|
|
210525
|
+
if (index2 !== spies.length - 1) {
|
|
210526
|
+
calledBeforeNext = spy.calledBefore(spies[index2 + 1]);
|
|
209932
210527
|
}
|
|
209933
210528
|
if (hasCallsLeft(callMap, spy) && calledBeforeNext) {
|
|
209934
210529
|
callMap[spy.id] += 1;
|
|
@@ -211370,24 +211965,24 @@ ${job.error.stack.split(`
|
|
|
211370
211965
|
createMatcher.array.deepEquals = function(expectation) {
|
|
211371
211966
|
return createMatcher(function(actual) {
|
|
211372
211967
|
var sameLength = actual.length === expectation.length;
|
|
211373
|
-
return typeOf(actual) === "array" && sameLength && every(actual, function(element,
|
|
211374
|
-
var expected = expectation[
|
|
211968
|
+
return typeOf(actual) === "array" && sameLength && every(actual, function(element, index2) {
|
|
211969
|
+
var expected = expectation[index2];
|
|
211375
211970
|
return typeOf(expected) === "array" && typeOf(element) === "array" ? createMatcher.array.deepEquals(expected).test(element) : deepEqual2(expected, element);
|
|
211376
211971
|
});
|
|
211377
211972
|
}, `deepEquals([${iterableToString(expectation)}])`);
|
|
211378
211973
|
};
|
|
211379
211974
|
createMatcher.array.startsWith = function(expectation) {
|
|
211380
211975
|
return createMatcher(function(actual) {
|
|
211381
|
-
return typeOf(actual) === "array" && every(expectation, function(expectedElement,
|
|
211382
|
-
return actual[
|
|
211976
|
+
return typeOf(actual) === "array" && every(expectation, function(expectedElement, index2) {
|
|
211977
|
+
return actual[index2] === expectedElement;
|
|
211383
211978
|
});
|
|
211384
211979
|
}, `startsWith([${iterableToString(expectation)}])`);
|
|
211385
211980
|
};
|
|
211386
211981
|
createMatcher.array.endsWith = function(expectation) {
|
|
211387
211982
|
return createMatcher(function(actual) {
|
|
211388
211983
|
var offset = actual.length - expectation.length;
|
|
211389
|
-
return typeOf(actual) === "array" && every(expectation, function(expectedElement,
|
|
211390
|
-
return actual[offset +
|
|
211984
|
+
return typeOf(actual) === "array" && every(expectation, function(expectedElement, index2) {
|
|
211985
|
+
return actual[offset + index2] === expectedElement;
|
|
211391
211986
|
});
|
|
211392
211987
|
}, `endsWith([${iterableToString(expectation)}])`);
|
|
211393
211988
|
};
|
|
@@ -212021,10 +212616,10 @@ ${job.error.stack.split(`
|
|
|
212021
212616
|
}
|
|
212022
212617
|
return callMap[spy.id] < spy.callCount;
|
|
212023
212618
|
}
|
|
212024
|
-
function checkAdjacentCalls(callMap, spy,
|
|
212619
|
+
function checkAdjacentCalls(callMap, spy, index2, spies) {
|
|
212025
212620
|
var calledBeforeNext = true;
|
|
212026
|
-
if (
|
|
212027
|
-
calledBeforeNext = spy.calledBefore(spies[
|
|
212621
|
+
if (index2 !== spies.length - 1) {
|
|
212622
|
+
calledBeforeNext = spy.calledBefore(spies[index2 + 1]);
|
|
212028
212623
|
}
|
|
212029
212624
|
if (hasCallsLeft(callMap, spy) && calledBeforeNext) {
|
|
212030
212625
|
callMap[spy.id] += 1;
|
|
@@ -212792,16 +213387,16 @@ ${job.error.stack.split(`
|
|
|
212792
213387
|
});
|
|
212793
213388
|
var encoders = {};
|
|
212794
213389
|
var decoders = {};
|
|
212795
|
-
function indexCodePointFor(pointer,
|
|
212796
|
-
if (!
|
|
213390
|
+
function indexCodePointFor(pointer, index3) {
|
|
213391
|
+
if (!index3)
|
|
212797
213392
|
return null;
|
|
212798
|
-
return
|
|
213393
|
+
return index3[pointer] || null;
|
|
212799
213394
|
}
|
|
212800
|
-
function indexPointerFor(code_point,
|
|
212801
|
-
var pointer =
|
|
213395
|
+
function indexPointerFor(code_point, index3) {
|
|
213396
|
+
var pointer = index3.indexOf(code_point);
|
|
212802
213397
|
return pointer === -1 ? null : pointer;
|
|
212803
213398
|
}
|
|
212804
|
-
function
|
|
213399
|
+
function index2(name) {
|
|
212805
213400
|
if (!("encoding-indexes" in global2)) {
|
|
212806
213401
|
throw Error("Indexes missing." + " Did you forget to include encoding-indexes.js first?");
|
|
212807
213402
|
}
|
|
@@ -212814,7 +213409,7 @@ ${job.error.stack.split(`
|
|
|
212814
213409
|
return 59335;
|
|
212815
213410
|
var offset = 0;
|
|
212816
213411
|
var code_point_offset = 0;
|
|
212817
|
-
var idx =
|
|
213412
|
+
var idx = index2("gb18030-ranges");
|
|
212818
213413
|
var i5;
|
|
212819
213414
|
for (i5 = 0;i5 < idx.length; ++i5) {
|
|
212820
213415
|
var entry = idx[i5];
|
|
@@ -212832,7 +213427,7 @@ ${job.error.stack.split(`
|
|
|
212832
213427
|
return 7457;
|
|
212833
213428
|
var offset = 0;
|
|
212834
213429
|
var pointer_offset = 0;
|
|
212835
|
-
var idx =
|
|
213430
|
+
var idx = index2("gb18030-ranges");
|
|
212836
213431
|
var i5;
|
|
212837
213432
|
for (i5 = 0;i5 < idx.length; ++i5) {
|
|
212838
213433
|
var entry = idx[i5];
|
|
@@ -212846,7 +213441,7 @@ ${job.error.stack.split(`
|
|
|
212846
213441
|
return pointer_offset + code_point - offset;
|
|
212847
213442
|
}
|
|
212848
213443
|
function indexShiftJISPointerFor(code_point) {
|
|
212849
|
-
shift_jis_index = shift_jis_index ||
|
|
213444
|
+
shift_jis_index = shift_jis_index || index2("jis0208").map(function(code_point2, pointer) {
|
|
212850
213445
|
return inRange(pointer, 8272, 8835) ? null : code_point2;
|
|
212851
213446
|
});
|
|
212852
213447
|
var index_ = shift_jis_index;
|
|
@@ -212854,7 +213449,7 @@ ${job.error.stack.split(`
|
|
|
212854
213449
|
}
|
|
212855
213450
|
var shift_jis_index;
|
|
212856
213451
|
function indexBig5PointerFor(code_point) {
|
|
212857
|
-
big5_index_no_hkscs = big5_index_no_hkscs ||
|
|
213452
|
+
big5_index_no_hkscs = big5_index_no_hkscs || index2("big5").map(function(code_point2, pointer) {
|
|
212858
213453
|
return pointer < (161 - 129) * 157 ? null : code_point2;
|
|
212859
213454
|
});
|
|
212860
213455
|
var index_ = big5_index_no_hkscs;
|
|
@@ -213131,27 +213726,27 @@ ${job.error.stack.split(`
|
|
|
213131
213726
|
decoders["UTF-8"] = function(options2) {
|
|
213132
213727
|
return new UTF8Decoder(options2);
|
|
213133
213728
|
};
|
|
213134
|
-
function SingleByteDecoder(
|
|
213729
|
+
function SingleByteDecoder(index3, options2) {
|
|
213135
213730
|
var fatal = options2.fatal;
|
|
213136
213731
|
this.handler = function(stream, bite) {
|
|
213137
213732
|
if (bite === end_of_stream)
|
|
213138
213733
|
return finished;
|
|
213139
213734
|
if (isASCIIByte(bite))
|
|
213140
213735
|
return bite;
|
|
213141
|
-
var code_point =
|
|
213736
|
+
var code_point = index3[bite - 128];
|
|
213142
213737
|
if (code_point === null)
|
|
213143
213738
|
return decoderError(fatal);
|
|
213144
213739
|
return code_point;
|
|
213145
213740
|
};
|
|
213146
213741
|
}
|
|
213147
|
-
function SingleByteEncoder(
|
|
213742
|
+
function SingleByteEncoder(index3, options2) {
|
|
213148
213743
|
var fatal = options2.fatal;
|
|
213149
213744
|
this.handler = function(stream, code_point) {
|
|
213150
213745
|
if (code_point === end_of_stream)
|
|
213151
213746
|
return finished;
|
|
213152
213747
|
if (isASCIICodePoint(code_point))
|
|
213153
213748
|
return code_point;
|
|
213154
|
-
var pointer = indexPointerFor(code_point,
|
|
213749
|
+
var pointer = indexPointerFor(code_point, index3);
|
|
213155
213750
|
if (pointer === null)
|
|
213156
213751
|
encoderError(code_point);
|
|
213157
213752
|
return pointer + 128;
|
|
@@ -213165,7 +213760,7 @@ ${job.error.stack.split(`
|
|
|
213165
213760
|
return;
|
|
213166
213761
|
category.encodings.forEach(function(encoding) {
|
|
213167
213762
|
var name = encoding.name;
|
|
213168
|
-
var idx =
|
|
213763
|
+
var idx = index2(name.toLowerCase());
|
|
213169
213764
|
decoders[name] = function(options2) {
|
|
213170
213765
|
return new SingleByteDecoder(idx, options2);
|
|
213171
213766
|
};
|
|
@@ -213231,7 +213826,7 @@ ${job.error.stack.split(`
|
|
|
213231
213826
|
var offset = bite < 127 ? 64 : 65;
|
|
213232
213827
|
if (inRange(bite, 64, 126) || inRange(bite, 128, 254))
|
|
213233
213828
|
pointer = (lead - 129) * 190 + (bite - offset);
|
|
213234
|
-
code_point = pointer === null ? null : indexCodePointFor(pointer,
|
|
213829
|
+
code_point = pointer === null ? null : indexCodePointFor(pointer, index2("gb18030"));
|
|
213235
213830
|
if (code_point === null && isASCIIByte(bite))
|
|
213236
213831
|
stream.prepend(bite);
|
|
213237
213832
|
if (code_point === null)
|
|
@@ -213260,7 +213855,7 @@ ${job.error.stack.split(`
|
|
|
213260
213855
|
return encoderError(code_point);
|
|
213261
213856
|
if (gbk_flag && code_point === 8364)
|
|
213262
213857
|
return 128;
|
|
213263
|
-
var pointer = indexPointerFor(code_point,
|
|
213858
|
+
var pointer = indexPointerFor(code_point, index2("gb18030"));
|
|
213264
213859
|
if (pointer !== null) {
|
|
213265
213860
|
var lead = floor(pointer / 190) + 129;
|
|
213266
213861
|
var trail = pointer % 190;
|
|
@@ -213317,7 +213912,7 @@ ${job.error.stack.split(`
|
|
|
213317
213912
|
case 1166:
|
|
213318
213913
|
return [234, 780];
|
|
213319
213914
|
}
|
|
213320
|
-
var code_point = pointer === null ? null : indexCodePointFor(pointer,
|
|
213915
|
+
var code_point = pointer === null ? null : indexCodePointFor(pointer, index2("big5"));
|
|
213321
213916
|
if (code_point === null && isASCIIByte(bite))
|
|
213322
213917
|
stream.prepend(bite);
|
|
213323
213918
|
if (code_point === null)
|
|
@@ -213381,7 +213976,7 @@ ${job.error.stack.split(`
|
|
|
213381
213976
|
eucjp_lead = 0;
|
|
213382
213977
|
var code_point = null;
|
|
213383
213978
|
if (inRange(lead, 161, 254) && inRange(bite, 161, 254)) {
|
|
213384
|
-
code_point = indexCodePointFor((lead - 161) * 94 + (bite - 161),
|
|
213979
|
+
code_point = indexCodePointFor((lead - 161) * 94 + (bite - 161), index2(!eucjp_jis0212_flag ? "jis0208" : "jis0212"));
|
|
213385
213980
|
}
|
|
213386
213981
|
eucjp_jis0212_flag = false;
|
|
213387
213982
|
if (!inRange(bite, 161, 254))
|
|
@@ -213414,7 +214009,7 @@ ${job.error.stack.split(`
|
|
|
213414
214009
|
return [142, code_point - 65377 + 161];
|
|
213415
214010
|
if (code_point === 8722)
|
|
213416
214011
|
code_point = 65293;
|
|
213417
|
-
var pointer = indexPointerFor(code_point,
|
|
214012
|
+
var pointer = indexPointerFor(code_point, index2("jis0208"));
|
|
213418
214013
|
if (pointer === null)
|
|
213419
214014
|
return encoderError(code_point);
|
|
213420
214015
|
var lead = floor(pointer / 94) + 161;
|
|
@@ -213517,7 +214112,7 @@ ${job.error.stack.split(`
|
|
|
213517
214112
|
if (inRange(bite, 33, 126)) {
|
|
213518
214113
|
iso2022jp_decoder_state = states.LeadByte;
|
|
213519
214114
|
var pointer = (iso2022jp_lead - 33) * 94 + bite - 33;
|
|
213520
|
-
var code_point = indexCodePointFor(pointer,
|
|
214115
|
+
var code_point = indexCodePointFor(pointer, index2("jis0208"));
|
|
213521
214116
|
if (code_point === null)
|
|
213522
214117
|
return decoderError(fatal);
|
|
213523
214118
|
return code_point;
|
|
@@ -213605,7 +214200,7 @@ ${job.error.stack.split(`
|
|
|
213605
214200
|
}
|
|
213606
214201
|
if (code_point === 8722)
|
|
213607
214202
|
code_point = 65293;
|
|
213608
|
-
var pointer = indexPointerFor(code_point,
|
|
214203
|
+
var pointer = indexPointerFor(code_point, index2("jis0208"));
|
|
213609
214204
|
if (pointer === null)
|
|
213610
214205
|
return encoderError(code_point);
|
|
213611
214206
|
if (iso2022jp_state !== states.jis0208) {
|
|
@@ -213644,7 +214239,7 @@ ${job.error.stack.split(`
|
|
|
213644
214239
|
pointer = (lead - lead_offset) * 188 + bite - offset;
|
|
213645
214240
|
if (inRange(pointer, 8836, 10715))
|
|
213646
214241
|
return 57344 - 8836 + pointer;
|
|
213647
|
-
var code_point = pointer === null ? null : indexCodePointFor(pointer,
|
|
214242
|
+
var code_point = pointer === null ? null : indexCodePointFor(pointer, index2("jis0208"));
|
|
213648
214243
|
if (code_point === null && isASCIIByte(bite))
|
|
213649
214244
|
stream.prepend(bite);
|
|
213650
214245
|
if (code_point === null)
|
|
@@ -213709,7 +214304,7 @@ ${job.error.stack.split(`
|
|
|
213709
214304
|
euckr_lead = 0;
|
|
213710
214305
|
if (inRange(bite, 65, 254))
|
|
213711
214306
|
pointer = (lead - 129) * 190 + (bite - 65);
|
|
213712
|
-
var code_point = pointer === null ? null : indexCodePointFor(pointer,
|
|
214307
|
+
var code_point = pointer === null ? null : indexCodePointFor(pointer, index2("euc-kr"));
|
|
213713
214308
|
if (pointer === null && isASCIIByte(bite))
|
|
213714
214309
|
stream.prepend(bite);
|
|
213715
214310
|
if (code_point === null)
|
|
@@ -213732,7 +214327,7 @@ ${job.error.stack.split(`
|
|
|
213732
214327
|
return finished;
|
|
213733
214328
|
if (isASCIICodePoint(code_point))
|
|
213734
214329
|
return code_point;
|
|
213735
|
-
var pointer = indexPointerFor(code_point,
|
|
214330
|
+
var pointer = indexPointerFor(code_point, index2("euc-kr"));
|
|
213736
214331
|
if (pointer === null)
|
|
213737
214332
|
return encoderError(code_point);
|
|
213738
214333
|
var lead = floor(pointer / 190) + 129;
|
|
@@ -213999,7 +214594,7 @@ ${job.error.stack.split(`
|
|
|
213999
214594
|
fail(value, true, message3, "==", assert2.ok);
|
|
214000
214595
|
}
|
|
214001
214596
|
assert2.ok = ok2;
|
|
214002
|
-
assert2.equal = function
|
|
214597
|
+
assert2.equal = function equal2(actual, expected, message3) {
|
|
214003
214598
|
if (actual != expected)
|
|
214004
214599
|
fail(actual, expected, message3, "==", assert2.equal);
|
|
214005
214600
|
};
|
|
@@ -214902,7 +215497,7 @@ ${job.error.stack.split(`
|
|
|
214902
215497
|
castInput: function castInput(value) {
|
|
214903
215498
|
return value;
|
|
214904
215499
|
},
|
|
214905
|
-
tokenize: function
|
|
215500
|
+
tokenize: function tokenize2(value) {
|
|
214906
215501
|
return value.split("");
|
|
214907
215502
|
},
|
|
214908
215503
|
join: function join54(chars) {
|
|
@@ -215215,8 +215810,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
215215
215810
|
var options2 = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};
|
|
215216
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;
|
|
215217
215812
|
function parseIndex() {
|
|
215218
|
-
var
|
|
215219
|
-
list4.push(
|
|
215813
|
+
var index2 = {};
|
|
215814
|
+
list4.push(index2);
|
|
215220
215815
|
while (i5 < diffstr.length) {
|
|
215221
215816
|
var line = diffstr[i5];
|
|
215222
215817
|
if (/^(\-\-\-|\+\+\+|@@)\s/.test(line)) {
|
|
@@ -215224,19 +215819,19 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
215224
215819
|
}
|
|
215225
215820
|
var header = /^(?:Index:|diff(?: -r \w+)+)\s+(.+?)\s*$/.exec(line);
|
|
215226
215821
|
if (header) {
|
|
215227
|
-
|
|
215822
|
+
index2.index = header[1];
|
|
215228
215823
|
}
|
|
215229
215824
|
i5++;
|
|
215230
215825
|
}
|
|
215231
|
-
parseFileHeader(
|
|
215232
|
-
parseFileHeader(
|
|
215233
|
-
|
|
215826
|
+
parseFileHeader(index2);
|
|
215827
|
+
parseFileHeader(index2);
|
|
215828
|
+
index2.hunks = [];
|
|
215234
215829
|
while (i5 < diffstr.length) {
|
|
215235
215830
|
var _line = diffstr[i5];
|
|
215236
215831
|
if (/^(Index:|diff|\-\-\-|\+\+\+)\s/.test(_line)) {
|
|
215237
215832
|
break;
|
|
215238
215833
|
} else if (/^@@/.test(_line)) {
|
|
215239
|
-
|
|
215834
|
+
index2.hunks.push(parseHunk());
|
|
215240
215835
|
} else if (_line && options2.strict) {
|
|
215241
215836
|
throw new Error("Unknown line " + (i5 + 1) + " " + JSON.stringify(_line));
|
|
215242
215837
|
} else {
|
|
@@ -215244,7 +215839,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
215244
215839
|
}
|
|
215245
215840
|
}
|
|
215246
215841
|
}
|
|
215247
|
-
function parseFileHeader(
|
|
215842
|
+
function parseFileHeader(index2) {
|
|
215248
215843
|
var fileHeader = /^(---|\+\+\+)\s+(.*)$/.exec(diffstr[i5]);
|
|
215249
215844
|
if (fileHeader) {
|
|
215250
215845
|
var keyPrefix = fileHeader[1] === "---" ? "old" : "new";
|
|
@@ -215253,8 +215848,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
215253
215848
|
if (/^".*"$/.test(fileName)) {
|
|
215254
215849
|
fileName = fileName.substr(1, fileName.length - 2);
|
|
215255
215850
|
}
|
|
215256
|
-
|
|
215257
|
-
|
|
215851
|
+
index2[keyPrefix + "FileName"] = fileName;
|
|
215852
|
+
index2[keyPrefix + "Header"] = (data[1] || "").trim();
|
|
215258
215853
|
i5++;
|
|
215259
215854
|
}
|
|
215260
215855
|
}
|
|
@@ -215433,16 +216028,16 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
215433
216028
|
}
|
|
215434
216029
|
var currentIndex = 0;
|
|
215435
216030
|
function processIndex() {
|
|
215436
|
-
var
|
|
215437
|
-
if (!
|
|
216031
|
+
var index2 = uniDiff[currentIndex++];
|
|
216032
|
+
if (!index2) {
|
|
215438
216033
|
return options2.complete();
|
|
215439
216034
|
}
|
|
215440
|
-
options2.loadFile(
|
|
216035
|
+
options2.loadFile(index2, function(err, data) {
|
|
215441
216036
|
if (err) {
|
|
215442
216037
|
return options2.complete(err);
|
|
215443
216038
|
}
|
|
215444
|
-
var updatedContent = applyPatch2(data,
|
|
215445
|
-
options2.patched(
|
|
216039
|
+
var updatedContent = applyPatch2(data, index2, options2);
|
|
216040
|
+
options2.patched(index2, updatedContent, function(err2) {
|
|
215446
216041
|
if (err2) {
|
|
215447
216042
|
return options2.complete(err2);
|
|
215448
216043
|
}
|
|
@@ -215681,11 +216276,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
215681
216276
|
function fileNameChanged(patch) {
|
|
215682
216277
|
return patch.newFileName && patch.newFileName !== patch.oldFileName;
|
|
215683
216278
|
}
|
|
215684
|
-
function selectField(
|
|
216279
|
+
function selectField(index2, mine, theirs) {
|
|
215685
216280
|
if (mine === theirs) {
|
|
215686
216281
|
return mine;
|
|
215687
216282
|
} else {
|
|
215688
|
-
|
|
216283
|
+
index2.conflict = true;
|
|
215689
216284
|
return {
|
|
215690
216285
|
mine,
|
|
215691
216286
|
theirs
|
|
@@ -216296,8 +216891,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216296
216891
|
throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
|
|
216297
216892
|
}
|
|
216298
216893
|
var result = [];
|
|
216299
|
-
$replace(string5, rePropName, function(match3,
|
|
216300
|
-
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") :
|
|
216894
|
+
$replace(string5, rePropName, function(match3, number6, quote, subString) {
|
|
216895
|
+
result[result.length] = quote ? $replace(subString, reEscapeChar, "$1") : number6 || match3;
|
|
216301
216896
|
});
|
|
216302
216897
|
return result;
|
|
216303
216898
|
};
|
|
@@ -216564,10 +217159,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216564
217159
|
var Map2 = getNative(root5, "Map"), nativeCreate = getNative(Object, "create");
|
|
216565
217160
|
var symbolProto = Symbol2 ? Symbol2.prototype : undefined, symbolToString = symbolProto ? symbolProto.toString : undefined;
|
|
216566
217161
|
function Hash(entries2) {
|
|
216567
|
-
var
|
|
217162
|
+
var index2 = -1, length2 = entries2 ? entries2.length : 0;
|
|
216568
217163
|
this.clear();
|
|
216569
|
-
while (++
|
|
216570
|
-
var entry = entries2[
|
|
217164
|
+
while (++index2 < length2) {
|
|
217165
|
+
var entry = entries2[index2];
|
|
216571
217166
|
this.set(entry[0], entry[1]);
|
|
216572
217167
|
}
|
|
216573
217168
|
}
|
|
@@ -216600,10 +217195,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216600
217195
|
Hash.prototype.has = hashHas;
|
|
216601
217196
|
Hash.prototype.set = hashSet;
|
|
216602
217197
|
function ListCache(entries2) {
|
|
216603
|
-
var
|
|
217198
|
+
var index2 = -1, length2 = entries2 ? entries2.length : 0;
|
|
216604
217199
|
this.clear();
|
|
216605
|
-
while (++
|
|
216606
|
-
var entry = entries2[
|
|
217200
|
+
while (++index2 < length2) {
|
|
217201
|
+
var entry = entries2[index2];
|
|
216607
217202
|
this.set(entry[0], entry[1]);
|
|
216608
217203
|
}
|
|
216609
217204
|
}
|
|
@@ -216611,31 +217206,31 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216611
217206
|
this.__data__ = [];
|
|
216612
217207
|
}
|
|
216613
217208
|
function listCacheDelete(key) {
|
|
216614
|
-
var data = this.__data__,
|
|
216615
|
-
if (
|
|
217209
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
217210
|
+
if (index2 < 0) {
|
|
216616
217211
|
return false;
|
|
216617
217212
|
}
|
|
216618
217213
|
var lastIndex = data.length - 1;
|
|
216619
|
-
if (
|
|
217214
|
+
if (index2 == lastIndex) {
|
|
216620
217215
|
data.pop();
|
|
216621
217216
|
} else {
|
|
216622
|
-
splice.call(data,
|
|
217217
|
+
splice.call(data, index2, 1);
|
|
216623
217218
|
}
|
|
216624
217219
|
return true;
|
|
216625
217220
|
}
|
|
216626
217221
|
function listCacheGet(key) {
|
|
216627
|
-
var data = this.__data__,
|
|
216628
|
-
return
|
|
217222
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
217223
|
+
return index2 < 0 ? undefined : data[index2][1];
|
|
216629
217224
|
}
|
|
216630
217225
|
function listCacheHas(key) {
|
|
216631
217226
|
return assocIndexOf(this.__data__, key) > -1;
|
|
216632
217227
|
}
|
|
216633
217228
|
function listCacheSet(key, value) {
|
|
216634
|
-
var data = this.__data__,
|
|
216635
|
-
if (
|
|
217229
|
+
var data = this.__data__, index2 = assocIndexOf(data, key);
|
|
217230
|
+
if (index2 < 0) {
|
|
216636
217231
|
data.push([key, value]);
|
|
216637
217232
|
} else {
|
|
216638
|
-
data[
|
|
217233
|
+
data[index2][1] = value;
|
|
216639
217234
|
}
|
|
216640
217235
|
return this;
|
|
216641
217236
|
}
|
|
@@ -216645,10 +217240,10 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216645
217240
|
ListCache.prototype.has = listCacheHas;
|
|
216646
217241
|
ListCache.prototype.set = listCacheSet;
|
|
216647
217242
|
function MapCache(entries2) {
|
|
216648
|
-
var
|
|
217243
|
+
var index2 = -1, length2 = entries2 ? entries2.length : 0;
|
|
216649
217244
|
this.clear();
|
|
216650
|
-
while (++
|
|
216651
|
-
var entry = entries2[
|
|
217245
|
+
while (++index2 < length2) {
|
|
217246
|
+
var entry = entries2[index2];
|
|
216652
217247
|
this.set(entry[0], entry[1]);
|
|
216653
217248
|
}
|
|
216654
217249
|
}
|
|
@@ -216688,11 +217283,11 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216688
217283
|
}
|
|
216689
217284
|
function baseGet(object3, path6) {
|
|
216690
217285
|
path6 = isKey(path6, object3) ? [path6] : castPath(path6);
|
|
216691
|
-
var
|
|
216692
|
-
while (object3 != null &&
|
|
216693
|
-
object3 = object3[toKey(path6[
|
|
217286
|
+
var index2 = 0, length2 = path6.length;
|
|
217287
|
+
while (object3 != null && index2 < length2) {
|
|
217288
|
+
object3 = object3[toKey(path6[index2++])];
|
|
216694
217289
|
}
|
|
216695
|
-
return
|
|
217290
|
+
return index2 && index2 == length2 ? object3 : undefined;
|
|
216696
217291
|
}
|
|
216697
217292
|
function baseIsNative(value) {
|
|
216698
217293
|
if (!isObject2(value) || isMasked(value)) {
|
|
@@ -216745,8 +217340,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216745
217340
|
if (reLeadingDot.test(string5)) {
|
|
216746
217341
|
result.push("");
|
|
216747
217342
|
}
|
|
216748
|
-
string5.replace(rePropName, function(match3,
|
|
216749
|
-
result.push(quote ? string6.replace(reEscapeChar, "$1") :
|
|
217343
|
+
string5.replace(rePropName, function(match3, number6, quote, string6) {
|
|
217344
|
+
result.push(quote ? string6.replace(reEscapeChar, "$1") : number6 || match3);
|
|
216750
217345
|
});
|
|
216751
217346
|
return result;
|
|
216752
217347
|
});
|
|
@@ -216773,12 +217368,12 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
216773
217368
|
throw new TypeError(FUNC_ERROR_TEXT);
|
|
216774
217369
|
}
|
|
216775
217370
|
var memoized = function() {
|
|
216776
|
-
var args = arguments, key = resolver ? resolver.apply(this, args) : args[0],
|
|
216777
|
-
if (
|
|
216778
|
-
return
|
|
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);
|
|
216779
217374
|
}
|
|
216780
217375
|
var result = func.apply(this, args);
|
|
216781
|
-
memoized.cache =
|
|
217376
|
+
memoized.cache = cache5.set(key, result);
|
|
216782
217377
|
return result;
|
|
216783
217378
|
};
|
|
216784
217379
|
memoized.cache = new (memoize.Cache || MapCache);
|
|
@@ -217242,8 +217837,8 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
217242
217837
|
restore: function restore() {
|
|
217243
217838
|
return this.xhr.restore && this.xhr.restore.apply(this.xhr, arguments);
|
|
217244
217839
|
},
|
|
217245
|
-
getRequest: function getRequest(
|
|
217246
|
-
return this.requests[
|
|
217840
|
+
getRequest: function getRequest(index2) {
|
|
217841
|
+
return this.requests[index2] || null;
|
|
217247
217842
|
},
|
|
217248
217843
|
reset: function reset() {
|
|
217249
217844
|
this.resetBehavior();
|
|
@@ -217838,14 +218433,14 @@ ${inspect2(response)}
|
|
|
217838
218433
|
clearResponse(this);
|
|
217839
218434
|
if (this.async) {
|
|
217840
218435
|
var chunkSize = this.chunkSize || 10;
|
|
217841
|
-
var
|
|
218436
|
+
var index2 = 0;
|
|
217842
218437
|
do {
|
|
217843
218438
|
this.readyStateChange(FakeXMLHttpRequest.LOADING);
|
|
217844
218439
|
if (isTextResponse) {
|
|
217845
|
-
this.responseText = this.response += body.substring(
|
|
218440
|
+
this.responseText = this.response += body.substring(index2, index2 + chunkSize);
|
|
217846
218441
|
}
|
|
217847
|
-
|
|
217848
|
-
} while (
|
|
218442
|
+
index2 += chunkSize;
|
|
218443
|
+
} while (index2 < body.length);
|
|
217849
218444
|
}
|
|
217850
218445
|
this.response = convertResponseBody(this.responseType, contentType2, body);
|
|
217851
218446
|
if (isTextResponse) {
|
|
@@ -218293,8 +218888,8 @@ ${inspect2(response)}
|
|
|
218293
218888
|
const value = this.tryConsume(type);
|
|
218294
218889
|
if (value !== undefined)
|
|
218295
218890
|
return value;
|
|
218296
|
-
const { type: nextType, index } = this.peek();
|
|
218297
|
-
throw new TypeError(`Unexpected ${nextType} at ${
|
|
218891
|
+
const { type: nextType, index: index2 } = this.peek();
|
|
218892
|
+
throw new TypeError(`Unexpected ${nextType} at ${index2}, expected ${type}: ${DEBUG_URL}`);
|
|
218298
218893
|
}
|
|
218299
218894
|
text() {
|
|
218300
218895
|
let result = "";
|
|
@@ -218399,9 +218994,9 @@ ${inspect2(response)}
|
|
|
218399
218994
|
throw new TypeError(`Expected "${token.name}" to be a non-empty array`);
|
|
218400
218995
|
}
|
|
218401
218996
|
return [
|
|
218402
|
-
value.map((value2,
|
|
218997
|
+
value.map((value2, index2) => {
|
|
218403
218998
|
if (typeof value2 !== "string") {
|
|
218404
|
-
throw new TypeError(`Expected "${token.name}/${
|
|
218999
|
+
throw new TypeError(`Expected "${token.name}/${index2}" to be a string`);
|
|
218405
219000
|
}
|
|
218406
219001
|
return encodeValue(value2);
|
|
218407
219002
|
}).join(delimiter2)
|
|
@@ -218464,20 +219059,20 @@ ${inspect2(response)}
|
|
|
218464
219059
|
const regexp = new RegExp(pattern, flags);
|
|
218465
219060
|
return { regexp, keys };
|
|
218466
219061
|
}
|
|
218467
|
-
function* flatten(tokens,
|
|
218468
|
-
if (
|
|
219062
|
+
function* flatten(tokens, index2, init) {
|
|
219063
|
+
if (index2 === tokens.length) {
|
|
218469
219064
|
return yield init;
|
|
218470
219065
|
}
|
|
218471
|
-
const token = tokens[
|
|
219066
|
+
const token = tokens[index2];
|
|
218472
219067
|
if (token.type === "group") {
|
|
218473
219068
|
const fork = init.slice();
|
|
218474
219069
|
for (const seq of flatten(token.tokens, 0, fork)) {
|
|
218475
|
-
yield* flatten(tokens,
|
|
219070
|
+
yield* flatten(tokens, index2 + 1, seq);
|
|
218476
219071
|
}
|
|
218477
219072
|
} else {
|
|
218478
219073
|
init.push(token);
|
|
218479
219074
|
}
|
|
218480
|
-
yield* flatten(tokens,
|
|
219075
|
+
yield* flatten(tokens, index2 + 1, init);
|
|
218481
219076
|
}
|
|
218482
219077
|
function sequenceToRegExp(tokens, delimiter2, keys) {
|
|
218483
219078
|
let result = "";
|
|
@@ -218516,13 +219111,13 @@ ${inspect2(response)}
|
|
|
218516
219111
|
return `(?:(?!${values.map(escape2).join("|")}).)`;
|
|
218517
219112
|
}
|
|
218518
219113
|
function stringify6(data) {
|
|
218519
|
-
return data.tokens.map(function stringifyToken(token,
|
|
219114
|
+
return data.tokens.map(function stringifyToken(token, index2, tokens) {
|
|
218520
219115
|
if (token.type === "text")
|
|
218521
219116
|
return escapeText(token.value);
|
|
218522
219117
|
if (token.type === "group") {
|
|
218523
219118
|
return `{${token.tokens.map(stringifyToken).join("")}}`;
|
|
218524
219119
|
}
|
|
218525
|
-
const isSafe = isNameSafe(token.name) && isNextNameSafe(tokens[
|
|
219120
|
+
const isSafe = isNameSafe(token.name) && isNextNameSafe(tokens[index2 + 1]);
|
|
218526
219121
|
const key = isSafe ? token.name : JSON.stringify(token.name);
|
|
218527
219122
|
if (token.type === "param")
|
|
218528
219123
|
return `:${key}`;
|
|
@@ -219909,10 +220504,10 @@ function requireReactIs() {
|
|
|
219909
220504
|
return reactIs.exports;
|
|
219910
220505
|
}
|
|
219911
220506
|
var reactIsExports = requireReactIs();
|
|
219912
|
-
var
|
|
220507
|
+
var index2 = /* @__PURE__ */ getDefaultExportFromCjs(reactIsExports);
|
|
219913
220508
|
var ReactIs18 = /* @__PURE__ */ _mergeNamespaces({
|
|
219914
220509
|
__proto__: null,
|
|
219915
|
-
default:
|
|
220510
|
+
default: index2
|
|
219916
220511
|
}, [reactIsExports]);
|
|
219917
220512
|
var reactIsMethods = [
|
|
219918
220513
|
"isAsyncMode",
|
|
@@ -221231,16 +221826,16 @@ var refresh2 = (program3) => {
|
|
|
221231
221826
|
}
|
|
221232
221827
|
const commitAll = options2.commit === true;
|
|
221233
221828
|
const commitIndexes = Array.isArray(options2.commit) ? options2.commit.flatMap((value) => value.split(",")).filter((value) => value !== "").map((value) => {
|
|
221234
|
-
const
|
|
221235
|
-
if (!Number.isInteger(
|
|
221829
|
+
const index3 = Number(value);
|
|
221830
|
+
if (!Number.isInteger(index3) || index3 < 0 || index3 >= result.operations.length) {
|
|
221236
221831
|
throw new ExpectedError(`Invalid state change index: ${value}`);
|
|
221237
221832
|
}
|
|
221238
|
-
return
|
|
221833
|
+
return index3;
|
|
221239
221834
|
}) : [];
|
|
221240
221835
|
let skipped = 0;
|
|
221241
|
-
for (const [
|
|
221836
|
+
for (const [index3, entry] of result.operations.entries()) {
|
|
221242
221837
|
logs_exports.warning([
|
|
221243
|
-
`${color2.warning.bold.inverse(` ${capitalCase(entry.operation)} `)} ${color2.dim(`#${
|
|
221838
|
+
`${color2.warning.bold.inverse(` ${capitalCase(entry.operation)} `)} ${color2.dim(`#${index3}`)}`,
|
|
221244
221839
|
entry.urn
|
|
221245
221840
|
].join(`
|
|
221246
221841
|
`));
|
|
@@ -221250,7 +221845,7 @@ var refresh2 = (program3) => {
|
|
|
221250
221845
|
logs_exports.message(diffResult);
|
|
221251
221846
|
}
|
|
221252
221847
|
}
|
|
221253
|
-
if (commitAll || commitIndexes.includes(
|
|
221848
|
+
if (commitAll || commitIndexes.includes(index3)) {
|
|
221254
221849
|
entry.commit();
|
|
221255
221850
|
continue;
|
|
221256
221851
|
}
|
|
@@ -221407,9 +222002,7 @@ program2.exitOverride((error53) => {
|
|
|
221407
222002
|
program2.on("option:skip-prompt", () => {
|
|
221408
222003
|
process.env.SKIP_PROMPT = program2.opts().skipPrompt ? "1" : undefined;
|
|
221409
222004
|
});
|
|
221410
|
-
|
|
221411
|
-
process.env.SKIP_PROMPT = "1";
|
|
221412
|
-
}
|
|
222005
|
+
applyRemoteAgentEnv();
|
|
221413
222006
|
program2.on("option:no-cache", () => {
|
|
221414
222007
|
process.env.NO_CACHE = program2.opts().cache === false ? "1" : undefined;
|
|
221415
222008
|
});
|