@uipath/llmgw-tool 1.197.0 → 1.198.0-preview.100
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/tool.js +1452 -955
- package/package.json +2 -2
package/dist/tool.js
CHANGED
|
@@ -4,7 +4,7 @@ var __require = /* @__PURE__ */ createRequire(import.meta.url);
|
|
|
4
4
|
var package_default = {
|
|
5
5
|
name: "@uipath/llmgw-tool",
|
|
6
6
|
license: "MIT",
|
|
7
|
-
version: "1.
|
|
7
|
+
version: "1.198.0-preview.100",
|
|
8
8
|
description: "CLI plugin for UiPath AI Trust Layer Bring-Your-Own LLM connections.",
|
|
9
9
|
private: false,
|
|
10
10
|
repository: {
|
|
@@ -941,8 +941,15 @@ var TLS_ERROR_CODES = new Set([
|
|
|
941
941
|
var TLS_INSTRUCTIONS = "The server's TLS certificate could not be verified. Most often a " + "corporate proxy/firewall re-signs HTTPS with a root CA that Node does " + "not trust — set NODE_EXTRA_CA_CERTS to that CA's PEM file (and HTTPS_PROXY " + "if you connect through a proxy). If the certificate is instead expired or " + "its hostname does not match, fix the endpoint URL or the system clock. " + "Then retry.";
|
|
942
942
|
var NETWORK_INSTRUCTIONS = "Could not reach the UiPath service. Check your network connection and " + "VPN, confirm any HTTP_PROXY/HTTPS_PROXY/NO_PROXY settings are correct, " + "then retry.";
|
|
943
943
|
function describeConnectivityError(error) {
|
|
944
|
-
|
|
945
|
-
|
|
944
|
+
const queue = [error];
|
|
945
|
+
const seen = new Set;
|
|
946
|
+
for (let steps = 0;queue.length > 0 && steps < 32; steps++) {
|
|
947
|
+
const current = queue.shift();
|
|
948
|
+
if (current === null || typeof current !== "object")
|
|
949
|
+
continue;
|
|
950
|
+
if (seen.has(current))
|
|
951
|
+
continue;
|
|
952
|
+
seen.add(current);
|
|
946
953
|
const cur = current;
|
|
947
954
|
const code = typeof cur.code === "string" ? cur.code : undefined;
|
|
948
955
|
const message = typeof cur.message === "string" ? cur.message : undefined;
|
|
@@ -962,7 +969,10 @@ function describeConnectivityError(error) {
|
|
|
962
969
|
instructions: NETWORK_INSTRUCTIONS
|
|
963
970
|
};
|
|
964
971
|
}
|
|
965
|
-
|
|
972
|
+
if (cur.cause !== undefined)
|
|
973
|
+
queue.push(cur.cause);
|
|
974
|
+
if (Array.isArray(cur.errors))
|
|
975
|
+
queue.push(...cur.errors);
|
|
966
976
|
}
|
|
967
977
|
return;
|
|
968
978
|
}
|
|
@@ -3236,31 +3246,17 @@ function search(data, expression, options) {
|
|
|
3236
3246
|
}
|
|
3237
3247
|
|
|
3238
3248
|
// ../../../node_modules/js-yaml/dist/js-yaml.mjs
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
var
|
|
3243
|
-
var
|
|
3244
|
-
var
|
|
3245
|
-
var
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
key = keys[i];
|
|
3251
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
3252
|
-
__defProp(to, key, {
|
|
3253
|
-
get: ((k) => from[k]).bind(null, key),
|
|
3254
|
-
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
|
3255
|
-
});
|
|
3256
|
-
}
|
|
3257
|
-
return to;
|
|
3258
|
-
};
|
|
3259
|
-
var __toESM = (mod2, isNodeMode, target) => (target = mod2 != null ? __create(__getProtoOf(mod2)) : {}, __copyProps(isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", {
|
|
3260
|
-
value: mod2,
|
|
3261
|
-
enumerable: true
|
|
3262
|
-
}) : target, mod2));
|
|
3263
|
-
var require_common = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
3249
|
+
function getDefaultExportFromCjs(x) {
|
|
3250
|
+
return x && x.__esModule && Object.prototype.hasOwnProperty.call(x, "default") ? x["default"] : x;
|
|
3251
|
+
}
|
|
3252
|
+
var jsYaml = {};
|
|
3253
|
+
var loader = {};
|
|
3254
|
+
var common = {};
|
|
3255
|
+
var hasRequiredCommon;
|
|
3256
|
+
function requireCommon() {
|
|
3257
|
+
if (hasRequiredCommon)
|
|
3258
|
+
return common;
|
|
3259
|
+
hasRequiredCommon = 1;
|
|
3264
3260
|
function isNothing(subject) {
|
|
3265
3261
|
return typeof subject === "undefined" || subject === null;
|
|
3266
3262
|
}
|
|
@@ -3286,55 +3282,71 @@ var require_common = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3286
3282
|
}
|
|
3287
3283
|
function repeat(string, count) {
|
|
3288
3284
|
let result = "";
|
|
3289
|
-
for (let cycle = 0;cycle < count; cycle += 1)
|
|
3285
|
+
for (let cycle = 0;cycle < count; cycle += 1) {
|
|
3290
3286
|
result += string;
|
|
3287
|
+
}
|
|
3291
3288
|
return result;
|
|
3292
3289
|
}
|
|
3293
3290
|
function isNegativeZero(number) {
|
|
3294
3291
|
return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
|
|
3295
3292
|
}
|
|
3296
|
-
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3293
|
+
common.isNothing = isNothing;
|
|
3294
|
+
common.isObject = isObject2;
|
|
3295
|
+
common.toArray = toArray;
|
|
3296
|
+
common.repeat = repeat;
|
|
3297
|
+
common.isNegativeZero = isNegativeZero;
|
|
3298
|
+
common.extend = extend;
|
|
3299
|
+
return common;
|
|
3300
|
+
}
|
|
3301
|
+
var exception;
|
|
3302
|
+
var hasRequiredException;
|
|
3303
|
+
function requireException() {
|
|
3304
|
+
if (hasRequiredException)
|
|
3305
|
+
return exception;
|
|
3306
|
+
hasRequiredException = 1;
|
|
3307
|
+
function formatError(exception2, compact) {
|
|
3305
3308
|
let where = "";
|
|
3306
|
-
const message =
|
|
3307
|
-
if (!
|
|
3309
|
+
const message = exception2.reason || "(unknown reason)";
|
|
3310
|
+
if (!exception2.mark)
|
|
3308
3311
|
return message;
|
|
3309
|
-
if (
|
|
3310
|
-
where += 'in "' +
|
|
3311
|
-
|
|
3312
|
-
|
|
3312
|
+
if (exception2.mark.name) {
|
|
3313
|
+
where += 'in "' + exception2.mark.name + '" ';
|
|
3314
|
+
}
|
|
3315
|
+
where += "(" + (exception2.mark.line + 1) + ":" + (exception2.mark.column + 1) + ")";
|
|
3316
|
+
if (!compact && exception2.mark.snippet) {
|
|
3313
3317
|
where += `
|
|
3314
3318
|
|
|
3315
|
-
` +
|
|
3319
|
+
` + exception2.mark.snippet;
|
|
3320
|
+
}
|
|
3316
3321
|
return message + " " + where;
|
|
3317
3322
|
}
|
|
3318
|
-
function
|
|
3323
|
+
function YAMLException2(reason, mark) {
|
|
3319
3324
|
Error.call(this);
|
|
3320
3325
|
this.name = "YAMLException";
|
|
3321
3326
|
this.reason = reason;
|
|
3322
3327
|
this.mark = mark;
|
|
3323
3328
|
this.message = formatError(this, false);
|
|
3324
|
-
if (Error.captureStackTrace)
|
|
3329
|
+
if (Error.captureStackTrace) {
|
|
3325
3330
|
Error.captureStackTrace(this, this.constructor);
|
|
3326
|
-
else
|
|
3327
|
-
this.stack =
|
|
3331
|
+
} else {
|
|
3332
|
+
this.stack = new Error().stack || "";
|
|
3333
|
+
}
|
|
3328
3334
|
}
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3335
|
+
YAMLException2.prototype = Object.create(Error.prototype);
|
|
3336
|
+
YAMLException2.prototype.constructor = YAMLException2;
|
|
3337
|
+
YAMLException2.prototype.toString = function toString(compact) {
|
|
3332
3338
|
return this.name + ": " + formatError(this, compact);
|
|
3333
3339
|
};
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3340
|
+
exception = YAMLException2;
|
|
3341
|
+
return exception;
|
|
3342
|
+
}
|
|
3343
|
+
var snippet;
|
|
3344
|
+
var hasRequiredSnippet;
|
|
3345
|
+
function requireSnippet() {
|
|
3346
|
+
if (hasRequiredSnippet)
|
|
3347
|
+
return snippet;
|
|
3348
|
+
hasRequiredSnippet = 1;
|
|
3349
|
+
const common2 = requireCommon();
|
|
3338
3350
|
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
3339
3351
|
let head = "";
|
|
3340
3352
|
let tail = "";
|
|
@@ -3353,7 +3365,7 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3353
3365
|
};
|
|
3354
3366
|
}
|
|
3355
3367
|
function padStart(string, max) {
|
|
3356
|
-
return
|
|
3368
|
+
return common2.repeat(" ", max - string.length) + string;
|
|
3357
3369
|
}
|
|
3358
3370
|
function makeSnippet(mark, options) {
|
|
3359
3371
|
options = Object.create(options || null);
|
|
@@ -3375,8 +3387,9 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3375
3387
|
while (match = re.exec(mark.buffer)) {
|
|
3376
3388
|
lineEnds.push(match.index);
|
|
3377
3389
|
lineStarts.push(match.index + match[0].length);
|
|
3378
|
-
if (mark.position <= match.index && foundLineNo < 0)
|
|
3390
|
+
if (mark.position <= match.index && foundLineNo < 0) {
|
|
3379
3391
|
foundLineNo = lineStarts.length - 2;
|
|
3392
|
+
}
|
|
3380
3393
|
}
|
|
3381
3394
|
if (foundLineNo < 0)
|
|
3382
3395
|
foundLineNo = lineStarts.length - 1;
|
|
@@ -3387,28 +3400,34 @@ var require_snippet = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3387
3400
|
if (foundLineNo - i < 0)
|
|
3388
3401
|
break;
|
|
3389
3402
|
const line2 = getLine(mark.buffer, lineStarts[foundLineNo - i], lineEnds[foundLineNo - i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]), maxLineLength);
|
|
3390
|
-
result =
|
|
3403
|
+
result = common2.repeat(" ", options.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + `
|
|
3391
3404
|
` + result;
|
|
3392
3405
|
}
|
|
3393
3406
|
const line = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
|
|
3394
|
-
result +=
|
|
3407
|
+
result += common2.repeat(" ", options.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line.str + `
|
|
3395
3408
|
`;
|
|
3396
|
-
result +=
|
|
3409
|
+
result += common2.repeat("-", options.indent + lineNoLength + 3 + line.pos) + `^
|
|
3397
3410
|
`;
|
|
3398
3411
|
for (let i = 1;i <= options.linesAfter; i++) {
|
|
3399
3412
|
if (foundLineNo + i >= lineEnds.length)
|
|
3400
3413
|
break;
|
|
3401
3414
|
const line2 = getLine(mark.buffer, lineStarts[foundLineNo + i], lineEnds[foundLineNo + i], mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]), maxLineLength);
|
|
3402
|
-
result +=
|
|
3415
|
+
result += common2.repeat(" ", options.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + `
|
|
3403
3416
|
`;
|
|
3404
3417
|
}
|
|
3405
3418
|
return result.replace(/\n$/, "");
|
|
3406
3419
|
}
|
|
3407
|
-
|
|
3408
|
-
|
|
3409
|
-
|
|
3410
|
-
|
|
3411
|
-
|
|
3420
|
+
snippet = makeSnippet;
|
|
3421
|
+
return snippet;
|
|
3422
|
+
}
|
|
3423
|
+
var type;
|
|
3424
|
+
var hasRequiredType;
|
|
3425
|
+
function requireType() {
|
|
3426
|
+
if (hasRequiredType)
|
|
3427
|
+
return type;
|
|
3428
|
+
hasRequiredType = 1;
|
|
3429
|
+
const YAMLException2 = requireException();
|
|
3430
|
+
const TYPE_CONSTRUCTOR_OPTIONS = [
|
|
3412
3431
|
"kind",
|
|
3413
3432
|
"multi",
|
|
3414
3433
|
"resolve",
|
|
@@ -3420,26 +3439,28 @@ var require_type = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3420
3439
|
"defaultStyle",
|
|
3421
3440
|
"styleAliases"
|
|
3422
3441
|
];
|
|
3423
|
-
|
|
3442
|
+
const YAML_NODE_KINDS = [
|
|
3424
3443
|
"scalar",
|
|
3425
3444
|
"sequence",
|
|
3426
3445
|
"mapping"
|
|
3427
3446
|
];
|
|
3428
|
-
function compileStyleAliases(
|
|
3447
|
+
function compileStyleAliases(map2) {
|
|
3429
3448
|
const result = {};
|
|
3430
|
-
if (
|
|
3431
|
-
Object.keys(
|
|
3432
|
-
|
|
3449
|
+
if (map2 !== null) {
|
|
3450
|
+
Object.keys(map2).forEach(function(style) {
|
|
3451
|
+
map2[style].forEach(function(alias) {
|
|
3433
3452
|
result[String(alias)] = style;
|
|
3434
3453
|
});
|
|
3435
3454
|
});
|
|
3455
|
+
}
|
|
3436
3456
|
return result;
|
|
3437
3457
|
}
|
|
3438
|
-
function
|
|
3458
|
+
function Type2(tag, options) {
|
|
3439
3459
|
options = options || {};
|
|
3440
3460
|
Object.keys(options).forEach(function(name) {
|
|
3441
|
-
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1)
|
|
3442
|
-
throw new
|
|
3461
|
+
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
|
|
3462
|
+
throw new YAMLException2('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
|
|
3463
|
+
}
|
|
3443
3464
|
});
|
|
3444
3465
|
this.options = options;
|
|
3445
3466
|
this.tag = tag;
|
|
@@ -3457,21 +3478,29 @@ var require_type = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3457
3478
|
this.defaultStyle = options["defaultStyle"] || null;
|
|
3458
3479
|
this.multi = options["multi"] || false;
|
|
3459
3480
|
this.styleAliases = compileStyleAliases(options["styleAliases"] || null);
|
|
3460
|
-
if (YAML_NODE_KINDS.indexOf(this.kind) === -1)
|
|
3461
|
-
throw new
|
|
3481
|
+
if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
|
|
3482
|
+
throw new YAMLException2('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
|
|
3483
|
+
}
|
|
3462
3484
|
}
|
|
3463
|
-
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3485
|
+
type = Type2;
|
|
3486
|
+
return type;
|
|
3487
|
+
}
|
|
3488
|
+
var schema;
|
|
3489
|
+
var hasRequiredSchema;
|
|
3490
|
+
function requireSchema() {
|
|
3491
|
+
if (hasRequiredSchema)
|
|
3492
|
+
return schema;
|
|
3493
|
+
hasRequiredSchema = 1;
|
|
3494
|
+
const YAMLException2 = requireException();
|
|
3495
|
+
const Type2 = requireType();
|
|
3496
|
+
function compileList(schema2, name) {
|
|
3469
3497
|
const result = [];
|
|
3470
|
-
|
|
3498
|
+
schema2[name].forEach(function(currentType) {
|
|
3471
3499
|
let newIndex = result.length;
|
|
3472
3500
|
result.forEach(function(previousType, previousIndex) {
|
|
3473
|
-
if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi)
|
|
3501
|
+
if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
|
|
3474
3502
|
newIndex = previousIndex;
|
|
3503
|
+
}
|
|
3475
3504
|
});
|
|
3476
3505
|
result[newIndex] = currentType;
|
|
3477
3506
|
});
|
|
@@ -3490,47 +3519,54 @@ var require_schema = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3490
3519
|
fallback: []
|
|
3491
3520
|
}
|
|
3492
3521
|
};
|
|
3493
|
-
function collectType(
|
|
3494
|
-
if (
|
|
3495
|
-
result.multi[
|
|
3496
|
-
result.multi["fallback"].push(
|
|
3497
|
-
} else
|
|
3498
|
-
result[
|
|
3522
|
+
function collectType(type2) {
|
|
3523
|
+
if (type2.multi) {
|
|
3524
|
+
result.multi[type2.kind].push(type2);
|
|
3525
|
+
result.multi["fallback"].push(type2);
|
|
3526
|
+
} else {
|
|
3527
|
+
result[type2.kind][type2.tag] = result["fallback"][type2.tag] = type2;
|
|
3528
|
+
}
|
|
3499
3529
|
}
|
|
3500
|
-
for (let index = 0, length = arguments.length;index < length; index += 1)
|
|
3530
|
+
for (let index = 0, length = arguments.length;index < length; index += 1) {
|
|
3501
3531
|
arguments[index].forEach(collectType);
|
|
3532
|
+
}
|
|
3502
3533
|
return result;
|
|
3503
3534
|
}
|
|
3504
|
-
function
|
|
3535
|
+
function Schema2(definition) {
|
|
3505
3536
|
return this.extend(definition);
|
|
3506
3537
|
}
|
|
3507
|
-
|
|
3538
|
+
Schema2.prototype.extend = function extend(definition) {
|
|
3508
3539
|
let implicit = [];
|
|
3509
3540
|
let explicit = [];
|
|
3510
|
-
if (definition instanceof
|
|
3541
|
+
if (definition instanceof Type2) {
|
|
3511
3542
|
explicit.push(definition);
|
|
3512
|
-
else if (Array.isArray(definition))
|
|
3543
|
+
} else if (Array.isArray(definition)) {
|
|
3513
3544
|
explicit = explicit.concat(definition);
|
|
3514
|
-
else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
|
|
3545
|
+
} else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
|
|
3515
3546
|
if (definition.implicit)
|
|
3516
3547
|
implicit = implicit.concat(definition.implicit);
|
|
3517
3548
|
if (definition.explicit)
|
|
3518
3549
|
explicit = explicit.concat(definition.explicit);
|
|
3519
|
-
} else
|
|
3520
|
-
throw new
|
|
3521
|
-
|
|
3522
|
-
|
|
3523
|
-
|
|
3524
|
-
|
|
3525
|
-
|
|
3526
|
-
if (
|
|
3527
|
-
throw new
|
|
3550
|
+
} else {
|
|
3551
|
+
throw new YAMLException2("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
3552
|
+
}
|
|
3553
|
+
implicit.forEach(function(type2) {
|
|
3554
|
+
if (!(type2 instanceof Type2)) {
|
|
3555
|
+
throw new YAMLException2("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
3556
|
+
}
|
|
3557
|
+
if (type2.loadKind && type2.loadKind !== "scalar") {
|
|
3558
|
+
throw new YAMLException2("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
3559
|
+
}
|
|
3560
|
+
if (type2.multi) {
|
|
3561
|
+
throw new YAMLException2("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
3562
|
+
}
|
|
3528
3563
|
});
|
|
3529
|
-
explicit.forEach(function(
|
|
3530
|
-
if (!(
|
|
3531
|
-
throw new
|
|
3564
|
+
explicit.forEach(function(type2) {
|
|
3565
|
+
if (!(type2 instanceof Type2)) {
|
|
3566
|
+
throw new YAMLException2("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
3567
|
+
}
|
|
3532
3568
|
});
|
|
3533
|
-
const result = Object.create(
|
|
3569
|
+
const result = Object.create(Schema2.prototype);
|
|
3534
3570
|
result.implicit = (this.implicit || []).concat(implicit);
|
|
3535
3571
|
result.explicit = (this.explicit || []).concat(explicit);
|
|
3536
3572
|
result.compiledImplicit = compileList(result, "implicit");
|
|
@@ -3538,41 +3574,77 @@ var require_schema = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3538
3574
|
result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
|
|
3539
3575
|
return result;
|
|
3540
3576
|
};
|
|
3541
|
-
|
|
3542
|
-
|
|
3543
|
-
|
|
3544
|
-
|
|
3577
|
+
schema = Schema2;
|
|
3578
|
+
return schema;
|
|
3579
|
+
}
|
|
3580
|
+
var str;
|
|
3581
|
+
var hasRequiredStr;
|
|
3582
|
+
function requireStr() {
|
|
3583
|
+
if (hasRequiredStr)
|
|
3584
|
+
return str;
|
|
3585
|
+
hasRequiredStr = 1;
|
|
3586
|
+
const Type2 = requireType();
|
|
3587
|
+
str = new Type2("tag:yaml.org,2002:str", {
|
|
3545
3588
|
kind: "scalar",
|
|
3546
3589
|
construct: function(data) {
|
|
3547
3590
|
return data !== null ? data : "";
|
|
3548
3591
|
}
|
|
3549
3592
|
});
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3593
|
+
return str;
|
|
3594
|
+
}
|
|
3595
|
+
var seq;
|
|
3596
|
+
var hasRequiredSeq;
|
|
3597
|
+
function requireSeq() {
|
|
3598
|
+
if (hasRequiredSeq)
|
|
3599
|
+
return seq;
|
|
3600
|
+
hasRequiredSeq = 1;
|
|
3601
|
+
const Type2 = requireType();
|
|
3602
|
+
seq = new Type2("tag:yaml.org,2002:seq", {
|
|
3553
3603
|
kind: "sequence",
|
|
3554
3604
|
construct: function(data) {
|
|
3555
3605
|
return data !== null ? data : [];
|
|
3556
3606
|
}
|
|
3557
3607
|
});
|
|
3558
|
-
|
|
3559
|
-
|
|
3560
|
-
|
|
3608
|
+
return seq;
|
|
3609
|
+
}
|
|
3610
|
+
var map;
|
|
3611
|
+
var hasRequiredMap;
|
|
3612
|
+
function requireMap() {
|
|
3613
|
+
if (hasRequiredMap)
|
|
3614
|
+
return map;
|
|
3615
|
+
hasRequiredMap = 1;
|
|
3616
|
+
const Type2 = requireType();
|
|
3617
|
+
map = new Type2("tag:yaml.org,2002:map", {
|
|
3561
3618
|
kind: "mapping",
|
|
3562
3619
|
construct: function(data) {
|
|
3563
3620
|
return data !== null ? data : {};
|
|
3564
3621
|
}
|
|
3565
3622
|
});
|
|
3566
|
-
|
|
3567
|
-
|
|
3568
|
-
|
|
3569
|
-
|
|
3570
|
-
|
|
3571
|
-
|
|
3572
|
-
|
|
3573
|
-
|
|
3574
|
-
|
|
3575
|
-
|
|
3623
|
+
return map;
|
|
3624
|
+
}
|
|
3625
|
+
var failsafe;
|
|
3626
|
+
var hasRequiredFailsafe;
|
|
3627
|
+
function requireFailsafe() {
|
|
3628
|
+
if (hasRequiredFailsafe)
|
|
3629
|
+
return failsafe;
|
|
3630
|
+
hasRequiredFailsafe = 1;
|
|
3631
|
+
const Schema2 = requireSchema();
|
|
3632
|
+
failsafe = new Schema2({
|
|
3633
|
+
explicit: [
|
|
3634
|
+
requireStr(),
|
|
3635
|
+
requireSeq(),
|
|
3636
|
+
requireMap()
|
|
3637
|
+
]
|
|
3638
|
+
});
|
|
3639
|
+
return failsafe;
|
|
3640
|
+
}
|
|
3641
|
+
var _null;
|
|
3642
|
+
var hasRequired_null;
|
|
3643
|
+
function require_null() {
|
|
3644
|
+
if (hasRequired_null)
|
|
3645
|
+
return _null;
|
|
3646
|
+
hasRequired_null = 1;
|
|
3647
|
+
const Type2 = requireType();
|
|
3576
3648
|
function resolveYamlNull(data) {
|
|
3577
3649
|
if (data === null)
|
|
3578
3650
|
return true;
|
|
@@ -3585,7 +3657,7 @@ var require_null = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3585
3657
|
function isNull(object) {
|
|
3586
3658
|
return object === null;
|
|
3587
3659
|
}
|
|
3588
|
-
|
|
3660
|
+
_null = new Type2("tag:yaml.org,2002:null", {
|
|
3589
3661
|
kind: "scalar",
|
|
3590
3662
|
resolve: resolveYamlNull,
|
|
3591
3663
|
construct: constructYamlNull,
|
|
@@ -3609,9 +3681,15 @@ var require_null = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3609
3681
|
},
|
|
3610
3682
|
defaultStyle: "lowercase"
|
|
3611
3683
|
});
|
|
3612
|
-
|
|
3613
|
-
|
|
3614
|
-
|
|
3684
|
+
return _null;
|
|
3685
|
+
}
|
|
3686
|
+
var bool;
|
|
3687
|
+
var hasRequiredBool;
|
|
3688
|
+
function requireBool() {
|
|
3689
|
+
if (hasRequiredBool)
|
|
3690
|
+
return bool;
|
|
3691
|
+
hasRequiredBool = 1;
|
|
3692
|
+
const Type2 = requireType();
|
|
3615
3693
|
function resolveYamlBoolean(data) {
|
|
3616
3694
|
if (data === null)
|
|
3617
3695
|
return false;
|
|
@@ -3624,7 +3702,7 @@ var require_bool = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3624
3702
|
function isBoolean(object) {
|
|
3625
3703
|
return Object.prototype.toString.call(object) === "[object Boolean]";
|
|
3626
3704
|
}
|
|
3627
|
-
|
|
3705
|
+
bool = new Type2("tag:yaml.org,2002:bool", {
|
|
3628
3706
|
kind: "scalar",
|
|
3629
3707
|
resolve: resolveYamlBoolean,
|
|
3630
3708
|
construct: constructYamlBoolean,
|
|
@@ -3642,10 +3720,16 @@ var require_bool = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3642
3720
|
},
|
|
3643
3721
|
defaultStyle: "lowercase"
|
|
3644
3722
|
});
|
|
3645
|
-
|
|
3646
|
-
|
|
3647
|
-
|
|
3648
|
-
|
|
3723
|
+
return bool;
|
|
3724
|
+
}
|
|
3725
|
+
var int;
|
|
3726
|
+
var hasRequiredInt;
|
|
3727
|
+
function requireInt() {
|
|
3728
|
+
if (hasRequiredInt)
|
|
3729
|
+
return int;
|
|
3730
|
+
hasRequiredInt = 1;
|
|
3731
|
+
const common2 = requireCommon();
|
|
3732
|
+
const Type2 = requireType();
|
|
3649
3733
|
function isHexCode(c) {
|
|
3650
3734
|
return c >= 48 && c <= 57 || c >= 65 && c <= 70 || c >= 97 && c <= 102;
|
|
3651
3735
|
}
|
|
@@ -3664,8 +3748,9 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3664
3748
|
if (!max)
|
|
3665
3749
|
return false;
|
|
3666
3750
|
let ch = data[index];
|
|
3667
|
-
if (ch === "-" || ch === "+")
|
|
3751
|
+
if (ch === "-" || ch === "+") {
|
|
3668
3752
|
ch = data[++index];
|
|
3753
|
+
}
|
|
3669
3754
|
if (ch === "0") {
|
|
3670
3755
|
if (index + 1 === max)
|
|
3671
3756
|
return true;
|
|
@@ -3678,7 +3763,7 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3678
3763
|
return false;
|
|
3679
3764
|
hasDigits = true;
|
|
3680
3765
|
}
|
|
3681
|
-
return hasDigits &&
|
|
3766
|
+
return hasDigits && isFinite(parseYamlInteger(data));
|
|
3682
3767
|
}
|
|
3683
3768
|
if (ch === "x") {
|
|
3684
3769
|
index++;
|
|
@@ -3687,7 +3772,7 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3687
3772
|
return false;
|
|
3688
3773
|
hasDigits = true;
|
|
3689
3774
|
}
|
|
3690
|
-
return hasDigits &&
|
|
3775
|
+
return hasDigits && isFinite(parseYamlInteger(data));
|
|
3691
3776
|
}
|
|
3692
3777
|
if (ch === "o") {
|
|
3693
3778
|
index++;
|
|
@@ -3696,17 +3781,18 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3696
3781
|
return false;
|
|
3697
3782
|
hasDigits = true;
|
|
3698
3783
|
}
|
|
3699
|
-
return hasDigits &&
|
|
3784
|
+
return hasDigits && isFinite(parseYamlInteger(data));
|
|
3700
3785
|
}
|
|
3701
3786
|
}
|
|
3702
3787
|
for (;index < max; index++) {
|
|
3703
|
-
if (!isDecCode(data.charCodeAt(index)))
|
|
3788
|
+
if (!isDecCode(data.charCodeAt(index))) {
|
|
3704
3789
|
return false;
|
|
3790
|
+
}
|
|
3705
3791
|
hasDigits = true;
|
|
3706
3792
|
}
|
|
3707
3793
|
if (!hasDigits)
|
|
3708
3794
|
return false;
|
|
3709
|
-
return
|
|
3795
|
+
return isFinite(parseYamlInteger(data));
|
|
3710
3796
|
}
|
|
3711
3797
|
function parseYamlInteger(data) {
|
|
3712
3798
|
let value = data;
|
|
@@ -3734,9 +3820,9 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3734
3820
|
return parseYamlInteger(data);
|
|
3735
3821
|
}
|
|
3736
3822
|
function isInteger(object) {
|
|
3737
|
-
return Object.prototype.toString.call(object) === "[object Number]" && object % 1 === 0 && !
|
|
3823
|
+
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common2.isNegativeZero(object));
|
|
3738
3824
|
}
|
|
3739
|
-
|
|
3825
|
+
int = new Type2("tag:yaml.org,2002:int", {
|
|
3740
3826
|
kind: "scalar",
|
|
3741
3827
|
resolve: resolveYamlInteger,
|
|
3742
3828
|
construct: constructYamlInteger,
|
|
@@ -3763,35 +3849,45 @@ var require_int = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3763
3849
|
hexadecimal: [16, "hex"]
|
|
3764
3850
|
}
|
|
3765
3851
|
});
|
|
3766
|
-
|
|
3767
|
-
|
|
3768
|
-
|
|
3769
|
-
|
|
3770
|
-
|
|
3771
|
-
|
|
3852
|
+
return int;
|
|
3853
|
+
}
|
|
3854
|
+
var float;
|
|
3855
|
+
var hasRequiredFloat;
|
|
3856
|
+
function requireFloat() {
|
|
3857
|
+
if (hasRequiredFloat)
|
|
3858
|
+
return float;
|
|
3859
|
+
hasRequiredFloat = 1;
|
|
3860
|
+
const common2 = requireCommon();
|
|
3861
|
+
const Type2 = requireType();
|
|
3862
|
+
const YAML_FLOAT_PATTERN = new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
3863
|
+
const YAML_FLOAT_SPECIAL_PATTERN = new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");
|
|
3772
3864
|
function resolveYamlFloat(data) {
|
|
3773
3865
|
if (data === null)
|
|
3774
3866
|
return false;
|
|
3775
|
-
if (!YAML_FLOAT_PATTERN.test(data))
|
|
3867
|
+
if (!YAML_FLOAT_PATTERN.test(data)) {
|
|
3776
3868
|
return false;
|
|
3777
|
-
|
|
3869
|
+
}
|
|
3870
|
+
if (isFinite(parseFloat(data, 10))) {
|
|
3778
3871
|
return true;
|
|
3872
|
+
}
|
|
3779
3873
|
return YAML_FLOAT_SPECIAL_PATTERN.test(data);
|
|
3780
3874
|
}
|
|
3781
3875
|
function constructYamlFloat(data) {
|
|
3782
3876
|
let value = data.toLowerCase();
|
|
3783
3877
|
const sign = value[0] === "-" ? -1 : 1;
|
|
3784
|
-
if ("+-".indexOf(value[0]) >= 0)
|
|
3878
|
+
if ("+-".indexOf(value[0]) >= 0) {
|
|
3785
3879
|
value = value.slice(1);
|
|
3786
|
-
|
|
3880
|
+
}
|
|
3881
|
+
if (value === ".inf") {
|
|
3787
3882
|
return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
3788
|
-
else if (value === ".nan")
|
|
3883
|
+
} else if (value === ".nan") {
|
|
3789
3884
|
return NaN;
|
|
3885
|
+
}
|
|
3790
3886
|
return sign * parseFloat(value, 10);
|
|
3791
3887
|
}
|
|
3792
|
-
|
|
3888
|
+
const SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
|
|
3793
3889
|
function representYamlFloat(object, style) {
|
|
3794
|
-
if (isNaN(object))
|
|
3890
|
+
if (isNaN(object)) {
|
|
3795
3891
|
switch (style) {
|
|
3796
3892
|
case "lowercase":
|
|
3797
3893
|
return ".nan";
|
|
@@ -3800,7 +3896,7 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3800
3896
|
case "camelcase":
|
|
3801
3897
|
return ".NaN";
|
|
3802
3898
|
}
|
|
3803
|
-
else if (Number.POSITIVE_INFINITY === object)
|
|
3899
|
+
} else if (Number.POSITIVE_INFINITY === object) {
|
|
3804
3900
|
switch (style) {
|
|
3805
3901
|
case "lowercase":
|
|
3806
3902
|
return ".inf";
|
|
@@ -3809,7 +3905,7 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3809
3905
|
case "camelcase":
|
|
3810
3906
|
return ".Inf";
|
|
3811
3907
|
}
|
|
3812
|
-
else if (Number.NEGATIVE_INFINITY === object)
|
|
3908
|
+
} else if (Number.NEGATIVE_INFINITY === object) {
|
|
3813
3909
|
switch (style) {
|
|
3814
3910
|
case "lowercase":
|
|
3815
3911
|
return "-.inf";
|
|
@@ -3818,15 +3914,16 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3818
3914
|
case "camelcase":
|
|
3819
3915
|
return "-.Inf";
|
|
3820
3916
|
}
|
|
3821
|
-
else if (
|
|
3917
|
+
} else if (common2.isNegativeZero(object)) {
|
|
3822
3918
|
return "-0.0";
|
|
3919
|
+
}
|
|
3823
3920
|
const res = object.toString(10);
|
|
3824
3921
|
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
|
|
3825
3922
|
}
|
|
3826
3923
|
function isFloat(object) {
|
|
3827
|
-
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 ||
|
|
3924
|
+
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common2.isNegativeZero(object));
|
|
3828
3925
|
}
|
|
3829
|
-
|
|
3926
|
+
float = new Type2("tag:yaml.org,2002:float", {
|
|
3830
3927
|
kind: "scalar",
|
|
3831
3928
|
resolve: resolveYamlFloat,
|
|
3832
3929
|
construct: constructYamlFloat,
|
|
@@ -3834,22 +3931,42 @@ var require_float = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3834
3931
|
represent: representYamlFloat,
|
|
3835
3932
|
defaultStyle: "lowercase"
|
|
3836
3933
|
});
|
|
3837
|
-
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
|
|
3845
|
-
|
|
3846
|
-
|
|
3847
|
-
|
|
3848
|
-
|
|
3849
|
-
|
|
3850
|
-
|
|
3851
|
-
|
|
3852
|
-
|
|
3934
|
+
return float;
|
|
3935
|
+
}
|
|
3936
|
+
var json;
|
|
3937
|
+
var hasRequiredJson;
|
|
3938
|
+
function requireJson() {
|
|
3939
|
+
if (hasRequiredJson)
|
|
3940
|
+
return json;
|
|
3941
|
+
hasRequiredJson = 1;
|
|
3942
|
+
json = requireFailsafe().extend({
|
|
3943
|
+
implicit: [
|
|
3944
|
+
require_null(),
|
|
3945
|
+
requireBool(),
|
|
3946
|
+
requireInt(),
|
|
3947
|
+
requireFloat()
|
|
3948
|
+
]
|
|
3949
|
+
});
|
|
3950
|
+
return json;
|
|
3951
|
+
}
|
|
3952
|
+
var core;
|
|
3953
|
+
var hasRequiredCore;
|
|
3954
|
+
function requireCore() {
|
|
3955
|
+
if (hasRequiredCore)
|
|
3956
|
+
return core;
|
|
3957
|
+
hasRequiredCore = 1;
|
|
3958
|
+
core = requireJson();
|
|
3959
|
+
return core;
|
|
3960
|
+
}
|
|
3961
|
+
var timestamp;
|
|
3962
|
+
var hasRequiredTimestamp;
|
|
3963
|
+
function requireTimestamp() {
|
|
3964
|
+
if (hasRequiredTimestamp)
|
|
3965
|
+
return timestamp;
|
|
3966
|
+
hasRequiredTimestamp = 1;
|
|
3967
|
+
const Type2 = requireType();
|
|
3968
|
+
const YAML_DATE_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$");
|
|
3969
|
+
const YAML_TIMESTAMP_REGEXP = new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");
|
|
3853
3970
|
function resolveYamlTimestamp(data) {
|
|
3854
3971
|
if (data === null)
|
|
3855
3972
|
return false;
|
|
@@ -3870,15 +3987,17 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3870
3987
|
const year = +match[1];
|
|
3871
3988
|
const month = +match[2] - 1;
|
|
3872
3989
|
const day = +match[3];
|
|
3873
|
-
if (!match[4])
|
|
3990
|
+
if (!match[4]) {
|
|
3874
3991
|
return new Date(Date.UTC(year, month, day));
|
|
3992
|
+
}
|
|
3875
3993
|
const hour = +match[4];
|
|
3876
3994
|
const minute = +match[5];
|
|
3877
3995
|
const second = +match[6];
|
|
3878
3996
|
if (match[7]) {
|
|
3879
3997
|
fraction = match[7].slice(0, 3);
|
|
3880
|
-
while (fraction.length < 3)
|
|
3998
|
+
while (fraction.length < 3) {
|
|
3881
3999
|
fraction += "0";
|
|
4000
|
+
}
|
|
3882
4001
|
fraction = +fraction;
|
|
3883
4002
|
}
|
|
3884
4003
|
if (match[9]) {
|
|
@@ -3896,36 +4015,48 @@ var require_timestamp = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3896
4015
|
function representYamlTimestamp(object) {
|
|
3897
4016
|
return object.toISOString();
|
|
3898
4017
|
}
|
|
3899
|
-
|
|
4018
|
+
timestamp = new Type2("tag:yaml.org,2002:timestamp", {
|
|
3900
4019
|
kind: "scalar",
|
|
3901
4020
|
resolve: resolveYamlTimestamp,
|
|
3902
4021
|
construct: constructYamlTimestamp,
|
|
3903
4022
|
instanceOf: Date,
|
|
3904
4023
|
represent: representYamlTimestamp
|
|
3905
4024
|
});
|
|
3906
|
-
|
|
3907
|
-
|
|
3908
|
-
|
|
4025
|
+
return timestamp;
|
|
4026
|
+
}
|
|
4027
|
+
var merge;
|
|
4028
|
+
var hasRequiredMerge;
|
|
4029
|
+
function requireMerge() {
|
|
4030
|
+
if (hasRequiredMerge)
|
|
4031
|
+
return merge;
|
|
4032
|
+
hasRequiredMerge = 1;
|
|
4033
|
+
const Type2 = requireType();
|
|
3909
4034
|
function resolveYamlMerge(data) {
|
|
3910
4035
|
return data === "<<" || data === null;
|
|
3911
4036
|
}
|
|
3912
|
-
|
|
4037
|
+
merge = new Type2("tag:yaml.org,2002:merge", {
|
|
3913
4038
|
kind: "scalar",
|
|
3914
4039
|
resolve: resolveYamlMerge
|
|
3915
4040
|
});
|
|
3916
|
-
|
|
3917
|
-
|
|
3918
|
-
|
|
3919
|
-
|
|
4041
|
+
return merge;
|
|
4042
|
+
}
|
|
4043
|
+
var binary;
|
|
4044
|
+
var hasRequiredBinary;
|
|
4045
|
+
function requireBinary() {
|
|
4046
|
+
if (hasRequiredBinary)
|
|
4047
|
+
return binary;
|
|
4048
|
+
hasRequiredBinary = 1;
|
|
4049
|
+
const Type2 = requireType();
|
|
4050
|
+
const BASE64_MAP = `ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
3920
4051
|
\r`;
|
|
3921
4052
|
function resolveYamlBinary(data) {
|
|
3922
4053
|
if (data === null)
|
|
3923
4054
|
return false;
|
|
3924
4055
|
let bitlen = 0;
|
|
3925
4056
|
const max = data.length;
|
|
3926
|
-
const
|
|
4057
|
+
const map2 = BASE64_MAP;
|
|
3927
4058
|
for (let idx = 0;idx < max; idx++) {
|
|
3928
|
-
const code =
|
|
4059
|
+
const code = map2.indexOf(data.charAt(idx));
|
|
3929
4060
|
if (code > 64)
|
|
3930
4061
|
continue;
|
|
3931
4062
|
if (code < 0)
|
|
@@ -3937,7 +4068,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3937
4068
|
function constructYamlBinary(data) {
|
|
3938
4069
|
const input = data.replace(/[\r\n=]/g, "");
|
|
3939
4070
|
const max = input.length;
|
|
3940
|
-
const
|
|
4071
|
+
const map2 = BASE64_MAP;
|
|
3941
4072
|
let bits = 0;
|
|
3942
4073
|
const result = [];
|
|
3943
4074
|
for (let idx = 0;idx < max; idx++) {
|
|
@@ -3946,7 +4077,7 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3946
4077
|
result.push(bits >> 8 & 255);
|
|
3947
4078
|
result.push(bits & 255);
|
|
3948
4079
|
}
|
|
3949
|
-
bits = bits << 6 |
|
|
4080
|
+
bits = bits << 6 | map2.indexOf(input.charAt(idx));
|
|
3950
4081
|
}
|
|
3951
4082
|
const tailbits = max % 4 * 6;
|
|
3952
4083
|
if (tailbits === 0) {
|
|
@@ -3956,58 +4087,65 @@ var require_binary = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
3956
4087
|
} else if (tailbits === 18) {
|
|
3957
4088
|
result.push(bits >> 10 & 255);
|
|
3958
4089
|
result.push(bits >> 2 & 255);
|
|
3959
|
-
} else if (tailbits === 12)
|
|
4090
|
+
} else if (tailbits === 12) {
|
|
3960
4091
|
result.push(bits >> 4 & 255);
|
|
4092
|
+
}
|
|
3961
4093
|
return new Uint8Array(result);
|
|
3962
4094
|
}
|
|
3963
4095
|
function representYamlBinary(object) {
|
|
3964
4096
|
let result = "";
|
|
3965
4097
|
let bits = 0;
|
|
3966
4098
|
const max = object.length;
|
|
3967
|
-
const
|
|
4099
|
+
const map2 = BASE64_MAP;
|
|
3968
4100
|
for (let idx = 0;idx < max; idx++) {
|
|
3969
4101
|
if (idx % 3 === 0 && idx) {
|
|
3970
|
-
result +=
|
|
3971
|
-
result +=
|
|
3972
|
-
result +=
|
|
3973
|
-
result +=
|
|
4102
|
+
result += map2[bits >> 18 & 63];
|
|
4103
|
+
result += map2[bits >> 12 & 63];
|
|
4104
|
+
result += map2[bits >> 6 & 63];
|
|
4105
|
+
result += map2[bits & 63];
|
|
3974
4106
|
}
|
|
3975
4107
|
bits = (bits << 8) + object[idx];
|
|
3976
4108
|
}
|
|
3977
4109
|
const tail = max % 3;
|
|
3978
4110
|
if (tail === 0) {
|
|
3979
|
-
result +=
|
|
3980
|
-
result +=
|
|
3981
|
-
result +=
|
|
3982
|
-
result +=
|
|
4111
|
+
result += map2[bits >> 18 & 63];
|
|
4112
|
+
result += map2[bits >> 12 & 63];
|
|
4113
|
+
result += map2[bits >> 6 & 63];
|
|
4114
|
+
result += map2[bits & 63];
|
|
3983
4115
|
} else if (tail === 2) {
|
|
3984
|
-
result +=
|
|
3985
|
-
result +=
|
|
3986
|
-
result +=
|
|
3987
|
-
result +=
|
|
4116
|
+
result += map2[bits >> 10 & 63];
|
|
4117
|
+
result += map2[bits >> 4 & 63];
|
|
4118
|
+
result += map2[bits << 2 & 63];
|
|
4119
|
+
result += map2[64];
|
|
3988
4120
|
} else if (tail === 1) {
|
|
3989
|
-
result +=
|
|
3990
|
-
result +=
|
|
3991
|
-
result +=
|
|
3992
|
-
result +=
|
|
4121
|
+
result += map2[bits >> 2 & 63];
|
|
4122
|
+
result += map2[bits << 4 & 63];
|
|
4123
|
+
result += map2[64];
|
|
4124
|
+
result += map2[64];
|
|
3993
4125
|
}
|
|
3994
4126
|
return result;
|
|
3995
4127
|
}
|
|
3996
4128
|
function isBinary(obj) {
|
|
3997
4129
|
return Object.prototype.toString.call(obj) === "[object Uint8Array]";
|
|
3998
4130
|
}
|
|
3999
|
-
|
|
4131
|
+
binary = new Type2("tag:yaml.org,2002:binary", {
|
|
4000
4132
|
kind: "scalar",
|
|
4001
4133
|
resolve: resolveYamlBinary,
|
|
4002
4134
|
construct: constructYamlBinary,
|
|
4003
4135
|
predicate: isBinary,
|
|
4004
4136
|
represent: representYamlBinary
|
|
4005
4137
|
});
|
|
4006
|
-
|
|
4007
|
-
|
|
4008
|
-
|
|
4009
|
-
|
|
4010
|
-
|
|
4138
|
+
return binary;
|
|
4139
|
+
}
|
|
4140
|
+
var omap;
|
|
4141
|
+
var hasRequiredOmap;
|
|
4142
|
+
function requireOmap() {
|
|
4143
|
+
if (hasRequiredOmap)
|
|
4144
|
+
return omap;
|
|
4145
|
+
hasRequiredOmap = 1;
|
|
4146
|
+
const Type2 = requireType();
|
|
4147
|
+
const _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4148
|
+
const _toString = Object.prototype.toString;
|
|
4011
4149
|
function resolveYamlOmap(data) {
|
|
4012
4150
|
if (data === null)
|
|
4013
4151
|
return true;
|
|
@@ -4019,12 +4157,14 @@ var require_omap = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4019
4157
|
if (_toString.call(pair) !== "[object Object]")
|
|
4020
4158
|
return false;
|
|
4021
4159
|
let pairKey;
|
|
4022
|
-
for (pairKey in pair)
|
|
4023
|
-
if (_hasOwnProperty.call(pair, pairKey))
|
|
4160
|
+
for (pairKey in pair) {
|
|
4161
|
+
if (_hasOwnProperty.call(pair, pairKey)) {
|
|
4024
4162
|
if (!pairHasKey)
|
|
4025
4163
|
pairHasKey = true;
|
|
4026
4164
|
else
|
|
4027
4165
|
return false;
|
|
4166
|
+
}
|
|
4167
|
+
}
|
|
4028
4168
|
if (!pairHasKey)
|
|
4029
4169
|
return false;
|
|
4030
4170
|
if (objectKeys.indexOf(pairKey) === -1)
|
|
@@ -4037,15 +4177,21 @@ var require_omap = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4037
4177
|
function constructYamlOmap(data) {
|
|
4038
4178
|
return data !== null ? data : [];
|
|
4039
4179
|
}
|
|
4040
|
-
|
|
4180
|
+
omap = new Type2("tag:yaml.org,2002:omap", {
|
|
4041
4181
|
kind: "sequence",
|
|
4042
4182
|
resolve: resolveYamlOmap,
|
|
4043
4183
|
construct: constructYamlOmap
|
|
4044
4184
|
});
|
|
4045
|
-
|
|
4046
|
-
|
|
4047
|
-
|
|
4048
|
-
|
|
4185
|
+
return omap;
|
|
4186
|
+
}
|
|
4187
|
+
var pairs;
|
|
4188
|
+
var hasRequiredPairs;
|
|
4189
|
+
function requirePairs() {
|
|
4190
|
+
if (hasRequiredPairs)
|
|
4191
|
+
return pairs;
|
|
4192
|
+
hasRequiredPairs = 1;
|
|
4193
|
+
const Type2 = requireType();
|
|
4194
|
+
const _toString = Object.prototype.toString;
|
|
4049
4195
|
function resolveYamlPairs(data) {
|
|
4050
4196
|
if (data === null)
|
|
4051
4197
|
return true;
|
|
@@ -4074,64 +4220,85 @@ var require_pairs = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4074
4220
|
}
|
|
4075
4221
|
return result;
|
|
4076
4222
|
}
|
|
4077
|
-
|
|
4223
|
+
pairs = new Type2("tag:yaml.org,2002:pairs", {
|
|
4078
4224
|
kind: "sequence",
|
|
4079
4225
|
resolve: resolveYamlPairs,
|
|
4080
4226
|
construct: constructYamlPairs
|
|
4081
4227
|
});
|
|
4082
|
-
|
|
4083
|
-
|
|
4084
|
-
|
|
4085
|
-
|
|
4228
|
+
return pairs;
|
|
4229
|
+
}
|
|
4230
|
+
var set;
|
|
4231
|
+
var hasRequiredSet;
|
|
4232
|
+
function requireSet() {
|
|
4233
|
+
if (hasRequiredSet)
|
|
4234
|
+
return set;
|
|
4235
|
+
hasRequiredSet = 1;
|
|
4236
|
+
const Type2 = requireType();
|
|
4237
|
+
const _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4086
4238
|
function resolveYamlSet(data) {
|
|
4087
4239
|
if (data === null)
|
|
4088
4240
|
return true;
|
|
4089
4241
|
const object = data;
|
|
4090
|
-
for (const key in object)
|
|
4242
|
+
for (const key in object) {
|
|
4091
4243
|
if (_hasOwnProperty.call(object, key)) {
|
|
4092
4244
|
if (object[key] !== null)
|
|
4093
4245
|
return false;
|
|
4094
4246
|
}
|
|
4247
|
+
}
|
|
4095
4248
|
return true;
|
|
4096
4249
|
}
|
|
4097
4250
|
function constructYamlSet(data) {
|
|
4098
4251
|
return data !== null ? data : {};
|
|
4099
4252
|
}
|
|
4100
|
-
|
|
4253
|
+
set = new Type2("tag:yaml.org,2002:set", {
|
|
4101
4254
|
kind: "mapping",
|
|
4102
4255
|
resolve: resolveYamlSet,
|
|
4103
4256
|
construct: constructYamlSet
|
|
4104
4257
|
});
|
|
4105
|
-
|
|
4106
|
-
|
|
4107
|
-
|
|
4108
|
-
|
|
4258
|
+
return set;
|
|
4259
|
+
}
|
|
4260
|
+
var _default;
|
|
4261
|
+
var hasRequired_default;
|
|
4262
|
+
function require_default() {
|
|
4263
|
+
if (hasRequired_default)
|
|
4264
|
+
return _default;
|
|
4265
|
+
hasRequired_default = 1;
|
|
4266
|
+
_default = requireCore().extend({
|
|
4267
|
+
implicit: [
|
|
4268
|
+
requireTimestamp(),
|
|
4269
|
+
requireMerge()
|
|
4270
|
+
],
|
|
4109
4271
|
explicit: [
|
|
4110
|
-
|
|
4111
|
-
|
|
4112
|
-
|
|
4113
|
-
|
|
4272
|
+
requireBinary(),
|
|
4273
|
+
requireOmap(),
|
|
4274
|
+
requirePairs(),
|
|
4275
|
+
requireSet()
|
|
4114
4276
|
]
|
|
4115
4277
|
});
|
|
4116
|
-
|
|
4117
|
-
|
|
4118
|
-
|
|
4119
|
-
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
|
|
4126
|
-
|
|
4127
|
-
|
|
4128
|
-
|
|
4129
|
-
|
|
4130
|
-
|
|
4131
|
-
|
|
4132
|
-
|
|
4133
|
-
|
|
4134
|
-
|
|
4278
|
+
return _default;
|
|
4279
|
+
}
|
|
4280
|
+
var hasRequiredLoader;
|
|
4281
|
+
function requireLoader() {
|
|
4282
|
+
if (hasRequiredLoader)
|
|
4283
|
+
return loader;
|
|
4284
|
+
hasRequiredLoader = 1;
|
|
4285
|
+
const common2 = requireCommon();
|
|
4286
|
+
const YAMLException2 = requireException();
|
|
4287
|
+
const makeSnippet = requireSnippet();
|
|
4288
|
+
const DEFAULT_SCHEMA2 = require_default();
|
|
4289
|
+
const _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
4290
|
+
const CONTEXT_FLOW_IN = 1;
|
|
4291
|
+
const CONTEXT_FLOW_OUT = 2;
|
|
4292
|
+
const CONTEXT_BLOCK_IN = 3;
|
|
4293
|
+
const CONTEXT_BLOCK_OUT = 4;
|
|
4294
|
+
const CHOMPING_CLIP = 1;
|
|
4295
|
+
const CHOMPING_STRIP = 2;
|
|
4296
|
+
const CHOMPING_KEEP = 3;
|
|
4297
|
+
const PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
|
4298
|
+
const PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
|
|
4299
|
+
const PATTERN_FLOW_INDICATORS = /[,\[\]{}]/;
|
|
4300
|
+
const PATTERN_TAG_HANDLE = /^(?:!|!!|![0-9A-Za-z-]+!)$/;
|
|
4301
|
+
const PATTERN_TAG_URI = /^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;
|
|
4135
4302
|
function _class(obj) {
|
|
4136
4303
|
return Object.prototype.toString.call(obj);
|
|
4137
4304
|
}
|
|
@@ -4148,25 +4315,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4148
4315
|
return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
|
|
4149
4316
|
}
|
|
4150
4317
|
function fromHexCode(c) {
|
|
4151
|
-
if (c >= 48 && c <= 57)
|
|
4318
|
+
if (c >= 48 && c <= 57) {
|
|
4152
4319
|
return c - 48;
|
|
4320
|
+
}
|
|
4153
4321
|
const lc = c | 32;
|
|
4154
|
-
if (lc >= 97 && lc <= 102)
|
|
4322
|
+
if (lc >= 97 && lc <= 102) {
|
|
4155
4323
|
return lc - 97 + 10;
|
|
4324
|
+
}
|
|
4156
4325
|
return -1;
|
|
4157
4326
|
}
|
|
4158
4327
|
function escapedHexLen(c) {
|
|
4159
|
-
if (c === 120)
|
|
4328
|
+
if (c === 120) {
|
|
4160
4329
|
return 2;
|
|
4161
|
-
|
|
4330
|
+
}
|
|
4331
|
+
if (c === 117) {
|
|
4162
4332
|
return 4;
|
|
4163
|
-
|
|
4333
|
+
}
|
|
4334
|
+
if (c === 85) {
|
|
4164
4335
|
return 8;
|
|
4336
|
+
}
|
|
4165
4337
|
return 0;
|
|
4166
4338
|
}
|
|
4167
4339
|
function fromDecimalCode(c) {
|
|
4168
|
-
if (c >= 48 && c <= 57)
|
|
4340
|
+
if (c >= 48 && c <= 57) {
|
|
4169
4341
|
return c - 48;
|
|
4342
|
+
}
|
|
4170
4343
|
return -1;
|
|
4171
4344
|
}
|
|
4172
4345
|
function simpleEscapeSequence(c) {
|
|
@@ -4213,23 +4386,25 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4213
4386
|
}
|
|
4214
4387
|
}
|
|
4215
4388
|
function charFromCodepoint(c) {
|
|
4216
|
-
if (c <= 65535)
|
|
4389
|
+
if (c <= 65535) {
|
|
4217
4390
|
return String.fromCharCode(c);
|
|
4391
|
+
}
|
|
4218
4392
|
return String.fromCharCode((c - 65536 >> 10) + 55296, (c - 65536 & 1023) + 56320);
|
|
4219
4393
|
}
|
|
4220
4394
|
function setProperty(object, key, value) {
|
|
4221
|
-
if (key === "__proto__")
|
|
4395
|
+
if (key === "__proto__") {
|
|
4222
4396
|
Object.defineProperty(object, key, {
|
|
4223
4397
|
configurable: true,
|
|
4224
4398
|
enumerable: true,
|
|
4225
4399
|
writable: true,
|
|
4226
4400
|
value
|
|
4227
4401
|
});
|
|
4228
|
-
else
|
|
4402
|
+
} else {
|
|
4229
4403
|
object[key] = value;
|
|
4404
|
+
}
|
|
4230
4405
|
}
|
|
4231
|
-
|
|
4232
|
-
|
|
4406
|
+
const simpleEscapeCheck = new Array(256);
|
|
4407
|
+
const simpleEscapeMap = new Array(256);
|
|
4233
4408
|
for (let i = 0;i < 256; i++) {
|
|
4234
4409
|
simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
|
|
4235
4410
|
simpleEscapeMap[i] = simpleEscapeSequence(i);
|
|
@@ -4237,13 +4412,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4237
4412
|
function State(input, options) {
|
|
4238
4413
|
this.input = input;
|
|
4239
4414
|
this.filename = options["filename"] || null;
|
|
4240
|
-
this.schema = options["schema"] ||
|
|
4415
|
+
this.schema = options["schema"] || DEFAULT_SCHEMA2;
|
|
4241
4416
|
this.onWarning = options["onWarning"] || null;
|
|
4242
4417
|
this.legacy = options["legacy"] || false;
|
|
4243
4418
|
this.json = options["json"] || false;
|
|
4244
4419
|
this.listener = options["listener"] || null;
|
|
4245
4420
|
this.maxDepth = typeof options["maxDepth"] === "number" ? options["maxDepth"] : 100;
|
|
4246
|
-
this.
|
|
4421
|
+
this.maxTotalMergeKeys = typeof options["maxTotalMergeKeys"] === "number" ? options["maxTotalMergeKeys"] : 1e4;
|
|
4247
4422
|
this.implicitTypes = this.schema.compiledImplicit;
|
|
4248
4423
|
this.typeMap = this.schema.compiledTypeMap;
|
|
4249
4424
|
this.length = input.length;
|
|
@@ -4252,6 +4427,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4252
4427
|
this.lineStart = 0;
|
|
4253
4428
|
this.lineIndent = 0;
|
|
4254
4429
|
this.depth = 0;
|
|
4430
|
+
this.totalMergeKeys = 0;
|
|
4255
4431
|
this.firstTabInLine = -1;
|
|
4256
4432
|
this.documents = [];
|
|
4257
4433
|
this.anchorMapTransactions = [];
|
|
@@ -4265,29 +4441,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4265
4441
|
column: state.position - state.lineStart
|
|
4266
4442
|
};
|
|
4267
4443
|
mark.snippet = makeSnippet(mark);
|
|
4268
|
-
return new
|
|
4444
|
+
return new YAMLException2(message, mark);
|
|
4269
4445
|
}
|
|
4270
4446
|
function throwError(state, message) {
|
|
4271
4447
|
throw generateError(state, message);
|
|
4272
4448
|
}
|
|
4273
4449
|
function throwWarning(state, message) {
|
|
4274
|
-
if (state.onWarning)
|
|
4450
|
+
if (state.onWarning) {
|
|
4275
4451
|
state.onWarning.call(null, generateError(state, message));
|
|
4452
|
+
}
|
|
4276
4453
|
}
|
|
4277
4454
|
function storeAnchor(state, name, value) {
|
|
4278
4455
|
const transactions = state.anchorMapTransactions;
|
|
4279
4456
|
if (transactions.length !== 0) {
|
|
4280
4457
|
const transaction = transactions[transactions.length - 1];
|
|
4281
|
-
if (!_hasOwnProperty.call(transaction, name))
|
|
4458
|
+
if (!_hasOwnProperty.call(transaction, name)) {
|
|
4282
4459
|
transaction[name] = {
|
|
4283
4460
|
existed: _hasOwnProperty.call(state.anchorMap, name),
|
|
4284
4461
|
value: state.anchorMap[name]
|
|
4285
4462
|
};
|
|
4463
|
+
}
|
|
4286
4464
|
}
|
|
4287
4465
|
state.anchorMap[name] = value;
|
|
4288
4466
|
}
|
|
4289
4467
|
function beginAnchorTransaction(state) {
|
|
4290
|
-
state.anchorMapTransactions.push(Object.create(null));
|
|
4468
|
+
state.anchorMapTransactions.push(/* @__PURE__ */ Object.create(null));
|
|
4291
4469
|
}
|
|
4292
4470
|
function commitAnchorTransaction(state) {
|
|
4293
4471
|
const transaction = state.anchorMapTransactions.pop();
|
|
@@ -4298,8 +4476,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4298
4476
|
const names = Object.keys(transaction);
|
|
4299
4477
|
for (let index = 0, length = names.length;index < length; index += 1) {
|
|
4300
4478
|
const name = names[index];
|
|
4301
|
-
if (!_hasOwnProperty.call(parent, name))
|
|
4479
|
+
if (!_hasOwnProperty.call(parent, name)) {
|
|
4302
4480
|
parent[name] = transaction[name];
|
|
4481
|
+
}
|
|
4303
4482
|
}
|
|
4304
4483
|
}
|
|
4305
4484
|
function rollbackAnchorTransaction(state) {
|
|
@@ -4307,10 +4486,11 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4307
4486
|
const names = Object.keys(transaction);
|
|
4308
4487
|
for (let index = names.length - 1;index >= 0; index -= 1) {
|
|
4309
4488
|
const entry = transaction[names[index]];
|
|
4310
|
-
if (entry.existed)
|
|
4489
|
+
if (entry.existed) {
|
|
4311
4490
|
state.anchorMap[names[index]] = entry.value;
|
|
4312
|
-
else
|
|
4491
|
+
} else {
|
|
4313
4492
|
delete state.anchorMap[names[index]];
|
|
4493
|
+
}
|
|
4314
4494
|
}
|
|
4315
4495
|
}
|
|
4316
4496
|
function snapshotState(state) {
|
|
@@ -4337,36 +4517,45 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4337
4517
|
state.kind = snapshot.kind;
|
|
4338
4518
|
state.result = snapshot.result;
|
|
4339
4519
|
}
|
|
4340
|
-
|
|
4520
|
+
const directiveHandlers = {
|
|
4341
4521
|
YAML: function handleYamlDirective(state, name, args) {
|
|
4342
|
-
if (state.version !== null)
|
|
4522
|
+
if (state.version !== null) {
|
|
4343
4523
|
throwError(state, "duplication of %YAML directive");
|
|
4344
|
-
|
|
4524
|
+
}
|
|
4525
|
+
if (args.length !== 1) {
|
|
4345
4526
|
throwError(state, "YAML directive accepts exactly one argument");
|
|
4527
|
+
}
|
|
4346
4528
|
const match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
|
4347
|
-
if (match === null)
|
|
4529
|
+
if (match === null) {
|
|
4348
4530
|
throwError(state, "ill-formed argument of the YAML directive");
|
|
4531
|
+
}
|
|
4349
4532
|
const major = parseInt(match[1], 10);
|
|
4350
4533
|
const minor = parseInt(match[2], 10);
|
|
4351
|
-
if (major !== 1)
|
|
4534
|
+
if (major !== 1) {
|
|
4352
4535
|
throwError(state, "unacceptable YAML version of the document");
|
|
4536
|
+
}
|
|
4353
4537
|
state.version = args[0];
|
|
4354
4538
|
state.checkLineBreaks = minor < 2;
|
|
4355
|
-
if (minor !== 1 && minor !== 2)
|
|
4539
|
+
if (minor !== 1 && minor !== 2) {
|
|
4356
4540
|
throwWarning(state, "unsupported YAML version of the document");
|
|
4541
|
+
}
|
|
4357
4542
|
},
|
|
4358
4543
|
TAG: function handleTagDirective(state, name, args) {
|
|
4359
4544
|
let prefix;
|
|
4360
|
-
if (args.length !== 2)
|
|
4545
|
+
if (args.length !== 2) {
|
|
4361
4546
|
throwError(state, "TAG directive accepts exactly two arguments");
|
|
4547
|
+
}
|
|
4362
4548
|
const handle = args[0];
|
|
4363
4549
|
prefix = args[1];
|
|
4364
|
-
if (!PATTERN_TAG_HANDLE.test(handle))
|
|
4550
|
+
if (!PATTERN_TAG_HANDLE.test(handle)) {
|
|
4365
4551
|
throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
|
|
4366
|
-
|
|
4552
|
+
}
|
|
4553
|
+
if (_hasOwnProperty.call(state.tagMap, handle)) {
|
|
4367
4554
|
throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
|
|
4368
|
-
|
|
4555
|
+
}
|
|
4556
|
+
if (!PATTERN_TAG_URI.test(prefix)) {
|
|
4369
4557
|
throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
4558
|
+
}
|
|
4370
4559
|
try {
|
|
4371
4560
|
prefix = decodeURIComponent(prefix);
|
|
4372
4561
|
} catch (err) {
|
|
@@ -4378,23 +4567,29 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4378
4567
|
function captureSegment(state, start, end, checkJson) {
|
|
4379
4568
|
if (start < end) {
|
|
4380
4569
|
const _result = state.input.slice(start, end);
|
|
4381
|
-
if (checkJson)
|
|
4570
|
+
if (checkJson) {
|
|
4382
4571
|
for (let _position = 0, _length = _result.length;_position < _length; _position += 1) {
|
|
4383
4572
|
const _character = _result.charCodeAt(_position);
|
|
4384
|
-
if (!(_character === 9 || _character >= 32 && _character <= 1114111))
|
|
4573
|
+
if (!(_character === 9 || _character >= 32 && _character <= 1114111)) {
|
|
4385
4574
|
throwError(state, "expected valid JSON character");
|
|
4575
|
+
}
|
|
4386
4576
|
}
|
|
4387
|
-
else if (PATTERN_NON_PRINTABLE.test(_result))
|
|
4577
|
+
} else if (PATTERN_NON_PRINTABLE.test(_result)) {
|
|
4388
4578
|
throwError(state, "the stream contains non-printable characters");
|
|
4579
|
+
}
|
|
4389
4580
|
state.result += _result;
|
|
4390
4581
|
}
|
|
4391
4582
|
}
|
|
4392
4583
|
function mergeMappings(state, destination, source, overridableKeys) {
|
|
4393
|
-
if (!
|
|
4584
|
+
if (!common2.isObject(source)) {
|
|
4394
4585
|
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
4586
|
+
}
|
|
4395
4587
|
const sourceKeys = Object.keys(source);
|
|
4396
4588
|
for (let index = 0, quantity = sourceKeys.length;index < quantity; index += 1) {
|
|
4397
4589
|
const key = sourceKeys[index];
|
|
4590
|
+
if (state.maxTotalMergeKeys !== -1 && ++state.totalMergeKeys > state.maxTotalMergeKeys) {
|
|
4591
|
+
throwError(state, "merge keys exceeded maxTotalMergeKeys (" + state.maxTotalMergeKeys + ")");
|
|
4592
|
+
}
|
|
4398
4593
|
if (!_hasOwnProperty.call(destination, key)) {
|
|
4399
4594
|
setProperty(destination, key, source[key]);
|
|
4400
4595
|
overridableKeys[key] = true;
|
|
@@ -4405,32 +4600,30 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4405
4600
|
if (Array.isArray(keyNode)) {
|
|
4406
4601
|
keyNode = Array.prototype.slice.call(keyNode);
|
|
4407
4602
|
for (let index = 0, quantity = keyNode.length;index < quantity; index += 1) {
|
|
4408
|
-
if (Array.isArray(keyNode[index]))
|
|
4603
|
+
if (Array.isArray(keyNode[index])) {
|
|
4409
4604
|
throwError(state, "nested arrays are not supported inside keys");
|
|
4410
|
-
|
|
4605
|
+
}
|
|
4606
|
+
if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
|
|
4411
4607
|
keyNode[index] = "[object Object]";
|
|
4608
|
+
}
|
|
4412
4609
|
}
|
|
4413
4610
|
}
|
|
4414
|
-
if (typeof keyNode === "object" && _class(keyNode) === "[object Object]")
|
|
4611
|
+
if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
|
|
4415
4612
|
keyNode = "[object Object]";
|
|
4613
|
+
}
|
|
4416
4614
|
keyNode = String(keyNode);
|
|
4417
|
-
if (_result === null)
|
|
4615
|
+
if (_result === null) {
|
|
4418
4616
|
_result = {};
|
|
4419
|
-
|
|
4617
|
+
}
|
|
4618
|
+
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
4420
4619
|
if (Array.isArray(valueNode)) {
|
|
4421
|
-
if (valueNode.length > state.maxMergeSeqLength)
|
|
4422
|
-
throwError(state, "merge sequence length exceeded maxMergeSeqLength (" + state.maxMergeSeqLength + ")");
|
|
4423
|
-
const seen = /* @__PURE__ */ new Set;
|
|
4424
4620
|
for (let index = 0, quantity = valueNode.length;index < quantity; index += 1) {
|
|
4425
|
-
|
|
4426
|
-
if (seen.has(src))
|
|
4427
|
-
continue;
|
|
4428
|
-
seen.add(src);
|
|
4429
|
-
mergeMappings(state, _result, src, overridableKeys);
|
|
4621
|
+
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
4430
4622
|
}
|
|
4431
|
-
} else
|
|
4623
|
+
} else {
|
|
4432
4624
|
mergeMappings(state, _result, valueNode, overridableKeys);
|
|
4433
|
-
|
|
4625
|
+
}
|
|
4626
|
+
} else {
|
|
4434
4627
|
if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
|
|
4435
4628
|
state.line = startLine || state.line;
|
|
4436
4629
|
state.lineStart = startLineStart || state.lineStart;
|
|
@@ -4444,14 +4637,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4444
4637
|
}
|
|
4445
4638
|
function readLineBreak(state) {
|
|
4446
4639
|
const ch = state.input.charCodeAt(state.position);
|
|
4447
|
-
if (ch === 10)
|
|
4640
|
+
if (ch === 10) {
|
|
4448
4641
|
state.position++;
|
|
4449
|
-
else if (ch === 13) {
|
|
4642
|
+
} else if (ch === 13) {
|
|
4450
4643
|
state.position++;
|
|
4451
|
-
if (state.input.charCodeAt(state.position) === 10)
|
|
4644
|
+
if (state.input.charCodeAt(state.position) === 10) {
|
|
4452
4645
|
state.position++;
|
|
4453
|
-
|
|
4646
|
+
}
|
|
4647
|
+
} else {
|
|
4454
4648
|
throwError(state, "a line break is expected");
|
|
4649
|
+
}
|
|
4455
4650
|
state.line += 1;
|
|
4456
4651
|
state.lineStart = state.position;
|
|
4457
4652
|
state.firstTabInLine = -1;
|
|
@@ -4461,14 +4656,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4461
4656
|
let ch = state.input.charCodeAt(state.position);
|
|
4462
4657
|
while (ch !== 0) {
|
|
4463
4658
|
while (isWhiteSpace(ch)) {
|
|
4464
|
-
if (ch === 9 && state.firstTabInLine === -1)
|
|
4659
|
+
if (ch === 9 && state.firstTabInLine === -1) {
|
|
4465
4660
|
state.firstTabInLine = state.position;
|
|
4661
|
+
}
|
|
4466
4662
|
ch = state.input.charCodeAt(++state.position);
|
|
4467
4663
|
}
|
|
4468
|
-
if (allowComments && ch === 35)
|
|
4469
|
-
do
|
|
4664
|
+
if (allowComments && ch === 35) {
|
|
4665
|
+
do {
|
|
4470
4666
|
ch = state.input.charCodeAt(++state.position);
|
|
4471
|
-
while (ch !== 10 && ch !== 13 && ch !== 0);
|
|
4667
|
+
} while (ch !== 10 && ch !== 13 && ch !== 0);
|
|
4668
|
+
}
|
|
4472
4669
|
if (isEol(ch)) {
|
|
4473
4670
|
readLineBreak(state);
|
|
4474
4671
|
ch = state.input.charCodeAt(state.position);
|
|
@@ -4478,11 +4675,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4478
4675
|
state.lineIndent++;
|
|
4479
4676
|
ch = state.input.charCodeAt(++state.position);
|
|
4480
4677
|
}
|
|
4481
|
-
} else
|
|
4678
|
+
} else {
|
|
4482
4679
|
break;
|
|
4680
|
+
}
|
|
4483
4681
|
}
|
|
4484
|
-
if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent)
|
|
4682
|
+
if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
|
|
4485
4683
|
throwWarning(state, "deficient indentation");
|
|
4684
|
+
}
|
|
4486
4685
|
return lineBreaks;
|
|
4487
4686
|
}
|
|
4488
4687
|
function testDocumentSeparator(state) {
|
|
@@ -4491,17 +4690,19 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4491
4690
|
if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
|
|
4492
4691
|
_position += 3;
|
|
4493
4692
|
ch = state.input.charCodeAt(_position);
|
|
4494
|
-
if (ch === 0 || isWsOrEol(ch))
|
|
4693
|
+
if (ch === 0 || isWsOrEol(ch)) {
|
|
4495
4694
|
return true;
|
|
4695
|
+
}
|
|
4496
4696
|
}
|
|
4497
4697
|
return false;
|
|
4498
4698
|
}
|
|
4499
4699
|
function writeFoldedLines(state, count) {
|
|
4500
|
-
if (count === 1)
|
|
4700
|
+
if (count === 1) {
|
|
4501
4701
|
state.result += " ";
|
|
4502
|
-
else if (count > 1)
|
|
4503
|
-
state.result +=
|
|
4702
|
+
} else if (count > 1) {
|
|
4703
|
+
state.result += common2.repeat(`
|
|
4504
4704
|
`, count - 1);
|
|
4705
|
+
}
|
|
4505
4706
|
}
|
|
4506
4707
|
function readPlainScalar(state, nodeIndent, withinFlowCollection) {
|
|
4507
4708
|
let captureStart;
|
|
@@ -4513,12 +4714,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4513
4714
|
const _kind = state.kind;
|
|
4514
4715
|
const _result = state.result;
|
|
4515
4716
|
let ch = state.input.charCodeAt(state.position);
|
|
4516
|
-
if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96)
|
|
4717
|
+
if (isWsOrEol(ch) || isFlowIndicator(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
|
|
4517
4718
|
return false;
|
|
4719
|
+
}
|
|
4518
4720
|
if (ch === 63 || ch === 45) {
|
|
4519
4721
|
const following = state.input.charCodeAt(state.position + 1);
|
|
4520
|
-
if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following))
|
|
4722
|
+
if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
|
|
4521
4723
|
return false;
|
|
4724
|
+
}
|
|
4522
4725
|
}
|
|
4523
4726
|
state.kind = "scalar";
|
|
4524
4727
|
state.result = "";
|
|
@@ -4527,14 +4730,17 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4527
4730
|
while (ch !== 0) {
|
|
4528
4731
|
if (ch === 58) {
|
|
4529
4732
|
const following = state.input.charCodeAt(state.position + 1);
|
|
4530
|
-
if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following))
|
|
4733
|
+
if (isWsOrEol(following) || withinFlowCollection && isFlowIndicator(following)) {
|
|
4531
4734
|
break;
|
|
4735
|
+
}
|
|
4532
4736
|
} else if (ch === 35) {
|
|
4533
|
-
|
|
4737
|
+
const preceding = state.input.charCodeAt(state.position - 1);
|
|
4738
|
+
if (isWsOrEol(preceding)) {
|
|
4534
4739
|
break;
|
|
4535
|
-
|
|
4740
|
+
}
|
|
4741
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && isFlowIndicator(ch)) {
|
|
4536
4742
|
break;
|
|
4537
|
-
else if (isEol(ch)) {
|
|
4743
|
+
} else if (isEol(ch)) {
|
|
4538
4744
|
_line = state.line;
|
|
4539
4745
|
_lineStart = state.lineStart;
|
|
4540
4746
|
_lineIndent = state.lineIndent;
|
|
@@ -4557,13 +4763,15 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4557
4763
|
captureStart = captureEnd = state.position;
|
|
4558
4764
|
hasPendingContent = false;
|
|
4559
4765
|
}
|
|
4560
|
-
if (!isWhiteSpace(ch))
|
|
4766
|
+
if (!isWhiteSpace(ch)) {
|
|
4561
4767
|
captureEnd = state.position + 1;
|
|
4768
|
+
}
|
|
4562
4769
|
ch = state.input.charCodeAt(++state.position);
|
|
4563
4770
|
}
|
|
4564
4771
|
captureSegment(state, captureStart, captureEnd, false);
|
|
4565
|
-
if (state.result)
|
|
4772
|
+
if (state.result) {
|
|
4566
4773
|
return true;
|
|
4774
|
+
}
|
|
4567
4775
|
state.kind = _kind;
|
|
4568
4776
|
state.result = _result;
|
|
4569
4777
|
return false;
|
|
@@ -4572,13 +4780,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4572
4780
|
let captureStart;
|
|
4573
4781
|
let captureEnd;
|
|
4574
4782
|
let ch = state.input.charCodeAt(state.position);
|
|
4575
|
-
if (ch !== 39)
|
|
4783
|
+
if (ch !== 39) {
|
|
4576
4784
|
return false;
|
|
4785
|
+
}
|
|
4577
4786
|
state.kind = "scalar";
|
|
4578
4787
|
state.result = "";
|
|
4579
4788
|
state.position++;
|
|
4580
4789
|
captureStart = captureEnd = state.position;
|
|
4581
|
-
while ((ch = state.input.charCodeAt(state.position)) !== 0)
|
|
4790
|
+
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
4582
4791
|
if (ch === 39) {
|
|
4583
4792
|
captureSegment(state, captureStart, state.position, true);
|
|
4584
4793
|
ch = state.input.charCodeAt(++state.position);
|
|
@@ -4586,19 +4795,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4586
4795
|
captureStart = state.position;
|
|
4587
4796
|
state.position++;
|
|
4588
4797
|
captureEnd = state.position;
|
|
4589
|
-
} else
|
|
4798
|
+
} else {
|
|
4590
4799
|
return true;
|
|
4800
|
+
}
|
|
4591
4801
|
} else if (isEol(ch)) {
|
|
4592
4802
|
captureSegment(state, captureStart, captureEnd, true);
|
|
4593
4803
|
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
4594
4804
|
captureStart = captureEnd = state.position;
|
|
4595
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state))
|
|
4805
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
4596
4806
|
throwError(state, "unexpected end of the document within a single quoted scalar");
|
|
4597
|
-
else {
|
|
4807
|
+
} else {
|
|
4598
4808
|
state.position++;
|
|
4599
|
-
if (!isWhiteSpace(ch))
|
|
4809
|
+
if (!isWhiteSpace(ch)) {
|
|
4600
4810
|
captureEnd = state.position;
|
|
4811
|
+
}
|
|
4601
4812
|
}
|
|
4813
|
+
}
|
|
4602
4814
|
throwError(state, "unexpected end of the stream within a single quoted scalar");
|
|
4603
4815
|
}
|
|
4604
4816
|
function readDoubleQuotedScalar(state, nodeIndent) {
|
|
@@ -4606,13 +4818,14 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4606
4818
|
let captureEnd;
|
|
4607
4819
|
let tmp;
|
|
4608
4820
|
let ch = state.input.charCodeAt(state.position);
|
|
4609
|
-
if (ch !== 34)
|
|
4821
|
+
if (ch !== 34) {
|
|
4610
4822
|
return false;
|
|
4823
|
+
}
|
|
4611
4824
|
state.kind = "scalar";
|
|
4612
4825
|
state.result = "";
|
|
4613
4826
|
state.position++;
|
|
4614
4827
|
captureStart = captureEnd = state.position;
|
|
4615
|
-
while ((ch = state.input.charCodeAt(state.position)) !== 0)
|
|
4828
|
+
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
4616
4829
|
if (ch === 34) {
|
|
4617
4830
|
captureSegment(state, captureStart, state.position, true);
|
|
4618
4831
|
state.position++;
|
|
@@ -4620,9 +4833,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4620
4833
|
} else if (ch === 92) {
|
|
4621
4834
|
captureSegment(state, captureStart, state.position, true);
|
|
4622
4835
|
ch = state.input.charCodeAt(++state.position);
|
|
4623
|
-
if (isEol(ch))
|
|
4836
|
+
if (isEol(ch)) {
|
|
4624
4837
|
skipSeparationSpace(state, false, nodeIndent);
|
|
4625
|
-
else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
4838
|
+
} else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
4626
4839
|
state.result += simpleEscapeMap[ch];
|
|
4627
4840
|
state.position++;
|
|
4628
4841
|
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
|
@@ -4630,27 +4843,31 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4630
4843
|
let hexResult = 0;
|
|
4631
4844
|
for (;hexLength > 0; hexLength--) {
|
|
4632
4845
|
ch = state.input.charCodeAt(++state.position);
|
|
4633
|
-
if ((tmp = fromHexCode(ch)) >= 0)
|
|
4846
|
+
if ((tmp = fromHexCode(ch)) >= 0) {
|
|
4634
4847
|
hexResult = (hexResult << 4) + tmp;
|
|
4635
|
-
else
|
|
4848
|
+
} else {
|
|
4636
4849
|
throwError(state, "expected hexadecimal character");
|
|
4850
|
+
}
|
|
4637
4851
|
}
|
|
4638
4852
|
state.result += charFromCodepoint(hexResult);
|
|
4639
4853
|
state.position++;
|
|
4640
|
-
} else
|
|
4854
|
+
} else {
|
|
4641
4855
|
throwError(state, "unknown escape sequence");
|
|
4856
|
+
}
|
|
4642
4857
|
captureStart = captureEnd = state.position;
|
|
4643
4858
|
} else if (isEol(ch)) {
|
|
4644
4859
|
captureSegment(state, captureStart, captureEnd, true);
|
|
4645
4860
|
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
4646
4861
|
captureStart = captureEnd = state.position;
|
|
4647
|
-
} else if (state.position === state.lineStart && testDocumentSeparator(state))
|
|
4862
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
4648
4863
|
throwError(state, "unexpected end of the document within a double quoted scalar");
|
|
4649
|
-
else {
|
|
4864
|
+
} else {
|
|
4650
4865
|
state.position++;
|
|
4651
|
-
if (!isWhiteSpace(ch))
|
|
4866
|
+
if (!isWhiteSpace(ch)) {
|
|
4652
4867
|
captureEnd = state.position;
|
|
4868
|
+
}
|
|
4653
4869
|
}
|
|
4870
|
+
}
|
|
4654
4871
|
throwError(state, "unexpected end of the stream within a double quoted scalar");
|
|
4655
4872
|
}
|
|
4656
4873
|
function readFlowCollection(state, nodeIndent) {
|
|
@@ -4665,7 +4882,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4665
4882
|
let isPair;
|
|
4666
4883
|
let isExplicitPair;
|
|
4667
4884
|
let isMapping;
|
|
4668
|
-
const overridableKeys = Object.create(null);
|
|
4885
|
+
const overridableKeys = /* @__PURE__ */ Object.create(null);
|
|
4669
4886
|
let keyNode;
|
|
4670
4887
|
let keyTag;
|
|
4671
4888
|
let valueNode;
|
|
@@ -4678,10 +4895,12 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4678
4895
|
terminator = 125;
|
|
4679
4896
|
isMapping = true;
|
|
4680
4897
|
_result = {};
|
|
4681
|
-
} else
|
|
4898
|
+
} else {
|
|
4682
4899
|
return false;
|
|
4683
|
-
|
|
4900
|
+
}
|
|
4901
|
+
if (state.anchor !== null) {
|
|
4684
4902
|
storeAnchor(state, state.anchor, _result);
|
|
4903
|
+
}
|
|
4685
4904
|
ch = state.input.charCodeAt(++state.position);
|
|
4686
4905
|
while (ch !== 0) {
|
|
4687
4906
|
skipSeparationSpace(state, true, nodeIndent);
|
|
@@ -4693,14 +4912,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4693
4912
|
state.kind = isMapping ? "mapping" : "sequence";
|
|
4694
4913
|
state.result = _result;
|
|
4695
4914
|
return true;
|
|
4696
|
-
} else if (!readNext)
|
|
4915
|
+
} else if (!readNext) {
|
|
4697
4916
|
throwError(state, "missed comma between flow collection entries");
|
|
4698
|
-
else if (ch === 44)
|
|
4917
|
+
} else if (ch === 44) {
|
|
4699
4918
|
throwError(state, "expected the node content, but found ','");
|
|
4919
|
+
}
|
|
4700
4920
|
keyTag = keyNode = valueNode = null;
|
|
4701
4921
|
isPair = isExplicitPair = false;
|
|
4702
4922
|
if (ch === 63) {
|
|
4703
|
-
|
|
4923
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
4924
|
+
if (isWsOrEol(following)) {
|
|
4704
4925
|
isPair = isExplicitPair = true;
|
|
4705
4926
|
state.position++;
|
|
4706
4927
|
skipSeparationSpace(state, true, nodeIndent);
|
|
@@ -4721,19 +4942,21 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4721
4942
|
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
|
|
4722
4943
|
valueNode = state.result;
|
|
4723
4944
|
}
|
|
4724
|
-
if (isMapping)
|
|
4945
|
+
if (isMapping) {
|
|
4725
4946
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
|
|
4726
|
-
else if (isPair)
|
|
4947
|
+
} else if (isPair) {
|
|
4727
4948
|
_result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
|
|
4728
|
-
else
|
|
4949
|
+
} else {
|
|
4729
4950
|
_result.push(keyNode);
|
|
4951
|
+
}
|
|
4730
4952
|
skipSeparationSpace(state, true, nodeIndent);
|
|
4731
4953
|
ch = state.input.charCodeAt(state.position);
|
|
4732
4954
|
if (ch === 44) {
|
|
4733
4955
|
readNext = true;
|
|
4734
4956
|
ch = state.input.charCodeAt(++state.position);
|
|
4735
|
-
} else
|
|
4957
|
+
} else {
|
|
4736
4958
|
readNext = false;
|
|
4959
|
+
}
|
|
4737
4960
|
}
|
|
4738
4961
|
throwError(state, "unexpected end of the stream within a flow collection");
|
|
4739
4962
|
}
|
|
@@ -4747,40 +4970,45 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4747
4970
|
let atMoreIndented = false;
|
|
4748
4971
|
let tmp;
|
|
4749
4972
|
let ch = state.input.charCodeAt(state.position);
|
|
4750
|
-
if (ch === 124)
|
|
4973
|
+
if (ch === 124) {
|
|
4751
4974
|
folding = false;
|
|
4752
|
-
else if (ch === 62)
|
|
4975
|
+
} else if (ch === 62) {
|
|
4753
4976
|
folding = true;
|
|
4754
|
-
else
|
|
4977
|
+
} else {
|
|
4755
4978
|
return false;
|
|
4979
|
+
}
|
|
4756
4980
|
state.kind = "scalar";
|
|
4757
4981
|
state.result = "";
|
|
4758
4982
|
while (ch !== 0) {
|
|
4759
4983
|
ch = state.input.charCodeAt(++state.position);
|
|
4760
|
-
if (ch === 43 || ch === 45)
|
|
4761
|
-
if (CHOMPING_CLIP === chomping)
|
|
4984
|
+
if (ch === 43 || ch === 45) {
|
|
4985
|
+
if (CHOMPING_CLIP === chomping) {
|
|
4762
4986
|
chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
|
|
4763
|
-
else
|
|
4987
|
+
} else {
|
|
4764
4988
|
throwError(state, "repeat of a chomping mode identifier");
|
|
4765
|
-
|
|
4766
|
-
|
|
4989
|
+
}
|
|
4990
|
+
} else if ((tmp = fromDecimalCode(ch)) >= 0) {
|
|
4991
|
+
if (tmp === 0) {
|
|
4767
4992
|
throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
4768
|
-
else if (!detectedIndent) {
|
|
4993
|
+
} else if (!detectedIndent) {
|
|
4769
4994
|
textIndent = nodeIndent + tmp - 1;
|
|
4770
4995
|
detectedIndent = true;
|
|
4771
|
-
} else
|
|
4996
|
+
} else {
|
|
4772
4997
|
throwError(state, "repeat of an indentation width identifier");
|
|
4773
|
-
|
|
4998
|
+
}
|
|
4999
|
+
} else {
|
|
4774
5000
|
break;
|
|
5001
|
+
}
|
|
4775
5002
|
}
|
|
4776
5003
|
if (isWhiteSpace(ch)) {
|
|
4777
|
-
do
|
|
5004
|
+
do {
|
|
4778
5005
|
ch = state.input.charCodeAt(++state.position);
|
|
4779
|
-
while (isWhiteSpace(ch));
|
|
4780
|
-
if (ch === 35)
|
|
4781
|
-
do
|
|
5006
|
+
} while (isWhiteSpace(ch));
|
|
5007
|
+
if (ch === 35) {
|
|
5008
|
+
do {
|
|
4782
5009
|
ch = state.input.charCodeAt(++state.position);
|
|
4783
|
-
while (!isEol(ch) && ch !== 0);
|
|
5010
|
+
} while (!isEol(ch) && ch !== 0);
|
|
5011
|
+
}
|
|
4784
5012
|
}
|
|
4785
5013
|
while (ch !== 0) {
|
|
4786
5014
|
readLineBreak(state);
|
|
@@ -4790,49 +5018,56 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4790
5018
|
state.lineIndent++;
|
|
4791
5019
|
ch = state.input.charCodeAt(++state.position);
|
|
4792
5020
|
}
|
|
4793
|
-
if (!detectedIndent && state.lineIndent > textIndent)
|
|
5021
|
+
if (!detectedIndent && state.lineIndent > textIndent) {
|
|
4794
5022
|
textIndent = state.lineIndent;
|
|
5023
|
+
}
|
|
4795
5024
|
if (isEol(ch)) {
|
|
4796
5025
|
emptyLines++;
|
|
4797
5026
|
continue;
|
|
4798
5027
|
}
|
|
4799
|
-
if (!detectedIndent && textIndent === 0)
|
|
5028
|
+
if (!detectedIndent && textIndent === 0) {
|
|
4800
5029
|
throwError(state, "missing indentation for block scalar");
|
|
5030
|
+
}
|
|
4801
5031
|
if (state.lineIndent < textIndent) {
|
|
4802
|
-
if (chomping === CHOMPING_KEEP)
|
|
4803
|
-
state.result +=
|
|
5032
|
+
if (chomping === CHOMPING_KEEP) {
|
|
5033
|
+
state.result += common2.repeat(`
|
|
4804
5034
|
`, didReadContent ? 1 + emptyLines : emptyLines);
|
|
4805
|
-
else if (chomping === CHOMPING_CLIP) {
|
|
4806
|
-
if (didReadContent)
|
|
5035
|
+
} else if (chomping === CHOMPING_CLIP) {
|
|
5036
|
+
if (didReadContent) {
|
|
4807
5037
|
state.result += `
|
|
4808
5038
|
`;
|
|
5039
|
+
}
|
|
4809
5040
|
}
|
|
4810
5041
|
break;
|
|
4811
5042
|
}
|
|
4812
|
-
if (folding)
|
|
5043
|
+
if (folding) {
|
|
4813
5044
|
if (isWhiteSpace(ch)) {
|
|
4814
5045
|
atMoreIndented = true;
|
|
4815
|
-
state.result +=
|
|
5046
|
+
state.result += common2.repeat(`
|
|
4816
5047
|
`, didReadContent ? 1 + emptyLines : emptyLines);
|
|
4817
5048
|
} else if (atMoreIndented) {
|
|
4818
5049
|
atMoreIndented = false;
|
|
4819
|
-
state.result +=
|
|
5050
|
+
state.result += common2.repeat(`
|
|
4820
5051
|
`, emptyLines + 1);
|
|
4821
5052
|
} else if (emptyLines === 0) {
|
|
4822
|
-
if (didReadContent)
|
|
5053
|
+
if (didReadContent) {
|
|
4823
5054
|
state.result += " ";
|
|
4824
|
-
|
|
4825
|
-
|
|
5055
|
+
}
|
|
5056
|
+
} else {
|
|
5057
|
+
state.result += common2.repeat(`
|
|
4826
5058
|
`, emptyLines);
|
|
4827
|
-
|
|
4828
|
-
|
|
5059
|
+
}
|
|
5060
|
+
} else {
|
|
5061
|
+
state.result += common2.repeat(`
|
|
4829
5062
|
`, didReadContent ? 1 + emptyLines : emptyLines);
|
|
5063
|
+
}
|
|
4830
5064
|
didReadContent = true;
|
|
4831
5065
|
detectedIndent = true;
|
|
4832
5066
|
emptyLines = 0;
|
|
4833
5067
|
const captureStart = state.position;
|
|
4834
|
-
while (!isEol(ch) && ch !== 0)
|
|
5068
|
+
while (!isEol(ch) && ch !== 0) {
|
|
4835
5069
|
ch = state.input.charCodeAt(++state.position);
|
|
5070
|
+
}
|
|
4836
5071
|
captureSegment(state, captureStart, state.position, false);
|
|
4837
5072
|
}
|
|
4838
5073
|
return true;
|
|
@@ -4844,18 +5079,22 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4844
5079
|
let detected = false;
|
|
4845
5080
|
if (state.firstTabInLine !== -1)
|
|
4846
5081
|
return false;
|
|
4847
|
-
if (state.anchor !== null)
|
|
5082
|
+
if (state.anchor !== null) {
|
|
4848
5083
|
storeAnchor(state, state.anchor, _result);
|
|
5084
|
+
}
|
|
4849
5085
|
let ch = state.input.charCodeAt(state.position);
|
|
4850
5086
|
while (ch !== 0) {
|
|
4851
5087
|
if (state.firstTabInLine !== -1) {
|
|
4852
5088
|
state.position = state.firstTabInLine;
|
|
4853
5089
|
throwError(state, "tab characters must not be used in indentation");
|
|
4854
5090
|
}
|
|
4855
|
-
if (ch !== 45)
|
|
5091
|
+
if (ch !== 45) {
|
|
4856
5092
|
break;
|
|
4857
|
-
|
|
5093
|
+
}
|
|
5094
|
+
const following = state.input.charCodeAt(state.position + 1);
|
|
5095
|
+
if (!isWsOrEol(following)) {
|
|
4858
5096
|
break;
|
|
5097
|
+
}
|
|
4859
5098
|
detected = true;
|
|
4860
5099
|
state.position++;
|
|
4861
5100
|
if (skipSeparationSpace(state, true, -1)) {
|
|
@@ -4870,10 +5109,11 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4870
5109
|
_result.push(state.result);
|
|
4871
5110
|
skipSeparationSpace(state, true, -1);
|
|
4872
5111
|
ch = state.input.charCodeAt(state.position);
|
|
4873
|
-
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0)
|
|
5112
|
+
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
|
|
4874
5113
|
throwError(state, "bad indentation of a sequence entry");
|
|
4875
|
-
else if (state.lineIndent < nodeIndent)
|
|
5114
|
+
} else if (state.lineIndent < nodeIndent) {
|
|
4876
5115
|
break;
|
|
5116
|
+
}
|
|
4877
5117
|
}
|
|
4878
5118
|
if (detected) {
|
|
4879
5119
|
state.tag = _tag;
|
|
@@ -4892,7 +5132,7 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4892
5132
|
const _tag = state.tag;
|
|
4893
5133
|
const _anchor = state.anchor;
|
|
4894
5134
|
const _result = {};
|
|
4895
|
-
const overridableKeys = Object.create(null);
|
|
5135
|
+
const overridableKeys = /* @__PURE__ */ Object.create(null);
|
|
4896
5136
|
let keyTag = null;
|
|
4897
5137
|
let keyNode = null;
|
|
4898
5138
|
let valueNode = null;
|
|
@@ -4900,8 +5140,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4900
5140
|
let detected = false;
|
|
4901
5141
|
if (state.firstTabInLine !== -1)
|
|
4902
5142
|
return false;
|
|
4903
|
-
if (state.anchor !== null)
|
|
5143
|
+
if (state.anchor !== null) {
|
|
4904
5144
|
storeAnchor(state, state.anchor, _result);
|
|
5145
|
+
}
|
|
4905
5146
|
let ch = state.input.charCodeAt(state.position);
|
|
4906
5147
|
while (ch !== 0) {
|
|
4907
5148
|
if (!atExplicitKey && state.firstTabInLine !== -1) {
|
|
@@ -4922,24 +5163,28 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4922
5163
|
} else if (atExplicitKey) {
|
|
4923
5164
|
atExplicitKey = false;
|
|
4924
5165
|
allowCompact = true;
|
|
4925
|
-
} else
|
|
5166
|
+
} else {
|
|
4926
5167
|
throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
|
|
5168
|
+
}
|
|
4927
5169
|
state.position += 1;
|
|
4928
5170
|
ch = following;
|
|
4929
5171
|
} else {
|
|
4930
5172
|
_keyLine = state.line;
|
|
4931
5173
|
_keyLineStart = state.lineStart;
|
|
4932
5174
|
_keyPos = state.position;
|
|
4933
|
-
if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true))
|
|
5175
|
+
if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
|
|
4934
5176
|
break;
|
|
5177
|
+
}
|
|
4935
5178
|
if (state.line === _line) {
|
|
4936
5179
|
ch = state.input.charCodeAt(state.position);
|
|
4937
|
-
while (isWhiteSpace(ch))
|
|
5180
|
+
while (isWhiteSpace(ch)) {
|
|
4938
5181
|
ch = state.input.charCodeAt(++state.position);
|
|
5182
|
+
}
|
|
4939
5183
|
if (ch === 58) {
|
|
4940
5184
|
ch = state.input.charCodeAt(++state.position);
|
|
4941
|
-
if (!isWsOrEol(ch))
|
|
5185
|
+
if (!isWsOrEol(ch)) {
|
|
4942
5186
|
throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
|
|
5187
|
+
}
|
|
4943
5188
|
if (atExplicitKey) {
|
|
4944
5189
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
4945
5190
|
keyTag = keyNode = valueNode = null;
|
|
@@ -4949,16 +5194,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4949
5194
|
allowCompact = false;
|
|
4950
5195
|
keyTag = state.tag;
|
|
4951
5196
|
keyNode = state.result;
|
|
4952
|
-
} else if (detected)
|
|
5197
|
+
} else if (detected) {
|
|
4953
5198
|
throwError(state, "can not read an implicit mapping pair; a colon is missed");
|
|
4954
|
-
else {
|
|
5199
|
+
} else {
|
|
4955
5200
|
state.tag = _tag;
|
|
4956
5201
|
state.anchor = _anchor;
|
|
4957
5202
|
return true;
|
|
4958
5203
|
}
|
|
4959
|
-
} else if (detected)
|
|
5204
|
+
} else if (detected) {
|
|
4960
5205
|
throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
4961
|
-
else {
|
|
5206
|
+
} else {
|
|
4962
5207
|
state.tag = _tag;
|
|
4963
5208
|
state.anchor = _anchor;
|
|
4964
5209
|
return true;
|
|
@@ -4970,11 +5215,13 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4970
5215
|
_keyLineStart = state.lineStart;
|
|
4971
5216
|
_keyPos = state.position;
|
|
4972
5217
|
}
|
|
4973
|
-
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact))
|
|
4974
|
-
if (atExplicitKey)
|
|
5218
|
+
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
|
|
5219
|
+
if (atExplicitKey) {
|
|
4975
5220
|
keyNode = state.result;
|
|
4976
|
-
else
|
|
5221
|
+
} else {
|
|
4977
5222
|
valueNode = state.result;
|
|
5223
|
+
}
|
|
5224
|
+
}
|
|
4978
5225
|
if (!atExplicitKey) {
|
|
4979
5226
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
|
|
4980
5227
|
keyTag = keyNode = valueNode = null;
|
|
@@ -4982,13 +5229,15 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
4982
5229
|
skipSeparationSpace(state, true, -1);
|
|
4983
5230
|
ch = state.input.charCodeAt(state.position);
|
|
4984
5231
|
}
|
|
4985
|
-
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0)
|
|
5232
|
+
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
|
|
4986
5233
|
throwError(state, "bad indentation of a mapping entry");
|
|
4987
|
-
else if (state.lineIndent < nodeIndent)
|
|
5234
|
+
} else if (state.lineIndent < nodeIndent) {
|
|
4988
5235
|
break;
|
|
5236
|
+
}
|
|
4989
5237
|
}
|
|
4990
|
-
if (atExplicitKey)
|
|
5238
|
+
if (atExplicitKey) {
|
|
4991
5239
|
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
5240
|
+
}
|
|
4992
5241
|
if (detected) {
|
|
4993
5242
|
state.tag = _tag;
|
|
4994
5243
|
state.anchor = _anchor;
|
|
@@ -5005,8 +5254,9 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5005
5254
|
let ch = state.input.charCodeAt(state.position);
|
|
5006
5255
|
if (ch !== 33)
|
|
5007
5256
|
return false;
|
|
5008
|
-
if (state.tag !== null)
|
|
5257
|
+
if (state.tag !== null) {
|
|
5009
5258
|
throwError(state, "duplication of a tag property");
|
|
5259
|
+
}
|
|
5010
5260
|
ch = state.input.charCodeAt(++state.position);
|
|
5011
5261
|
if (ch === 60) {
|
|
5012
5262
|
isVerbatim = true;
|
|
@@ -5015,66 +5265,77 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5015
5265
|
isNamed = true;
|
|
5016
5266
|
tagHandle = "!!";
|
|
5017
5267
|
ch = state.input.charCodeAt(++state.position);
|
|
5018
|
-
} else
|
|
5268
|
+
} else {
|
|
5019
5269
|
tagHandle = "!";
|
|
5270
|
+
}
|
|
5020
5271
|
let _position = state.position;
|
|
5021
5272
|
if (isVerbatim) {
|
|
5022
|
-
do
|
|
5273
|
+
do {
|
|
5023
5274
|
ch = state.input.charCodeAt(++state.position);
|
|
5024
|
-
while (ch !== 0 && ch !== 62);
|
|
5275
|
+
} while (ch !== 0 && ch !== 62);
|
|
5025
5276
|
if (state.position < state.length) {
|
|
5026
5277
|
tagName = state.input.slice(_position, state.position);
|
|
5027
5278
|
ch = state.input.charCodeAt(++state.position);
|
|
5028
|
-
} else
|
|
5279
|
+
} else {
|
|
5029
5280
|
throwError(state, "unexpected end of the stream within a verbatim tag");
|
|
5281
|
+
}
|
|
5030
5282
|
} else {
|
|
5031
5283
|
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
5032
|
-
if (ch === 33)
|
|
5284
|
+
if (ch === 33) {
|
|
5033
5285
|
if (!isNamed) {
|
|
5034
5286
|
tagHandle = state.input.slice(_position - 1, state.position + 1);
|
|
5035
|
-
if (!PATTERN_TAG_HANDLE.test(tagHandle))
|
|
5287
|
+
if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
|
|
5036
5288
|
throwError(state, "named tag handle cannot contain such characters");
|
|
5289
|
+
}
|
|
5037
5290
|
isNamed = true;
|
|
5038
5291
|
_position = state.position + 1;
|
|
5039
|
-
} else
|
|
5292
|
+
} else {
|
|
5040
5293
|
throwError(state, "tag suffix cannot contain exclamation marks");
|
|
5294
|
+
}
|
|
5295
|
+
}
|
|
5041
5296
|
ch = state.input.charCodeAt(++state.position);
|
|
5042
5297
|
}
|
|
5043
5298
|
tagName = state.input.slice(_position, state.position);
|
|
5044
|
-
if (PATTERN_FLOW_INDICATORS.test(tagName))
|
|
5299
|
+
if (PATTERN_FLOW_INDICATORS.test(tagName)) {
|
|
5045
5300
|
throwError(state, "tag suffix cannot contain flow indicator characters");
|
|
5301
|
+
}
|
|
5046
5302
|
}
|
|
5047
|
-
if (tagName && !PATTERN_TAG_URI.test(tagName))
|
|
5303
|
+
if (tagName && !PATTERN_TAG_URI.test(tagName)) {
|
|
5048
5304
|
throwError(state, "tag name cannot contain such characters: " + tagName);
|
|
5305
|
+
}
|
|
5049
5306
|
try {
|
|
5050
5307
|
tagName = decodeURIComponent(tagName);
|
|
5051
5308
|
} catch (err) {
|
|
5052
5309
|
throwError(state, "tag name is malformed: " + tagName);
|
|
5053
5310
|
}
|
|
5054
|
-
if (isVerbatim)
|
|
5311
|
+
if (isVerbatim) {
|
|
5055
5312
|
state.tag = tagName;
|
|
5056
|
-
else if (_hasOwnProperty.call(state.tagMap, tagHandle))
|
|
5313
|
+
} else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
|
|
5057
5314
|
state.tag = state.tagMap[tagHandle] + tagName;
|
|
5058
|
-
else if (tagHandle === "!")
|
|
5315
|
+
} else if (tagHandle === "!") {
|
|
5059
5316
|
state.tag = "!" + tagName;
|
|
5060
|
-
else if (tagHandle === "!!")
|
|
5317
|
+
} else if (tagHandle === "!!") {
|
|
5061
5318
|
state.tag = "tag:yaml.org,2002:" + tagName;
|
|
5062
|
-
else
|
|
5319
|
+
} else {
|
|
5063
5320
|
throwError(state, 'undeclared tag handle "' + tagHandle + '"');
|
|
5321
|
+
}
|
|
5064
5322
|
return true;
|
|
5065
5323
|
}
|
|
5066
5324
|
function readAnchorProperty(state) {
|
|
5067
5325
|
let ch = state.input.charCodeAt(state.position);
|
|
5068
5326
|
if (ch !== 38)
|
|
5069
5327
|
return false;
|
|
5070
|
-
if (state.anchor !== null)
|
|
5328
|
+
if (state.anchor !== null) {
|
|
5071
5329
|
throwError(state, "duplication of an anchor property");
|
|
5330
|
+
}
|
|
5072
5331
|
ch = state.input.charCodeAt(++state.position);
|
|
5073
5332
|
const _position = state.position;
|
|
5074
|
-
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch))
|
|
5333
|
+
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
|
|
5075
5334
|
ch = state.input.charCodeAt(++state.position);
|
|
5076
|
-
|
|
5335
|
+
}
|
|
5336
|
+
if (state.position === _position) {
|
|
5077
5337
|
throwError(state, "name of an anchor node must contain at least one character");
|
|
5338
|
+
}
|
|
5078
5339
|
state.anchor = state.input.slice(_position, state.position);
|
|
5079
5340
|
return true;
|
|
5080
5341
|
}
|
|
@@ -5084,13 +5345,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5084
5345
|
return false;
|
|
5085
5346
|
ch = state.input.charCodeAt(++state.position);
|
|
5086
5347
|
const _position = state.position;
|
|
5087
|
-
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch))
|
|
5348
|
+
while (ch !== 0 && !isWsOrEol(ch) && !isFlowIndicator(ch)) {
|
|
5088
5349
|
ch = state.input.charCodeAt(++state.position);
|
|
5089
|
-
|
|
5350
|
+
}
|
|
5351
|
+
if (state.position === _position) {
|
|
5090
5352
|
throwError(state, "name of an alias node must contain at least one character");
|
|
5353
|
+
}
|
|
5091
5354
|
const alias = state.input.slice(_position, state.position);
|
|
5092
|
-
if (!_hasOwnProperty.call(state.anchorMap, alias))
|
|
5355
|
+
if (!_hasOwnProperty.call(state.anchorMap, alias)) {
|
|
5093
5356
|
throwError(state, 'unidentified alias "' + alias + '"');
|
|
5357
|
+
}
|
|
5094
5358
|
state.result = state.anchorMap[alias];
|
|
5095
5359
|
skipSeparationSpace(state, true, -1);
|
|
5096
5360
|
return true;
|
|
@@ -5118,14 +5382,16 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5118
5382
|
let atNewLine = false;
|
|
5119
5383
|
let hasContent = false;
|
|
5120
5384
|
let propertyStart = null;
|
|
5121
|
-
let
|
|
5385
|
+
let type2;
|
|
5122
5386
|
let flowIndent;
|
|
5123
5387
|
let blockIndent;
|
|
5124
|
-
if (state.depth >= state.maxDepth)
|
|
5388
|
+
if (state.depth >= state.maxDepth) {
|
|
5125
5389
|
throwError(state, "nesting exceeded maxDepth (" + state.maxDepth + ")");
|
|
5390
|
+
}
|
|
5126
5391
|
state.depth += 1;
|
|
5127
|
-
if (state.listener !== null)
|
|
5392
|
+
if (state.listener !== null) {
|
|
5128
5393
|
state.listener("open", state);
|
|
5394
|
+
}
|
|
5129
5395
|
state.tag = null;
|
|
5130
5396
|
state.anchor = null;
|
|
5131
5397
|
state.kind = null;
|
|
@@ -5134,110 +5400,131 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5134
5400
|
if (allowToSeek) {
|
|
5135
5401
|
if (skipSeparationSpace(state, true, -1)) {
|
|
5136
5402
|
atNewLine = true;
|
|
5137
|
-
if (state.lineIndent > parentIndent)
|
|
5403
|
+
if (state.lineIndent > parentIndent) {
|
|
5138
5404
|
indentStatus = 1;
|
|
5139
|
-
else if (state.lineIndent === parentIndent)
|
|
5405
|
+
} else if (state.lineIndent === parentIndent) {
|
|
5140
5406
|
indentStatus = 0;
|
|
5141
|
-
else if (state.lineIndent < parentIndent)
|
|
5407
|
+
} else if (state.lineIndent < parentIndent) {
|
|
5142
5408
|
indentStatus = -1;
|
|
5409
|
+
}
|
|
5143
5410
|
}
|
|
5144
5411
|
}
|
|
5145
|
-
if (indentStatus === 1)
|
|
5412
|
+
if (indentStatus === 1) {
|
|
5146
5413
|
while (true) {
|
|
5147
5414
|
const ch = state.input.charCodeAt(state.position);
|
|
5148
5415
|
const propertyState = snapshotState(state);
|
|
5149
|
-
if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null))
|
|
5416
|
+
if (atNewLine && (ch === 33 && state.tag !== null || ch === 38 && state.anchor !== null)) {
|
|
5150
5417
|
break;
|
|
5151
|
-
|
|
5418
|
+
}
|
|
5419
|
+
if (!readTagProperty(state) && !readAnchorProperty(state)) {
|
|
5152
5420
|
break;
|
|
5153
|
-
|
|
5421
|
+
}
|
|
5422
|
+
if (propertyStart === null) {
|
|
5154
5423
|
propertyStart = propertyState;
|
|
5424
|
+
}
|
|
5155
5425
|
if (skipSeparationSpace(state, true, -1)) {
|
|
5156
5426
|
atNewLine = true;
|
|
5157
5427
|
allowBlockCollections = allowBlockStyles;
|
|
5158
|
-
if (state.lineIndent > parentIndent)
|
|
5428
|
+
if (state.lineIndent > parentIndent) {
|
|
5159
5429
|
indentStatus = 1;
|
|
5160
|
-
else if (state.lineIndent === parentIndent)
|
|
5430
|
+
} else if (state.lineIndent === parentIndent) {
|
|
5161
5431
|
indentStatus = 0;
|
|
5162
|
-
else if (state.lineIndent < parentIndent)
|
|
5432
|
+
} else if (state.lineIndent < parentIndent) {
|
|
5163
5433
|
indentStatus = -1;
|
|
5164
|
-
|
|
5434
|
+
}
|
|
5435
|
+
} else {
|
|
5165
5436
|
allowBlockCollections = false;
|
|
5437
|
+
}
|
|
5166
5438
|
}
|
|
5167
|
-
|
|
5439
|
+
}
|
|
5440
|
+
if (allowBlockCollections) {
|
|
5168
5441
|
allowBlockCollections = atNewLine || allowCompact;
|
|
5442
|
+
}
|
|
5169
5443
|
if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
|
|
5170
|
-
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext)
|
|
5444
|
+
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
|
|
5171
5445
|
flowIndent = parentIndent;
|
|
5172
|
-
else
|
|
5446
|
+
} else {
|
|
5173
5447
|
flowIndent = parentIndent + 1;
|
|
5448
|
+
}
|
|
5174
5449
|
blockIndent = state.position - state.lineStart;
|
|
5175
|
-
if (indentStatus === 1)
|
|
5176
|
-
if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent))
|
|
5450
|
+
if (indentStatus === 1) {
|
|
5451
|
+
if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
|
|
5177
5452
|
hasContent = true;
|
|
5178
|
-
else {
|
|
5453
|
+
} else {
|
|
5179
5454
|
const ch = state.input.charCodeAt(state.position);
|
|
5180
|
-
if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent))
|
|
5455
|
+
if (propertyStart !== null && allowBlockStyles && !allowBlockCollections && ch !== 124 && ch !== 62 && tryReadBlockMappingFromProperty(state, propertyStart, propertyStart.position - propertyStart.lineStart, flowIndent)) {
|
|
5181
5456
|
hasContent = true;
|
|
5182
|
-
else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent))
|
|
5457
|
+
} else if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
|
|
5183
5458
|
hasContent = true;
|
|
5184
|
-
else if (readAlias(state)) {
|
|
5459
|
+
} else if (readAlias(state)) {
|
|
5185
5460
|
hasContent = true;
|
|
5186
|
-
if (state.tag !== null || state.anchor !== null)
|
|
5461
|
+
if (state.tag !== null || state.anchor !== null) {
|
|
5187
5462
|
throwError(state, "alias node should not have any properties");
|
|
5463
|
+
}
|
|
5188
5464
|
} else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
|
|
5189
5465
|
hasContent = true;
|
|
5190
|
-
if (state.tag === null)
|
|
5466
|
+
if (state.tag === null) {
|
|
5191
5467
|
state.tag = "?";
|
|
5468
|
+
}
|
|
5192
5469
|
}
|
|
5193
|
-
if (state.anchor !== null)
|
|
5470
|
+
if (state.anchor !== null) {
|
|
5194
5471
|
storeAnchor(state, state.anchor, state.result);
|
|
5472
|
+
}
|
|
5195
5473
|
}
|
|
5196
|
-
else if (indentStatus === 0)
|
|
5474
|
+
} else if (indentStatus === 0) {
|
|
5197
5475
|
hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
|
|
5476
|
+
}
|
|
5198
5477
|
}
|
|
5199
5478
|
if (state.tag === null) {
|
|
5200
|
-
if (state.anchor !== null)
|
|
5479
|
+
if (state.anchor !== null) {
|
|
5201
5480
|
storeAnchor(state, state.anchor, state.result);
|
|
5481
|
+
}
|
|
5202
5482
|
} else if (state.tag === "?") {
|
|
5203
|
-
if (state.result !== null && state.kind !== "scalar")
|
|
5483
|
+
if (state.result !== null && state.kind !== "scalar") {
|
|
5204
5484
|
throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
|
|
5485
|
+
}
|
|
5205
5486
|
for (let typeIndex = 0, typeQuantity = state.implicitTypes.length;typeIndex < typeQuantity; typeIndex += 1) {
|
|
5206
|
-
|
|
5207
|
-
if (
|
|
5208
|
-
state.result =
|
|
5209
|
-
state.tag =
|
|
5210
|
-
if (state.anchor !== null)
|
|
5487
|
+
type2 = state.implicitTypes[typeIndex];
|
|
5488
|
+
if (type2.resolve(state.result)) {
|
|
5489
|
+
state.result = type2.construct(state.result);
|
|
5490
|
+
state.tag = type2.tag;
|
|
5491
|
+
if (state.anchor !== null) {
|
|
5211
5492
|
storeAnchor(state, state.anchor, state.result);
|
|
5493
|
+
}
|
|
5212
5494
|
break;
|
|
5213
5495
|
}
|
|
5214
5496
|
}
|
|
5215
5497
|
} else if (state.tag !== "!") {
|
|
5216
|
-
if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag))
|
|
5217
|
-
|
|
5218
|
-
else {
|
|
5219
|
-
|
|
5498
|
+
if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) {
|
|
5499
|
+
type2 = state.typeMap[state.kind || "fallback"][state.tag];
|
|
5500
|
+
} else {
|
|
5501
|
+
type2 = null;
|
|
5220
5502
|
const typeList = state.typeMap.multi[state.kind || "fallback"];
|
|
5221
|
-
for (let typeIndex = 0, typeQuantity = typeList.length;typeIndex < typeQuantity; typeIndex += 1)
|
|
5503
|
+
for (let typeIndex = 0, typeQuantity = typeList.length;typeIndex < typeQuantity; typeIndex += 1) {
|
|
5222
5504
|
if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
|
|
5223
|
-
|
|
5505
|
+
type2 = typeList[typeIndex];
|
|
5224
5506
|
break;
|
|
5225
5507
|
}
|
|
5508
|
+
}
|
|
5226
5509
|
}
|
|
5227
|
-
if (!
|
|
5510
|
+
if (!type2) {
|
|
5228
5511
|
throwError(state, "unknown tag !<" + state.tag + ">");
|
|
5229
|
-
|
|
5230
|
-
|
|
5231
|
-
|
|
5512
|
+
}
|
|
5513
|
+
if (state.result !== null && type2.kind !== state.kind) {
|
|
5514
|
+
throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type2.kind + '", not "' + state.kind + '"');
|
|
5515
|
+
}
|
|
5516
|
+
if (!type2.resolve(state.result, state.tag)) {
|
|
5232
5517
|
throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
|
|
5233
|
-
else {
|
|
5234
|
-
state.result =
|
|
5235
|
-
if (state.anchor !== null)
|
|
5518
|
+
} else {
|
|
5519
|
+
state.result = type2.construct(state.result, state.tag);
|
|
5520
|
+
if (state.anchor !== null) {
|
|
5236
5521
|
storeAnchor(state, state.anchor, state.result);
|
|
5522
|
+
}
|
|
5237
5523
|
}
|
|
5238
5524
|
}
|
|
5239
|
-
if (state.listener !== null)
|
|
5525
|
+
if (state.listener !== null) {
|
|
5240
5526
|
state.listener("close", state);
|
|
5527
|
+
}
|
|
5241
5528
|
state.depth -= 1;
|
|
5242
5529
|
return state.tag !== null || state.anchor !== null || hasContent;
|
|
5243
5530
|
}
|
|
@@ -5247,55 +5534,63 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5247
5534
|
let ch;
|
|
5248
5535
|
state.version = null;
|
|
5249
5536
|
state.checkLineBreaks = state.legacy;
|
|
5250
|
-
state.tagMap = Object.create(null);
|
|
5251
|
-
state.anchorMap = Object.create(null);
|
|
5537
|
+
state.tagMap = /* @__PURE__ */ Object.create(null);
|
|
5538
|
+
state.anchorMap = /* @__PURE__ */ Object.create(null);
|
|
5252
5539
|
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
5253
5540
|
skipSeparationSpace(state, true, -1);
|
|
5254
5541
|
ch = state.input.charCodeAt(state.position);
|
|
5255
|
-
if (state.lineIndent > 0 || ch !== 37)
|
|
5542
|
+
if (state.lineIndent > 0 || ch !== 37) {
|
|
5256
5543
|
break;
|
|
5544
|
+
}
|
|
5257
5545
|
hasDirectives = true;
|
|
5258
5546
|
ch = state.input.charCodeAt(++state.position);
|
|
5259
5547
|
let _position = state.position;
|
|
5260
|
-
while (ch !== 0 && !isWsOrEol(ch))
|
|
5548
|
+
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
5261
5549
|
ch = state.input.charCodeAt(++state.position);
|
|
5550
|
+
}
|
|
5262
5551
|
const directiveName = state.input.slice(_position, state.position);
|
|
5263
5552
|
const directiveArgs = [];
|
|
5264
|
-
if (directiveName.length < 1)
|
|
5553
|
+
if (directiveName.length < 1) {
|
|
5265
5554
|
throwError(state, "directive name must not be less than one character in length");
|
|
5555
|
+
}
|
|
5266
5556
|
while (ch !== 0) {
|
|
5267
|
-
while (isWhiteSpace(ch))
|
|
5557
|
+
while (isWhiteSpace(ch)) {
|
|
5268
5558
|
ch = state.input.charCodeAt(++state.position);
|
|
5559
|
+
}
|
|
5269
5560
|
if (ch === 35) {
|
|
5270
|
-
do
|
|
5561
|
+
do {
|
|
5271
5562
|
ch = state.input.charCodeAt(++state.position);
|
|
5272
|
-
while (ch !== 0 && !isEol(ch));
|
|
5563
|
+
} while (ch !== 0 && !isEol(ch));
|
|
5273
5564
|
break;
|
|
5274
5565
|
}
|
|
5275
5566
|
if (isEol(ch))
|
|
5276
5567
|
break;
|
|
5277
5568
|
_position = state.position;
|
|
5278
|
-
while (ch !== 0 && !isWsOrEol(ch))
|
|
5569
|
+
while (ch !== 0 && !isWsOrEol(ch)) {
|
|
5279
5570
|
ch = state.input.charCodeAt(++state.position);
|
|
5571
|
+
}
|
|
5280
5572
|
directiveArgs.push(state.input.slice(_position, state.position));
|
|
5281
5573
|
}
|
|
5282
5574
|
if (ch !== 0)
|
|
5283
5575
|
readLineBreak(state);
|
|
5284
|
-
if (_hasOwnProperty.call(directiveHandlers, directiveName))
|
|
5576
|
+
if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
|
|
5285
5577
|
directiveHandlers[directiveName](state, directiveName, directiveArgs);
|
|
5286
|
-
else
|
|
5578
|
+
} else {
|
|
5287
5579
|
throwWarning(state, 'unknown document directive "' + directiveName + '"');
|
|
5580
|
+
}
|
|
5288
5581
|
}
|
|
5289
5582
|
skipSeparationSpace(state, true, -1);
|
|
5290
5583
|
if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
|
|
5291
5584
|
state.position += 3;
|
|
5292
5585
|
skipSeparationSpace(state, true, -1);
|
|
5293
|
-
} else if (hasDirectives)
|
|
5586
|
+
} else if (hasDirectives) {
|
|
5294
5587
|
throwError(state, "directives end mark is expected");
|
|
5588
|
+
}
|
|
5295
5589
|
composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
|
|
5296
5590
|
skipSeparationSpace(state, true, -1);
|
|
5297
|
-
if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position)))
|
|
5591
|
+
if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
|
|
5298
5592
|
throwWarning(state, "non-ASCII line breaks are interpreted as content");
|
|
5593
|
+
}
|
|
5299
5594
|
state.documents.push(state.result);
|
|
5300
5595
|
if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
5301
5596
|
if (state.input.charCodeAt(state.position) === 46) {
|
|
@@ -5304,18 +5599,21 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5304
5599
|
}
|
|
5305
5600
|
return;
|
|
5306
5601
|
}
|
|
5307
|
-
if (state.position < state.length - 1)
|
|
5602
|
+
if (state.position < state.length - 1) {
|
|
5308
5603
|
throwError(state, "end of the stream or a document separator is expected");
|
|
5604
|
+
}
|
|
5309
5605
|
}
|
|
5310
5606
|
function loadDocuments(input, options) {
|
|
5311
5607
|
input = String(input);
|
|
5312
5608
|
options = options || {};
|
|
5313
5609
|
if (input.length !== 0) {
|
|
5314
|
-
if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13)
|
|
5610
|
+
if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
|
|
5315
5611
|
input += `
|
|
5316
5612
|
`;
|
|
5317
|
-
|
|
5613
|
+
}
|
|
5614
|
+
if (input.charCodeAt(0) === 65279) {
|
|
5318
5615
|
input = input.slice(1);
|
|
5616
|
+
}
|
|
5319
5617
|
}
|
|
5320
5618
|
const state = new State(input, options);
|
|
5321
5619
|
const nullpos = input.indexOf("\x00");
|
|
@@ -5328,64 +5626,74 @@ var require_loader = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5328
5626
|
state.lineIndent += 1;
|
|
5329
5627
|
state.position += 1;
|
|
5330
5628
|
}
|
|
5331
|
-
while (state.position < state.length - 1)
|
|
5629
|
+
while (state.position < state.length - 1) {
|
|
5332
5630
|
readDocument(state);
|
|
5631
|
+
}
|
|
5333
5632
|
return state.documents;
|
|
5334
5633
|
}
|
|
5335
|
-
function
|
|
5634
|
+
function loadAll2(input, iterator, options) {
|
|
5336
5635
|
if (iterator !== null && typeof iterator === "object" && typeof options === "undefined") {
|
|
5337
5636
|
options = iterator;
|
|
5338
5637
|
iterator = null;
|
|
5339
5638
|
}
|
|
5340
5639
|
const documents = loadDocuments(input, options);
|
|
5341
|
-
if (typeof iterator !== "function")
|
|
5640
|
+
if (typeof iterator !== "function") {
|
|
5342
5641
|
return documents;
|
|
5343
|
-
|
|
5642
|
+
}
|
|
5643
|
+
for (let index = 0, length = documents.length;index < length; index += 1) {
|
|
5344
5644
|
iterator(documents[index]);
|
|
5645
|
+
}
|
|
5345
5646
|
}
|
|
5346
|
-
function
|
|
5647
|
+
function load2(input, options) {
|
|
5347
5648
|
const documents = loadDocuments(input, options);
|
|
5348
|
-
if (documents.length === 0)
|
|
5649
|
+
if (documents.length === 0) {
|
|
5349
5650
|
return;
|
|
5350
|
-
else if (documents.length === 1)
|
|
5651
|
+
} else if (documents.length === 1) {
|
|
5351
5652
|
return documents[0];
|
|
5352
|
-
|
|
5653
|
+
}
|
|
5654
|
+
throw new YAMLException2("expected a single document in the stream, but found more");
|
|
5353
5655
|
}
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
|
|
5358
|
-
|
|
5359
|
-
|
|
5360
|
-
|
|
5361
|
-
|
|
5362
|
-
|
|
5363
|
-
|
|
5364
|
-
|
|
5365
|
-
|
|
5366
|
-
|
|
5367
|
-
|
|
5368
|
-
|
|
5369
|
-
|
|
5370
|
-
|
|
5371
|
-
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5376
|
-
|
|
5377
|
-
|
|
5378
|
-
|
|
5379
|
-
|
|
5380
|
-
|
|
5381
|
-
|
|
5382
|
-
|
|
5383
|
-
|
|
5384
|
-
|
|
5385
|
-
|
|
5386
|
-
|
|
5387
|
-
|
|
5388
|
-
|
|
5656
|
+
loader.loadAll = loadAll2;
|
|
5657
|
+
loader.load = load2;
|
|
5658
|
+
return loader;
|
|
5659
|
+
}
|
|
5660
|
+
var dumper = {};
|
|
5661
|
+
var hasRequiredDumper;
|
|
5662
|
+
function requireDumper() {
|
|
5663
|
+
if (hasRequiredDumper)
|
|
5664
|
+
return dumper;
|
|
5665
|
+
hasRequiredDumper = 1;
|
|
5666
|
+
const common2 = requireCommon();
|
|
5667
|
+
const YAMLException2 = requireException();
|
|
5668
|
+
const DEFAULT_SCHEMA2 = require_default();
|
|
5669
|
+
const _toString = Object.prototype.toString;
|
|
5670
|
+
const _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
5671
|
+
const CHAR_BOM = 65279;
|
|
5672
|
+
const CHAR_TAB = 9;
|
|
5673
|
+
const CHAR_LINE_FEED = 10;
|
|
5674
|
+
const CHAR_CARRIAGE_RETURN = 13;
|
|
5675
|
+
const CHAR_SPACE = 32;
|
|
5676
|
+
const CHAR_EXCLAMATION = 33;
|
|
5677
|
+
const CHAR_DOUBLE_QUOTE = 34;
|
|
5678
|
+
const CHAR_SHARP = 35;
|
|
5679
|
+
const CHAR_PERCENT = 37;
|
|
5680
|
+
const CHAR_AMPERSAND = 38;
|
|
5681
|
+
const CHAR_SINGLE_QUOTE = 39;
|
|
5682
|
+
const CHAR_ASTERISK = 42;
|
|
5683
|
+
const CHAR_COMMA = 44;
|
|
5684
|
+
const CHAR_MINUS = 45;
|
|
5685
|
+
const CHAR_COLON = 58;
|
|
5686
|
+
const CHAR_EQUALS = 61;
|
|
5687
|
+
const CHAR_GREATER_THAN = 62;
|
|
5688
|
+
const CHAR_QUESTION = 63;
|
|
5689
|
+
const CHAR_COMMERCIAL_AT = 64;
|
|
5690
|
+
const CHAR_LEFT_SQUARE_BRACKET = 91;
|
|
5691
|
+
const CHAR_RIGHT_SQUARE_BRACKET = 93;
|
|
5692
|
+
const CHAR_GRAVE_ACCENT = 96;
|
|
5693
|
+
const CHAR_LEFT_CURLY_BRACKET = 123;
|
|
5694
|
+
const CHAR_VERTICAL_LINE = 124;
|
|
5695
|
+
const CHAR_RIGHT_CURLY_BRACKET = 125;
|
|
5696
|
+
const ESCAPE_SEQUENCES = {};
|
|
5389
5697
|
ESCAPE_SEQUENCES[0] = "\\0";
|
|
5390
5698
|
ESCAPE_SEQUENCES[7] = "\\a";
|
|
5391
5699
|
ESCAPE_SEQUENCES[8] = "\\b";
|
|
@@ -5401,7 +5709,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5401
5709
|
ESCAPE_SEQUENCES[160] = "\\_";
|
|
5402
5710
|
ESCAPE_SEQUENCES[8232] = "\\L";
|
|
5403
5711
|
ESCAPE_SEQUENCES[8233] = "\\P";
|
|
5404
|
-
|
|
5712
|
+
const DEPRECATED_BOOLEANS_SYNTAX = [
|
|
5405
5713
|
"y",
|
|
5406
5714
|
"Y",
|
|
5407
5715
|
"yes",
|
|
@@ -5419,20 +5727,22 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5419
5727
|
"Off",
|
|
5420
5728
|
"OFF"
|
|
5421
5729
|
];
|
|
5422
|
-
|
|
5423
|
-
function compileStyleMap(
|
|
5424
|
-
if (
|
|
5730
|
+
const DEPRECATED_BASE60_SYNTAX = /^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;
|
|
5731
|
+
function compileStyleMap(schema2, map2) {
|
|
5732
|
+
if (map2 === null)
|
|
5425
5733
|
return {};
|
|
5426
5734
|
const result = {};
|
|
5427
|
-
const keys = Object.keys(
|
|
5735
|
+
const keys = Object.keys(map2);
|
|
5428
5736
|
for (let index = 0, length = keys.length;index < length; index += 1) {
|
|
5429
5737
|
let tag = keys[index];
|
|
5430
|
-
let style = String(
|
|
5431
|
-
if (tag.slice(0, 2) === "!!")
|
|
5738
|
+
let style = String(map2[tag]);
|
|
5739
|
+
if (tag.slice(0, 2) === "!!") {
|
|
5432
5740
|
tag = "tag:yaml.org,2002:" + tag.slice(2);
|
|
5433
|
-
|
|
5434
|
-
|
|
5435
|
-
|
|
5741
|
+
}
|
|
5742
|
+
const type2 = schema2.compiledTypeMap["fallback"][tag];
|
|
5743
|
+
if (type2 && _hasOwnProperty.call(type2.styleAliases, style)) {
|
|
5744
|
+
style = type2.styleAliases[style];
|
|
5745
|
+
}
|
|
5436
5746
|
result[tag] = style;
|
|
5437
5747
|
}
|
|
5438
5748
|
return result;
|
|
@@ -5450,18 +5760,19 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5450
5760
|
} else if (character <= 4294967295) {
|
|
5451
5761
|
handle = "U";
|
|
5452
5762
|
length = 8;
|
|
5453
|
-
} else
|
|
5454
|
-
throw new
|
|
5455
|
-
|
|
5763
|
+
} else {
|
|
5764
|
+
throw new YAMLException2("code point within a string may not be greater than 0xFFFFFFFF");
|
|
5765
|
+
}
|
|
5766
|
+
return "\\" + handle + common2.repeat("0", length - string.length) + string;
|
|
5456
5767
|
}
|
|
5457
|
-
|
|
5458
|
-
|
|
5768
|
+
const QUOTING_TYPE_SINGLE = 1;
|
|
5769
|
+
const QUOTING_TYPE_DOUBLE = 2;
|
|
5459
5770
|
function State(options) {
|
|
5460
|
-
this.schema = options["schema"] ||
|
|
5771
|
+
this.schema = options["schema"] || DEFAULT_SCHEMA2;
|
|
5461
5772
|
this.indent = Math.max(1, options["indent"] || 2);
|
|
5462
5773
|
this.noArrayIndent = options["noArrayIndent"] || false;
|
|
5463
5774
|
this.skipInvalid = options["skipInvalid"] || false;
|
|
5464
|
-
this.flowLevel =
|
|
5775
|
+
this.flowLevel = common2.isNothing(options["flowLevel"]) ? -1 : options["flowLevel"];
|
|
5465
5776
|
this.styleMap = compileStyleMap(this.schema, options["styles"] || null);
|
|
5466
5777
|
this.sortKeys = options["sortKeys"] || false;
|
|
5467
5778
|
this.lineWidth = options["lineWidth"] || 80;
|
|
@@ -5479,7 +5790,7 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5479
5790
|
this.usedDuplicates = null;
|
|
5480
5791
|
}
|
|
5481
5792
|
function indentString(string, spaces) {
|
|
5482
|
-
const ind =
|
|
5793
|
+
const ind = common2.repeat(" ", spaces);
|
|
5483
5794
|
let position = 0;
|
|
5484
5795
|
let result = "";
|
|
5485
5796
|
const length = string.length;
|
|
@@ -5503,12 +5814,15 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5503
5814
|
}
|
|
5504
5815
|
function generateNextLine(state, level) {
|
|
5505
5816
|
return `
|
|
5506
|
-
` +
|
|
5817
|
+
` + common2.repeat(" ", state.indent * level);
|
|
5507
5818
|
}
|
|
5508
|
-
function testImplicitResolving(state,
|
|
5509
|
-
for (let index = 0, length = state.implicitTypes.length;index < length; index += 1)
|
|
5510
|
-
|
|
5819
|
+
function testImplicitResolving(state, str2) {
|
|
5820
|
+
for (let index = 0, length = state.implicitTypes.length;index < length; index += 1) {
|
|
5821
|
+
const type2 = state.implicitTypes[index];
|
|
5822
|
+
if (type2.resolve(str2)) {
|
|
5511
5823
|
return true;
|
|
5824
|
+
}
|
|
5825
|
+
}
|
|
5512
5826
|
return false;
|
|
5513
5827
|
}
|
|
5514
5828
|
function isWhitespace(c) {
|
|
@@ -5536,19 +5850,21 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5536
5850
|
let second;
|
|
5537
5851
|
if (first >= 55296 && first <= 56319 && pos + 1 < string.length) {
|
|
5538
5852
|
second = string.charCodeAt(pos + 1);
|
|
5539
|
-
if (second >= 56320 && second <= 57343)
|
|
5853
|
+
if (second >= 56320 && second <= 57343) {
|
|
5540
5854
|
return (first - 55296) * 1024 + second - 56320 + 65536;
|
|
5855
|
+
}
|
|
5541
5856
|
}
|
|
5542
5857
|
return first;
|
|
5543
5858
|
}
|
|
5544
5859
|
function needIndentIndicator(string) {
|
|
5545
|
-
|
|
5546
|
-
|
|
5547
|
-
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5551
|
-
|
|
5860
|
+
const leadingSpaceRe = /^\n* /;
|
|
5861
|
+
return leadingSpaceRe.test(string);
|
|
5862
|
+
}
|
|
5863
|
+
const STYLE_PLAIN = 1;
|
|
5864
|
+
const STYLE_SINGLE = 2;
|
|
5865
|
+
const STYLE_LITERAL = 3;
|
|
5866
|
+
const STYLE_FOLDED = 4;
|
|
5867
|
+
const STYLE_DOUBLE = 5;
|
|
5552
5868
|
function chooseScalarStyle(string, singleLineOnly, indentPerLevel, lineWidth, testAmbiguousType, quotingType, forceQuotes, inblock) {
|
|
5553
5869
|
let i;
|
|
5554
5870
|
let char = 0;
|
|
@@ -5558,15 +5874,16 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5558
5874
|
const shouldTrackWidth = lineWidth !== -1;
|
|
5559
5875
|
let previousLineBreak = -1;
|
|
5560
5876
|
let plain = isPlainSafeFirst(codePointAt(string, 0)) && isPlainSafeLast(codePointAt(string, string.length - 1));
|
|
5561
|
-
if (singleLineOnly || forceQuotes)
|
|
5877
|
+
if (singleLineOnly || forceQuotes) {
|
|
5562
5878
|
for (i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
|
|
5563
5879
|
char = codePointAt(string, i);
|
|
5564
|
-
if (!isPrintable(char))
|
|
5880
|
+
if (!isPrintable(char)) {
|
|
5565
5881
|
return STYLE_DOUBLE;
|
|
5882
|
+
}
|
|
5566
5883
|
plain = plain && isPlainSafe(char, prevChar, inblock);
|
|
5567
5884
|
prevChar = char;
|
|
5568
5885
|
}
|
|
5569
|
-
else {
|
|
5886
|
+
} else {
|
|
5570
5887
|
for (i = 0;i < string.length; char >= 65536 ? i += 2 : i++) {
|
|
5571
5888
|
char = codePointAt(string, i);
|
|
5572
5889
|
if (char === CHAR_LINE_FEED) {
|
|
@@ -5575,31 +5892,37 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5575
5892
|
hasFoldableLine = hasFoldableLine || i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
|
|
5576
5893
|
previousLineBreak = i;
|
|
5577
5894
|
}
|
|
5578
|
-
} else if (!isPrintable(char))
|
|
5895
|
+
} else if (!isPrintable(char)) {
|
|
5579
5896
|
return STYLE_DOUBLE;
|
|
5897
|
+
}
|
|
5580
5898
|
plain = plain && isPlainSafe(char, prevChar, inblock);
|
|
5581
5899
|
prevChar = char;
|
|
5582
5900
|
}
|
|
5583
|
-
hasFoldableLine = hasFoldableLine || shouldTrackWidth && i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ";
|
|
5901
|
+
hasFoldableLine = hasFoldableLine || shouldTrackWidth && (i - previousLineBreak - 1 > lineWidth && string[previousLineBreak + 1] !== " ");
|
|
5584
5902
|
}
|
|
5585
5903
|
if (!hasLineBreak && !hasFoldableLine) {
|
|
5586
|
-
if (plain && !forceQuotes && !testAmbiguousType(string))
|
|
5904
|
+
if (plain && !forceQuotes && !testAmbiguousType(string)) {
|
|
5587
5905
|
return STYLE_PLAIN;
|
|
5906
|
+
}
|
|
5588
5907
|
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
|
|
5589
5908
|
}
|
|
5590
|
-
if (indentPerLevel > 9 && needIndentIndicator(string))
|
|
5909
|
+
if (indentPerLevel > 9 && needIndentIndicator(string)) {
|
|
5591
5910
|
return STYLE_DOUBLE;
|
|
5592
|
-
|
|
5911
|
+
}
|
|
5912
|
+
if (!forceQuotes) {
|
|
5593
5913
|
return hasFoldableLine ? STYLE_FOLDED : STYLE_LITERAL;
|
|
5914
|
+
}
|
|
5594
5915
|
return quotingType === QUOTING_TYPE_DOUBLE ? STYLE_DOUBLE : STYLE_SINGLE;
|
|
5595
5916
|
}
|
|
5596
5917
|
function writeScalar(state, string, level, iskey, inblock) {
|
|
5597
5918
|
state.dump = function() {
|
|
5598
|
-
if (string.length === 0)
|
|
5919
|
+
if (string.length === 0) {
|
|
5599
5920
|
return state.quotingType === QUOTING_TYPE_DOUBLE ? '""' : "''";
|
|
5921
|
+
}
|
|
5600
5922
|
if (!state.noCompatMode) {
|
|
5601
|
-
if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string))
|
|
5923
|
+
if (DEPRECATED_BOOLEANS_SYNTAX.indexOf(string) !== -1 || DEPRECATED_BASE60_SYNTAX.test(string)) {
|
|
5602
5924
|
return state.quotingType === QUOTING_TYPE_DOUBLE ? '"' + string + '"' : "'" + string + "'";
|
|
5925
|
+
}
|
|
5603
5926
|
}
|
|
5604
5927
|
const indent = state.indent * Math.max(1, level);
|
|
5605
5928
|
const lineWidth = state.lineWidth === -1 ? -1 : Math.max(Math.min(state.lineWidth, 40), state.lineWidth - indent);
|
|
@@ -5617,9 +5940,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5617
5940
|
case STYLE_FOLDED:
|
|
5618
5941
|
return ">" + blockHeader(string, state.indent) + dropEndingNewline(indentString(foldString(string, lineWidth), indent));
|
|
5619
5942
|
case STYLE_DOUBLE:
|
|
5620
|
-
return '"' + escapeString(string
|
|
5943
|
+
return '"' + escapeString(string) + '"';
|
|
5621
5944
|
default:
|
|
5622
|
-
throw new
|
|
5945
|
+
throw new YAMLException2("impossible error: invalid scalar style");
|
|
5623
5946
|
}
|
|
5624
5947
|
}();
|
|
5625
5948
|
}
|
|
@@ -5627,9 +5950,11 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5627
5950
|
const indentIndicator = needIndentIndicator(string) ? String(indentPerLevel) : "";
|
|
5628
5951
|
const clip = string[string.length - 1] === `
|
|
5629
5952
|
`;
|
|
5630
|
-
|
|
5953
|
+
const keep = clip && (string[string.length - 2] === `
|
|
5631
5954
|
` || string === `
|
|
5632
|
-
`)
|
|
5955
|
+
`);
|
|
5956
|
+
const chomp = keep ? "+" : clip ? "" : "-";
|
|
5957
|
+
return indentIndicator + chomp + `
|
|
5633
5958
|
`;
|
|
5634
5959
|
}
|
|
5635
5960
|
function dropEndingNewline(string) {
|
|
@@ -5681,11 +6006,12 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5681
6006
|
}
|
|
5682
6007
|
result += `
|
|
5683
6008
|
`;
|
|
5684
|
-
if (line.length - start > width && curr > start)
|
|
6009
|
+
if (line.length - start > width && curr > start) {
|
|
5685
6010
|
result += line.slice(start, curr) + `
|
|
5686
6011
|
` + line.slice(curr + 1);
|
|
5687
|
-
else
|
|
6012
|
+
} else {
|
|
5688
6013
|
result += line.slice(start);
|
|
6014
|
+
}
|
|
5689
6015
|
return result.slice(1);
|
|
5690
6016
|
}
|
|
5691
6017
|
function escapeString(string) {
|
|
@@ -5698,8 +6024,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5698
6024
|
result += string[i];
|
|
5699
6025
|
if (char >= 65536)
|
|
5700
6026
|
result += string[i + 1];
|
|
5701
|
-
} else
|
|
6027
|
+
} else {
|
|
5702
6028
|
result += escapeSeq || encodeHex(char);
|
|
6029
|
+
}
|
|
5703
6030
|
}
|
|
5704
6031
|
return result;
|
|
5705
6032
|
}
|
|
@@ -5708,8 +6035,9 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5708
6035
|
const _tag = state.tag;
|
|
5709
6036
|
for (let index = 0, length = object.length;index < length; index += 1) {
|
|
5710
6037
|
let value = object[index];
|
|
5711
|
-
if (state.replacer)
|
|
6038
|
+
if (state.replacer) {
|
|
5712
6039
|
value = state.replacer.call(object, String(index), value);
|
|
6040
|
+
}
|
|
5713
6041
|
if (writeNode(state, level, value, false, false) || typeof value === "undefined" && writeNode(state, level, null, false, false)) {
|
|
5714
6042
|
if (_result !== "")
|
|
5715
6043
|
_result += "," + (!state.condenseFlow ? " " : "");
|
|
@@ -5724,15 +6052,18 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5724
6052
|
const _tag = state.tag;
|
|
5725
6053
|
for (let index = 0, length = object.length;index < length; index += 1) {
|
|
5726
6054
|
let value = object[index];
|
|
5727
|
-
if (state.replacer)
|
|
6055
|
+
if (state.replacer) {
|
|
5728
6056
|
value = state.replacer.call(object, String(index), value);
|
|
6057
|
+
}
|
|
5729
6058
|
if (writeNode(state, level + 1, value, true, true, false, true) || typeof value === "undefined" && writeNode(state, level + 1, null, true, true, false, true)) {
|
|
5730
|
-
if (!compact || _result !== "")
|
|
6059
|
+
if (!compact || _result !== "") {
|
|
5731
6060
|
_result += generateNextLine(state, level);
|
|
5732
|
-
|
|
6061
|
+
}
|
|
6062
|
+
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
5733
6063
|
_result += "-";
|
|
5734
|
-
else
|
|
6064
|
+
} else {
|
|
5735
6065
|
_result += "- ";
|
|
6066
|
+
}
|
|
5736
6067
|
_result += state.dump;
|
|
5737
6068
|
}
|
|
5738
6069
|
}
|
|
@@ -5751,15 +6082,18 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5751
6082
|
pairBuffer += '"';
|
|
5752
6083
|
const objectKey = objectKeyList[index];
|
|
5753
6084
|
let objectValue = object[objectKey];
|
|
5754
|
-
if (state.replacer)
|
|
6085
|
+
if (state.replacer) {
|
|
5755
6086
|
objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
5756
|
-
|
|
6087
|
+
}
|
|
6088
|
+
if (!writeNode(state, level, objectKey, false, false)) {
|
|
5757
6089
|
continue;
|
|
6090
|
+
}
|
|
5758
6091
|
if (state.dump.length > 1024)
|
|
5759
6092
|
pairBuffer += "? ";
|
|
5760
6093
|
pairBuffer += state.dump + (state.condenseFlow ? '"' : "") + ":" + (state.condenseFlow ? "" : " ");
|
|
5761
|
-
if (!writeNode(state, level, objectValue, false, false))
|
|
6094
|
+
if (!writeNode(state, level, objectValue, false, false)) {
|
|
5762
6095
|
continue;
|
|
6096
|
+
}
|
|
5763
6097
|
pairBuffer += state.dump;
|
|
5764
6098
|
_result += pairBuffer;
|
|
5765
6099
|
}
|
|
@@ -5770,37 +6104,46 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5770
6104
|
let _result = "";
|
|
5771
6105
|
const _tag = state.tag;
|
|
5772
6106
|
const objectKeyList = Object.keys(object);
|
|
5773
|
-
if (state.sortKeys === true)
|
|
6107
|
+
if (state.sortKeys === true) {
|
|
5774
6108
|
objectKeyList.sort();
|
|
5775
|
-
else if (typeof state.sortKeys === "function")
|
|
6109
|
+
} else if (typeof state.sortKeys === "function") {
|
|
5776
6110
|
objectKeyList.sort(state.sortKeys);
|
|
5777
|
-
else if (state.sortKeys)
|
|
5778
|
-
throw new
|
|
6111
|
+
} else if (state.sortKeys) {
|
|
6112
|
+
throw new YAMLException2("sortKeys must be a boolean or a function");
|
|
6113
|
+
}
|
|
5779
6114
|
for (let index = 0, length = objectKeyList.length;index < length; index += 1) {
|
|
5780
6115
|
let pairBuffer = "";
|
|
5781
|
-
if (!compact || _result !== "")
|
|
6116
|
+
if (!compact || _result !== "") {
|
|
5782
6117
|
pairBuffer += generateNextLine(state, level);
|
|
6118
|
+
}
|
|
5783
6119
|
const objectKey = objectKeyList[index];
|
|
5784
6120
|
let objectValue = object[objectKey];
|
|
5785
|
-
if (state.replacer)
|
|
6121
|
+
if (state.replacer) {
|
|
5786
6122
|
objectValue = state.replacer.call(object, objectKey, objectValue);
|
|
5787
|
-
|
|
6123
|
+
}
|
|
6124
|
+
if (!writeNode(state, level + 1, objectKey, true, true, true)) {
|
|
5788
6125
|
continue;
|
|
6126
|
+
}
|
|
5789
6127
|
const explicitPair = state.tag !== null && state.tag !== "?" || state.dump && state.dump.length > 1024;
|
|
5790
|
-
if (explicitPair)
|
|
5791
|
-
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0))
|
|
6128
|
+
if (explicitPair) {
|
|
6129
|
+
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
5792
6130
|
pairBuffer += "?";
|
|
5793
|
-
else
|
|
6131
|
+
} else {
|
|
5794
6132
|
pairBuffer += "? ";
|
|
6133
|
+
}
|
|
6134
|
+
}
|
|
5795
6135
|
pairBuffer += state.dump;
|
|
5796
|
-
if (explicitPair)
|
|
6136
|
+
if (explicitPair) {
|
|
5797
6137
|
pairBuffer += generateNextLine(state, level);
|
|
5798
|
-
|
|
6138
|
+
}
|
|
6139
|
+
if (!writeNode(state, level + 1, objectValue, true, explicitPair)) {
|
|
5799
6140
|
continue;
|
|
5800
|
-
|
|
6141
|
+
}
|
|
6142
|
+
if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
|
|
5801
6143
|
pairBuffer += ":";
|
|
5802
|
-
else
|
|
6144
|
+
} else {
|
|
5803
6145
|
pairBuffer += ": ";
|
|
6146
|
+
}
|
|
5804
6147
|
pairBuffer += state.dump;
|
|
5805
6148
|
_result += pairBuffer;
|
|
5806
6149
|
}
|
|
@@ -5810,24 +6153,27 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5810
6153
|
function detectType(state, object, explicit) {
|
|
5811
6154
|
const typeList = explicit ? state.explicitTypes : state.implicitTypes;
|
|
5812
6155
|
for (let index = 0, length = typeList.length;index < length; index += 1) {
|
|
5813
|
-
const
|
|
5814
|
-
if ((
|
|
5815
|
-
if (explicit)
|
|
5816
|
-
if (
|
|
5817
|
-
state.tag =
|
|
5818
|
-
else
|
|
5819
|
-
state.tag =
|
|
5820
|
-
|
|
6156
|
+
const type2 = typeList[index];
|
|
6157
|
+
if ((type2.instanceOf || type2.predicate) && (!type2.instanceOf || typeof object === "object" && object instanceof type2.instanceOf) && (!type2.predicate || type2.predicate(object))) {
|
|
6158
|
+
if (explicit) {
|
|
6159
|
+
if (type2.multi && type2.representName) {
|
|
6160
|
+
state.tag = type2.representName(object);
|
|
6161
|
+
} else {
|
|
6162
|
+
state.tag = type2.tag;
|
|
6163
|
+
}
|
|
6164
|
+
} else {
|
|
5821
6165
|
state.tag = "?";
|
|
5822
|
-
|
|
5823
|
-
|
|
6166
|
+
}
|
|
6167
|
+
if (type2.represent) {
|
|
6168
|
+
const style = state.styleMap[type2.tag] || type2.defaultStyle;
|
|
5824
6169
|
let _result;
|
|
5825
|
-
if (_toString.call(
|
|
5826
|
-
_result =
|
|
5827
|
-
else if (_hasOwnProperty.call(
|
|
5828
|
-
_result =
|
|
5829
|
-
else
|
|
5830
|
-
throw new
|
|
6170
|
+
if (_toString.call(type2.represent) === "[object Function]") {
|
|
6171
|
+
_result = type2.represent(object, style);
|
|
6172
|
+
} else if (_hasOwnProperty.call(type2.represent, style)) {
|
|
6173
|
+
_result = type2.represent[style](object, style);
|
|
6174
|
+
} else {
|
|
6175
|
+
throw new YAMLException2("!<" + type2.tag + '> tag resolver accepts not "' + style + '" style');
|
|
6176
|
+
}
|
|
5831
6177
|
state.dump = _result;
|
|
5832
6178
|
}
|
|
5833
6179
|
return true;
|
|
@@ -5838,67 +6184,78 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5838
6184
|
function writeNode(state, level, object, block, compact, iskey, isblockseq) {
|
|
5839
6185
|
state.tag = null;
|
|
5840
6186
|
state.dump = object;
|
|
5841
|
-
if (!detectType(state, object, false))
|
|
6187
|
+
if (!detectType(state, object, false)) {
|
|
5842
6188
|
detectType(state, object, true);
|
|
5843
|
-
|
|
6189
|
+
}
|
|
6190
|
+
const type2 = _toString.call(state.dump);
|
|
5844
6191
|
const inblock = block;
|
|
5845
|
-
if (block)
|
|
6192
|
+
if (block) {
|
|
5846
6193
|
block = state.flowLevel < 0 || state.flowLevel > level;
|
|
5847
|
-
|
|
6194
|
+
}
|
|
6195
|
+
const objectOrArray = type2 === "[object Object]" || type2 === "[object Array]";
|
|
5848
6196
|
let duplicateIndex;
|
|
5849
6197
|
let duplicate;
|
|
5850
6198
|
if (objectOrArray) {
|
|
5851
6199
|
duplicateIndex = state.duplicates.indexOf(object);
|
|
5852
6200
|
duplicate = duplicateIndex !== -1;
|
|
5853
6201
|
}
|
|
5854
|
-
if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0)
|
|
6202
|
+
if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level > 0) {
|
|
5855
6203
|
compact = false;
|
|
5856
|
-
|
|
6204
|
+
}
|
|
6205
|
+
if (duplicate && state.usedDuplicates[duplicateIndex]) {
|
|
5857
6206
|
state.dump = "*ref_" + duplicateIndex;
|
|
5858
|
-
else {
|
|
5859
|
-
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex])
|
|
6207
|
+
} else {
|
|
6208
|
+
if (objectOrArray && duplicate && !state.usedDuplicates[duplicateIndex]) {
|
|
5860
6209
|
state.usedDuplicates[duplicateIndex] = true;
|
|
5861
|
-
|
|
6210
|
+
}
|
|
6211
|
+
if (type2 === "[object Object]") {
|
|
5862
6212
|
if (block && Object.keys(state.dump).length !== 0) {
|
|
5863
6213
|
writeBlockMapping(state, level, state.dump, compact);
|
|
5864
|
-
if (duplicate)
|
|
6214
|
+
if (duplicate) {
|
|
5865
6215
|
state.dump = "&ref_" + duplicateIndex + state.dump;
|
|
6216
|
+
}
|
|
5866
6217
|
} else {
|
|
5867
6218
|
writeFlowMapping(state, level, state.dump);
|
|
5868
|
-
if (duplicate)
|
|
6219
|
+
if (duplicate) {
|
|
5869
6220
|
state.dump = "&ref_" + duplicateIndex + " " + state.dump;
|
|
6221
|
+
}
|
|
5870
6222
|
}
|
|
5871
|
-
else if (
|
|
6223
|
+
} else if (type2 === "[object Array]") {
|
|
5872
6224
|
if (block && state.dump.length !== 0) {
|
|
5873
|
-
if (state.noArrayIndent && !isblockseq && level > 0)
|
|
6225
|
+
if (state.noArrayIndent && !isblockseq && level > 0) {
|
|
5874
6226
|
writeBlockSequence(state, level - 1, state.dump, compact);
|
|
5875
|
-
else
|
|
6227
|
+
} else {
|
|
5876
6228
|
writeBlockSequence(state, level, state.dump, compact);
|
|
5877
|
-
|
|
6229
|
+
}
|
|
6230
|
+
if (duplicate) {
|
|
5878
6231
|
state.dump = "&ref_" + duplicateIndex + state.dump;
|
|
6232
|
+
}
|
|
5879
6233
|
} else {
|
|
5880
6234
|
writeFlowSequence(state, level, state.dump);
|
|
5881
|
-
if (duplicate)
|
|
6235
|
+
if (duplicate) {
|
|
5882
6236
|
state.dump = "&ref_" + duplicateIndex + " " + state.dump;
|
|
6237
|
+
}
|
|
5883
6238
|
}
|
|
5884
|
-
else if (
|
|
5885
|
-
if (state.tag !== "?")
|
|
6239
|
+
} else if (type2 === "[object String]") {
|
|
6240
|
+
if (state.tag !== "?") {
|
|
5886
6241
|
writeScalar(state, state.dump, level, iskey, inblock);
|
|
5887
|
-
|
|
6242
|
+
}
|
|
6243
|
+
} else if (type2 === "[object Undefined]") {
|
|
5888
6244
|
return false;
|
|
5889
|
-
else {
|
|
6245
|
+
} else {
|
|
5890
6246
|
if (state.skipInvalid)
|
|
5891
6247
|
return false;
|
|
5892
|
-
throw new
|
|
6248
|
+
throw new YAMLException2("unacceptable kind of an object to dump " + type2);
|
|
5893
6249
|
}
|
|
5894
6250
|
if (state.tag !== null && state.tag !== "?") {
|
|
5895
6251
|
let tagStr = encodeURI(state.tag[0] === "!" ? state.tag.slice(1) : state.tag).replace(/!/g, "%21");
|
|
5896
|
-
if (state.tag[0] === "!")
|
|
6252
|
+
if (state.tag[0] === "!") {
|
|
5897
6253
|
tagStr = "!" + tagStr;
|
|
5898
|
-
else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:")
|
|
6254
|
+
} else if (tagStr.slice(0, 18) === "tag:yaml.org,2002:") {
|
|
5899
6255
|
tagStr = "!!" + tagStr.slice(18);
|
|
5900
|
-
else
|
|
6256
|
+
} else {
|
|
5901
6257
|
tagStr = "!<" + tagStr + ">";
|
|
6258
|
+
}
|
|
5902
6259
|
state.dump = tagStr + " " + state.dump;
|
|
5903
6260
|
}
|
|
5904
6261
|
}
|
|
@@ -5909,83 +6266,110 @@ var require_dumper = /* @__PURE__ */ __commonJSMin((exports, module) => {
|
|
|
5909
6266
|
const duplicatesIndexes = [];
|
|
5910
6267
|
inspectNode(object, objects, duplicatesIndexes);
|
|
5911
6268
|
const length = duplicatesIndexes.length;
|
|
5912
|
-
for (let index = 0;index < length; index += 1)
|
|
6269
|
+
for (let index = 0;index < length; index += 1) {
|
|
5913
6270
|
state.duplicates.push(objects[duplicatesIndexes[index]]);
|
|
6271
|
+
}
|
|
5914
6272
|
state.usedDuplicates = new Array(length);
|
|
5915
6273
|
}
|
|
5916
6274
|
function inspectNode(object, objects, duplicatesIndexes) {
|
|
5917
6275
|
if (object !== null && typeof object === "object") {
|
|
5918
6276
|
const index = objects.indexOf(object);
|
|
5919
6277
|
if (index !== -1) {
|
|
5920
|
-
if (duplicatesIndexes.indexOf(index) === -1)
|
|
6278
|
+
if (duplicatesIndexes.indexOf(index) === -1) {
|
|
5921
6279
|
duplicatesIndexes.push(index);
|
|
6280
|
+
}
|
|
5922
6281
|
} else {
|
|
5923
6282
|
objects.push(object);
|
|
5924
|
-
if (Array.isArray(object))
|
|
5925
|
-
for (let i = 0, length = object.length;i < length; i += 1)
|
|
6283
|
+
if (Array.isArray(object)) {
|
|
6284
|
+
for (let i = 0, length = object.length;i < length; i += 1) {
|
|
5926
6285
|
inspectNode(object[i], objects, duplicatesIndexes);
|
|
5927
|
-
|
|
6286
|
+
}
|
|
6287
|
+
} else {
|
|
5928
6288
|
const objectKeyList = Object.keys(object);
|
|
5929
|
-
for (let i = 0, length = objectKeyList.length;i < length; i += 1)
|
|
6289
|
+
for (let i = 0, length = objectKeyList.length;i < length; i += 1) {
|
|
5930
6290
|
inspectNode(object[objectKeyList[i]], objects, duplicatesIndexes);
|
|
6291
|
+
}
|
|
5931
6292
|
}
|
|
5932
6293
|
}
|
|
5933
6294
|
}
|
|
5934
6295
|
}
|
|
5935
|
-
function
|
|
6296
|
+
function dump2(input, options) {
|
|
5936
6297
|
options = options || {};
|
|
5937
6298
|
const state = new State(options);
|
|
5938
6299
|
if (!state.noRefs)
|
|
5939
6300
|
getDuplicateReferences(input, state);
|
|
5940
6301
|
let value = input;
|
|
5941
|
-
if (state.replacer)
|
|
6302
|
+
if (state.replacer) {
|
|
5942
6303
|
value = state.replacer.call({ "": value }, "", value);
|
|
6304
|
+
}
|
|
5943
6305
|
if (writeNode(state, 0, value, true, true))
|
|
5944
6306
|
return state.dump + `
|
|
5945
6307
|
`;
|
|
5946
6308
|
return "";
|
|
5947
6309
|
}
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
6310
|
+
dumper.dump = dump2;
|
|
6311
|
+
return dumper;
|
|
6312
|
+
}
|
|
6313
|
+
var hasRequiredJsYaml;
|
|
6314
|
+
function requireJsYaml() {
|
|
6315
|
+
if (hasRequiredJsYaml)
|
|
6316
|
+
return jsYaml;
|
|
6317
|
+
hasRequiredJsYaml = 1;
|
|
6318
|
+
const loader2 = requireLoader();
|
|
6319
|
+
const dumper2 = requireDumper();
|
|
5953
6320
|
function renamed(from, to) {
|
|
5954
6321
|
return function() {
|
|
5955
6322
|
throw new Error("Function yaml." + from + " is removed in js-yaml 4. Use yaml." + to + " instead, which is now safe by default.");
|
|
5956
6323
|
};
|
|
5957
6324
|
}
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
binary:
|
|
5970
|
-
float:
|
|
5971
|
-
map:
|
|
6325
|
+
jsYaml.Type = requireType();
|
|
6326
|
+
jsYaml.Schema = requireSchema();
|
|
6327
|
+
jsYaml.FAILSAFE_SCHEMA = requireFailsafe();
|
|
6328
|
+
jsYaml.JSON_SCHEMA = requireJson();
|
|
6329
|
+
jsYaml.CORE_SCHEMA = requireCore();
|
|
6330
|
+
jsYaml.DEFAULT_SCHEMA = require_default();
|
|
6331
|
+
jsYaml.load = loader2.load;
|
|
6332
|
+
jsYaml.loadAll = loader2.loadAll;
|
|
6333
|
+
jsYaml.dump = dumper2.dump;
|
|
6334
|
+
jsYaml.YAMLException = requireException();
|
|
6335
|
+
jsYaml.types = {
|
|
6336
|
+
binary: requireBinary(),
|
|
6337
|
+
float: requireFloat(),
|
|
6338
|
+
map: requireMap(),
|
|
5972
6339
|
null: require_null(),
|
|
5973
|
-
pairs:
|
|
5974
|
-
set:
|
|
5975
|
-
timestamp:
|
|
5976
|
-
bool:
|
|
5977
|
-
int:
|
|
5978
|
-
merge:
|
|
5979
|
-
omap:
|
|
5980
|
-
seq:
|
|
5981
|
-
str:
|
|
6340
|
+
pairs: requirePairs(),
|
|
6341
|
+
set: requireSet(),
|
|
6342
|
+
timestamp: requireTimestamp(),
|
|
6343
|
+
bool: requireBool(),
|
|
6344
|
+
int: requireInt(),
|
|
6345
|
+
merge: requireMerge(),
|
|
6346
|
+
omap: requireOmap(),
|
|
6347
|
+
seq: requireSeq(),
|
|
6348
|
+
str: requireStr()
|
|
5982
6349
|
};
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
var
|
|
6350
|
+
jsYaml.safeLoad = renamed("safeLoad", "load");
|
|
6351
|
+
jsYaml.safeLoadAll = renamed("safeLoadAll", "loadAll");
|
|
6352
|
+
jsYaml.safeDump = renamed("safeDump", "dump");
|
|
6353
|
+
return jsYaml;
|
|
6354
|
+
}
|
|
6355
|
+
var jsYamlExports = requireJsYaml();
|
|
6356
|
+
var yaml = /* @__PURE__ */ getDefaultExportFromCjs(jsYamlExports);
|
|
6357
|
+
var {
|
|
6358
|
+
Type,
|
|
6359
|
+
Schema,
|
|
6360
|
+
FAILSAFE_SCHEMA,
|
|
6361
|
+
JSON_SCHEMA,
|
|
6362
|
+
CORE_SCHEMA,
|
|
6363
|
+
DEFAULT_SCHEMA,
|
|
6364
|
+
load,
|
|
6365
|
+
loadAll,
|
|
6366
|
+
dump,
|
|
6367
|
+
YAMLException,
|
|
6368
|
+
types,
|
|
6369
|
+
safeLoad,
|
|
6370
|
+
safeLoadAll,
|
|
6371
|
+
safeDump
|
|
6372
|
+
} = yaml;
|
|
5989
6373
|
|
|
5990
6374
|
// ../../common/src/logger.ts
|
|
5991
6375
|
var logFilePathSlot = singleton("logFilePath");
|
|
@@ -6061,11 +6445,11 @@ class SimpleLogger {
|
|
|
6061
6445
|
const path3 = this.logFilePath || getGlobalLogFilePath();
|
|
6062
6446
|
if (!path3)
|
|
6063
6447
|
return;
|
|
6064
|
-
const
|
|
6448
|
+
const timestamp2 = new Date().toISOString();
|
|
6065
6449
|
this.pendingWrites = Promise.all([
|
|
6066
6450
|
this.pendingWrites,
|
|
6067
6451
|
this.pendingInit
|
|
6068
|
-
]).then(() => getFileSystem().appendFile(path3, `${
|
|
6452
|
+
]).then(() => getFileSystem().appendFile(path3, `${timestamp2} ${formatted}`).catch(() => {}));
|
|
6069
6453
|
}
|
|
6070
6454
|
debug(message, ...args) {
|
|
6071
6455
|
if (this.level > 0 /* DEBUG */)
|
|
@@ -6181,6 +6565,7 @@ function getLogFilePath() {
|
|
|
6181
6565
|
// ../../common/src/output-format-context.ts
|
|
6182
6566
|
var formatSlot = singleton("OutputFormat");
|
|
6183
6567
|
var formatExplicitSlot = singleton("OutputFormatExplicit");
|
|
6568
|
+
var helpRequestedSlot = singleton("HelpRequested");
|
|
6184
6569
|
var filterSlot = singleton("OutputFilter");
|
|
6185
6570
|
function getOutputFormat() {
|
|
6186
6571
|
return formatSlot.get("json");
|
|
@@ -6458,10 +6843,10 @@ class LoggerTelemetryProvider {
|
|
|
6458
6843
|
success
|
|
6459
6844
|
})));
|
|
6460
6845
|
}
|
|
6461
|
-
async trackDependency(name,
|
|
6846
|
+
async trackDependency(name, type2, duration, success, properties) {
|
|
6462
6847
|
logger.debug(formatMessage("Dependency", name, this.enrich({
|
|
6463
6848
|
...properties,
|
|
6464
|
-
type,
|
|
6849
|
+
type: type2,
|
|
6465
6850
|
duration: `${duration}ms`,
|
|
6466
6851
|
success
|
|
6467
6852
|
})));
|
|
@@ -6563,89 +6948,261 @@ var CI_SIGNATURES = [
|
|
|
6563
6948
|
provider: "generic",
|
|
6564
6949
|
matches: (env) => isTruthy(env.CI)
|
|
6565
6950
|
}
|
|
6566
|
-
];
|
|
6567
|
-
function currentEnv() {
|
|
6568
|
-
return typeof process === "undefined" ? {} : process.env;
|
|
6569
|
-
}
|
|
6570
|
-
function currentTtyState() {
|
|
6571
|
-
if (typeof process === "undefined")
|
|
6572
|
-
return false;
|
|
6573
|
-
return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
|
|
6951
|
+
];
|
|
6952
|
+
function currentEnv() {
|
|
6953
|
+
return typeof process === "undefined" ? {} : process.env;
|
|
6954
|
+
}
|
|
6955
|
+
function currentTtyState() {
|
|
6956
|
+
if (typeof process === "undefined")
|
|
6957
|
+
return false;
|
|
6958
|
+
return Boolean(process.stdout?.isTTY || process.stdin?.isTTY || process.stderr?.isTTY);
|
|
6959
|
+
}
|
|
6960
|
+
function detectCi(env) {
|
|
6961
|
+
const signature = CI_SIGNATURES.find((candidate) => candidate.matches(env));
|
|
6962
|
+
if (!signature)
|
|
6963
|
+
return;
|
|
6964
|
+
return {
|
|
6965
|
+
executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
|
|
6966
|
+
ciProvider: signature.provider
|
|
6967
|
+
};
|
|
6968
|
+
}
|
|
6969
|
+
function detectExecutionContext(options = {}) {
|
|
6970
|
+
const env = options.env ?? currentEnv();
|
|
6971
|
+
const ci = detectCi(env);
|
|
6972
|
+
if (ci)
|
|
6973
|
+
return ci;
|
|
6974
|
+
const agent = options.agent ?? detectAgentFromEnv(env);
|
|
6975
|
+
if (agent) {
|
|
6976
|
+
return { executionContext: "agent" };
|
|
6977
|
+
}
|
|
6978
|
+
const authSignal = options.authSignal ?? authSignalSlot.get();
|
|
6979
|
+
if (authSignal === "service_account") {
|
|
6980
|
+
return { executionContext: "service_account" };
|
|
6981
|
+
}
|
|
6982
|
+
const isTty = options.isTty ?? currentTtyState();
|
|
6983
|
+
if (isTty) {
|
|
6984
|
+
return { executionContext: "manual" };
|
|
6985
|
+
}
|
|
6986
|
+
return { executionContext: "unknown" };
|
|
6987
|
+
}
|
|
6988
|
+
function getExecutionContextTelemetryProperties() {
|
|
6989
|
+
const detected = detectExecutionContext();
|
|
6990
|
+
return {
|
|
6991
|
+
execution_context: detected.executionContext,
|
|
6992
|
+
...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
|
|
6993
|
+
};
|
|
6994
|
+
}
|
|
6995
|
+
// ../../common/src/telemetry/node-context-storage.ts
|
|
6996
|
+
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6997
|
+
|
|
6998
|
+
class NodeContextStorage {
|
|
6999
|
+
storage = new AsyncLocalStorage;
|
|
7000
|
+
run(context, fn) {
|
|
7001
|
+
return this.storage.run(context, fn);
|
|
7002
|
+
}
|
|
7003
|
+
getContext() {
|
|
7004
|
+
return this.storage.getStore();
|
|
7005
|
+
}
|
|
7006
|
+
}
|
|
7007
|
+
// ../../common/src/telemetry/trace-context.ts
|
|
7008
|
+
var TELEMETRY_TRACEPARENT_ENV = "TRACEPARENT";
|
|
7009
|
+
var TRACEPARENT_PATTERN = /^00-([0-9a-f]{32})-([0-9a-f]{16})-[0-9a-f]{2}$/;
|
|
7010
|
+
function getProcessEnv() {
|
|
7011
|
+
return globalThis.process?.env;
|
|
7012
|
+
}
|
|
7013
|
+
function parseInboundTraceparent(value) {
|
|
7014
|
+
if (!value) {
|
|
7015
|
+
return;
|
|
7016
|
+
}
|
|
7017
|
+
const match = TRACEPARENT_PATTERN.exec(value.trim().toLowerCase());
|
|
7018
|
+
if (!match) {
|
|
7019
|
+
return;
|
|
7020
|
+
}
|
|
7021
|
+
const [, traceId, parentSpanId] = match;
|
|
7022
|
+
if (/^0+$/.test(traceId) || /^0+$/.test(parentSpanId)) {
|
|
7023
|
+
return;
|
|
7024
|
+
}
|
|
7025
|
+
return { traceId, parentSpanId };
|
|
7026
|
+
}
|
|
7027
|
+
function getInboundTraceContext() {
|
|
7028
|
+
return parseInboundTraceparent(getProcessEnv()?.[TELEMETRY_TRACEPARENT_ENV]);
|
|
7029
|
+
}
|
|
7030
|
+
|
|
7031
|
+
// ../../common/src/telemetry/session-id.ts
|
|
7032
|
+
var TELEMETRY_SESSION_ID_ENV = "UIPATH_SESSION_ID";
|
|
7033
|
+
var TELEMETRY_SESSION_ID_PROPERTY = "session_id";
|
|
7034
|
+
var telemetrySessionIdSlot = singleton("TelemetrySessionId");
|
|
7035
|
+
var telemetryOperationIdSlot = singleton("TelemetryOperationId");
|
|
7036
|
+
function getProcessEnv2() {
|
|
7037
|
+
return globalThis.process?.env;
|
|
7038
|
+
}
|
|
7039
|
+
function normalizeSessionId(value) {
|
|
7040
|
+
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
7041
|
+
return;
|
|
7042
|
+
}
|
|
7043
|
+
const trimmed = String(value).trim();
|
|
7044
|
+
return trimmed || undefined;
|
|
7045
|
+
}
|
|
7046
|
+
function getConfiguredTelemetrySessionId() {
|
|
7047
|
+
return normalizeSessionId(getProcessEnv2()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
7048
|
+
}
|
|
7049
|
+
function resolveTelemetrySessionId(existingSessionId) {
|
|
7050
|
+
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
7051
|
+
}
|
|
7052
|
+
function getTelemetryOperationId() {
|
|
7053
|
+
const existing = telemetryOperationIdSlot.get();
|
|
7054
|
+
if (existing) {
|
|
7055
|
+
return existing;
|
|
7056
|
+
}
|
|
7057
|
+
const inboundTraceId = getInboundTraceContext()?.traceId;
|
|
7058
|
+
const generated = inboundTraceId ?? crypto.randomUUID().replaceAll("-", "");
|
|
7059
|
+
telemetryOperationIdSlot.set(generated);
|
|
7060
|
+
return generated;
|
|
7061
|
+
}
|
|
7062
|
+
// ../../common/src/telemetry/global-telemetry-properties.ts
|
|
7063
|
+
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
7064
|
+
function getGlobalTelemetryProperties() {
|
|
7065
|
+
return telemetryPropsSlot.get();
|
|
7066
|
+
}
|
|
7067
|
+
|
|
7068
|
+
// ../../common/src/telemetry/pii-redactor.ts
|
|
7069
|
+
var REDACTED = "[REDACTED]";
|
|
7070
|
+
var MAX_VALUE_LENGTH = 200;
|
|
7071
|
+
var SENSITIVE_NAME_TOKENS = new Set([
|
|
7072
|
+
"token",
|
|
7073
|
+
"tokens",
|
|
7074
|
+
"secret",
|
|
7075
|
+
"secrets",
|
|
7076
|
+
"password",
|
|
7077
|
+
"passwords",
|
|
7078
|
+
"pwd",
|
|
7079
|
+
"credential",
|
|
7080
|
+
"credentials",
|
|
7081
|
+
"auth",
|
|
7082
|
+
"authentication",
|
|
7083
|
+
"authorization",
|
|
7084
|
+
"authority",
|
|
7085
|
+
"cert",
|
|
7086
|
+
"certificate",
|
|
7087
|
+
"certificates"
|
|
7088
|
+
]);
|
|
7089
|
+
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
7090
|
+
"api",
|
|
7091
|
+
"access",
|
|
7092
|
+
"client",
|
|
7093
|
+
"private",
|
|
7094
|
+
"public",
|
|
7095
|
+
"signing",
|
|
7096
|
+
"encryption",
|
|
7097
|
+
"session",
|
|
7098
|
+
"master",
|
|
7099
|
+
"shared",
|
|
7100
|
+
"root",
|
|
7101
|
+
"ssh",
|
|
7102
|
+
"rsa",
|
|
7103
|
+
"aes",
|
|
7104
|
+
"hmac",
|
|
7105
|
+
"oauth"
|
|
7106
|
+
]);
|
|
7107
|
+
var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
7108
|
+
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
7109
|
+
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
7110
|
+
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
7111
|
+
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
7112
|
+
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
7113
|
+
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
7114
|
+
function shortHash(input) {
|
|
7115
|
+
let hash = 2166136261;
|
|
7116
|
+
for (let i = 0;i < input.length; i++) {
|
|
7117
|
+
hash ^= input.charCodeAt(i);
|
|
7118
|
+
hash = Math.imul(hash, 16777619);
|
|
7119
|
+
}
|
|
7120
|
+
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
7121
|
+
}
|
|
7122
|
+
function redactUrl(raw) {
|
|
7123
|
+
try {
|
|
7124
|
+
const url = new URL(raw);
|
|
7125
|
+
return `${url.protocol}//${url.host}`;
|
|
7126
|
+
} catch {
|
|
7127
|
+
return `url#${shortHash(raw)}`;
|
|
7128
|
+
}
|
|
7129
|
+
}
|
|
7130
|
+
function redactValueDetectors(value) {
|
|
7131
|
+
let out = value;
|
|
7132
|
+
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
7133
|
+
out = out.replace(URL_PATTERN, (match) => {
|
|
7134
|
+
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
7135
|
+
const core2 = trailing ? match.slice(0, -trailing.length) : match;
|
|
7136
|
+
return `${redactUrl(core2)}${trailing}`;
|
|
7137
|
+
});
|
|
7138
|
+
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
7139
|
+
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
7140
|
+
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
7141
|
+
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
7142
|
+
if (out.length > MAX_VALUE_LENGTH) {
|
|
7143
|
+
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
7144
|
+
}
|
|
7145
|
+
return out;
|
|
7146
|
+
}
|
|
7147
|
+
function redactValue(value) {
|
|
7148
|
+
return redactValueDetectors(value);
|
|
7149
|
+
}
|
|
7150
|
+
function redactError(error) {
|
|
7151
|
+
const safe = new Error(redactValueDetectors(error.message ?? ""));
|
|
7152
|
+
safe.name = error.name;
|
|
7153
|
+
safe.stack = typeof error.stack === "string" ? redactValueDetectors(error.stack) : undefined;
|
|
7154
|
+
return safe;
|
|
7155
|
+
}
|
|
7156
|
+
function nameTokens(name) {
|
|
7157
|
+
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s._-]+/).map((t) => t.toLowerCase()).filter(Boolean);
|
|
7158
|
+
}
|
|
7159
|
+
function isSensitiveName(name) {
|
|
7160
|
+
const tokens = nameTokens(name);
|
|
7161
|
+
for (let i = 0;i < tokens.length; i++) {
|
|
7162
|
+
const token = tokens[i];
|
|
7163
|
+
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
7164
|
+
return true;
|
|
7165
|
+
}
|
|
7166
|
+
if (token === "key" || token === "keys") {
|
|
7167
|
+
const prev = tokens[i - 1];
|
|
7168
|
+
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
7169
|
+
return true;
|
|
7170
|
+
}
|
|
7171
|
+
}
|
|
7172
|
+
}
|
|
7173
|
+
return false;
|
|
6574
7174
|
}
|
|
6575
|
-
function
|
|
6576
|
-
|
|
6577
|
-
if (!signature)
|
|
7175
|
+
function redactProperty(name, value) {
|
|
7176
|
+
if (value === undefined || value === null) {
|
|
6578
7177
|
return;
|
|
6579
|
-
return {
|
|
6580
|
-
executionContext: signature.isScheduler?.(env) ? "scheduler" : "ci",
|
|
6581
|
-
ciProvider: signature.provider
|
|
6582
|
-
};
|
|
6583
|
-
}
|
|
6584
|
-
function detectExecutionContext(options = {}) {
|
|
6585
|
-
const env = options.env ?? currentEnv();
|
|
6586
|
-
const ci = detectCi(env);
|
|
6587
|
-
if (ci)
|
|
6588
|
-
return ci;
|
|
6589
|
-
const agent = options.agent ?? detectAgentFromEnv(env);
|
|
6590
|
-
if (agent) {
|
|
6591
|
-
return { executionContext: "agent" };
|
|
6592
|
-
}
|
|
6593
|
-
const authSignal = options.authSignal ?? authSignalSlot.get();
|
|
6594
|
-
if (authSignal === "service_account") {
|
|
6595
|
-
return { executionContext: "service_account" };
|
|
6596
7178
|
}
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
return { executionContext: "manual" };
|
|
7179
|
+
if (isSensitiveName(name)) {
|
|
7180
|
+
return REDACTED;
|
|
6600
7181
|
}
|
|
6601
|
-
|
|
6602
|
-
|
|
6603
|
-
function getExecutionContextTelemetryProperties() {
|
|
6604
|
-
const detected = detectExecutionContext();
|
|
6605
|
-
return {
|
|
6606
|
-
execution_context: detected.executionContext,
|
|
6607
|
-
...detected.ciProvider ? { ci_provider: detected.ciProvider } : {}
|
|
6608
|
-
};
|
|
6609
|
-
}
|
|
6610
|
-
// ../../common/src/telemetry/node-context-storage.ts
|
|
6611
|
-
import { AsyncLocalStorage } from "node:async_hooks";
|
|
6612
|
-
|
|
6613
|
-
class NodeContextStorage {
|
|
6614
|
-
storage = new AsyncLocalStorage;
|
|
6615
|
-
run(context, fn) {
|
|
6616
|
-
return this.storage.run(context, fn);
|
|
7182
|
+
if (typeof value === "boolean" || typeof value === "number") {
|
|
7183
|
+
return value;
|
|
6617
7184
|
}
|
|
6618
|
-
|
|
6619
|
-
return
|
|
7185
|
+
if (typeof value !== "string") {
|
|
7186
|
+
return "[OBJECT]";
|
|
6620
7187
|
}
|
|
7188
|
+
return redactValueDetectors(value);
|
|
6621
7189
|
}
|
|
6622
|
-
|
|
6623
|
-
|
|
6624
|
-
|
|
6625
|
-
|
|
6626
|
-
|
|
6627
|
-
|
|
6628
|
-
}
|
|
6629
|
-
function normalizeSessionId(value) {
|
|
6630
|
-
if (typeof value !== "string" && typeof value !== "number" && typeof value !== "boolean") {
|
|
6631
|
-
return;
|
|
7190
|
+
function redactProperties(properties) {
|
|
7191
|
+
const out = {};
|
|
7192
|
+
for (const [name, value] of Object.entries(properties)) {
|
|
7193
|
+
const redacted = redactProperty(name, value);
|
|
7194
|
+
if (redacted !== undefined) {
|
|
7195
|
+
out[name] = redacted;
|
|
7196
|
+
}
|
|
6632
7197
|
}
|
|
6633
|
-
|
|
6634
|
-
return trimmed || undefined;
|
|
6635
|
-
}
|
|
6636
|
-
function getConfiguredTelemetrySessionId() {
|
|
6637
|
-
return normalizeSessionId(getProcessEnv()?.[TELEMETRY_SESSION_ID_ENV]);
|
|
6638
|
-
}
|
|
6639
|
-
function resolveTelemetrySessionId(existingSessionId) {
|
|
6640
|
-
return getConfiguredTelemetrySessionId() ?? normalizeSessionId(existingSessionId);
|
|
6641
|
-
}
|
|
6642
|
-
// ../../common/src/telemetry/global-telemetry-properties.ts
|
|
6643
|
-
var telemetryPropsSlot = singleton("TelemetryDefaultProps");
|
|
6644
|
-
function getGlobalTelemetryProperties() {
|
|
6645
|
-
return telemetryPropsSlot.get();
|
|
7198
|
+
return out;
|
|
6646
7199
|
}
|
|
6647
7200
|
|
|
6648
7201
|
// ../../common/src/telemetry/telemetry-service.ts
|
|
7202
|
+
var TELEMETRY_OPERATION_ID_PROPERTY = "uip.trace.operation_id";
|
|
7203
|
+
var TELEMETRY_PARENT_ID_PROPERTY = "uip.trace.parent_id";
|
|
7204
|
+
var TELEMETRY_SPAN_ID_PROPERTY = "uip.trace.span_id";
|
|
7205
|
+
|
|
6649
7206
|
class TelemetryService {
|
|
6650
7207
|
telemetryProvider;
|
|
6651
7208
|
contextStorage;
|
|
@@ -6672,11 +7229,15 @@ class TelemetryService {
|
|
|
6672
7229
|
trackException(error, properties) {
|
|
6673
7230
|
const context = this.getCurrentContext();
|
|
6674
7231
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
6675
|
-
this.telemetryProvider.trackException(error, enrichedProperties);
|
|
7232
|
+
this.telemetryProvider.trackException(redactError(error), enrichedProperties);
|
|
6676
7233
|
}
|
|
6677
7234
|
async trackRequest(name, fn, properties) {
|
|
7235
|
+
const parentContext = this.getCurrentContext();
|
|
7236
|
+
const operationId = parentContext?.operationId ?? this.operationId ?? getTelemetryOperationId();
|
|
7237
|
+
const parentId = parentContext ? parentContext.id : this.inboundParentIdFor(operationId);
|
|
6678
7238
|
const context = {
|
|
6679
|
-
operationId
|
|
7239
|
+
operationId,
|
|
7240
|
+
...parentId !== undefined ? { parentId } : {},
|
|
6680
7241
|
id: this.generateId()
|
|
6681
7242
|
};
|
|
6682
7243
|
const startTime = performance.now();
|
|
@@ -6694,7 +7255,46 @@ class TelemetryService {
|
|
|
6694
7255
|
throw error;
|
|
6695
7256
|
}
|
|
6696
7257
|
}
|
|
6697
|
-
|
|
7258
|
+
trackRequestResult(name, durationMs, success, properties, context) {
|
|
7259
|
+
const requestContext = context ?? {
|
|
7260
|
+
operationId: this.operationId ?? getTelemetryOperationId(),
|
|
7261
|
+
id: this.generateId()
|
|
7262
|
+
};
|
|
7263
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, requestContext);
|
|
7264
|
+
this.telemetryProvider.trackRequest(name, durationMs, success, enrichedProperties);
|
|
7265
|
+
}
|
|
7266
|
+
createRequestContext() {
|
|
7267
|
+
const operationId = this.operationId ?? getTelemetryOperationId();
|
|
7268
|
+
const parentId = this.inboundParentIdFor(operationId);
|
|
7269
|
+
return {
|
|
7270
|
+
operationId,
|
|
7271
|
+
...parentId !== undefined ? { parentId } : {},
|
|
7272
|
+
id: this.generateId()
|
|
7273
|
+
};
|
|
7274
|
+
}
|
|
7275
|
+
inboundParentIdFor(operationId) {
|
|
7276
|
+
const inbound = getInboundTraceContext();
|
|
7277
|
+
return inbound && inbound.traceId === operationId ? inbound.parentSpanId : undefined;
|
|
7278
|
+
}
|
|
7279
|
+
runWithContext(context, fn) {
|
|
7280
|
+
return this.contextStorage.run(context, fn);
|
|
7281
|
+
}
|
|
7282
|
+
createDependencyContext() {
|
|
7283
|
+
const parentContext = this.getCurrentContext();
|
|
7284
|
+
if (!parentContext) {
|
|
7285
|
+
return;
|
|
7286
|
+
}
|
|
7287
|
+
return {
|
|
7288
|
+
operationId: parentContext.operationId,
|
|
7289
|
+
parentId: parentContext.id,
|
|
7290
|
+
id: this.generateId()
|
|
7291
|
+
};
|
|
7292
|
+
}
|
|
7293
|
+
trackDependencyResult(name, type2, durationMs, success, properties, context, resultCode) {
|
|
7294
|
+
const enrichedProperties = this.enrichPropertiesWithContext(properties, context);
|
|
7295
|
+
this.telemetryProvider.trackDependency(redactValue(name), type2, durationMs, success, enrichedProperties, resultCode);
|
|
7296
|
+
}
|
|
7297
|
+
async trackDependencyOperation(name, type2, fn, properties) {
|
|
6698
7298
|
const parentContext = this.getCurrentContext();
|
|
6699
7299
|
if (!parentContext) {
|
|
6700
7300
|
throw new Error("trackDependencyOperation must be called within a trackRequest block.");
|
|
@@ -6709,13 +7309,13 @@ class TelemetryService {
|
|
|
6709
7309
|
const result = await this.contextStorage.run(childContext, fn);
|
|
6710
7310
|
const durationMs = performance.now() - startTime;
|
|
6711
7311
|
const enrichedProperties = this.enrichPropertiesWithContext(properties, childContext);
|
|
6712
|
-
await this.telemetryProvider.trackDependency(name,
|
|
7312
|
+
await this.telemetryProvider.trackDependency(name, type2, durationMs, true, enrichedProperties);
|
|
6713
7313
|
return result;
|
|
6714
7314
|
} catch (error) {
|
|
6715
7315
|
const durationMs = performance.now() - startTime;
|
|
6716
7316
|
const err = error instanceof Error ? error : new Error(String(error));
|
|
6717
7317
|
const enrichedProperties = this.enrichPropertiesWithContext({ ...properties, errorMessage: err.message }, childContext);
|
|
6718
|
-
await this.telemetryProvider.trackDependency(name,
|
|
7318
|
+
await this.telemetryProvider.trackDependency(name, type2, durationMs, false, enrichedProperties);
|
|
6719
7319
|
throw error;
|
|
6720
7320
|
}
|
|
6721
7321
|
}
|
|
@@ -6730,8 +7330,12 @@ class TelemetryService {
|
|
|
6730
7330
|
...getExecutionContextTelemetryProperties(),
|
|
6731
7331
|
...globalProperties,
|
|
6732
7332
|
...this.defaultProperties,
|
|
6733
|
-
...properties,
|
|
6734
|
-
...context
|
|
7333
|
+
...redactProperties(properties ?? {}),
|
|
7334
|
+
...context ? {
|
|
7335
|
+
[TELEMETRY_OPERATION_ID_PROPERTY]: context.operationId,
|
|
7336
|
+
...context.parentId !== undefined ? { [TELEMETRY_PARENT_ID_PROPERTY]: context.parentId } : {},
|
|
7337
|
+
[TELEMETRY_SPAN_ID_PROPERTY]: context.id
|
|
7338
|
+
} : {}
|
|
6735
7339
|
};
|
|
6736
7340
|
if (sessionId === undefined) {
|
|
6737
7341
|
delete enriched[TELEMETRY_SESSION_ID_PROPERTY];
|
|
@@ -6741,7 +7345,16 @@ class TelemetryService {
|
|
|
6741
7345
|
return enriched;
|
|
6742
7346
|
}
|
|
6743
7347
|
generateId() {
|
|
6744
|
-
|
|
7348
|
+
const bytes = new Uint8Array(8);
|
|
7349
|
+
let hex = "";
|
|
7350
|
+
do {
|
|
7351
|
+
crypto.getRandomValues(bytes);
|
|
7352
|
+
hex = "";
|
|
7353
|
+
for (const byte of bytes) {
|
|
7354
|
+
hex += byte.toString(16).padStart(2, "0");
|
|
7355
|
+
}
|
|
7356
|
+
} while (/^0+$/.test(hex));
|
|
7357
|
+
return hex;
|
|
6745
7358
|
}
|
|
6746
7359
|
}
|
|
6747
7360
|
// ../../common/src/telemetry/node-appinsights-telemetry-provider.ts
|
|
@@ -6922,8 +7535,8 @@ function printOutput(data, format = "json", logFn, asciiSafe = false) {
|
|
|
6922
7535
|
}
|
|
6923
7536
|
switch (format) {
|
|
6924
7537
|
case "json": {
|
|
6925
|
-
const
|
|
6926
|
-
logFn(asciiSafe ? escapeNonAscii(
|
|
7538
|
+
const json2 = JSON.stringify(data, null, 2);
|
|
7539
|
+
logFn(asciiSafe ? escapeNonAscii(json2) : json2);
|
|
6927
7540
|
break;
|
|
6928
7541
|
}
|
|
6929
7542
|
case "yaml":
|
|
@@ -7248,6 +7861,9 @@ var OutputFormatter;
|
|
|
7248
7861
|
if (opts?.warning) {
|
|
7249
7862
|
data.Warning = opts.warning;
|
|
7250
7863
|
}
|
|
7864
|
+
if (opts?.pagination) {
|
|
7865
|
+
data.Pagination = opts.pagination;
|
|
7866
|
+
}
|
|
7251
7867
|
success(data);
|
|
7252
7868
|
}
|
|
7253
7869
|
OutputFormatter.emitList = emitList;
|
|
@@ -7256,8 +7872,8 @@ var OutputFormatter;
|
|
|
7256
7872
|
const sink = getOutputSink();
|
|
7257
7873
|
const normalized = toPascalCaseData(data);
|
|
7258
7874
|
if (format === "json") {
|
|
7259
|
-
const
|
|
7260
|
-
const safe = needsAsciiSafeJson(sink) ? escapeNonAscii(
|
|
7875
|
+
const json2 = JSON.stringify(normalized);
|
|
7876
|
+
const safe = needsAsciiSafeJson(sink) ? escapeNonAscii(json2) : json2;
|
|
7261
7877
|
sink.writeErr(`${safe}
|
|
7262
7878
|
`);
|
|
7263
7879
|
} else {
|
|
@@ -7443,134 +8059,11 @@ function buildCommandTelemetryAttribution(commandPath, skillSource) {
|
|
|
7443
8059
|
};
|
|
7444
8060
|
}
|
|
7445
8061
|
|
|
7446
|
-
// ../../common/src/telemetry/pii-redactor.ts
|
|
7447
|
-
var REDACTED = "[REDACTED]";
|
|
7448
|
-
var MAX_VALUE_LENGTH = 200;
|
|
7449
|
-
var SENSITIVE_NAME_TOKENS = new Set([
|
|
7450
|
-
"token",
|
|
7451
|
-
"tokens",
|
|
7452
|
-
"secret",
|
|
7453
|
-
"secrets",
|
|
7454
|
-
"password",
|
|
7455
|
-
"passwords",
|
|
7456
|
-
"pwd",
|
|
7457
|
-
"credential",
|
|
7458
|
-
"credentials",
|
|
7459
|
-
"auth",
|
|
7460
|
-
"authentication",
|
|
7461
|
-
"authorization",
|
|
7462
|
-
"authority",
|
|
7463
|
-
"cert",
|
|
7464
|
-
"certificate",
|
|
7465
|
-
"certificates"
|
|
7466
|
-
]);
|
|
7467
|
-
var SENSITIVE_KEY_PREFIXES = new Set([
|
|
7468
|
-
"api",
|
|
7469
|
-
"access",
|
|
7470
|
-
"client",
|
|
7471
|
-
"private",
|
|
7472
|
-
"public",
|
|
7473
|
-
"signing",
|
|
7474
|
-
"encryption",
|
|
7475
|
-
"session",
|
|
7476
|
-
"master",
|
|
7477
|
-
"shared",
|
|
7478
|
-
"root",
|
|
7479
|
-
"ssh",
|
|
7480
|
-
"rsa",
|
|
7481
|
-
"aes",
|
|
7482
|
-
"hmac",
|
|
7483
|
-
"oauth"
|
|
7484
|
-
]);
|
|
7485
|
-
var UUID_PATTERN = /\b[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}\b/gi;
|
|
7486
|
-
var EMAIL_PATTERN = /\b[^\s@]+@[A-Za-z0-9.-]+\.[A-Za-z]{2,}\b/g;
|
|
7487
|
-
var JWT_PATTERN = /\beyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]+\.[A-Za-z0-9_-]+/g;
|
|
7488
|
-
var LONG_TOKEN_PATTERN = /\b[A-Za-z0-9_-]{40,}\b/g;
|
|
7489
|
-
var USER_HOME_PATTERN = /([/\\])(Users|home)([/\\])([^/\\]+)/gi;
|
|
7490
|
-
var URL_PATTERN = /\bhttps?:\/\/[^\s,;]+/gi;
|
|
7491
|
-
var URL_TRAILING_PUNCT = /[.,;:!?)\]}>'"]+$/;
|
|
7492
|
-
function shortHash(input) {
|
|
7493
|
-
let hash = 2166136261;
|
|
7494
|
-
for (let i = 0;i < input.length; i++) {
|
|
7495
|
-
hash ^= input.charCodeAt(i);
|
|
7496
|
-
hash = Math.imul(hash, 16777619);
|
|
7497
|
-
}
|
|
7498
|
-
return (hash >>> 0).toString(16).padStart(8, "0");
|
|
7499
|
-
}
|
|
7500
|
-
function redactUrl(raw) {
|
|
7501
|
-
try {
|
|
7502
|
-
const url = new URL(raw);
|
|
7503
|
-
return `${url.protocol}//${url.host}`;
|
|
7504
|
-
} catch {
|
|
7505
|
-
return `url#${shortHash(raw)}`;
|
|
7506
|
-
}
|
|
7507
|
-
}
|
|
7508
|
-
function redactValueDetectors(value) {
|
|
7509
|
-
let out = value;
|
|
7510
|
-
out = out.replace(JWT_PATTERN, () => REDACTED);
|
|
7511
|
-
out = out.replace(URL_PATTERN, (match) => {
|
|
7512
|
-
const trailing = match.match(URL_TRAILING_PUNCT)?.[0] ?? "";
|
|
7513
|
-
const core = trailing ? match.slice(0, -trailing.length) : match;
|
|
7514
|
-
return `${redactUrl(core)}${trailing}`;
|
|
7515
|
-
});
|
|
7516
|
-
out = out.replace(USER_HOME_PATTERN, (_match, sep1, folder, sep2) => `${sep1}${folder}${sep2}<user>`);
|
|
7517
|
-
out = out.replace(EMAIL_PATTERN, (match) => `email#${shortHash(match)}`);
|
|
7518
|
-
out = out.replace(UUID_PATTERN, (match) => `uuid#${shortHash(match)}`);
|
|
7519
|
-
out = out.replace(LONG_TOKEN_PATTERN, () => REDACTED);
|
|
7520
|
-
if (out.length > MAX_VALUE_LENGTH) {
|
|
7521
|
-
out = `${out.slice(0, MAX_VALUE_LENGTH)}…`;
|
|
7522
|
-
}
|
|
7523
|
-
return out;
|
|
7524
|
-
}
|
|
7525
|
-
function nameTokens(name) {
|
|
7526
|
-
return name.replace(/([a-z0-9])([A-Z])/g, "$1 $2").replace(/([A-Z]+)([A-Z][a-z])/g, "$1 $2").split(/[\s_-]+/).map((t) => t.toLowerCase()).filter(Boolean);
|
|
7527
|
-
}
|
|
7528
|
-
function isSensitiveName(name) {
|
|
7529
|
-
const tokens = nameTokens(name);
|
|
7530
|
-
for (let i = 0;i < tokens.length; i++) {
|
|
7531
|
-
const token = tokens[i];
|
|
7532
|
-
if (SENSITIVE_NAME_TOKENS.has(token)) {
|
|
7533
|
-
return true;
|
|
7534
|
-
}
|
|
7535
|
-
if (token === "key" || token === "keys") {
|
|
7536
|
-
const prev = tokens[i - 1];
|
|
7537
|
-
if (prev && SENSITIVE_KEY_PREFIXES.has(prev)) {
|
|
7538
|
-
return true;
|
|
7539
|
-
}
|
|
7540
|
-
}
|
|
7541
|
-
}
|
|
7542
|
-
return false;
|
|
7543
|
-
}
|
|
7544
|
-
function redactProperty(name, value) {
|
|
7545
|
-
if (value === undefined || value === null) {
|
|
7546
|
-
return;
|
|
7547
|
-
}
|
|
7548
|
-
if (isSensitiveName(name)) {
|
|
7549
|
-
return REDACTED;
|
|
7550
|
-
}
|
|
7551
|
-
if (typeof value === "boolean" || typeof value === "number") {
|
|
7552
|
-
return value;
|
|
7553
|
-
}
|
|
7554
|
-
if (typeof value !== "string") {
|
|
7555
|
-
return "[OBJECT]";
|
|
7556
|
-
}
|
|
7557
|
-
return redactValueDetectors(value);
|
|
7558
|
-
}
|
|
7559
|
-
function redactProperties(properties) {
|
|
7560
|
-
const out = {};
|
|
7561
|
-
for (const [name, value] of Object.entries(properties)) {
|
|
7562
|
-
const redacted = redactProperty(name, value);
|
|
7563
|
-
if (redacted !== undefined) {
|
|
7564
|
-
out[name] = redacted;
|
|
7565
|
-
}
|
|
7566
|
-
}
|
|
7567
|
-
return out;
|
|
7568
|
-
}
|
|
7569
|
-
|
|
7570
8062
|
// ../../common/src/trackedAction.ts
|
|
7571
8063
|
var pollSignalSlot = singleton("PollSignal");
|
|
7572
8064
|
var cliErrorCodeValues = new Set(CLI_ERROR_CODES);
|
|
7573
8065
|
var retryHintValues = new Set(RETRY_HINTS);
|
|
8066
|
+
var TELEMETRY_COMMAND_ARG_PREFIX = "uip.cmd.arg.";
|
|
7574
8067
|
var processContext = {
|
|
7575
8068
|
exit: (code) => {
|
|
7576
8069
|
process.exitCode = code;
|
|
@@ -7581,22 +8074,18 @@ var processContext = {
|
|
|
7581
8074
|
};
|
|
7582
8075
|
function extractCommandParams(cmd) {
|
|
7583
8076
|
const params = {};
|
|
8077
|
+
const add2 = (name, value) => {
|
|
8078
|
+
if (name && value !== undefined) {
|
|
8079
|
+
params[`${TELEMETRY_COMMAND_ARG_PREFIX}${name}`] = value;
|
|
8080
|
+
}
|
|
8081
|
+
};
|
|
7584
8082
|
const registered = cmd.registeredArguments ?? [];
|
|
7585
8083
|
const processed = cmd.processedArgs ?? [];
|
|
7586
8084
|
for (let i = 0;i < registered.length; i++) {
|
|
7587
|
-
|
|
7588
|
-
if (value === undefined) {
|
|
7589
|
-
continue;
|
|
7590
|
-
}
|
|
7591
|
-
const name = registered[i].name();
|
|
7592
|
-
if (name) {
|
|
7593
|
-
params[name] = value;
|
|
7594
|
-
}
|
|
8085
|
+
add2(registered[i].name(), processed[i]);
|
|
7595
8086
|
}
|
|
7596
8087
|
for (const [key, value] of Object.entries(cmd.opts())) {
|
|
7597
|
-
|
|
7598
|
-
params[key] = value;
|
|
7599
|
-
}
|
|
8088
|
+
add2(key, value);
|
|
7600
8089
|
}
|
|
7601
8090
|
return params;
|
|
7602
8091
|
}
|
|
@@ -7639,11 +8128,12 @@ Command2.prototype.trackedAction = function(context, fn, properties) {
|
|
|
7639
8128
|
return this.action(async (...args) => {
|
|
7640
8129
|
const telemetryName = deriveCommandPath(command);
|
|
7641
8130
|
const props = typeof properties === "function" ? properties(...args) : properties;
|
|
8131
|
+
const requestContext = telemetry.createRequestContext();
|
|
7642
8132
|
const startTime = performance.now();
|
|
7643
8133
|
let errorMessage;
|
|
7644
8134
|
let fallbackExitCode = EXIT_CODES.Success;
|
|
7645
8135
|
clearRecordedCommandFailureTelemetry();
|
|
7646
|
-
const [error] = await catchError(fn(...args));
|
|
8136
|
+
const [error] = await catchError(telemetry.runWithContext(requestContext, () => fn(...args)));
|
|
7647
8137
|
if (error) {
|
|
7648
8138
|
errorMessage = error instanceof Error ? error.message : String(error);
|
|
7649
8139
|
logger.debug(`[trackedAction] ${telemetryName} failed: ${errorMessage}`);
|
|
@@ -7679,16 +8169,21 @@ Command2.prototype.trackedAction = function(context, fn, properties) {
|
|
|
7679
8169
|
recordedFailure,
|
|
7680
8170
|
pollSignal: context.pollSignal
|
|
7681
8171
|
});
|
|
7682
|
-
|
|
7683
|
-
|
|
8172
|
+
const commandParams = extractCommandParams(command);
|
|
8173
|
+
if (props) {
|
|
8174
|
+
for (const key of Object.keys(props)) {
|
|
8175
|
+
delete commandParams[`${TELEMETRY_COMMAND_ARG_PREFIX}${key}`];
|
|
8176
|
+
}
|
|
8177
|
+
}
|
|
8178
|
+
const baseProperties = redactProperties({
|
|
8179
|
+
...commandParams,
|
|
7684
8180
|
...props,
|
|
7685
8181
|
...buildCommandTelemetryAttribution(telemetryName, process.env.UIPATH_SKILL),
|
|
7686
8182
|
command: "true",
|
|
7687
|
-
duration: String(durationMs),
|
|
7688
|
-
success: String(success),
|
|
7689
8183
|
...terminalTelemetry,
|
|
7690
8184
|
...errorMessage ? { errorMessage } : {}
|
|
7691
|
-
})
|
|
8185
|
+
});
|
|
8186
|
+
telemetry.trackRequestResult(telemetryName, durationMs, success, baseProperties, requestContext);
|
|
7692
8187
|
});
|
|
7693
8188
|
};
|
|
7694
8189
|
// ../../common/src/console-guard.ts
|
|
@@ -7698,6 +8193,7 @@ var savedOriginalsSlot = singleton("ConsoleGuardOriginals");
|
|
|
7698
8193
|
var DEFAULT_AUTH_TIMEOUT_MS = 5 * 60 * 1000;
|
|
7699
8194
|
// ../../common/src/interactivity-context.ts
|
|
7700
8195
|
var modeSlot = singleton("InteractivityMode");
|
|
8196
|
+
var interactiveFlagSlot = singleton("InteractiveFlag");
|
|
7701
8197
|
// ../../common/src/option-aliases.ts
|
|
7702
8198
|
import { Option } from "commander";
|
|
7703
8199
|
// ../../common/src/option-validators.ts
|
|
@@ -7799,17 +8295,17 @@ import { existsSync as existsSync2 } from "node:fs";
|
|
|
7799
8295
|
import * as fs62 from "node:fs/promises";
|
|
7800
8296
|
import * as os22 from "node:os";
|
|
7801
8297
|
import * as path22 from "node:path";
|
|
7802
|
-
var
|
|
7803
|
-
var
|
|
7804
|
-
var
|
|
7805
|
-
var
|
|
7806
|
-
var
|
|
8298
|
+
var __create = Object.create;
|
|
8299
|
+
var __getProtoOf = Object.getPrototypeOf;
|
|
8300
|
+
var __defProp = Object.defineProperty;
|
|
8301
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
8302
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
7807
8303
|
function __accessProp(key) {
|
|
7808
8304
|
return this[key];
|
|
7809
8305
|
}
|
|
7810
8306
|
var __toESMCache_node;
|
|
7811
8307
|
var __toESMCache_esm;
|
|
7812
|
-
var
|
|
8308
|
+
var __toESM = (mod2, isNodeMode, target) => {
|
|
7813
8309
|
var canCache = mod2 != null && typeof mod2 === "object";
|
|
7814
8310
|
if (canCache) {
|
|
7815
8311
|
var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
|
|
@@ -7817,11 +8313,11 @@ var __toESM2 = (mod2, isNodeMode, target) => {
|
|
|
7817
8313
|
if (cached)
|
|
7818
8314
|
return cached;
|
|
7819
8315
|
}
|
|
7820
|
-
target = mod2 != null ?
|
|
7821
|
-
const to = isNodeMode || !mod2 || !mod2.__esModule ?
|
|
7822
|
-
for (let key of
|
|
7823
|
-
if (!
|
|
7824
|
-
|
|
8316
|
+
target = mod2 != null ? __create(__getProtoOf(mod2)) : {};
|
|
8317
|
+
const to = isNodeMode || !mod2 || !mod2.__esModule ? __defProp(target, "default", { value: mod2, enumerable: true }) : target;
|
|
8318
|
+
for (let key of __getOwnPropNames(mod2))
|
|
8319
|
+
if (!__hasOwnProp.call(to, key))
|
|
8320
|
+
__defProp(to, key, {
|
|
7825
8321
|
get: __accessProp.bind(mod2, key),
|
|
7826
8322
|
enumerable: true
|
|
7827
8323
|
});
|
|
@@ -8178,11 +8674,11 @@ var init_is_in_ssh = __esm(() => {
|
|
|
8178
8674
|
isInSsh2 = Boolean(process72.env.SSH_CONNECTION || process72.env.SSH_CLIENT || process72.env.SSH_TTY);
|
|
8179
8675
|
is_in_ssh_default2 = isInSsh2;
|
|
8180
8676
|
});
|
|
8181
|
-
function detectArchBinary2(
|
|
8182
|
-
if (typeof
|
|
8183
|
-
return
|
|
8677
|
+
function detectArchBinary2(binary2) {
|
|
8678
|
+
if (typeof binary2 === "string" || Array.isArray(binary2)) {
|
|
8679
|
+
return binary2;
|
|
8184
8680
|
}
|
|
8185
|
-
const { [arch2]: archBinary } =
|
|
8681
|
+
const { [arch2]: archBinary } = binary2;
|
|
8186
8682
|
if (!archBinary) {
|
|
8187
8683
|
throw new Error(`${arch2} is not supported`);
|
|
8188
8684
|
}
|
|
@@ -21733,7 +22229,7 @@ var require_TimeoutError = __commonJS((exports) => {
|
|
|
21733
22229
|
}();
|
|
21734
22230
|
exports.TimeoutError = TimeoutErrorImpl;
|
|
21735
22231
|
});
|
|
21736
|
-
var
|
|
22232
|
+
var require_map = __commonJS((exports) => {
|
|
21737
22233
|
var __extends = exports && exports.__extends || function() {
|
|
21738
22234
|
var extendStatics = function(d, b) {
|
|
21739
22235
|
extendStatics = Object.setPrototypeOf || { __proto__: [] } instanceof Array && function(d2, b2) {
|
|
@@ -21755,7 +22251,7 @@ var require_map2 = __commonJS((exports) => {
|
|
|
21755
22251
|
}();
|
|
21756
22252
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21757
22253
|
var Subscriber_1 = require_Subscriber();
|
|
21758
|
-
function
|
|
22254
|
+
function map2(project, thisArg) {
|
|
21759
22255
|
return function mapOperation(source) {
|
|
21760
22256
|
if (typeof project !== "function") {
|
|
21761
22257
|
throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");
|
|
@@ -21763,7 +22259,7 @@ var require_map2 = __commonJS((exports) => {
|
|
|
21763
22259
|
return source.lift(new MapOperator(project, thisArg));
|
|
21764
22260
|
};
|
|
21765
22261
|
}
|
|
21766
|
-
exports.map =
|
|
22262
|
+
exports.map = map2;
|
|
21767
22263
|
var MapOperator = function() {
|
|
21768
22264
|
function MapOperator2(project, thisArg) {
|
|
21769
22265
|
this.project = project;
|
|
@@ -21801,7 +22297,7 @@ var require_bindCallback = __commonJS((exports) => {
|
|
|
21801
22297
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21802
22298
|
var Observable_1 = require_Observable();
|
|
21803
22299
|
var AsyncSubject_1 = require_AsyncSubject();
|
|
21804
|
-
var map_1 =
|
|
22300
|
+
var map_1 = require_map();
|
|
21805
22301
|
var canReportError_1 = require_canReportError();
|
|
21806
22302
|
var isArray_1 = require_isArray();
|
|
21807
22303
|
var isScheduler_1 = require_isScheduler();
|
|
@@ -21903,7 +22399,7 @@ var require_bindNodeCallback = __commonJS((exports) => {
|
|
|
21903
22399
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
21904
22400
|
var Observable_1 = require_Observable();
|
|
21905
22401
|
var AsyncSubject_1 = require_AsyncSubject();
|
|
21906
|
-
var map_1 =
|
|
22402
|
+
var map_1 = require_map();
|
|
21907
22403
|
var canReportError_1 = require_canReportError();
|
|
21908
22404
|
var isScheduler_1 = require_isScheduler();
|
|
21909
22405
|
var isArray_1 = require_isArray();
|
|
@@ -22653,7 +23149,7 @@ var require_mergeMap = __commonJS((exports) => {
|
|
|
22653
23149
|
};
|
|
22654
23150
|
}();
|
|
22655
23151
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22656
|
-
var map_1 =
|
|
23152
|
+
var map_1 = require_map();
|
|
22657
23153
|
var from_1 = require_from();
|
|
22658
23154
|
var innerSubscribe_1 = require_innerSubscribe();
|
|
22659
23155
|
function mergeMap(project, resultSelector, concurrent) {
|
|
@@ -22814,7 +23310,7 @@ var require_forkJoin = __commonJS((exports) => {
|
|
|
22814
23310
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
22815
23311
|
var Observable_1 = require_Observable();
|
|
22816
23312
|
var isArray_1 = require_isArray();
|
|
22817
|
-
var map_1 =
|
|
23313
|
+
var map_1 = require_map();
|
|
22818
23314
|
var isObject_1 = require_isObject();
|
|
22819
23315
|
var from_1 = require_from();
|
|
22820
23316
|
function forkJoin() {
|
|
@@ -22892,7 +23388,7 @@ var require_fromEvent = __commonJS((exports) => {
|
|
|
22892
23388
|
var Observable_1 = require_Observable();
|
|
22893
23389
|
var isArray_1 = require_isArray();
|
|
22894
23390
|
var isFunction_1 = require_isFunction();
|
|
22895
|
-
var map_1 =
|
|
23391
|
+
var map_1 = require_map();
|
|
22896
23392
|
var toString = function() {
|
|
22897
23393
|
return Object.prototype.toString;
|
|
22898
23394
|
}();
|
|
@@ -22962,7 +23458,7 @@ var require_fromEventPattern = __commonJS((exports) => {
|
|
|
22962
23458
|
var Observable_1 = require_Observable();
|
|
22963
23459
|
var isArray_1 = require_isArray();
|
|
22964
23460
|
var isFunction_1 = require_isFunction();
|
|
22965
|
-
var map_1 =
|
|
23461
|
+
var map_1 = require_map();
|
|
22966
23462
|
function fromEventPattern(addHandler, removeHandler, resultSelector) {
|
|
22967
23463
|
if (resultSelector) {
|
|
22968
23464
|
return fromEventPattern(addHandler, removeHandler).pipe(map_1.map(function(args) {
|
|
@@ -23167,13 +23663,13 @@ var require_interval = __commonJS((exports) => {
|
|
|
23167
23663
|
this.schedule({ subscriber, counter: counter + 1, period }, period);
|
|
23168
23664
|
}
|
|
23169
23665
|
});
|
|
23170
|
-
var
|
|
23666
|
+
var require_merge = __commonJS((exports) => {
|
|
23171
23667
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23172
23668
|
var Observable_1 = require_Observable();
|
|
23173
23669
|
var isScheduler_1 = require_isScheduler();
|
|
23174
23670
|
var mergeAll_1 = require_mergeAll();
|
|
23175
23671
|
var fromArray_1 = require_fromArray();
|
|
23176
|
-
function
|
|
23672
|
+
function merge2() {
|
|
23177
23673
|
var observables = [];
|
|
23178
23674
|
for (var _i = 0;_i < arguments.length; _i++) {
|
|
23179
23675
|
observables[_i] = arguments[_i];
|
|
@@ -23194,7 +23690,7 @@ var require_merge2 = __commonJS((exports) => {
|
|
|
23194
23690
|
}
|
|
23195
23691
|
return mergeAll_1.mergeAll(concurrent)(fromArray_1.fromArray(observables, scheduler));
|
|
23196
23692
|
}
|
|
23197
|
-
exports.merge =
|
|
23693
|
+
exports.merge = merge2;
|
|
23198
23694
|
});
|
|
23199
23695
|
var require_never = __commonJS((exports) => {
|
|
23200
23696
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
@@ -23239,11 +23735,11 @@ var require_onErrorResumeNext = __commonJS((exports) => {
|
|
|
23239
23735
|
}
|
|
23240
23736
|
exports.onErrorResumeNext = onErrorResumeNext;
|
|
23241
23737
|
});
|
|
23242
|
-
var
|
|
23738
|
+
var require_pairs = __commonJS((exports) => {
|
|
23243
23739
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23244
23740
|
var Observable_1 = require_Observable();
|
|
23245
23741
|
var Subscription_1 = require_Subscription();
|
|
23246
|
-
function
|
|
23742
|
+
function pairs2(obj, scheduler) {
|
|
23247
23743
|
if (!scheduler) {
|
|
23248
23744
|
return new Observable_1.Observable(function(subscriber) {
|
|
23249
23745
|
var keys = Object.keys(obj);
|
|
@@ -23264,7 +23760,7 @@ var require_pairs2 = __commonJS((exports) => {
|
|
|
23264
23760
|
});
|
|
23265
23761
|
}
|
|
23266
23762
|
}
|
|
23267
|
-
exports.pairs =
|
|
23763
|
+
exports.pairs = pairs2;
|
|
23268
23764
|
function dispatch(state) {
|
|
23269
23765
|
var { keys, index, subscriber, subscription, obj } = state;
|
|
23270
23766
|
if (!subscriber.closed) {
|
|
@@ -23905,7 +24401,7 @@ var require_rxjs = __commonJS((exports) => {
|
|
|
23905
24401
|
exports.iif = iif_1.iif;
|
|
23906
24402
|
var interval_1 = require_interval();
|
|
23907
24403
|
exports.interval = interval_1.interval;
|
|
23908
|
-
var merge_1 =
|
|
24404
|
+
var merge_1 = require_merge();
|
|
23909
24405
|
exports.merge = merge_1.merge;
|
|
23910
24406
|
var never_1 = require_never();
|
|
23911
24407
|
exports.never = never_1.never;
|
|
@@ -23913,7 +24409,7 @@ var require_rxjs = __commonJS((exports) => {
|
|
|
23913
24409
|
exports.of = of_1.of;
|
|
23914
24410
|
var onErrorResumeNext_1 = require_onErrorResumeNext();
|
|
23915
24411
|
exports.onErrorResumeNext = onErrorResumeNext_1.onErrorResumeNext;
|
|
23916
|
-
var pairs_1 =
|
|
24412
|
+
var pairs_1 = require_pairs();
|
|
23917
24413
|
exports.pairs = pairs_1.pairs;
|
|
23918
24414
|
var partition_1 = require_partition();
|
|
23919
24415
|
exports.partition = partition_1.partition;
|
|
@@ -26902,7 +27398,7 @@ var parseResourceUrl = (url) => {
|
|
|
26902
27398
|
};
|
|
26903
27399
|
};
|
|
26904
27400
|
var defaultLoadModule = async () => {
|
|
26905
|
-
const [error, mod2] = await catchError2(() => Promise.resolve().then(() =>
|
|
27401
|
+
const [error, mod2] = await catchError2(() => Promise.resolve().then(() => __toESM(require_dist(), 1)));
|
|
26906
27402
|
if (error || !mod2) {
|
|
26907
27403
|
return;
|
|
26908
27404
|
}
|
|
@@ -27155,12 +27651,12 @@ var loadEnvFileAsync = async ({ envPath }) => {
|
|
|
27155
27651
|
var saveEnvFileAsync = async ({
|
|
27156
27652
|
envPath,
|
|
27157
27653
|
data,
|
|
27158
|
-
merge = true
|
|
27654
|
+
merge: merge2 = true
|
|
27159
27655
|
}) => {
|
|
27160
27656
|
const fs72 = getFileSystem2();
|
|
27161
27657
|
const absolutePath = fs72.path.isAbsolute(envPath) ? envPath : fs72.path.join(fs72.env.homedir(), envPath);
|
|
27162
27658
|
let existingData = {};
|
|
27163
|
-
if (
|
|
27659
|
+
if (merge2 && await fs72.exists(absolutePath)) {
|
|
27164
27660
|
try {
|
|
27165
27661
|
existingData = await loadEnvFileAsync({ envPath: absolutePath });
|
|
27166
27662
|
} catch {}
|
|
@@ -27649,6 +28145,7 @@ function normalizeTokenRefreshUnavailableFailure() {
|
|
|
27649
28145
|
function errorMessage(error) {
|
|
27650
28146
|
return error instanceof Error ? error.message : String(error);
|
|
27651
28147
|
}
|
|
28148
|
+
init_constants();
|
|
27652
28149
|
init_src();
|
|
27653
28150
|
var TENANT_SELECTION_REQUIRED_CODE = "TENANT_SELECTION_REQUIRED";
|
|
27654
28151
|
var INVALID_TENANT_CODE = "INVALID_TENANT";
|
|
@@ -29032,4 +29529,4 @@ export {
|
|
|
29032
29529
|
metadata
|
|
29033
29530
|
};
|
|
29034
29531
|
|
|
29035
|
-
//# debugId=
|
|
29532
|
+
//# debugId=AAA0B112E6AD21C364756E2164756E21
|