prettier 3.0.2 → 3.1.0
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/LICENSE +189 -244
- package/README.md +1 -1
- package/bin/prettier.cjs +3 -2
- package/doc.d.ts +3 -0
- package/doc.js +12 -24
- package/doc.mjs +12 -24
- package/index.cjs +22 -29
- package/index.d.ts +18 -14
- package/index.mjs +3198 -648
- package/internal/cli.mjs +353 -65
- package/internal/internal.mjs +195 -6038
- package/package.json +7 -2
- package/plugins/acorn.js +12 -12
- package/plugins/acorn.mjs +12 -12
- package/plugins/angular.js +2 -2
- package/plugins/angular.mjs +2 -2
- package/plugins/babel.js +11 -11
- package/plugins/babel.mjs +11 -11
- package/plugins/estree.js +25 -25
- package/plugins/estree.mjs +25 -25
- package/plugins/flow.js +17 -17
- package/plugins/flow.mjs +17 -17
- package/plugins/glimmer.js +22 -22
- package/plugins/glimmer.mjs +22 -22
- package/plugins/html.js +17 -17
- package/plugins/html.mjs +17 -17
- package/plugins/markdown.js +46 -46
- package/plugins/markdown.mjs +46 -46
- package/plugins/meriyah.js +4 -4
- package/plugins/meriyah.mjs +4 -4
- package/plugins/postcss.js +20 -20
- package/plugins/postcss.mjs +21 -21
- package/plugins/typescript.js +20 -20
- package/plugins/typescript.mjs +20 -20
- package/standalone.js +29 -29
- package/standalone.mjs +29 -29
package/index.mjs
CHANGED
|
@@ -11,6 +11,7 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
|
11
11
|
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
12
12
|
var __getProtoOf = Object.getPrototypeOf;
|
|
13
13
|
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
14
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
14
15
|
var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, {
|
|
15
16
|
get: (a, b) => (typeof require !== "undefined" ? require : a)[b]
|
|
16
17
|
}) : x)(function(x) {
|
|
@@ -41,15 +42,28 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
41
42
|
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
42
43
|
mod
|
|
43
44
|
));
|
|
45
|
+
var __publicField = (obj, key, value) => {
|
|
46
|
+
__defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
|
|
47
|
+
return value;
|
|
48
|
+
};
|
|
44
49
|
var __accessCheck = (obj, member, msg) => {
|
|
45
50
|
if (!member.has(obj))
|
|
46
51
|
throw TypeError("Cannot " + msg);
|
|
47
52
|
};
|
|
53
|
+
var __privateGet = (obj, member, getter) => {
|
|
54
|
+
__accessCheck(obj, member, "read from private field");
|
|
55
|
+
return getter ? getter.call(obj) : member.get(obj);
|
|
56
|
+
};
|
|
48
57
|
var __privateAdd = (obj, member, value) => {
|
|
49
58
|
if (member.has(obj))
|
|
50
59
|
throw TypeError("Cannot add the same private member more than once");
|
|
51
60
|
member instanceof WeakSet ? member.add(obj) : member.set(obj, value);
|
|
52
61
|
};
|
|
62
|
+
var __privateSet = (obj, member, value, setter) => {
|
|
63
|
+
__accessCheck(obj, member, "write to private field");
|
|
64
|
+
setter ? setter.call(obj, value) : member.set(obj, value);
|
|
65
|
+
return value;
|
|
66
|
+
};
|
|
53
67
|
var __privateMethod = (obj, member, method) => {
|
|
54
68
|
__accessCheck(obj, member, "access private method");
|
|
55
69
|
return method;
|
|
@@ -125,10 +139,15 @@ var require_path = __commonJS({
|
|
|
125
139
|
"node_modules/fast-glob/out/utils/path.js"(exports) {
|
|
126
140
|
"use strict";
|
|
127
141
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
128
|
-
exports.
|
|
142
|
+
exports.convertPosixPathToPattern = exports.convertWindowsPathToPattern = exports.convertPathToPattern = exports.escapePosixPath = exports.escapeWindowsPath = exports.escape = exports.removeLeadingDotSegment = exports.makeAbsolute = exports.unixify = void 0;
|
|
143
|
+
var os2 = __require("os");
|
|
129
144
|
var path9 = __require("path");
|
|
145
|
+
var IS_WINDOWS_PLATFORM = os2.platform() === "win32";
|
|
130
146
|
var LEADING_DOT_SEGMENT_CHARACTERS_COUNT = 2;
|
|
131
|
-
var
|
|
147
|
+
var POSIX_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;
|
|
148
|
+
var WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE = /(\\?)([()[\]{}]|^!|[!+@](?=\())/g;
|
|
149
|
+
var DOS_DEVICE_PATH_RE = /^\\\\([.?])/;
|
|
150
|
+
var WINDOWS_BACKSLASHES_RE = /\\(?![!()+@[\]{}])/g;
|
|
132
151
|
function unixify(filepath) {
|
|
133
152
|
return filepath.replace(/\\/g, "/");
|
|
134
153
|
}
|
|
@@ -137,10 +156,6 @@ var require_path = __commonJS({
|
|
|
137
156
|
return path9.resolve(cwd, filepath);
|
|
138
157
|
}
|
|
139
158
|
exports.makeAbsolute = makeAbsolute;
|
|
140
|
-
function escape(pattern) {
|
|
141
|
-
return pattern.replace(UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
142
|
-
}
|
|
143
|
-
exports.escape = escape;
|
|
144
159
|
function removeLeadingDotSegment(entry) {
|
|
145
160
|
if (entry.charAt(0) === ".") {
|
|
146
161
|
const secondCharactery = entry.charAt(1);
|
|
@@ -151,6 +166,24 @@ var require_path = __commonJS({
|
|
|
151
166
|
return entry;
|
|
152
167
|
}
|
|
153
168
|
exports.removeLeadingDotSegment = removeLeadingDotSegment;
|
|
169
|
+
exports.escape = IS_WINDOWS_PLATFORM ? escapeWindowsPath : escapePosixPath;
|
|
170
|
+
function escapeWindowsPath(pattern) {
|
|
171
|
+
return pattern.replace(WINDOWS_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
172
|
+
}
|
|
173
|
+
exports.escapeWindowsPath = escapeWindowsPath;
|
|
174
|
+
function escapePosixPath(pattern) {
|
|
175
|
+
return pattern.replace(POSIX_UNESCAPED_GLOB_SYMBOLS_RE, "\\$2");
|
|
176
|
+
}
|
|
177
|
+
exports.escapePosixPath = escapePosixPath;
|
|
178
|
+
exports.convertPathToPattern = IS_WINDOWS_PLATFORM ? convertWindowsPathToPattern : convertPosixPathToPattern;
|
|
179
|
+
function convertWindowsPathToPattern(filepath) {
|
|
180
|
+
return escapeWindowsPath(filepath).replace(DOS_DEVICE_PATH_RE, "//$1").replace(WINDOWS_BACKSLASHES_RE, "/");
|
|
181
|
+
}
|
|
182
|
+
exports.convertWindowsPathToPattern = convertWindowsPathToPattern;
|
|
183
|
+
function convertPosixPathToPattern(filepath) {
|
|
184
|
+
return escapePosixPath(filepath);
|
|
185
|
+
}
|
|
186
|
+
exports.convertPosixPathToPattern = convertPosixPathToPattern;
|
|
154
187
|
}
|
|
155
188
|
});
|
|
156
189
|
|
|
@@ -3130,7 +3163,7 @@ var require_pattern = __commonJS({
|
|
|
3130
3163
|
"node_modules/fast-glob/out/utils/pattern.js"(exports) {
|
|
3131
3164
|
"use strict";
|
|
3132
3165
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3133
|
-
exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
3166
|
+
exports.removeDuplicateSlashes = exports.matchAny = exports.convertPatternsToRe = exports.makeRe = exports.getPatternParts = exports.expandBraceExpansion = exports.expandPatternsWithBraceExpansion = exports.isAffectDepthOfReadingPattern = exports.endsWithSlashGlobStar = exports.hasGlobStar = exports.getBaseDirectory = exports.isPatternRelatedToParentDirectory = exports.getPatternsOutsideCurrentDirectory = exports.getPatternsInsideCurrentDirectory = exports.getPositivePatterns = exports.getNegativePatterns = exports.isPositivePattern = exports.isNegativePattern = exports.convertToNegativePattern = exports.convertToPositivePattern = exports.isDynamicPattern = exports.isStaticPattern = void 0;
|
|
3134
3167
|
var path9 = __require("path");
|
|
3135
3168
|
var globParent = require_glob_parent();
|
|
3136
3169
|
var micromatch2 = require_micromatch();
|
|
@@ -3141,6 +3174,7 @@ var require_pattern = __commonJS({
|
|
|
3141
3174
|
var REGEX_GROUP_SYMBOLS_RE = /(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;
|
|
3142
3175
|
var GLOB_EXTENSION_SYMBOLS_RE = /[!*+?@]\([^(]*\)/;
|
|
3143
3176
|
var BRACE_EXPANSION_SEPARATORS_RE = /,|\.\./;
|
|
3177
|
+
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
3144
3178
|
function isStaticPattern(pattern, options8 = {}) {
|
|
3145
3179
|
return !isDynamicPattern(pattern, options8);
|
|
3146
3180
|
}
|
|
@@ -3236,10 +3270,9 @@ var require_pattern = __commonJS({
|
|
|
3236
3270
|
}
|
|
3237
3271
|
exports.expandPatternsWithBraceExpansion = expandPatternsWithBraceExpansion;
|
|
3238
3272
|
function expandBraceExpansion(pattern) {
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
});
|
|
3273
|
+
const patterns = micromatch2.braces(pattern, { expand: true, nodupes: true, keepEscaping: true });
|
|
3274
|
+
patterns.sort((a, b) => a.length - b.length);
|
|
3275
|
+
return patterns.filter((pattern2) => pattern2 !== "");
|
|
3243
3276
|
}
|
|
3244
3277
|
exports.expandBraceExpansion = expandBraceExpansion;
|
|
3245
3278
|
function getPatternParts(pattern, options8) {
|
|
@@ -3266,6 +3299,10 @@ var require_pattern = __commonJS({
|
|
|
3266
3299
|
return patternsRe.some((patternRe) => patternRe.test(entry));
|
|
3267
3300
|
}
|
|
3268
3301
|
exports.matchAny = matchAny;
|
|
3302
|
+
function removeDuplicateSlashes(pattern) {
|
|
3303
|
+
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3304
|
+
}
|
|
3305
|
+
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3269
3306
|
}
|
|
3270
3307
|
});
|
|
3271
3308
|
|
|
@@ -3458,9 +3495,11 @@ var require_tasks = __commonJS({
|
|
|
3458
3495
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3459
3496
|
exports.convertPatternGroupToTask = exports.convertPatternGroupsToTasks = exports.groupPatternsByBaseDirectory = exports.getNegativePatternsAsPositive = exports.getPositivePatterns = exports.convertPatternsToTasks = exports.generate = void 0;
|
|
3460
3497
|
var utils = require_utils3();
|
|
3461
|
-
function generate(
|
|
3498
|
+
function generate(input, settings) {
|
|
3499
|
+
const patterns = processPatterns(input, settings);
|
|
3500
|
+
const ignore = processPatterns(settings.ignore, settings);
|
|
3462
3501
|
const positivePatterns = getPositivePatterns(patterns);
|
|
3463
|
-
const negativePatterns = getNegativePatternsAsPositive(patterns,
|
|
3502
|
+
const negativePatterns = getNegativePatternsAsPositive(patterns, ignore);
|
|
3464
3503
|
const staticPatterns = positivePatterns.filter((pattern) => utils.pattern.isStaticPattern(pattern, settings));
|
|
3465
3504
|
const dynamicPatterns = positivePatterns.filter((pattern) => utils.pattern.isDynamicPattern(pattern, settings));
|
|
3466
3505
|
const staticTasks = convertPatternsToTasks(
|
|
@@ -3478,6 +3517,16 @@ var require_tasks = __commonJS({
|
|
|
3478
3517
|
return staticTasks.concat(dynamicTasks);
|
|
3479
3518
|
}
|
|
3480
3519
|
exports.generate = generate;
|
|
3520
|
+
function processPatterns(input, settings) {
|
|
3521
|
+
let patterns = input;
|
|
3522
|
+
if (settings.braceExpansion) {
|
|
3523
|
+
patterns = utils.pattern.expandPatternsWithBraceExpansion(patterns);
|
|
3524
|
+
}
|
|
3525
|
+
if (settings.baseNameMatch) {
|
|
3526
|
+
patterns = patterns.map((pattern) => pattern.includes("/") ? pattern : `**/${pattern}`);
|
|
3527
|
+
}
|
|
3528
|
+
return patterns.map((pattern) => utils.pattern.removeDuplicateSlashes(pattern));
|
|
3529
|
+
}
|
|
3481
3530
|
function convertPatternsToTasks(positive, negative, dynamic) {
|
|
3482
3531
|
const tasks = [];
|
|
3483
3532
|
const patternsOutsideCurrentDirectory = utils.pattern.getPatternsOutsideCurrentDirectory(positive);
|
|
@@ -3535,24 +3584,6 @@ var require_tasks = __commonJS({
|
|
|
3535
3584
|
}
|
|
3536
3585
|
});
|
|
3537
3586
|
|
|
3538
|
-
// node_modules/fast-glob/out/managers/patterns.js
|
|
3539
|
-
var require_patterns = __commonJS({
|
|
3540
|
-
"node_modules/fast-glob/out/managers/patterns.js"(exports) {
|
|
3541
|
-
"use strict";
|
|
3542
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3543
|
-
exports.removeDuplicateSlashes = exports.transform = void 0;
|
|
3544
|
-
var DOUBLE_SLASH_RE = /(?!^)\/{2,}/g;
|
|
3545
|
-
function transform2(patterns) {
|
|
3546
|
-
return patterns.map((pattern) => removeDuplicateSlashes(pattern));
|
|
3547
|
-
}
|
|
3548
|
-
exports.transform = transform2;
|
|
3549
|
-
function removeDuplicateSlashes(pattern) {
|
|
3550
|
-
return pattern.replace(DOUBLE_SLASH_RE, "/");
|
|
3551
|
-
}
|
|
3552
|
-
exports.removeDuplicateSlashes = removeDuplicateSlashes;
|
|
3553
|
-
}
|
|
3554
|
-
});
|
|
3555
|
-
|
|
3556
3587
|
// node_modules/@nodelib/fs.stat/out/providers/async.js
|
|
3557
3588
|
var require_async = __commonJS({
|
|
3558
3589
|
"node_modules/@nodelib/fs.stat/out/providers/async.js"(exports) {
|
|
@@ -4136,7 +4167,7 @@ var require_queue = __commonJS({
|
|
|
4136
4167
|
if (concurrency < 1) {
|
|
4137
4168
|
throw new Error("fastqueue concurrency must be greater than 1");
|
|
4138
4169
|
}
|
|
4139
|
-
var
|
|
4170
|
+
var cache2 = reusify(Task);
|
|
4140
4171
|
var queueHead = null;
|
|
4141
4172
|
var queueTail = null;
|
|
4142
4173
|
var _running = 0;
|
|
@@ -4197,7 +4228,7 @@ var require_queue = __commonJS({
|
|
|
4197
4228
|
return _running === 0 && self.length() === 0;
|
|
4198
4229
|
}
|
|
4199
4230
|
function push(value, done) {
|
|
4200
|
-
var current =
|
|
4231
|
+
var current = cache2.get();
|
|
4201
4232
|
current.context = context;
|
|
4202
4233
|
current.release = release;
|
|
4203
4234
|
current.value = value;
|
|
@@ -4218,7 +4249,7 @@ var require_queue = __commonJS({
|
|
|
4218
4249
|
}
|
|
4219
4250
|
}
|
|
4220
4251
|
function unshift(value, done) {
|
|
4221
|
-
var current =
|
|
4252
|
+
var current = cache2.get();
|
|
4222
4253
|
current.context = context;
|
|
4223
4254
|
current.release = release;
|
|
4224
4255
|
current.value = value;
|
|
@@ -4239,7 +4270,7 @@ var require_queue = __commonJS({
|
|
|
4239
4270
|
}
|
|
4240
4271
|
function release(holder) {
|
|
4241
4272
|
if (holder) {
|
|
4242
|
-
|
|
4273
|
+
cache2.release(holder);
|
|
4243
4274
|
}
|
|
4244
4275
|
var next = queueHead;
|
|
4245
4276
|
if (next) {
|
|
@@ -4900,8 +4931,7 @@ var require_matcher = __commonJS({
|
|
|
4900
4931
|
this._fillStorage();
|
|
4901
4932
|
}
|
|
4902
4933
|
_fillStorage() {
|
|
4903
|
-
const
|
|
4904
|
-
for (const pattern of patterns) {
|
|
4934
|
+
for (const pattern of this._patterns) {
|
|
4905
4935
|
const segments = this._getPatternSegments(pattern);
|
|
4906
4936
|
const sections = this._splitSegmentsIntoSections(segments);
|
|
4907
4937
|
this._storage.push({
|
|
@@ -5053,32 +5083,32 @@ var require_entry = __commonJS({
|
|
|
5053
5083
|
}
|
|
5054
5084
|
getFilter(positive, negative) {
|
|
5055
5085
|
const positiveRe = utils.pattern.convertPatternsToRe(positive, this._micromatchOptions);
|
|
5056
|
-
const negativeRe = utils.pattern.convertPatternsToRe(negative, this._micromatchOptions);
|
|
5086
|
+
const negativeRe = utils.pattern.convertPatternsToRe(negative, Object.assign(Object.assign({}, this._micromatchOptions), { dot: true }));
|
|
5057
5087
|
return (entry) => this._filter(entry, positiveRe, negativeRe);
|
|
5058
5088
|
}
|
|
5059
5089
|
_filter(entry, positiveRe, negativeRe) {
|
|
5060
|
-
|
|
5090
|
+
const filepath = utils.path.removeLeadingDotSegment(entry.path);
|
|
5091
|
+
if (this._settings.unique && this._isDuplicateEntry(filepath)) {
|
|
5061
5092
|
return false;
|
|
5062
5093
|
}
|
|
5063
5094
|
if (this._onlyFileFilter(entry) || this._onlyDirectoryFilter(entry)) {
|
|
5064
5095
|
return false;
|
|
5065
5096
|
}
|
|
5066
|
-
if (this._isSkippedByAbsoluteNegativePatterns(
|
|
5097
|
+
if (this._isSkippedByAbsoluteNegativePatterns(filepath, negativeRe)) {
|
|
5067
5098
|
return false;
|
|
5068
5099
|
}
|
|
5069
|
-
const filepath = this._settings.baseNameMatch ? entry.name : entry.path;
|
|
5070
5100
|
const isDirectory = entry.dirent.isDirectory();
|
|
5071
|
-
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(
|
|
5101
|
+
const isMatched = this._isMatchToPatterns(filepath, positiveRe, isDirectory) && !this._isMatchToPatterns(filepath, negativeRe, isDirectory);
|
|
5072
5102
|
if (this._settings.unique && isMatched) {
|
|
5073
|
-
this._createIndexRecord(
|
|
5103
|
+
this._createIndexRecord(filepath);
|
|
5074
5104
|
}
|
|
5075
5105
|
return isMatched;
|
|
5076
5106
|
}
|
|
5077
|
-
_isDuplicateEntry(
|
|
5078
|
-
return this.index.has(
|
|
5107
|
+
_isDuplicateEntry(filepath) {
|
|
5108
|
+
return this.index.has(filepath);
|
|
5079
5109
|
}
|
|
5080
|
-
_createIndexRecord(
|
|
5081
|
-
this.index.set(
|
|
5110
|
+
_createIndexRecord(filepath) {
|
|
5111
|
+
this.index.set(filepath, void 0);
|
|
5082
5112
|
}
|
|
5083
5113
|
_onlyFileFilter(entry) {
|
|
5084
5114
|
return this._settings.onlyFiles && !entry.dirent.isFile();
|
|
@@ -5093,8 +5123,7 @@ var require_entry = __commonJS({
|
|
|
5093
5123
|
const fullpath = utils.path.makeAbsolute(this._settings.cwd, entryPath);
|
|
5094
5124
|
return utils.pattern.matchAny(fullpath, patternsRe);
|
|
5095
5125
|
}
|
|
5096
|
-
_isMatchToPatterns(
|
|
5097
|
-
const filepath = utils.path.removeLeadingDotSegment(entryPath);
|
|
5126
|
+
_isMatchToPatterns(filepath, patternsRe, isDirectory) {
|
|
5098
5127
|
const isMatched = utils.pattern.matchAny(filepath, patternsRe);
|
|
5099
5128
|
if (!isMatched && isDirectory) {
|
|
5100
5129
|
return utils.pattern.matchAny(filepath + "/", patternsRe);
|
|
@@ -5400,6 +5429,7 @@ var require_settings4 = __commonJS({
|
|
|
5400
5429
|
if (this.stats) {
|
|
5401
5430
|
this.objectMode = true;
|
|
5402
5431
|
}
|
|
5432
|
+
this.ignore = [].concat(this.ignore);
|
|
5403
5433
|
}
|
|
5404
5434
|
_getValue(option, value) {
|
|
5405
5435
|
return option === void 0 ? value : option;
|
|
@@ -5417,7 +5447,6 @@ var require_out4 = __commonJS({
|
|
|
5417
5447
|
"node_modules/fast-glob/out/index.js"(exports, module) {
|
|
5418
5448
|
"use strict";
|
|
5419
5449
|
var taskManager = require_tasks();
|
|
5420
|
-
var patternManager = require_patterns();
|
|
5421
5450
|
var async_1 = require_async6();
|
|
5422
5451
|
var stream_1 = require_stream4();
|
|
5423
5452
|
var sync_1 = require_sync6();
|
|
@@ -5430,6 +5459,10 @@ var require_out4 = __commonJS({
|
|
|
5430
5459
|
return utils.array.flatten(result);
|
|
5431
5460
|
}
|
|
5432
5461
|
(function(FastGlob2) {
|
|
5462
|
+
FastGlob2.glob = FastGlob2;
|
|
5463
|
+
FastGlob2.globSync = sync;
|
|
5464
|
+
FastGlob2.globStream = stream;
|
|
5465
|
+
FastGlob2.async = FastGlob2;
|
|
5433
5466
|
function sync(source, options8) {
|
|
5434
5467
|
assertPatternsInput(source);
|
|
5435
5468
|
const works = getWorks(source, sync_1.default, options8);
|
|
@@ -5444,7 +5477,7 @@ var require_out4 = __commonJS({
|
|
|
5444
5477
|
FastGlob2.stream = stream;
|
|
5445
5478
|
function generateTasks(source, options8) {
|
|
5446
5479
|
assertPatternsInput(source);
|
|
5447
|
-
const patterns =
|
|
5480
|
+
const patterns = [].concat(source);
|
|
5448
5481
|
const settings = new settings_1.default(options8);
|
|
5449
5482
|
return taskManager.generate(patterns, settings);
|
|
5450
5483
|
}
|
|
@@ -5460,9 +5493,40 @@ var require_out4 = __commonJS({
|
|
|
5460
5493
|
return utils.path.escape(source);
|
|
5461
5494
|
}
|
|
5462
5495
|
FastGlob2.escapePath = escapePath;
|
|
5496
|
+
function convertPathToPattern(source) {
|
|
5497
|
+
assertPatternsInput(source);
|
|
5498
|
+
return utils.path.convertPathToPattern(source);
|
|
5499
|
+
}
|
|
5500
|
+
FastGlob2.convertPathToPattern = convertPathToPattern;
|
|
5501
|
+
let posix;
|
|
5502
|
+
(function(posix2) {
|
|
5503
|
+
function escapePath2(source) {
|
|
5504
|
+
assertPatternsInput(source);
|
|
5505
|
+
return utils.path.escapePosixPath(source);
|
|
5506
|
+
}
|
|
5507
|
+
posix2.escapePath = escapePath2;
|
|
5508
|
+
function convertPathToPattern2(source) {
|
|
5509
|
+
assertPatternsInput(source);
|
|
5510
|
+
return utils.path.convertPosixPathToPattern(source);
|
|
5511
|
+
}
|
|
5512
|
+
posix2.convertPathToPattern = convertPathToPattern2;
|
|
5513
|
+
})(posix = FastGlob2.posix || (FastGlob2.posix = {}));
|
|
5514
|
+
let win32;
|
|
5515
|
+
(function(win322) {
|
|
5516
|
+
function escapePath2(source) {
|
|
5517
|
+
assertPatternsInput(source);
|
|
5518
|
+
return utils.path.escapeWindowsPath(source);
|
|
5519
|
+
}
|
|
5520
|
+
win322.escapePath = escapePath2;
|
|
5521
|
+
function convertPathToPattern2(source) {
|
|
5522
|
+
assertPatternsInput(source);
|
|
5523
|
+
return utils.path.convertWindowsPathToPattern(source);
|
|
5524
|
+
}
|
|
5525
|
+
win322.convertPathToPattern = convertPathToPattern2;
|
|
5526
|
+
})(win32 = FastGlob2.win32 || (FastGlob2.win32 = {}));
|
|
5463
5527
|
})(FastGlob || (FastGlob = {}));
|
|
5464
5528
|
function getWorks(source, _Provider, options8) {
|
|
5465
|
-
const patterns =
|
|
5529
|
+
const patterns = [].concat(source);
|
|
5466
5530
|
const settings = new settings_1.default(options8);
|
|
5467
5531
|
const tasks = taskManager.generate(patterns, settings);
|
|
5468
5532
|
const provider = new _Provider(settings);
|
|
@@ -5896,11 +5960,11 @@ var require_identifier = __commonJS({
|
|
|
5896
5960
|
exports.isIdentifierName = isIdentifierName;
|
|
5897
5961
|
exports.isIdentifierStart = isIdentifierStart;
|
|
5898
5962
|
var nonASCIIidentifierStartChars = "\xAA\xB5\xBA\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D5F-\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1878\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2118-\u211D\u2124\u2126\u2128\u212A-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2160-\u2188\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309B-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u31A0-\u31BF\u31F0-\u31FF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uA9E0-\uA9E4\uA9E6-\uA9EF\uA9FA-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC";
|
|
5899
|
-
var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F";
|
|
5963
|
+
var nonASCIIidentifierChars = "\u200C\u200D\xB7\u0300-\u036F\u0387\u0483-\u0487\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u0669\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u06F0-\u06F9\u0711\u0730-\u074A\u07A6-\u07B0\u07C0-\u07C9\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u0898-\u089F\u08CA-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0966-\u096F\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09E6-\u09EF\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A66-\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AE6-\u0AEF\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B55-\u0B57\u0B62\u0B63\u0B66-\u0B6F\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0BE6-\u0BEF\u0C00-\u0C04\u0C3C\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C66-\u0C6F\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0CE6-\u0CEF\u0CF3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D66-\u0D6F\u0D81-\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DE6-\u0DEF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0E50-\u0E59\u0EB1\u0EB4-\u0EBC\u0EC8-\u0ECE\u0ED0-\u0ED9\u0F18\u0F19\u0F20-\u0F29\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1040-\u1049\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F-\u109D\u135D-\u135F\u1369-\u1371\u1712-\u1715\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u17E0-\u17E9\u180B-\u180D\u180F-\u1819\u18A9\u1920-\u192B\u1930-\u193B\u1946-\u194F\u19D0-\u19DA\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F-\u1A89\u1A90-\u1A99\u1AB0-\u1ABD\u1ABF-\u1ACE\u1B00-\u1B04\u1B34-\u1B44\u1B50-\u1B59\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BB0-\u1BB9\u1BE6-\u1BF3\u1C24-\u1C37\u1C40-\u1C49\u1C50-\u1C59\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DFF\u200C\u200D\u203F\u2040\u2054\u20D0-\u20DC\u20E1\u20E5-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\u30FB\uA620-\uA629\uA66F\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA82C\uA880\uA881\uA8B4-\uA8C5\uA8D0-\uA8D9\uA8E0-\uA8F1\uA8FF-\uA909\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9D0-\uA9D9\uA9E5\uA9F0-\uA9F9\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA50-\uAA59\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uABF0-\uABF9\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F\uFE33\uFE34\uFE4D-\uFE4F\uFF10-\uFF19\uFF3F\uFF65";
|
|
5900
5964
|
var nonASCIIidentifierStart = new RegExp("[" + nonASCIIidentifierStartChars + "]");
|
|
5901
5965
|
var nonASCIIidentifier = new RegExp("[" + nonASCIIidentifierStartChars + nonASCIIidentifierChars + "]");
|
|
5902
5966
|
nonASCIIidentifierStartChars = nonASCIIidentifierChars = null;
|
|
5903
|
-
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472,
|
|
5967
|
+
var astralIdentifierStartCodes = [0, 11, 2, 25, 2, 18, 2, 1, 2, 14, 3, 13, 35, 122, 70, 52, 268, 28, 4, 48, 48, 31, 14, 29, 6, 37, 11, 29, 3, 35, 5, 7, 2, 4, 43, 157, 19, 35, 5, 35, 5, 39, 9, 51, 13, 10, 2, 14, 2, 6, 2, 1, 2, 10, 2, 14, 2, 6, 2, 1, 68, 310, 10, 21, 11, 7, 25, 5, 2, 41, 2, 8, 70, 5, 3, 0, 2, 43, 2, 1, 4, 0, 3, 22, 11, 22, 10, 30, 66, 18, 2, 1, 11, 21, 11, 25, 71, 55, 7, 1, 65, 0, 16, 3, 2, 2, 2, 28, 43, 28, 4, 28, 36, 7, 2, 27, 28, 53, 11, 21, 11, 18, 14, 17, 111, 72, 56, 50, 14, 50, 14, 35, 349, 41, 7, 1, 79, 28, 11, 0, 9, 21, 43, 17, 47, 20, 28, 22, 13, 52, 58, 1, 3, 0, 14, 44, 33, 24, 27, 35, 30, 0, 3, 0, 9, 34, 4, 0, 13, 47, 15, 3, 22, 0, 2, 0, 36, 17, 2, 24, 20, 1, 64, 6, 2, 0, 2, 3, 2, 14, 2, 9, 8, 46, 39, 7, 3, 1, 3, 21, 2, 6, 2, 1, 2, 4, 4, 0, 19, 0, 13, 4, 159, 52, 19, 3, 21, 2, 31, 47, 21, 1, 2, 0, 185, 46, 42, 3, 37, 47, 21, 0, 60, 42, 14, 0, 72, 26, 38, 6, 186, 43, 117, 63, 32, 7, 3, 0, 3, 7, 2, 1, 2, 23, 16, 0, 2, 0, 95, 7, 3, 38, 17, 0, 2, 0, 29, 0, 11, 39, 8, 0, 22, 0, 12, 45, 20, 0, 19, 72, 264, 8, 2, 36, 18, 0, 50, 29, 113, 6, 2, 1, 2, 37, 22, 0, 26, 5, 2, 1, 2, 31, 15, 0, 328, 18, 16, 0, 2, 12, 2, 33, 125, 0, 80, 921, 103, 110, 18, 195, 2637, 96, 16, 1071, 18, 5, 4026, 582, 8634, 568, 8, 30, 18, 78, 18, 29, 19, 47, 17, 3, 32, 20, 6, 18, 689, 63, 129, 74, 6, 0, 67, 12, 65, 1, 2, 0, 29, 6135, 9, 1237, 43, 8, 8936, 3, 2, 6, 2, 1, 2, 290, 16, 0, 30, 2, 3, 0, 15, 3, 9, 395, 2309, 106, 6, 12, 4, 8, 8, 9, 5991, 84, 2, 70, 2, 1, 3, 0, 3, 1, 3, 3, 2, 11, 2, 0, 2, 6, 2, 64, 2, 3, 3, 7, 2, 6, 2, 27, 2, 3, 2, 4, 2, 0, 4, 6, 2, 339, 3, 24, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 30, 2, 24, 2, 7, 1845, 30, 7, 5, 262, 61, 147, 44, 11, 6, 17, 0, 322, 29, 19, 43, 485, 27, 757, 6, 2, 3, 2, 1, 2, 14, 2, 196, 60, 67, 8, 0, 1205, 3, 2, 26, 2, 1, 2, 0, 3, 0, 2, 9, 2, 3, 2, 0, 2, 0, 7, 0, 5, 0, 2, 0, 2, 0, 2, 2, 2, 1, 2, 0, 3, 0, 2, 0, 2, 0, 2, 0, 2, 0, 2, 1, 2, 0, 3, 3, 2, 6, 2, 3, 2, 3, 2, 0, 2, 9, 2, 16, 6, 2, 2, 4, 2, 16, 4421, 42719, 33, 4153, 7, 221, 3, 5761, 15, 7472, 16, 621, 2467, 541, 1507, 4938, 6, 4191];
|
|
5904
5968
|
var astralIdentifierCodes = [509, 0, 227, 0, 150, 4, 294, 9, 1368, 2, 2, 1, 6, 3, 41, 2, 5, 0, 166, 1, 574, 3, 9, 9, 370, 1, 81, 2, 71, 10, 50, 3, 123, 2, 54, 14, 32, 10, 3, 1, 11, 3, 46, 10, 8, 0, 46, 9, 7, 2, 37, 13, 2, 9, 6, 1, 45, 0, 13, 2, 49, 13, 9, 3, 2, 11, 83, 11, 7, 0, 3, 0, 158, 11, 6, 9, 7, 3, 56, 1, 2, 6, 3, 1, 3, 2, 10, 0, 11, 1, 3, 6, 4, 4, 193, 17, 10, 9, 5, 0, 82, 19, 13, 9, 214, 6, 3, 8, 28, 1, 83, 16, 16, 9, 82, 12, 9, 9, 84, 14, 5, 9, 243, 14, 166, 9, 71, 5, 2, 1, 3, 3, 2, 0, 2, 1, 13, 9, 120, 6, 3, 6, 4, 0, 29, 9, 41, 6, 2, 3, 9, 0, 10, 10, 47, 15, 406, 7, 2, 7, 17, 9, 57, 21, 2, 13, 123, 5, 4, 0, 2, 1, 2, 6, 2, 0, 9, 9, 49, 4, 2, 1, 2, 4, 9, 9, 330, 3, 10, 1, 2, 0, 49, 6, 4, 4, 14, 9, 5351, 0, 7, 14, 13835, 9, 87, 9, 39, 4, 60, 6, 26, 9, 1014, 0, 2, 54, 8, 3, 82, 0, 12, 1, 19628, 1, 4706, 45, 3, 22, 543, 4, 4, 5, 9, 7, 3, 6, 31, 3, 149, 2, 1418, 49, 513, 54, 5, 49, 9, 0, 15, 0, 23, 4, 2, 14, 1361, 6, 2, 16, 3, 6, 2, 1, 2, 4, 101, 0, 161, 6, 10, 9, 357, 0, 62, 13, 499, 13, 983, 6, 110, 6, 6, 9, 4759, 9, 787719, 239];
|
|
5905
5969
|
function isInAstralSet(code, set) {
|
|
5906
5970
|
let pos = 65536;
|
|
@@ -7081,9 +7145,9 @@ var require_color_convert = __commonJS({
|
|
|
7081
7145
|
}
|
|
7082
7146
|
});
|
|
7083
7147
|
|
|
7084
|
-
// node_modules/ansi-styles/index.js
|
|
7148
|
+
// node_modules/@babel/code-frame/node_modules/ansi-styles/index.js
|
|
7085
7149
|
var require_ansi_styles = __commonJS({
|
|
7086
|
-
"node_modules/ansi-styles/index.js"(exports, module) {
|
|
7150
|
+
"node_modules/@babel/code-frame/node_modules/ansi-styles/index.js"(exports, module) {
|
|
7087
7151
|
"use strict";
|
|
7088
7152
|
var colorConvert = require_color_convert();
|
|
7089
7153
|
var wrapAnsi162 = (fn, offset) => function() {
|
|
@@ -7622,20 +7686,57 @@ var require_lib2 = __commonJS({
|
|
|
7622
7686
|
exports.shouldHighlight = shouldHighlight;
|
|
7623
7687
|
var _jsTokens = require_js_tokens();
|
|
7624
7688
|
var _helperValidatorIdentifier = require_lib();
|
|
7625
|
-
var
|
|
7626
|
-
|
|
7689
|
+
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
|
7690
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
7691
|
+
if (typeof WeakMap !== "function")
|
|
7692
|
+
return null;
|
|
7693
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
7694
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
7695
|
+
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
7696
|
+
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
7697
|
+
})(nodeInterop);
|
|
7698
|
+
}
|
|
7699
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
7700
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
7701
|
+
return obj;
|
|
7702
|
+
}
|
|
7703
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
7704
|
+
return { default: obj };
|
|
7705
|
+
}
|
|
7706
|
+
var cache2 = _getRequireWildcardCache(nodeInterop);
|
|
7707
|
+
if (cache2 && cache2.has(obj)) {
|
|
7708
|
+
return cache2.get(obj);
|
|
7709
|
+
}
|
|
7710
|
+
var newObj = {};
|
|
7711
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
7712
|
+
for (var key in obj) {
|
|
7713
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
7714
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
7715
|
+
if (desc && (desc.get || desc.set)) {
|
|
7716
|
+
Object.defineProperty(newObj, key, desc);
|
|
7717
|
+
} else {
|
|
7718
|
+
newObj[key] = obj[key];
|
|
7719
|
+
}
|
|
7720
|
+
}
|
|
7721
|
+
}
|
|
7722
|
+
newObj.default = obj;
|
|
7723
|
+
if (cache2) {
|
|
7724
|
+
cache2.set(obj, newObj);
|
|
7725
|
+
}
|
|
7726
|
+
return newObj;
|
|
7727
|
+
}
|
|
7627
7728
|
var sometimesKeywords = /* @__PURE__ */ new Set(["as", "async", "from", "get", "of", "set"]);
|
|
7628
|
-
function getDefs(
|
|
7729
|
+
function getDefs(chalk2) {
|
|
7629
7730
|
return {
|
|
7630
|
-
keyword:
|
|
7631
|
-
capitalized:
|
|
7632
|
-
jsxIdentifier:
|
|
7633
|
-
punctuator:
|
|
7634
|
-
number:
|
|
7635
|
-
string:
|
|
7636
|
-
regex:
|
|
7637
|
-
comment:
|
|
7638
|
-
invalid:
|
|
7731
|
+
keyword: chalk2.cyan,
|
|
7732
|
+
capitalized: chalk2.yellow,
|
|
7733
|
+
jsxIdentifier: chalk2.yellow,
|
|
7734
|
+
punctuator: chalk2.yellow,
|
|
7735
|
+
number: chalk2.magenta,
|
|
7736
|
+
string: chalk2.green,
|
|
7737
|
+
regex: chalk2.magenta,
|
|
7738
|
+
comment: chalk2.grey,
|
|
7739
|
+
invalid: chalk2.white.bgRed.bold
|
|
7639
7740
|
};
|
|
7640
7741
|
}
|
|
7641
7742
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
@@ -7690,19 +7791,19 @@ var require_lib2 = __commonJS({
|
|
|
7690
7791
|
return highlighted;
|
|
7691
7792
|
}
|
|
7692
7793
|
function shouldHighlight(options8) {
|
|
7693
|
-
return
|
|
7794
|
+
return _chalk.default.level > 0 || options8.forceColor;
|
|
7694
7795
|
}
|
|
7695
7796
|
var chalkWithForcedColor = void 0;
|
|
7696
7797
|
function getChalk(forceColor) {
|
|
7697
7798
|
if (forceColor) {
|
|
7698
7799
|
var _chalkWithForcedColor;
|
|
7699
|
-
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new
|
|
7800
|
+
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
|
|
7700
7801
|
enabled: true,
|
|
7701
7802
|
level: 1
|
|
7702
7803
|
});
|
|
7703
7804
|
return chalkWithForcedColor;
|
|
7704
7805
|
}
|
|
7705
|
-
return
|
|
7806
|
+
return _chalk.default;
|
|
7706
7807
|
}
|
|
7707
7808
|
{
|
|
7708
7809
|
{
|
|
@@ -7727,29 +7828,66 @@ var require_lib3 = __commonJS({
|
|
|
7727
7828
|
Object.defineProperty(exports, "__esModule", {
|
|
7728
7829
|
value: true
|
|
7729
7830
|
});
|
|
7730
|
-
exports.codeFrameColumns =
|
|
7831
|
+
exports.codeFrameColumns = codeFrameColumns3;
|
|
7731
7832
|
exports.default = _default;
|
|
7732
7833
|
var _highlight = require_lib2();
|
|
7733
|
-
var
|
|
7734
|
-
|
|
7834
|
+
var _chalk = _interopRequireWildcard(require_chalk(), true);
|
|
7835
|
+
function _getRequireWildcardCache(nodeInterop) {
|
|
7836
|
+
if (typeof WeakMap !== "function")
|
|
7837
|
+
return null;
|
|
7838
|
+
var cacheBabelInterop = /* @__PURE__ */ new WeakMap();
|
|
7839
|
+
var cacheNodeInterop = /* @__PURE__ */ new WeakMap();
|
|
7840
|
+
return (_getRequireWildcardCache = function(nodeInterop2) {
|
|
7841
|
+
return nodeInterop2 ? cacheNodeInterop : cacheBabelInterop;
|
|
7842
|
+
})(nodeInterop);
|
|
7843
|
+
}
|
|
7844
|
+
function _interopRequireWildcard(obj, nodeInterop) {
|
|
7845
|
+
if (!nodeInterop && obj && obj.__esModule) {
|
|
7846
|
+
return obj;
|
|
7847
|
+
}
|
|
7848
|
+
if (obj === null || typeof obj !== "object" && typeof obj !== "function") {
|
|
7849
|
+
return { default: obj };
|
|
7850
|
+
}
|
|
7851
|
+
var cache2 = _getRequireWildcardCache(nodeInterop);
|
|
7852
|
+
if (cache2 && cache2.has(obj)) {
|
|
7853
|
+
return cache2.get(obj);
|
|
7854
|
+
}
|
|
7855
|
+
var newObj = {};
|
|
7856
|
+
var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor;
|
|
7857
|
+
for (var key in obj) {
|
|
7858
|
+
if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) {
|
|
7859
|
+
var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null;
|
|
7860
|
+
if (desc && (desc.get || desc.set)) {
|
|
7861
|
+
Object.defineProperty(newObj, key, desc);
|
|
7862
|
+
} else {
|
|
7863
|
+
newObj[key] = obj[key];
|
|
7864
|
+
}
|
|
7865
|
+
}
|
|
7866
|
+
}
|
|
7867
|
+
newObj.default = obj;
|
|
7868
|
+
if (cache2) {
|
|
7869
|
+
cache2.set(obj, newObj);
|
|
7870
|
+
}
|
|
7871
|
+
return newObj;
|
|
7872
|
+
}
|
|
7735
7873
|
var chalkWithForcedColor = void 0;
|
|
7736
7874
|
function getChalk(forceColor) {
|
|
7737
7875
|
if (forceColor) {
|
|
7738
7876
|
var _chalkWithForcedColor;
|
|
7739
|
-
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new
|
|
7877
|
+
(_chalkWithForcedColor = chalkWithForcedColor) != null ? _chalkWithForcedColor : chalkWithForcedColor = new _chalk.default.constructor({
|
|
7740
7878
|
enabled: true,
|
|
7741
7879
|
level: 1
|
|
7742
7880
|
});
|
|
7743
7881
|
return chalkWithForcedColor;
|
|
7744
7882
|
}
|
|
7745
|
-
return
|
|
7883
|
+
return _chalk.default;
|
|
7746
7884
|
}
|
|
7747
7885
|
var deprecationWarningShown = false;
|
|
7748
|
-
function getDefs(
|
|
7886
|
+
function getDefs(chalk2) {
|
|
7749
7887
|
return {
|
|
7750
|
-
gutter:
|
|
7751
|
-
marker:
|
|
7752
|
-
message:
|
|
7888
|
+
gutter: chalk2.grey,
|
|
7889
|
+
marker: chalk2.red.bold,
|
|
7890
|
+
message: chalk2.red.bold
|
|
7753
7891
|
};
|
|
7754
7892
|
}
|
|
7755
7893
|
var NEWLINE = /\r\n|[\n\r\u2028\u2029]/;
|
|
@@ -7809,10 +7947,10 @@ var require_lib3 = __commonJS({
|
|
|
7809
7947
|
markerLines
|
|
7810
7948
|
};
|
|
7811
7949
|
}
|
|
7812
|
-
function
|
|
7950
|
+
function codeFrameColumns3(rawLines, loc, opts = {}) {
|
|
7813
7951
|
const highlighted = (opts.highlightCode || opts.forceColor) && (0, _highlight.shouldHighlight)(opts);
|
|
7814
|
-
const
|
|
7815
|
-
const defs = getDefs(
|
|
7952
|
+
const chalk2 = getChalk(opts.forceColor);
|
|
7953
|
+
const defs = getDefs(chalk2);
|
|
7816
7954
|
const maybeHighlight = (chalkFn, string) => {
|
|
7817
7955
|
return highlighted ? chalkFn(string) : string;
|
|
7818
7956
|
};
|
|
@@ -7851,7 +7989,7 @@ var require_lib3 = __commonJS({
|
|
|
7851
7989
|
${frame}`;
|
|
7852
7990
|
}
|
|
7853
7991
|
if (highlighted) {
|
|
7854
|
-
return
|
|
7992
|
+
return chalk2.reset(frame);
|
|
7855
7993
|
} else {
|
|
7856
7994
|
return frame;
|
|
7857
7995
|
}
|
|
@@ -7875,7 +8013,7 @@ ${frame}`;
|
|
|
7875
8013
|
line: lineNumber
|
|
7876
8014
|
}
|
|
7877
8015
|
};
|
|
7878
|
-
return
|
|
8016
|
+
return codeFrameColumns3(rawLines, location, opts);
|
|
7879
8017
|
}
|
|
7880
8018
|
}
|
|
7881
8019
|
});
|
|
@@ -8420,7 +8558,7 @@ var require_gte = __commonJS({
|
|
|
8420
8558
|
// node_modules/pseudomap/pseudomap.js
|
|
8421
8559
|
var require_pseudomap = __commonJS({
|
|
8422
8560
|
"node_modules/pseudomap/pseudomap.js"(exports, module) {
|
|
8423
|
-
var
|
|
8561
|
+
var hasOwnProperty3 = Object.prototype.hasOwnProperty;
|
|
8424
8562
|
module.exports = PseudoMap;
|
|
8425
8563
|
function PseudoMap(set2) {
|
|
8426
8564
|
if (!(this instanceof PseudoMap))
|
|
@@ -8494,13 +8632,13 @@ var require_pseudomap = __commonJS({
|
|
|
8494
8632
|
this._index = i;
|
|
8495
8633
|
}
|
|
8496
8634
|
function find(data, k) {
|
|
8497
|
-
for (var i = 0, s = "_" + k, key = s;
|
|
8635
|
+
for (var i = 0, s = "_" + k, key = s; hasOwnProperty3.call(data, key); key = s + i++) {
|
|
8498
8636
|
if (same(data[key].key, k))
|
|
8499
8637
|
return data[key];
|
|
8500
8638
|
}
|
|
8501
8639
|
}
|
|
8502
8640
|
function set(data, k, v) {
|
|
8503
|
-
for (var i = 0, s = "_" + k, key = s;
|
|
8641
|
+
for (var i = 0, s = "_" + k, key = s; hasOwnProperty3.call(data, key); key = s + i++) {
|
|
8504
8642
|
if (same(data[key].key, k)) {
|
|
8505
8643
|
data[key].value = v;
|
|
8506
8644
|
return;
|
|
@@ -9296,7 +9434,7 @@ var require_fnmatch = __commonJS({
|
|
|
9296
9434
|
exports.minimatch = minimatch;
|
|
9297
9435
|
minimatch.Minimatch = Minimatch;
|
|
9298
9436
|
var LRU = require_lru_cache();
|
|
9299
|
-
var
|
|
9437
|
+
var cache2 = minimatch.cache = new LRU({ max: 100 });
|
|
9300
9438
|
var GLOBSTAR = minimatch.GLOBSTAR = Minimatch.GLOBSTAR = {};
|
|
9301
9439
|
var sigmund = require_sigmund();
|
|
9302
9440
|
var path9 = __require("path");
|
|
@@ -9374,7 +9512,7 @@ var require_fnmatch = __commonJS({
|
|
|
9374
9512
|
}
|
|
9375
9513
|
function Minimatch(pattern, options8) {
|
|
9376
9514
|
if (!(this instanceof Minimatch)) {
|
|
9377
|
-
return new Minimatch(pattern, options8,
|
|
9515
|
+
return new Minimatch(pattern, options8, cache2);
|
|
9378
9516
|
}
|
|
9379
9517
|
if (typeof pattern !== "string") {
|
|
9380
9518
|
throw new TypeError("glob pattern string required");
|
|
@@ -10494,67 +10632,6 @@ var require_src = __commonJS({
|
|
|
10494
10632
|
}
|
|
10495
10633
|
});
|
|
10496
10634
|
|
|
10497
|
-
// node_modules/editorconfig-to-prettier/index.js
|
|
10498
|
-
var require_editorconfig_to_prettier = __commonJS({
|
|
10499
|
-
"node_modules/editorconfig-to-prettier/index.js"(exports, module) {
|
|
10500
|
-
module.exports = editorConfigToPrettier2;
|
|
10501
|
-
function removeUnset(editorConfig) {
|
|
10502
|
-
const result = {};
|
|
10503
|
-
const keys = Object.keys(editorConfig);
|
|
10504
|
-
for (let i = 0; i < keys.length; i++) {
|
|
10505
|
-
const key = keys[i];
|
|
10506
|
-
if (editorConfig[key] === "unset") {
|
|
10507
|
-
continue;
|
|
10508
|
-
}
|
|
10509
|
-
result[key] = editorConfig[key];
|
|
10510
|
-
}
|
|
10511
|
-
return result;
|
|
10512
|
-
}
|
|
10513
|
-
function editorConfigToPrettier2(editorConfig) {
|
|
10514
|
-
if (!editorConfig) {
|
|
10515
|
-
return null;
|
|
10516
|
-
}
|
|
10517
|
-
editorConfig = removeUnset(editorConfig);
|
|
10518
|
-
if (Object.keys(editorConfig).length === 0) {
|
|
10519
|
-
return null;
|
|
10520
|
-
}
|
|
10521
|
-
const result = {};
|
|
10522
|
-
if (editorConfig.indent_style) {
|
|
10523
|
-
result.useTabs = editorConfig.indent_style === "tab";
|
|
10524
|
-
}
|
|
10525
|
-
if (editorConfig.indent_size === "tab") {
|
|
10526
|
-
result.useTabs = true;
|
|
10527
|
-
}
|
|
10528
|
-
if (result.useTabs && editorConfig.tab_width) {
|
|
10529
|
-
result.tabWidth = editorConfig.tab_width;
|
|
10530
|
-
} else if (editorConfig.indent_style === "space" && editorConfig.indent_size && editorConfig.indent_size !== "tab") {
|
|
10531
|
-
result.tabWidth = editorConfig.indent_size;
|
|
10532
|
-
} else if (editorConfig.tab_width !== void 0) {
|
|
10533
|
-
result.tabWidth = editorConfig.tab_width;
|
|
10534
|
-
}
|
|
10535
|
-
if (editorConfig.max_line_length) {
|
|
10536
|
-
if (editorConfig.max_line_length === "off") {
|
|
10537
|
-
result.printWidth = Number.POSITIVE_INFINITY;
|
|
10538
|
-
} else {
|
|
10539
|
-
result.printWidth = editorConfig.max_line_length;
|
|
10540
|
-
}
|
|
10541
|
-
}
|
|
10542
|
-
if (editorConfig.quote_type === "single") {
|
|
10543
|
-
result.singleQuote = true;
|
|
10544
|
-
} else if (editorConfig.quote_type === "double") {
|
|
10545
|
-
result.singleQuote = false;
|
|
10546
|
-
}
|
|
10547
|
-
if (["cr", "crlf", "lf"].indexOf(editorConfig.end_of_line) !== -1) {
|
|
10548
|
-
result.endOfLine = editorConfig.end_of_line;
|
|
10549
|
-
}
|
|
10550
|
-
if (editorConfig.insert_final_newline === false || editorConfig.insert_final_newline === true) {
|
|
10551
|
-
result.insertFinalNewline = editorConfig.insert_final_newline;
|
|
10552
|
-
}
|
|
10553
|
-
return result;
|
|
10554
|
-
}
|
|
10555
|
-
}
|
|
10556
|
-
});
|
|
10557
|
-
|
|
10558
10635
|
// node_modules/@iarna/toml/lib/parser.js
|
|
10559
10636
|
var require_parser = __commonJS({
|
|
10560
10637
|
"node_modules/@iarna/toml/lib/parser.js"(exports, module) {
|
|
@@ -10896,11 +10973,11 @@ var require_toml_parser = __commonJS({
|
|
|
10896
10973
|
}
|
|
10897
10974
|
var _type = Symbol("type");
|
|
10898
10975
|
var _declared = Symbol("declared");
|
|
10899
|
-
var
|
|
10976
|
+
var hasOwnProperty3 = Object.prototype.hasOwnProperty;
|
|
10900
10977
|
var defineProperty = Object.defineProperty;
|
|
10901
10978
|
var descriptor = { configurable: true, enumerable: true, writable: true, value: void 0 };
|
|
10902
10979
|
function hasKey(obj, key) {
|
|
10903
|
-
if (
|
|
10980
|
+
if (hasOwnProperty3.call(obj, key))
|
|
10904
10981
|
return true;
|
|
10905
10982
|
if (key === "__proto__")
|
|
10906
10983
|
defineProperty(obj, "__proto__", descriptor);
|
|
@@ -13077,194 +13154,2471 @@ var require_parse3 = __commonJS({
|
|
|
13077
13154
|
}
|
|
13078
13155
|
});
|
|
13079
13156
|
|
|
13080
|
-
// node_modules/
|
|
13081
|
-
var
|
|
13082
|
-
"node_modules/
|
|
13083
|
-
|
|
13084
|
-
|
|
13157
|
+
// node_modules/js-yaml/lib/common.js
|
|
13158
|
+
var require_common3 = __commonJS({
|
|
13159
|
+
"node_modules/js-yaml/lib/common.js"(exports, module) {
|
|
13160
|
+
"use strict";
|
|
13161
|
+
function isNothing(subject) {
|
|
13162
|
+
return typeof subject === "undefined" || subject === null;
|
|
13085
13163
|
}
|
|
13086
|
-
|
|
13087
|
-
|
|
13088
|
-
var ESCAPE = "\\";
|
|
13089
|
-
var REGEX_TEST_BLANK_LINE = /^\s+$/;
|
|
13090
|
-
var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
13091
|
-
var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
13092
|
-
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
13093
|
-
var REGEX_SPLITALL_CRLF = /\r?\n/g;
|
|
13094
|
-
var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/;
|
|
13095
|
-
var SLASH = "/";
|
|
13096
|
-
var TMP_KEY_IGNORE = "node-ignore";
|
|
13097
|
-
if (typeof Symbol !== "undefined") {
|
|
13098
|
-
TMP_KEY_IGNORE = Symbol.for("node-ignore");
|
|
13164
|
+
function isObject2(subject) {
|
|
13165
|
+
return typeof subject === "object" && subject !== null;
|
|
13099
13166
|
}
|
|
13100
|
-
|
|
13101
|
-
|
|
13102
|
-
|
|
13103
|
-
|
|
13104
|
-
|
|
13105
|
-
|
|
13106
|
-
|
|
13107
|
-
)
|
|
13108
|
-
|
|
13109
|
-
|
|
13110
|
-
|
|
13111
|
-
|
|
13112
|
-
|
|
13113
|
-
|
|
13114
|
-
[
|
|
13115
|
-
// (a\ ) -> (a )
|
|
13116
|
-
// (a ) -> (a)
|
|
13117
|
-
// (a \ ) -> (a )
|
|
13118
|
-
/\\?\s+$/,
|
|
13119
|
-
(match) => match.indexOf("\\") === 0 ? SPACE : EMPTY
|
|
13120
|
-
],
|
|
13121
|
-
// replace (\ ) with ' '
|
|
13122
|
-
[
|
|
13123
|
-
/\\\s/g,
|
|
13124
|
-
() => SPACE
|
|
13125
|
-
],
|
|
13126
|
-
// Escape metacharacters
|
|
13127
|
-
// which is written down by users but means special for regular expressions.
|
|
13128
|
-
// > There are 12 characters with special meanings:
|
|
13129
|
-
// > - the backslash \,
|
|
13130
|
-
// > - the caret ^,
|
|
13131
|
-
// > - the dollar sign $,
|
|
13132
|
-
// > - the period or dot .,
|
|
13133
|
-
// > - the vertical bar or pipe symbol |,
|
|
13134
|
-
// > - the question mark ?,
|
|
13135
|
-
// > - the asterisk or star *,
|
|
13136
|
-
// > - the plus sign +,
|
|
13137
|
-
// > - the opening parenthesis (,
|
|
13138
|
-
// > - the closing parenthesis ),
|
|
13139
|
-
// > - and the opening square bracket [,
|
|
13140
|
-
// > - the opening curly brace {,
|
|
13141
|
-
// > These special characters are often called "metacharacters".
|
|
13142
|
-
[
|
|
13143
|
-
/[\\$.|*+(){^]/g,
|
|
13144
|
-
(match) => `\\${match}`
|
|
13145
|
-
],
|
|
13146
|
-
[
|
|
13147
|
-
// > a question mark (?) matches a single character
|
|
13148
|
-
/(?!\\)\?/g,
|
|
13149
|
-
() => "[^/]"
|
|
13150
|
-
],
|
|
13151
|
-
// leading slash
|
|
13152
|
-
[
|
|
13153
|
-
// > A leading slash matches the beginning of the pathname.
|
|
13154
|
-
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
|
|
13155
|
-
// A leading slash matches the beginning of the pathname
|
|
13156
|
-
/^\//,
|
|
13157
|
-
() => "^"
|
|
13158
|
-
],
|
|
13159
|
-
// replace special metacharacter slash after the leading slash
|
|
13160
|
-
[
|
|
13161
|
-
/\//g,
|
|
13162
|
-
() => "\\/"
|
|
13163
|
-
],
|
|
13164
|
-
[
|
|
13165
|
-
// > A leading "**" followed by a slash means match in all directories.
|
|
13166
|
-
// > For example, "**/foo" matches file or directory "foo" anywhere,
|
|
13167
|
-
// > the same as pattern "foo".
|
|
13168
|
-
// > "**/foo/bar" matches file or directory "bar" anywhere that is directly
|
|
13169
|
-
// > under directory "foo".
|
|
13170
|
-
// Notice that the '*'s have been replaced as '\\*'
|
|
13171
|
-
/^\^*\\\*\\\*\\\//,
|
|
13172
|
-
// '**/foo' <-> 'foo'
|
|
13173
|
-
() => "^(?:.*\\/)?"
|
|
13174
|
-
],
|
|
13175
|
-
// starting
|
|
13176
|
-
[
|
|
13177
|
-
// there will be no leading '/'
|
|
13178
|
-
// (which has been replaced by section "leading slash")
|
|
13179
|
-
// If starts with '**', adding a '^' to the regular expression also works
|
|
13180
|
-
/^(?=[^^])/,
|
|
13181
|
-
function startingReplacer() {
|
|
13182
|
-
return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
|
|
13183
|
-
}
|
|
13184
|
-
],
|
|
13185
|
-
// two globstars
|
|
13186
|
-
[
|
|
13187
|
-
// Use lookahead assertions so that we could match more than one `'/**'`
|
|
13188
|
-
/\\\/\\\*\\\*(?=\\\/|$)/g,
|
|
13189
|
-
// Zero, one or several directories
|
|
13190
|
-
// should not use '*', or it will be replaced by the next replacer
|
|
13191
|
-
// Check if it is not the last `'/**'`
|
|
13192
|
-
(_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
|
|
13193
|
-
],
|
|
13194
|
-
// normal intermediate wildcards
|
|
13195
|
-
[
|
|
13196
|
-
// Never replace escaped '*'
|
|
13197
|
-
// ignore rule '\*' will match the path '*'
|
|
13198
|
-
// 'abc.*/' -> go
|
|
13199
|
-
// 'abc.*' -> skip this rule,
|
|
13200
|
-
// coz trailing single wildcard will be handed by [trailing wildcard]
|
|
13201
|
-
/(^|[^\\]+)(\\\*)+(?=.+)/g,
|
|
13202
|
-
// '*.js' matches '.js'
|
|
13203
|
-
// '*.js' doesn't match 'abc'
|
|
13204
|
-
(_, p1, p2) => {
|
|
13205
|
-
const unescaped = p2.replace(/\\\*/g, "[^\\/]*");
|
|
13206
|
-
return p1 + unescaped;
|
|
13207
|
-
}
|
|
13208
|
-
],
|
|
13209
|
-
[
|
|
13210
|
-
// unescape, revert step 3 except for back slash
|
|
13211
|
-
// For example, if a user escape a '\\*',
|
|
13212
|
-
// after step 3, the result will be '\\\\\\*'
|
|
13213
|
-
/\\\\\\(?=[$.|*+(){^])/g,
|
|
13214
|
-
() => ESCAPE
|
|
13215
|
-
],
|
|
13216
|
-
[
|
|
13217
|
-
// '\\\\' -> '\\'
|
|
13218
|
-
/\\\\/g,
|
|
13219
|
-
() => ESCAPE
|
|
13220
|
-
],
|
|
13221
|
-
[
|
|
13222
|
-
// > The range notation, e.g. [a-zA-Z],
|
|
13223
|
-
// > can be used to match one of the characters in a range.
|
|
13224
|
-
// `\` is escaped by step 3
|
|
13225
|
-
/(\\)?\[([^\]/]*?)(\\*)($|\])/g,
|
|
13226
|
-
(match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"
|
|
13227
|
-
],
|
|
13228
|
-
// ending
|
|
13229
|
-
[
|
|
13230
|
-
// 'js' will not match 'js.'
|
|
13231
|
-
// 'ab' will not match 'abc'
|
|
13232
|
-
/(?:[^*])$/,
|
|
13233
|
-
// WTF!
|
|
13234
|
-
// https://git-scm.com/docs/gitignore
|
|
13235
|
-
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
|
|
13236
|
-
// which re-fixes #24, #38
|
|
13237
|
-
// > If there is a separator at the end of the pattern then the pattern
|
|
13238
|
-
// > will only match directories, otherwise the pattern can match both
|
|
13239
|
-
// > files and directories.
|
|
13240
|
-
// 'js*' will not match 'a.js'
|
|
13241
|
-
// 'js/' will not match 'a.js'
|
|
13242
|
-
// 'js' will match 'a.js' and 'a.js/'
|
|
13243
|
-
(match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`
|
|
13244
|
-
],
|
|
13245
|
-
// trailing wildcard
|
|
13246
|
-
[
|
|
13247
|
-
/(\^|\\\/)?\\\*$/,
|
|
13248
|
-
(_, p1) => {
|
|
13249
|
-
const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
|
|
13250
|
-
return `${prefix}(?=$|\\/$)`;
|
|
13167
|
+
function toArray(sequence) {
|
|
13168
|
+
if (Array.isArray(sequence))
|
|
13169
|
+
return sequence;
|
|
13170
|
+
else if (isNothing(sequence))
|
|
13171
|
+
return [];
|
|
13172
|
+
return [sequence];
|
|
13173
|
+
}
|
|
13174
|
+
function extend(target, source) {
|
|
13175
|
+
var index, length, key, sourceKeys;
|
|
13176
|
+
if (source) {
|
|
13177
|
+
sourceKeys = Object.keys(source);
|
|
13178
|
+
for (index = 0, length = sourceKeys.length; index < length; index += 1) {
|
|
13179
|
+
key = sourceKeys[index];
|
|
13180
|
+
target[key] = source[key];
|
|
13251
13181
|
}
|
|
13252
|
-
]
|
|
13253
|
-
];
|
|
13254
|
-
var regexCache = /* @__PURE__ */ Object.create(null);
|
|
13255
|
-
var makeRegex = (pattern, ignoreCase) => {
|
|
13256
|
-
let source = regexCache[pattern];
|
|
13257
|
-
if (!source) {
|
|
13258
|
-
source = REPLACERS.reduce(
|
|
13259
|
-
(prev, current) => prev.replace(current[0], current[1].bind(pattern)),
|
|
13260
|
-
pattern
|
|
13261
|
-
);
|
|
13262
|
-
regexCache[pattern] = source;
|
|
13263
13182
|
}
|
|
13264
|
-
return
|
|
13265
|
-
}
|
|
13266
|
-
|
|
13267
|
-
|
|
13183
|
+
return target;
|
|
13184
|
+
}
|
|
13185
|
+
function repeat(string, count) {
|
|
13186
|
+
var result = "", cycle;
|
|
13187
|
+
for (cycle = 0; cycle < count; cycle += 1) {
|
|
13188
|
+
result += string;
|
|
13189
|
+
}
|
|
13190
|
+
return result;
|
|
13191
|
+
}
|
|
13192
|
+
function isNegativeZero(number) {
|
|
13193
|
+
return number === 0 && Number.NEGATIVE_INFINITY === 1 / number;
|
|
13194
|
+
}
|
|
13195
|
+
module.exports.isNothing = isNothing;
|
|
13196
|
+
module.exports.isObject = isObject2;
|
|
13197
|
+
module.exports.toArray = toArray;
|
|
13198
|
+
module.exports.repeat = repeat;
|
|
13199
|
+
module.exports.isNegativeZero = isNegativeZero;
|
|
13200
|
+
module.exports.extend = extend;
|
|
13201
|
+
}
|
|
13202
|
+
});
|
|
13203
|
+
|
|
13204
|
+
// node_modules/js-yaml/lib/exception.js
|
|
13205
|
+
var require_exception = __commonJS({
|
|
13206
|
+
"node_modules/js-yaml/lib/exception.js"(exports, module) {
|
|
13207
|
+
"use strict";
|
|
13208
|
+
function formatError(exception, compact) {
|
|
13209
|
+
var where = "", message = exception.reason || "(unknown reason)";
|
|
13210
|
+
if (!exception.mark)
|
|
13211
|
+
return message;
|
|
13212
|
+
if (exception.mark.name) {
|
|
13213
|
+
where += 'in "' + exception.mark.name + '" ';
|
|
13214
|
+
}
|
|
13215
|
+
where += "(" + (exception.mark.line + 1) + ":" + (exception.mark.column + 1) + ")";
|
|
13216
|
+
if (!compact && exception.mark.snippet) {
|
|
13217
|
+
where += "\n\n" + exception.mark.snippet;
|
|
13218
|
+
}
|
|
13219
|
+
return message + " " + where;
|
|
13220
|
+
}
|
|
13221
|
+
function YAMLException(reason, mark) {
|
|
13222
|
+
Error.call(this);
|
|
13223
|
+
this.name = "YAMLException";
|
|
13224
|
+
this.reason = reason;
|
|
13225
|
+
this.mark = mark;
|
|
13226
|
+
this.message = formatError(this, false);
|
|
13227
|
+
if (Error.captureStackTrace) {
|
|
13228
|
+
Error.captureStackTrace(this, this.constructor);
|
|
13229
|
+
} else {
|
|
13230
|
+
this.stack = new Error().stack || "";
|
|
13231
|
+
}
|
|
13232
|
+
}
|
|
13233
|
+
YAMLException.prototype = Object.create(Error.prototype);
|
|
13234
|
+
YAMLException.prototype.constructor = YAMLException;
|
|
13235
|
+
YAMLException.prototype.toString = function toString(compact) {
|
|
13236
|
+
return this.name + ": " + formatError(this, compact);
|
|
13237
|
+
};
|
|
13238
|
+
module.exports = YAMLException;
|
|
13239
|
+
}
|
|
13240
|
+
});
|
|
13241
|
+
|
|
13242
|
+
// node_modules/js-yaml/lib/snippet.js
|
|
13243
|
+
var require_snippet = __commonJS({
|
|
13244
|
+
"node_modules/js-yaml/lib/snippet.js"(exports, module) {
|
|
13245
|
+
"use strict";
|
|
13246
|
+
var common = require_common3();
|
|
13247
|
+
function getLine(buffer, lineStart, lineEnd, position, maxLineLength) {
|
|
13248
|
+
var head = "";
|
|
13249
|
+
var tail = "";
|
|
13250
|
+
var maxHalfLength = Math.floor(maxLineLength / 2) - 1;
|
|
13251
|
+
if (position - lineStart > maxHalfLength) {
|
|
13252
|
+
head = " ... ";
|
|
13253
|
+
lineStart = position - maxHalfLength + head.length;
|
|
13254
|
+
}
|
|
13255
|
+
if (lineEnd - position > maxHalfLength) {
|
|
13256
|
+
tail = " ...";
|
|
13257
|
+
lineEnd = position + maxHalfLength - tail.length;
|
|
13258
|
+
}
|
|
13259
|
+
return {
|
|
13260
|
+
str: head + buffer.slice(lineStart, lineEnd).replace(/\t/g, "\u2192") + tail,
|
|
13261
|
+
pos: position - lineStart + head.length
|
|
13262
|
+
// relative position
|
|
13263
|
+
};
|
|
13264
|
+
}
|
|
13265
|
+
function padStart(string, max) {
|
|
13266
|
+
return common.repeat(" ", max - string.length) + string;
|
|
13267
|
+
}
|
|
13268
|
+
function makeSnippet(mark, options8) {
|
|
13269
|
+
options8 = Object.create(options8 || null);
|
|
13270
|
+
if (!mark.buffer)
|
|
13271
|
+
return null;
|
|
13272
|
+
if (!options8.maxLength)
|
|
13273
|
+
options8.maxLength = 79;
|
|
13274
|
+
if (typeof options8.indent !== "number")
|
|
13275
|
+
options8.indent = 1;
|
|
13276
|
+
if (typeof options8.linesBefore !== "number")
|
|
13277
|
+
options8.linesBefore = 3;
|
|
13278
|
+
if (typeof options8.linesAfter !== "number")
|
|
13279
|
+
options8.linesAfter = 2;
|
|
13280
|
+
var re = /\r?\n|\r|\0/g;
|
|
13281
|
+
var lineStarts = [0];
|
|
13282
|
+
var lineEnds = [];
|
|
13283
|
+
var match;
|
|
13284
|
+
var foundLineNo = -1;
|
|
13285
|
+
while (match = re.exec(mark.buffer)) {
|
|
13286
|
+
lineEnds.push(match.index);
|
|
13287
|
+
lineStarts.push(match.index + match[0].length);
|
|
13288
|
+
if (mark.position <= match.index && foundLineNo < 0) {
|
|
13289
|
+
foundLineNo = lineStarts.length - 2;
|
|
13290
|
+
}
|
|
13291
|
+
}
|
|
13292
|
+
if (foundLineNo < 0)
|
|
13293
|
+
foundLineNo = lineStarts.length - 1;
|
|
13294
|
+
var result = "", i, line2;
|
|
13295
|
+
var lineNoLength = Math.min(mark.line + options8.linesAfter, lineEnds.length).toString().length;
|
|
13296
|
+
var maxLineLength = options8.maxLength - (options8.indent + lineNoLength + 3);
|
|
13297
|
+
for (i = 1; i <= options8.linesBefore; i++) {
|
|
13298
|
+
if (foundLineNo - i < 0)
|
|
13299
|
+
break;
|
|
13300
|
+
line2 = getLine(
|
|
13301
|
+
mark.buffer,
|
|
13302
|
+
lineStarts[foundLineNo - i],
|
|
13303
|
+
lineEnds[foundLineNo - i],
|
|
13304
|
+
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo - i]),
|
|
13305
|
+
maxLineLength
|
|
13306
|
+
);
|
|
13307
|
+
result = common.repeat(" ", options8.indent) + padStart((mark.line - i + 1).toString(), lineNoLength) + " | " + line2.str + "\n" + result;
|
|
13308
|
+
}
|
|
13309
|
+
line2 = getLine(mark.buffer, lineStarts[foundLineNo], lineEnds[foundLineNo], mark.position, maxLineLength);
|
|
13310
|
+
result += common.repeat(" ", options8.indent) + padStart((mark.line + 1).toString(), lineNoLength) + " | " + line2.str + "\n";
|
|
13311
|
+
result += common.repeat("-", options8.indent + lineNoLength + 3 + line2.pos) + "^\n";
|
|
13312
|
+
for (i = 1; i <= options8.linesAfter; i++) {
|
|
13313
|
+
if (foundLineNo + i >= lineEnds.length)
|
|
13314
|
+
break;
|
|
13315
|
+
line2 = getLine(
|
|
13316
|
+
mark.buffer,
|
|
13317
|
+
lineStarts[foundLineNo + i],
|
|
13318
|
+
lineEnds[foundLineNo + i],
|
|
13319
|
+
mark.position - (lineStarts[foundLineNo] - lineStarts[foundLineNo + i]),
|
|
13320
|
+
maxLineLength
|
|
13321
|
+
);
|
|
13322
|
+
result += common.repeat(" ", options8.indent) + padStart((mark.line + i + 1).toString(), lineNoLength) + " | " + line2.str + "\n";
|
|
13323
|
+
}
|
|
13324
|
+
return result.replace(/\n$/, "");
|
|
13325
|
+
}
|
|
13326
|
+
module.exports = makeSnippet;
|
|
13327
|
+
}
|
|
13328
|
+
});
|
|
13329
|
+
|
|
13330
|
+
// node_modules/js-yaml/lib/type.js
|
|
13331
|
+
var require_type = __commonJS({
|
|
13332
|
+
"node_modules/js-yaml/lib/type.js"(exports, module) {
|
|
13333
|
+
"use strict";
|
|
13334
|
+
var YAMLException = require_exception();
|
|
13335
|
+
var TYPE_CONSTRUCTOR_OPTIONS = [
|
|
13336
|
+
"kind",
|
|
13337
|
+
"multi",
|
|
13338
|
+
"resolve",
|
|
13339
|
+
"construct",
|
|
13340
|
+
"instanceOf",
|
|
13341
|
+
"predicate",
|
|
13342
|
+
"represent",
|
|
13343
|
+
"representName",
|
|
13344
|
+
"defaultStyle",
|
|
13345
|
+
"styleAliases"
|
|
13346
|
+
];
|
|
13347
|
+
var YAML_NODE_KINDS = [
|
|
13348
|
+
"scalar",
|
|
13349
|
+
"sequence",
|
|
13350
|
+
"mapping"
|
|
13351
|
+
];
|
|
13352
|
+
function compileStyleAliases(map) {
|
|
13353
|
+
var result = {};
|
|
13354
|
+
if (map !== null) {
|
|
13355
|
+
Object.keys(map).forEach(function(style) {
|
|
13356
|
+
map[style].forEach(function(alias) {
|
|
13357
|
+
result[String(alias)] = style;
|
|
13358
|
+
});
|
|
13359
|
+
});
|
|
13360
|
+
}
|
|
13361
|
+
return result;
|
|
13362
|
+
}
|
|
13363
|
+
function Type(tag, options8) {
|
|
13364
|
+
options8 = options8 || {};
|
|
13365
|
+
Object.keys(options8).forEach(function(name) {
|
|
13366
|
+
if (TYPE_CONSTRUCTOR_OPTIONS.indexOf(name) === -1) {
|
|
13367
|
+
throw new YAMLException('Unknown option "' + name + '" is met in definition of "' + tag + '" YAML type.');
|
|
13368
|
+
}
|
|
13369
|
+
});
|
|
13370
|
+
this.options = options8;
|
|
13371
|
+
this.tag = tag;
|
|
13372
|
+
this.kind = options8["kind"] || null;
|
|
13373
|
+
this.resolve = options8["resolve"] || function() {
|
|
13374
|
+
return true;
|
|
13375
|
+
};
|
|
13376
|
+
this.construct = options8["construct"] || function(data) {
|
|
13377
|
+
return data;
|
|
13378
|
+
};
|
|
13379
|
+
this.instanceOf = options8["instanceOf"] || null;
|
|
13380
|
+
this.predicate = options8["predicate"] || null;
|
|
13381
|
+
this.represent = options8["represent"] || null;
|
|
13382
|
+
this.representName = options8["representName"] || null;
|
|
13383
|
+
this.defaultStyle = options8["defaultStyle"] || null;
|
|
13384
|
+
this.multi = options8["multi"] || false;
|
|
13385
|
+
this.styleAliases = compileStyleAliases(options8["styleAliases"] || null);
|
|
13386
|
+
if (YAML_NODE_KINDS.indexOf(this.kind) === -1) {
|
|
13387
|
+
throw new YAMLException('Unknown kind "' + this.kind + '" is specified for "' + tag + '" YAML type.');
|
|
13388
|
+
}
|
|
13389
|
+
}
|
|
13390
|
+
module.exports = Type;
|
|
13391
|
+
}
|
|
13392
|
+
});
|
|
13393
|
+
|
|
13394
|
+
// node_modules/js-yaml/lib/schema.js
|
|
13395
|
+
var require_schema = __commonJS({
|
|
13396
|
+
"node_modules/js-yaml/lib/schema.js"(exports, module) {
|
|
13397
|
+
"use strict";
|
|
13398
|
+
var YAMLException = require_exception();
|
|
13399
|
+
var Type = require_type();
|
|
13400
|
+
function compileList(schema, name) {
|
|
13401
|
+
var result = [];
|
|
13402
|
+
schema[name].forEach(function(currentType) {
|
|
13403
|
+
var newIndex = result.length;
|
|
13404
|
+
result.forEach(function(previousType, previousIndex) {
|
|
13405
|
+
if (previousType.tag === currentType.tag && previousType.kind === currentType.kind && previousType.multi === currentType.multi) {
|
|
13406
|
+
newIndex = previousIndex;
|
|
13407
|
+
}
|
|
13408
|
+
});
|
|
13409
|
+
result[newIndex] = currentType;
|
|
13410
|
+
});
|
|
13411
|
+
return result;
|
|
13412
|
+
}
|
|
13413
|
+
function compileMap() {
|
|
13414
|
+
var result = {
|
|
13415
|
+
scalar: {},
|
|
13416
|
+
sequence: {},
|
|
13417
|
+
mapping: {},
|
|
13418
|
+
fallback: {},
|
|
13419
|
+
multi: {
|
|
13420
|
+
scalar: [],
|
|
13421
|
+
sequence: [],
|
|
13422
|
+
mapping: [],
|
|
13423
|
+
fallback: []
|
|
13424
|
+
}
|
|
13425
|
+
}, index, length;
|
|
13426
|
+
function collectType(type) {
|
|
13427
|
+
if (type.multi) {
|
|
13428
|
+
result.multi[type.kind].push(type);
|
|
13429
|
+
result.multi["fallback"].push(type);
|
|
13430
|
+
} else {
|
|
13431
|
+
result[type.kind][type.tag] = result["fallback"][type.tag] = type;
|
|
13432
|
+
}
|
|
13433
|
+
}
|
|
13434
|
+
for (index = 0, length = arguments.length; index < length; index += 1) {
|
|
13435
|
+
arguments[index].forEach(collectType);
|
|
13436
|
+
}
|
|
13437
|
+
return result;
|
|
13438
|
+
}
|
|
13439
|
+
function Schema2(definition) {
|
|
13440
|
+
return this.extend(definition);
|
|
13441
|
+
}
|
|
13442
|
+
Schema2.prototype.extend = function extend(definition) {
|
|
13443
|
+
var implicit = [];
|
|
13444
|
+
var explicit = [];
|
|
13445
|
+
if (definition instanceof Type) {
|
|
13446
|
+
explicit.push(definition);
|
|
13447
|
+
} else if (Array.isArray(definition)) {
|
|
13448
|
+
explicit = explicit.concat(definition);
|
|
13449
|
+
} else if (definition && (Array.isArray(definition.implicit) || Array.isArray(definition.explicit))) {
|
|
13450
|
+
if (definition.implicit)
|
|
13451
|
+
implicit = implicit.concat(definition.implicit);
|
|
13452
|
+
if (definition.explicit)
|
|
13453
|
+
explicit = explicit.concat(definition.explicit);
|
|
13454
|
+
} else {
|
|
13455
|
+
throw new YAMLException("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");
|
|
13456
|
+
}
|
|
13457
|
+
implicit.forEach(function(type) {
|
|
13458
|
+
if (!(type instanceof Type)) {
|
|
13459
|
+
throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
13460
|
+
}
|
|
13461
|
+
if (type.loadKind && type.loadKind !== "scalar") {
|
|
13462
|
+
throw new YAMLException("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");
|
|
13463
|
+
}
|
|
13464
|
+
if (type.multi) {
|
|
13465
|
+
throw new YAMLException("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.");
|
|
13466
|
+
}
|
|
13467
|
+
});
|
|
13468
|
+
explicit.forEach(function(type) {
|
|
13469
|
+
if (!(type instanceof Type)) {
|
|
13470
|
+
throw new YAMLException("Specified list of YAML types (or a single Type object) contains a non-Type object.");
|
|
13471
|
+
}
|
|
13472
|
+
});
|
|
13473
|
+
var result = Object.create(Schema2.prototype);
|
|
13474
|
+
result.implicit = (this.implicit || []).concat(implicit);
|
|
13475
|
+
result.explicit = (this.explicit || []).concat(explicit);
|
|
13476
|
+
result.compiledImplicit = compileList(result, "implicit");
|
|
13477
|
+
result.compiledExplicit = compileList(result, "explicit");
|
|
13478
|
+
result.compiledTypeMap = compileMap(result.compiledImplicit, result.compiledExplicit);
|
|
13479
|
+
return result;
|
|
13480
|
+
};
|
|
13481
|
+
module.exports = Schema2;
|
|
13482
|
+
}
|
|
13483
|
+
});
|
|
13484
|
+
|
|
13485
|
+
// node_modules/js-yaml/lib/type/str.js
|
|
13486
|
+
var require_str = __commonJS({
|
|
13487
|
+
"node_modules/js-yaml/lib/type/str.js"(exports, module) {
|
|
13488
|
+
"use strict";
|
|
13489
|
+
var Type = require_type();
|
|
13490
|
+
module.exports = new Type("tag:yaml.org,2002:str", {
|
|
13491
|
+
kind: "scalar",
|
|
13492
|
+
construct: function(data) {
|
|
13493
|
+
return data !== null ? data : "";
|
|
13494
|
+
}
|
|
13495
|
+
});
|
|
13496
|
+
}
|
|
13497
|
+
});
|
|
13498
|
+
|
|
13499
|
+
// node_modules/js-yaml/lib/type/seq.js
|
|
13500
|
+
var require_seq = __commonJS({
|
|
13501
|
+
"node_modules/js-yaml/lib/type/seq.js"(exports, module) {
|
|
13502
|
+
"use strict";
|
|
13503
|
+
var Type = require_type();
|
|
13504
|
+
module.exports = new Type("tag:yaml.org,2002:seq", {
|
|
13505
|
+
kind: "sequence",
|
|
13506
|
+
construct: function(data) {
|
|
13507
|
+
return data !== null ? data : [];
|
|
13508
|
+
}
|
|
13509
|
+
});
|
|
13510
|
+
}
|
|
13511
|
+
});
|
|
13512
|
+
|
|
13513
|
+
// node_modules/js-yaml/lib/type/map.js
|
|
13514
|
+
var require_map2 = __commonJS({
|
|
13515
|
+
"node_modules/js-yaml/lib/type/map.js"(exports, module) {
|
|
13516
|
+
"use strict";
|
|
13517
|
+
var Type = require_type();
|
|
13518
|
+
module.exports = new Type("tag:yaml.org,2002:map", {
|
|
13519
|
+
kind: "mapping",
|
|
13520
|
+
construct: function(data) {
|
|
13521
|
+
return data !== null ? data : {};
|
|
13522
|
+
}
|
|
13523
|
+
});
|
|
13524
|
+
}
|
|
13525
|
+
});
|
|
13526
|
+
|
|
13527
|
+
// node_modules/js-yaml/lib/schema/failsafe.js
|
|
13528
|
+
var require_failsafe = __commonJS({
|
|
13529
|
+
"node_modules/js-yaml/lib/schema/failsafe.js"(exports, module) {
|
|
13530
|
+
"use strict";
|
|
13531
|
+
var Schema2 = require_schema();
|
|
13532
|
+
module.exports = new Schema2({
|
|
13533
|
+
explicit: [
|
|
13534
|
+
require_str(),
|
|
13535
|
+
require_seq(),
|
|
13536
|
+
require_map2()
|
|
13537
|
+
]
|
|
13538
|
+
});
|
|
13539
|
+
}
|
|
13540
|
+
});
|
|
13541
|
+
|
|
13542
|
+
// node_modules/js-yaml/lib/type/null.js
|
|
13543
|
+
var require_null = __commonJS({
|
|
13544
|
+
"node_modules/js-yaml/lib/type/null.js"(exports, module) {
|
|
13545
|
+
"use strict";
|
|
13546
|
+
var Type = require_type();
|
|
13547
|
+
function resolveYamlNull(data) {
|
|
13548
|
+
if (data === null)
|
|
13549
|
+
return true;
|
|
13550
|
+
var max = data.length;
|
|
13551
|
+
return max === 1 && data === "~" || max === 4 && (data === "null" || data === "Null" || data === "NULL");
|
|
13552
|
+
}
|
|
13553
|
+
function constructYamlNull() {
|
|
13554
|
+
return null;
|
|
13555
|
+
}
|
|
13556
|
+
function isNull(object) {
|
|
13557
|
+
return object === null;
|
|
13558
|
+
}
|
|
13559
|
+
module.exports = new Type("tag:yaml.org,2002:null", {
|
|
13560
|
+
kind: "scalar",
|
|
13561
|
+
resolve: resolveYamlNull,
|
|
13562
|
+
construct: constructYamlNull,
|
|
13563
|
+
predicate: isNull,
|
|
13564
|
+
represent: {
|
|
13565
|
+
canonical: function() {
|
|
13566
|
+
return "~";
|
|
13567
|
+
},
|
|
13568
|
+
lowercase: function() {
|
|
13569
|
+
return "null";
|
|
13570
|
+
},
|
|
13571
|
+
uppercase: function() {
|
|
13572
|
+
return "NULL";
|
|
13573
|
+
},
|
|
13574
|
+
camelcase: function() {
|
|
13575
|
+
return "Null";
|
|
13576
|
+
},
|
|
13577
|
+
empty: function() {
|
|
13578
|
+
return "";
|
|
13579
|
+
}
|
|
13580
|
+
},
|
|
13581
|
+
defaultStyle: "lowercase"
|
|
13582
|
+
});
|
|
13583
|
+
}
|
|
13584
|
+
});
|
|
13585
|
+
|
|
13586
|
+
// node_modules/js-yaml/lib/type/bool.js
|
|
13587
|
+
var require_bool = __commonJS({
|
|
13588
|
+
"node_modules/js-yaml/lib/type/bool.js"(exports, module) {
|
|
13589
|
+
"use strict";
|
|
13590
|
+
var Type = require_type();
|
|
13591
|
+
function resolveYamlBoolean(data) {
|
|
13592
|
+
if (data === null)
|
|
13593
|
+
return false;
|
|
13594
|
+
var max = data.length;
|
|
13595
|
+
return max === 4 && (data === "true" || data === "True" || data === "TRUE") || max === 5 && (data === "false" || data === "False" || data === "FALSE");
|
|
13596
|
+
}
|
|
13597
|
+
function constructYamlBoolean(data) {
|
|
13598
|
+
return data === "true" || data === "True" || data === "TRUE";
|
|
13599
|
+
}
|
|
13600
|
+
function isBoolean(object) {
|
|
13601
|
+
return Object.prototype.toString.call(object) === "[object Boolean]";
|
|
13602
|
+
}
|
|
13603
|
+
module.exports = new Type("tag:yaml.org,2002:bool", {
|
|
13604
|
+
kind: "scalar",
|
|
13605
|
+
resolve: resolveYamlBoolean,
|
|
13606
|
+
construct: constructYamlBoolean,
|
|
13607
|
+
predicate: isBoolean,
|
|
13608
|
+
represent: {
|
|
13609
|
+
lowercase: function(object) {
|
|
13610
|
+
return object ? "true" : "false";
|
|
13611
|
+
},
|
|
13612
|
+
uppercase: function(object) {
|
|
13613
|
+
return object ? "TRUE" : "FALSE";
|
|
13614
|
+
},
|
|
13615
|
+
camelcase: function(object) {
|
|
13616
|
+
return object ? "True" : "False";
|
|
13617
|
+
}
|
|
13618
|
+
},
|
|
13619
|
+
defaultStyle: "lowercase"
|
|
13620
|
+
});
|
|
13621
|
+
}
|
|
13622
|
+
});
|
|
13623
|
+
|
|
13624
|
+
// node_modules/js-yaml/lib/type/int.js
|
|
13625
|
+
var require_int = __commonJS({
|
|
13626
|
+
"node_modules/js-yaml/lib/type/int.js"(exports, module) {
|
|
13627
|
+
"use strict";
|
|
13628
|
+
var common = require_common3();
|
|
13629
|
+
var Type = require_type();
|
|
13630
|
+
function isHexCode(c) {
|
|
13631
|
+
return 48 <= c && c <= 57 || 65 <= c && c <= 70 || 97 <= c && c <= 102;
|
|
13632
|
+
}
|
|
13633
|
+
function isOctCode(c) {
|
|
13634
|
+
return 48 <= c && c <= 55;
|
|
13635
|
+
}
|
|
13636
|
+
function isDecCode(c) {
|
|
13637
|
+
return 48 <= c && c <= 57;
|
|
13638
|
+
}
|
|
13639
|
+
function resolveYamlInteger(data) {
|
|
13640
|
+
if (data === null)
|
|
13641
|
+
return false;
|
|
13642
|
+
var max = data.length, index = 0, hasDigits = false, ch;
|
|
13643
|
+
if (!max)
|
|
13644
|
+
return false;
|
|
13645
|
+
ch = data[index];
|
|
13646
|
+
if (ch === "-" || ch === "+") {
|
|
13647
|
+
ch = data[++index];
|
|
13648
|
+
}
|
|
13649
|
+
if (ch === "0") {
|
|
13650
|
+
if (index + 1 === max)
|
|
13651
|
+
return true;
|
|
13652
|
+
ch = data[++index];
|
|
13653
|
+
if (ch === "b") {
|
|
13654
|
+
index++;
|
|
13655
|
+
for (; index < max; index++) {
|
|
13656
|
+
ch = data[index];
|
|
13657
|
+
if (ch === "_")
|
|
13658
|
+
continue;
|
|
13659
|
+
if (ch !== "0" && ch !== "1")
|
|
13660
|
+
return false;
|
|
13661
|
+
hasDigits = true;
|
|
13662
|
+
}
|
|
13663
|
+
return hasDigits && ch !== "_";
|
|
13664
|
+
}
|
|
13665
|
+
if (ch === "x") {
|
|
13666
|
+
index++;
|
|
13667
|
+
for (; index < max; index++) {
|
|
13668
|
+
ch = data[index];
|
|
13669
|
+
if (ch === "_")
|
|
13670
|
+
continue;
|
|
13671
|
+
if (!isHexCode(data.charCodeAt(index)))
|
|
13672
|
+
return false;
|
|
13673
|
+
hasDigits = true;
|
|
13674
|
+
}
|
|
13675
|
+
return hasDigits && ch !== "_";
|
|
13676
|
+
}
|
|
13677
|
+
if (ch === "o") {
|
|
13678
|
+
index++;
|
|
13679
|
+
for (; index < max; index++) {
|
|
13680
|
+
ch = data[index];
|
|
13681
|
+
if (ch === "_")
|
|
13682
|
+
continue;
|
|
13683
|
+
if (!isOctCode(data.charCodeAt(index)))
|
|
13684
|
+
return false;
|
|
13685
|
+
hasDigits = true;
|
|
13686
|
+
}
|
|
13687
|
+
return hasDigits && ch !== "_";
|
|
13688
|
+
}
|
|
13689
|
+
}
|
|
13690
|
+
if (ch === "_")
|
|
13691
|
+
return false;
|
|
13692
|
+
for (; index < max; index++) {
|
|
13693
|
+
ch = data[index];
|
|
13694
|
+
if (ch === "_")
|
|
13695
|
+
continue;
|
|
13696
|
+
if (!isDecCode(data.charCodeAt(index))) {
|
|
13697
|
+
return false;
|
|
13698
|
+
}
|
|
13699
|
+
hasDigits = true;
|
|
13700
|
+
}
|
|
13701
|
+
if (!hasDigits || ch === "_")
|
|
13702
|
+
return false;
|
|
13703
|
+
return true;
|
|
13704
|
+
}
|
|
13705
|
+
function constructYamlInteger(data) {
|
|
13706
|
+
var value = data, sign = 1, ch;
|
|
13707
|
+
if (value.indexOf("_") !== -1) {
|
|
13708
|
+
value = value.replace(/_/g, "");
|
|
13709
|
+
}
|
|
13710
|
+
ch = value[0];
|
|
13711
|
+
if (ch === "-" || ch === "+") {
|
|
13712
|
+
if (ch === "-")
|
|
13713
|
+
sign = -1;
|
|
13714
|
+
value = value.slice(1);
|
|
13715
|
+
ch = value[0];
|
|
13716
|
+
}
|
|
13717
|
+
if (value === "0")
|
|
13718
|
+
return 0;
|
|
13719
|
+
if (ch === "0") {
|
|
13720
|
+
if (value[1] === "b")
|
|
13721
|
+
return sign * parseInt(value.slice(2), 2);
|
|
13722
|
+
if (value[1] === "x")
|
|
13723
|
+
return sign * parseInt(value.slice(2), 16);
|
|
13724
|
+
if (value[1] === "o")
|
|
13725
|
+
return sign * parseInt(value.slice(2), 8);
|
|
13726
|
+
}
|
|
13727
|
+
return sign * parseInt(value, 10);
|
|
13728
|
+
}
|
|
13729
|
+
function isInteger(object) {
|
|
13730
|
+
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 === 0 && !common.isNegativeZero(object));
|
|
13731
|
+
}
|
|
13732
|
+
module.exports = new Type("tag:yaml.org,2002:int", {
|
|
13733
|
+
kind: "scalar",
|
|
13734
|
+
resolve: resolveYamlInteger,
|
|
13735
|
+
construct: constructYamlInteger,
|
|
13736
|
+
predicate: isInteger,
|
|
13737
|
+
represent: {
|
|
13738
|
+
binary: function(obj) {
|
|
13739
|
+
return obj >= 0 ? "0b" + obj.toString(2) : "-0b" + obj.toString(2).slice(1);
|
|
13740
|
+
},
|
|
13741
|
+
octal: function(obj) {
|
|
13742
|
+
return obj >= 0 ? "0o" + obj.toString(8) : "-0o" + obj.toString(8).slice(1);
|
|
13743
|
+
},
|
|
13744
|
+
decimal: function(obj) {
|
|
13745
|
+
return obj.toString(10);
|
|
13746
|
+
},
|
|
13747
|
+
/* eslint-disable max-len */
|
|
13748
|
+
hexadecimal: function(obj) {
|
|
13749
|
+
return obj >= 0 ? "0x" + obj.toString(16).toUpperCase() : "-0x" + obj.toString(16).toUpperCase().slice(1);
|
|
13750
|
+
}
|
|
13751
|
+
},
|
|
13752
|
+
defaultStyle: "decimal",
|
|
13753
|
+
styleAliases: {
|
|
13754
|
+
binary: [2, "bin"],
|
|
13755
|
+
octal: [8, "oct"],
|
|
13756
|
+
decimal: [10, "dec"],
|
|
13757
|
+
hexadecimal: [16, "hex"]
|
|
13758
|
+
}
|
|
13759
|
+
});
|
|
13760
|
+
}
|
|
13761
|
+
});
|
|
13762
|
+
|
|
13763
|
+
// node_modules/js-yaml/lib/type/float.js
|
|
13764
|
+
var require_float = __commonJS({
|
|
13765
|
+
"node_modules/js-yaml/lib/type/float.js"(exports, module) {
|
|
13766
|
+
"use strict";
|
|
13767
|
+
var common = require_common3();
|
|
13768
|
+
var Type = require_type();
|
|
13769
|
+
var YAML_FLOAT_PATTERN = new RegExp(
|
|
13770
|
+
// 2.5e4, 2.5 and integers
|
|
13771
|
+
"^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"
|
|
13772
|
+
);
|
|
13773
|
+
function resolveYamlFloat(data) {
|
|
13774
|
+
if (data === null)
|
|
13775
|
+
return false;
|
|
13776
|
+
if (!YAML_FLOAT_PATTERN.test(data) || // Quick hack to not allow integers end with `_`
|
|
13777
|
+
// Probably should update regexp & check speed
|
|
13778
|
+
data[data.length - 1] === "_") {
|
|
13779
|
+
return false;
|
|
13780
|
+
}
|
|
13781
|
+
return true;
|
|
13782
|
+
}
|
|
13783
|
+
function constructYamlFloat(data) {
|
|
13784
|
+
var value, sign;
|
|
13785
|
+
value = data.replace(/_/g, "").toLowerCase();
|
|
13786
|
+
sign = value[0] === "-" ? -1 : 1;
|
|
13787
|
+
if ("+-".indexOf(value[0]) >= 0) {
|
|
13788
|
+
value = value.slice(1);
|
|
13789
|
+
}
|
|
13790
|
+
if (value === ".inf") {
|
|
13791
|
+
return sign === 1 ? Number.POSITIVE_INFINITY : Number.NEGATIVE_INFINITY;
|
|
13792
|
+
} else if (value === ".nan") {
|
|
13793
|
+
return NaN;
|
|
13794
|
+
}
|
|
13795
|
+
return sign * parseFloat(value, 10);
|
|
13796
|
+
}
|
|
13797
|
+
var SCIENTIFIC_WITHOUT_DOT = /^[-+]?[0-9]+e/;
|
|
13798
|
+
function representYamlFloat(object, style) {
|
|
13799
|
+
var res;
|
|
13800
|
+
if (isNaN(object)) {
|
|
13801
|
+
switch (style) {
|
|
13802
|
+
case "lowercase":
|
|
13803
|
+
return ".nan";
|
|
13804
|
+
case "uppercase":
|
|
13805
|
+
return ".NAN";
|
|
13806
|
+
case "camelcase":
|
|
13807
|
+
return ".NaN";
|
|
13808
|
+
}
|
|
13809
|
+
} else if (Number.POSITIVE_INFINITY === object) {
|
|
13810
|
+
switch (style) {
|
|
13811
|
+
case "lowercase":
|
|
13812
|
+
return ".inf";
|
|
13813
|
+
case "uppercase":
|
|
13814
|
+
return ".INF";
|
|
13815
|
+
case "camelcase":
|
|
13816
|
+
return ".Inf";
|
|
13817
|
+
}
|
|
13818
|
+
} else if (Number.NEGATIVE_INFINITY === object) {
|
|
13819
|
+
switch (style) {
|
|
13820
|
+
case "lowercase":
|
|
13821
|
+
return "-.inf";
|
|
13822
|
+
case "uppercase":
|
|
13823
|
+
return "-.INF";
|
|
13824
|
+
case "camelcase":
|
|
13825
|
+
return "-.Inf";
|
|
13826
|
+
}
|
|
13827
|
+
} else if (common.isNegativeZero(object)) {
|
|
13828
|
+
return "-0.0";
|
|
13829
|
+
}
|
|
13830
|
+
res = object.toString(10);
|
|
13831
|
+
return SCIENTIFIC_WITHOUT_DOT.test(res) ? res.replace("e", ".e") : res;
|
|
13832
|
+
}
|
|
13833
|
+
function isFloat(object) {
|
|
13834
|
+
return Object.prototype.toString.call(object) === "[object Number]" && (object % 1 !== 0 || common.isNegativeZero(object));
|
|
13835
|
+
}
|
|
13836
|
+
module.exports = new Type("tag:yaml.org,2002:float", {
|
|
13837
|
+
kind: "scalar",
|
|
13838
|
+
resolve: resolveYamlFloat,
|
|
13839
|
+
construct: constructYamlFloat,
|
|
13840
|
+
predicate: isFloat,
|
|
13841
|
+
represent: representYamlFloat,
|
|
13842
|
+
defaultStyle: "lowercase"
|
|
13843
|
+
});
|
|
13844
|
+
}
|
|
13845
|
+
});
|
|
13846
|
+
|
|
13847
|
+
// node_modules/js-yaml/lib/schema/json.js
|
|
13848
|
+
var require_json = __commonJS({
|
|
13849
|
+
"node_modules/js-yaml/lib/schema/json.js"(exports, module) {
|
|
13850
|
+
"use strict";
|
|
13851
|
+
module.exports = require_failsafe().extend({
|
|
13852
|
+
implicit: [
|
|
13853
|
+
require_null(),
|
|
13854
|
+
require_bool(),
|
|
13855
|
+
require_int(),
|
|
13856
|
+
require_float()
|
|
13857
|
+
]
|
|
13858
|
+
});
|
|
13859
|
+
}
|
|
13860
|
+
});
|
|
13861
|
+
|
|
13862
|
+
// node_modules/js-yaml/lib/schema/core.js
|
|
13863
|
+
var require_core = __commonJS({
|
|
13864
|
+
"node_modules/js-yaml/lib/schema/core.js"(exports, module) {
|
|
13865
|
+
"use strict";
|
|
13866
|
+
module.exports = require_json();
|
|
13867
|
+
}
|
|
13868
|
+
});
|
|
13869
|
+
|
|
13870
|
+
// node_modules/js-yaml/lib/type/timestamp.js
|
|
13871
|
+
var require_timestamp = __commonJS({
|
|
13872
|
+
"node_modules/js-yaml/lib/type/timestamp.js"(exports, module) {
|
|
13873
|
+
"use strict";
|
|
13874
|
+
var Type = require_type();
|
|
13875
|
+
var YAML_DATE_REGEXP = new RegExp(
|
|
13876
|
+
"^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"
|
|
13877
|
+
);
|
|
13878
|
+
var YAML_TIMESTAMP_REGEXP = new RegExp(
|
|
13879
|
+
"^([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]))?))?$"
|
|
13880
|
+
);
|
|
13881
|
+
function resolveYamlTimestamp(data) {
|
|
13882
|
+
if (data === null)
|
|
13883
|
+
return false;
|
|
13884
|
+
if (YAML_DATE_REGEXP.exec(data) !== null)
|
|
13885
|
+
return true;
|
|
13886
|
+
if (YAML_TIMESTAMP_REGEXP.exec(data) !== null)
|
|
13887
|
+
return true;
|
|
13888
|
+
return false;
|
|
13889
|
+
}
|
|
13890
|
+
function constructYamlTimestamp(data) {
|
|
13891
|
+
var match, year, month, day, hour, minute, second, fraction = 0, delta = null, tz_hour, tz_minute, date;
|
|
13892
|
+
match = YAML_DATE_REGEXP.exec(data);
|
|
13893
|
+
if (match === null)
|
|
13894
|
+
match = YAML_TIMESTAMP_REGEXP.exec(data);
|
|
13895
|
+
if (match === null)
|
|
13896
|
+
throw new Error("Date resolve error");
|
|
13897
|
+
year = +match[1];
|
|
13898
|
+
month = +match[2] - 1;
|
|
13899
|
+
day = +match[3];
|
|
13900
|
+
if (!match[4]) {
|
|
13901
|
+
return new Date(Date.UTC(year, month, day));
|
|
13902
|
+
}
|
|
13903
|
+
hour = +match[4];
|
|
13904
|
+
minute = +match[5];
|
|
13905
|
+
second = +match[6];
|
|
13906
|
+
if (match[7]) {
|
|
13907
|
+
fraction = match[7].slice(0, 3);
|
|
13908
|
+
while (fraction.length < 3) {
|
|
13909
|
+
fraction += "0";
|
|
13910
|
+
}
|
|
13911
|
+
fraction = +fraction;
|
|
13912
|
+
}
|
|
13913
|
+
if (match[9]) {
|
|
13914
|
+
tz_hour = +match[10];
|
|
13915
|
+
tz_minute = +(match[11] || 0);
|
|
13916
|
+
delta = (tz_hour * 60 + tz_minute) * 6e4;
|
|
13917
|
+
if (match[9] === "-")
|
|
13918
|
+
delta = -delta;
|
|
13919
|
+
}
|
|
13920
|
+
date = new Date(Date.UTC(year, month, day, hour, minute, second, fraction));
|
|
13921
|
+
if (delta)
|
|
13922
|
+
date.setTime(date.getTime() - delta);
|
|
13923
|
+
return date;
|
|
13924
|
+
}
|
|
13925
|
+
function representYamlTimestamp(object) {
|
|
13926
|
+
return object.toISOString();
|
|
13927
|
+
}
|
|
13928
|
+
module.exports = new Type("tag:yaml.org,2002:timestamp", {
|
|
13929
|
+
kind: "scalar",
|
|
13930
|
+
resolve: resolveYamlTimestamp,
|
|
13931
|
+
construct: constructYamlTimestamp,
|
|
13932
|
+
instanceOf: Date,
|
|
13933
|
+
represent: representYamlTimestamp
|
|
13934
|
+
});
|
|
13935
|
+
}
|
|
13936
|
+
});
|
|
13937
|
+
|
|
13938
|
+
// node_modules/js-yaml/lib/type/merge.js
|
|
13939
|
+
var require_merge = __commonJS({
|
|
13940
|
+
"node_modules/js-yaml/lib/type/merge.js"(exports, module) {
|
|
13941
|
+
"use strict";
|
|
13942
|
+
var Type = require_type();
|
|
13943
|
+
function resolveYamlMerge(data) {
|
|
13944
|
+
return data === "<<" || data === null;
|
|
13945
|
+
}
|
|
13946
|
+
module.exports = new Type("tag:yaml.org,2002:merge", {
|
|
13947
|
+
kind: "scalar",
|
|
13948
|
+
resolve: resolveYamlMerge
|
|
13949
|
+
});
|
|
13950
|
+
}
|
|
13951
|
+
});
|
|
13952
|
+
|
|
13953
|
+
// node_modules/js-yaml/lib/type/binary.js
|
|
13954
|
+
var require_binary = __commonJS({
|
|
13955
|
+
"node_modules/js-yaml/lib/type/binary.js"(exports, module) {
|
|
13956
|
+
"use strict";
|
|
13957
|
+
var Type = require_type();
|
|
13958
|
+
var BASE64_MAP = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";
|
|
13959
|
+
function resolveYamlBinary(data) {
|
|
13960
|
+
if (data === null)
|
|
13961
|
+
return false;
|
|
13962
|
+
var code, idx, bitlen = 0, max = data.length, map = BASE64_MAP;
|
|
13963
|
+
for (idx = 0; idx < max; idx++) {
|
|
13964
|
+
code = map.indexOf(data.charAt(idx));
|
|
13965
|
+
if (code > 64)
|
|
13966
|
+
continue;
|
|
13967
|
+
if (code < 0)
|
|
13968
|
+
return false;
|
|
13969
|
+
bitlen += 6;
|
|
13970
|
+
}
|
|
13971
|
+
return bitlen % 8 === 0;
|
|
13972
|
+
}
|
|
13973
|
+
function constructYamlBinary(data) {
|
|
13974
|
+
var idx, tailbits, input = data.replace(/[\r\n=]/g, ""), max = input.length, map = BASE64_MAP, bits = 0, result = [];
|
|
13975
|
+
for (idx = 0; idx < max; idx++) {
|
|
13976
|
+
if (idx % 4 === 0 && idx) {
|
|
13977
|
+
result.push(bits >> 16 & 255);
|
|
13978
|
+
result.push(bits >> 8 & 255);
|
|
13979
|
+
result.push(bits & 255);
|
|
13980
|
+
}
|
|
13981
|
+
bits = bits << 6 | map.indexOf(input.charAt(idx));
|
|
13982
|
+
}
|
|
13983
|
+
tailbits = max % 4 * 6;
|
|
13984
|
+
if (tailbits === 0) {
|
|
13985
|
+
result.push(bits >> 16 & 255);
|
|
13986
|
+
result.push(bits >> 8 & 255);
|
|
13987
|
+
result.push(bits & 255);
|
|
13988
|
+
} else if (tailbits === 18) {
|
|
13989
|
+
result.push(bits >> 10 & 255);
|
|
13990
|
+
result.push(bits >> 2 & 255);
|
|
13991
|
+
} else if (tailbits === 12) {
|
|
13992
|
+
result.push(bits >> 4 & 255);
|
|
13993
|
+
}
|
|
13994
|
+
return new Uint8Array(result);
|
|
13995
|
+
}
|
|
13996
|
+
function representYamlBinary(object) {
|
|
13997
|
+
var result = "", bits = 0, idx, tail, max = object.length, map = BASE64_MAP;
|
|
13998
|
+
for (idx = 0; idx < max; idx++) {
|
|
13999
|
+
if (idx % 3 === 0 && idx) {
|
|
14000
|
+
result += map[bits >> 18 & 63];
|
|
14001
|
+
result += map[bits >> 12 & 63];
|
|
14002
|
+
result += map[bits >> 6 & 63];
|
|
14003
|
+
result += map[bits & 63];
|
|
14004
|
+
}
|
|
14005
|
+
bits = (bits << 8) + object[idx];
|
|
14006
|
+
}
|
|
14007
|
+
tail = max % 3;
|
|
14008
|
+
if (tail === 0) {
|
|
14009
|
+
result += map[bits >> 18 & 63];
|
|
14010
|
+
result += map[bits >> 12 & 63];
|
|
14011
|
+
result += map[bits >> 6 & 63];
|
|
14012
|
+
result += map[bits & 63];
|
|
14013
|
+
} else if (tail === 2) {
|
|
14014
|
+
result += map[bits >> 10 & 63];
|
|
14015
|
+
result += map[bits >> 4 & 63];
|
|
14016
|
+
result += map[bits << 2 & 63];
|
|
14017
|
+
result += map[64];
|
|
14018
|
+
} else if (tail === 1) {
|
|
14019
|
+
result += map[bits >> 2 & 63];
|
|
14020
|
+
result += map[bits << 4 & 63];
|
|
14021
|
+
result += map[64];
|
|
14022
|
+
result += map[64];
|
|
14023
|
+
}
|
|
14024
|
+
return result;
|
|
14025
|
+
}
|
|
14026
|
+
function isBinary(obj) {
|
|
14027
|
+
return Object.prototype.toString.call(obj) === "[object Uint8Array]";
|
|
14028
|
+
}
|
|
14029
|
+
module.exports = new Type("tag:yaml.org,2002:binary", {
|
|
14030
|
+
kind: "scalar",
|
|
14031
|
+
resolve: resolveYamlBinary,
|
|
14032
|
+
construct: constructYamlBinary,
|
|
14033
|
+
predicate: isBinary,
|
|
14034
|
+
represent: representYamlBinary
|
|
14035
|
+
});
|
|
14036
|
+
}
|
|
14037
|
+
});
|
|
14038
|
+
|
|
14039
|
+
// node_modules/js-yaml/lib/type/omap.js
|
|
14040
|
+
var require_omap = __commonJS({
|
|
14041
|
+
"node_modules/js-yaml/lib/type/omap.js"(exports, module) {
|
|
14042
|
+
"use strict";
|
|
14043
|
+
var Type = require_type();
|
|
14044
|
+
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
14045
|
+
var _toString = Object.prototype.toString;
|
|
14046
|
+
function resolveYamlOmap(data) {
|
|
14047
|
+
if (data === null)
|
|
14048
|
+
return true;
|
|
14049
|
+
var objectKeys = [], index, length, pair, pairKey, pairHasKey, object = data;
|
|
14050
|
+
for (index = 0, length = object.length; index < length; index += 1) {
|
|
14051
|
+
pair = object[index];
|
|
14052
|
+
pairHasKey = false;
|
|
14053
|
+
if (_toString.call(pair) !== "[object Object]")
|
|
14054
|
+
return false;
|
|
14055
|
+
for (pairKey in pair) {
|
|
14056
|
+
if (_hasOwnProperty.call(pair, pairKey)) {
|
|
14057
|
+
if (!pairHasKey)
|
|
14058
|
+
pairHasKey = true;
|
|
14059
|
+
else
|
|
14060
|
+
return false;
|
|
14061
|
+
}
|
|
14062
|
+
}
|
|
14063
|
+
if (!pairHasKey)
|
|
14064
|
+
return false;
|
|
14065
|
+
if (objectKeys.indexOf(pairKey) === -1)
|
|
14066
|
+
objectKeys.push(pairKey);
|
|
14067
|
+
else
|
|
14068
|
+
return false;
|
|
14069
|
+
}
|
|
14070
|
+
return true;
|
|
14071
|
+
}
|
|
14072
|
+
function constructYamlOmap(data) {
|
|
14073
|
+
return data !== null ? data : [];
|
|
14074
|
+
}
|
|
14075
|
+
module.exports = new Type("tag:yaml.org,2002:omap", {
|
|
14076
|
+
kind: "sequence",
|
|
14077
|
+
resolve: resolveYamlOmap,
|
|
14078
|
+
construct: constructYamlOmap
|
|
14079
|
+
});
|
|
14080
|
+
}
|
|
14081
|
+
});
|
|
14082
|
+
|
|
14083
|
+
// node_modules/js-yaml/lib/type/pairs.js
|
|
14084
|
+
var require_pairs = __commonJS({
|
|
14085
|
+
"node_modules/js-yaml/lib/type/pairs.js"(exports, module) {
|
|
14086
|
+
"use strict";
|
|
14087
|
+
var Type = require_type();
|
|
14088
|
+
var _toString = Object.prototype.toString;
|
|
14089
|
+
function resolveYamlPairs(data) {
|
|
14090
|
+
if (data === null)
|
|
14091
|
+
return true;
|
|
14092
|
+
var index, length, pair, keys, result, object = data;
|
|
14093
|
+
result = new Array(object.length);
|
|
14094
|
+
for (index = 0, length = object.length; index < length; index += 1) {
|
|
14095
|
+
pair = object[index];
|
|
14096
|
+
if (_toString.call(pair) !== "[object Object]")
|
|
14097
|
+
return false;
|
|
14098
|
+
keys = Object.keys(pair);
|
|
14099
|
+
if (keys.length !== 1)
|
|
14100
|
+
return false;
|
|
14101
|
+
result[index] = [keys[0], pair[keys[0]]];
|
|
14102
|
+
}
|
|
14103
|
+
return true;
|
|
14104
|
+
}
|
|
14105
|
+
function constructYamlPairs(data) {
|
|
14106
|
+
if (data === null)
|
|
14107
|
+
return [];
|
|
14108
|
+
var index, length, pair, keys, result, object = data;
|
|
14109
|
+
result = new Array(object.length);
|
|
14110
|
+
for (index = 0, length = object.length; index < length; index += 1) {
|
|
14111
|
+
pair = object[index];
|
|
14112
|
+
keys = Object.keys(pair);
|
|
14113
|
+
result[index] = [keys[0], pair[keys[0]]];
|
|
14114
|
+
}
|
|
14115
|
+
return result;
|
|
14116
|
+
}
|
|
14117
|
+
module.exports = new Type("tag:yaml.org,2002:pairs", {
|
|
14118
|
+
kind: "sequence",
|
|
14119
|
+
resolve: resolveYamlPairs,
|
|
14120
|
+
construct: constructYamlPairs
|
|
14121
|
+
});
|
|
14122
|
+
}
|
|
14123
|
+
});
|
|
14124
|
+
|
|
14125
|
+
// node_modules/js-yaml/lib/type/set.js
|
|
14126
|
+
var require_set = __commonJS({
|
|
14127
|
+
"node_modules/js-yaml/lib/type/set.js"(exports, module) {
|
|
14128
|
+
"use strict";
|
|
14129
|
+
var Type = require_type();
|
|
14130
|
+
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
14131
|
+
function resolveYamlSet(data) {
|
|
14132
|
+
if (data === null)
|
|
14133
|
+
return true;
|
|
14134
|
+
var key, object = data;
|
|
14135
|
+
for (key in object) {
|
|
14136
|
+
if (_hasOwnProperty.call(object, key)) {
|
|
14137
|
+
if (object[key] !== null)
|
|
14138
|
+
return false;
|
|
14139
|
+
}
|
|
14140
|
+
}
|
|
14141
|
+
return true;
|
|
14142
|
+
}
|
|
14143
|
+
function constructYamlSet(data) {
|
|
14144
|
+
return data !== null ? data : {};
|
|
14145
|
+
}
|
|
14146
|
+
module.exports = new Type("tag:yaml.org,2002:set", {
|
|
14147
|
+
kind: "mapping",
|
|
14148
|
+
resolve: resolveYamlSet,
|
|
14149
|
+
construct: constructYamlSet
|
|
14150
|
+
});
|
|
14151
|
+
}
|
|
14152
|
+
});
|
|
14153
|
+
|
|
14154
|
+
// node_modules/js-yaml/lib/schema/default.js
|
|
14155
|
+
var require_default = __commonJS({
|
|
14156
|
+
"node_modules/js-yaml/lib/schema/default.js"(exports, module) {
|
|
14157
|
+
"use strict";
|
|
14158
|
+
module.exports = require_core().extend({
|
|
14159
|
+
implicit: [
|
|
14160
|
+
require_timestamp(),
|
|
14161
|
+
require_merge()
|
|
14162
|
+
],
|
|
14163
|
+
explicit: [
|
|
14164
|
+
require_binary(),
|
|
14165
|
+
require_omap(),
|
|
14166
|
+
require_pairs(),
|
|
14167
|
+
require_set()
|
|
14168
|
+
]
|
|
14169
|
+
});
|
|
14170
|
+
}
|
|
14171
|
+
});
|
|
14172
|
+
|
|
14173
|
+
// node_modules/js-yaml/lib/loader.js
|
|
14174
|
+
var require_loader = __commonJS({
|
|
14175
|
+
"node_modules/js-yaml/lib/loader.js"(exports, module) {
|
|
14176
|
+
"use strict";
|
|
14177
|
+
var common = require_common3();
|
|
14178
|
+
var YAMLException = require_exception();
|
|
14179
|
+
var makeSnippet = require_snippet();
|
|
14180
|
+
var DEFAULT_SCHEMA = require_default();
|
|
14181
|
+
var _hasOwnProperty = Object.prototype.hasOwnProperty;
|
|
14182
|
+
var CONTEXT_FLOW_IN = 1;
|
|
14183
|
+
var CONTEXT_FLOW_OUT = 2;
|
|
14184
|
+
var CONTEXT_BLOCK_IN = 3;
|
|
14185
|
+
var CONTEXT_BLOCK_OUT = 4;
|
|
14186
|
+
var CHOMPING_CLIP = 1;
|
|
14187
|
+
var CHOMPING_STRIP = 2;
|
|
14188
|
+
var CHOMPING_KEEP = 3;
|
|
14189
|
+
var PATTERN_NON_PRINTABLE = /[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/;
|
|
14190
|
+
var PATTERN_NON_ASCII_LINE_BREAKS = /[\x85\u2028\u2029]/;
|
|
14191
|
+
var PATTERN_FLOW_INDICATORS = /[,\[\]\{\}]/;
|
|
14192
|
+
var PATTERN_TAG_HANDLE = /^(?:!|!!|![a-z\-]+!)$/i;
|
|
14193
|
+
var PATTERN_TAG_URI = /^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;
|
|
14194
|
+
function _class(obj) {
|
|
14195
|
+
return Object.prototype.toString.call(obj);
|
|
14196
|
+
}
|
|
14197
|
+
function is_EOL(c) {
|
|
14198
|
+
return c === 10 || c === 13;
|
|
14199
|
+
}
|
|
14200
|
+
function is_WHITE_SPACE(c) {
|
|
14201
|
+
return c === 9 || c === 32;
|
|
14202
|
+
}
|
|
14203
|
+
function is_WS_OR_EOL(c) {
|
|
14204
|
+
return c === 9 || c === 32 || c === 10 || c === 13;
|
|
14205
|
+
}
|
|
14206
|
+
function is_FLOW_INDICATOR(c) {
|
|
14207
|
+
return c === 44 || c === 91 || c === 93 || c === 123 || c === 125;
|
|
14208
|
+
}
|
|
14209
|
+
function fromHexCode(c) {
|
|
14210
|
+
var lc;
|
|
14211
|
+
if (48 <= c && c <= 57) {
|
|
14212
|
+
return c - 48;
|
|
14213
|
+
}
|
|
14214
|
+
lc = c | 32;
|
|
14215
|
+
if (97 <= lc && lc <= 102) {
|
|
14216
|
+
return lc - 97 + 10;
|
|
14217
|
+
}
|
|
14218
|
+
return -1;
|
|
14219
|
+
}
|
|
14220
|
+
function escapedHexLen(c) {
|
|
14221
|
+
if (c === 120) {
|
|
14222
|
+
return 2;
|
|
14223
|
+
}
|
|
14224
|
+
if (c === 117) {
|
|
14225
|
+
return 4;
|
|
14226
|
+
}
|
|
14227
|
+
if (c === 85) {
|
|
14228
|
+
return 8;
|
|
14229
|
+
}
|
|
14230
|
+
return 0;
|
|
14231
|
+
}
|
|
14232
|
+
function fromDecimalCode(c) {
|
|
14233
|
+
if (48 <= c && c <= 57) {
|
|
14234
|
+
return c - 48;
|
|
14235
|
+
}
|
|
14236
|
+
return -1;
|
|
14237
|
+
}
|
|
14238
|
+
function simpleEscapeSequence(c) {
|
|
14239
|
+
return c === 48 ? "\0" : c === 97 ? "\x07" : c === 98 ? "\b" : c === 116 ? " " : c === 9 ? " " : c === 110 ? "\n" : c === 118 ? "\v" : c === 102 ? "\f" : c === 114 ? "\r" : c === 101 ? "\x1B" : c === 32 ? " " : c === 34 ? '"' : c === 47 ? "/" : c === 92 ? "\\" : c === 78 ? "\x85" : c === 95 ? "\xA0" : c === 76 ? "\u2028" : c === 80 ? "\u2029" : "";
|
|
14240
|
+
}
|
|
14241
|
+
function charFromCodepoint(c) {
|
|
14242
|
+
if (c <= 65535) {
|
|
14243
|
+
return String.fromCharCode(c);
|
|
14244
|
+
}
|
|
14245
|
+
return String.fromCharCode(
|
|
14246
|
+
(c - 65536 >> 10) + 55296,
|
|
14247
|
+
(c - 65536 & 1023) + 56320
|
|
14248
|
+
);
|
|
14249
|
+
}
|
|
14250
|
+
var simpleEscapeCheck = new Array(256);
|
|
14251
|
+
var simpleEscapeMap = new Array(256);
|
|
14252
|
+
for (i = 0; i < 256; i++) {
|
|
14253
|
+
simpleEscapeCheck[i] = simpleEscapeSequence(i) ? 1 : 0;
|
|
14254
|
+
simpleEscapeMap[i] = simpleEscapeSequence(i);
|
|
14255
|
+
}
|
|
14256
|
+
var i;
|
|
14257
|
+
function State(input, options8) {
|
|
14258
|
+
this.input = input;
|
|
14259
|
+
this.filename = options8["filename"] || null;
|
|
14260
|
+
this.schema = options8["schema"] || DEFAULT_SCHEMA;
|
|
14261
|
+
this.onWarning = options8["onWarning"] || null;
|
|
14262
|
+
this.legacy = options8["legacy"] || false;
|
|
14263
|
+
this.json = options8["json"] || false;
|
|
14264
|
+
this.listener = options8["listener"] || null;
|
|
14265
|
+
this.implicitTypes = this.schema.compiledImplicit;
|
|
14266
|
+
this.typeMap = this.schema.compiledTypeMap;
|
|
14267
|
+
this.length = input.length;
|
|
14268
|
+
this.position = 0;
|
|
14269
|
+
this.line = 0;
|
|
14270
|
+
this.lineStart = 0;
|
|
14271
|
+
this.lineIndent = 0;
|
|
14272
|
+
this.firstTabInLine = -1;
|
|
14273
|
+
this.documents = [];
|
|
14274
|
+
}
|
|
14275
|
+
function generateError(state, message) {
|
|
14276
|
+
var mark = {
|
|
14277
|
+
name: state.filename,
|
|
14278
|
+
buffer: state.input.slice(0, -1),
|
|
14279
|
+
// omit trailing \0
|
|
14280
|
+
position: state.position,
|
|
14281
|
+
line: state.line,
|
|
14282
|
+
column: state.position - state.lineStart
|
|
14283
|
+
};
|
|
14284
|
+
mark.snippet = makeSnippet(mark);
|
|
14285
|
+
return new YAMLException(message, mark);
|
|
14286
|
+
}
|
|
14287
|
+
function throwError(state, message) {
|
|
14288
|
+
throw generateError(state, message);
|
|
14289
|
+
}
|
|
14290
|
+
function throwWarning(state, message) {
|
|
14291
|
+
if (state.onWarning) {
|
|
14292
|
+
state.onWarning.call(null, generateError(state, message));
|
|
14293
|
+
}
|
|
14294
|
+
}
|
|
14295
|
+
var directiveHandlers = {
|
|
14296
|
+
YAML: function handleYamlDirective(state, name, args) {
|
|
14297
|
+
var match, major, minor;
|
|
14298
|
+
if (state.version !== null) {
|
|
14299
|
+
throwError(state, "duplication of %YAML directive");
|
|
14300
|
+
}
|
|
14301
|
+
if (args.length !== 1) {
|
|
14302
|
+
throwError(state, "YAML directive accepts exactly one argument");
|
|
14303
|
+
}
|
|
14304
|
+
match = /^([0-9]+)\.([0-9]+)$/.exec(args[0]);
|
|
14305
|
+
if (match === null) {
|
|
14306
|
+
throwError(state, "ill-formed argument of the YAML directive");
|
|
14307
|
+
}
|
|
14308
|
+
major = parseInt(match[1], 10);
|
|
14309
|
+
minor = parseInt(match[2], 10);
|
|
14310
|
+
if (major !== 1) {
|
|
14311
|
+
throwError(state, "unacceptable YAML version of the document");
|
|
14312
|
+
}
|
|
14313
|
+
state.version = args[0];
|
|
14314
|
+
state.checkLineBreaks = minor < 2;
|
|
14315
|
+
if (minor !== 1 && minor !== 2) {
|
|
14316
|
+
throwWarning(state, "unsupported YAML version of the document");
|
|
14317
|
+
}
|
|
14318
|
+
},
|
|
14319
|
+
TAG: function handleTagDirective(state, name, args) {
|
|
14320
|
+
var handle, prefix;
|
|
14321
|
+
if (args.length !== 2) {
|
|
14322
|
+
throwError(state, "TAG directive accepts exactly two arguments");
|
|
14323
|
+
}
|
|
14324
|
+
handle = args[0];
|
|
14325
|
+
prefix = args[1];
|
|
14326
|
+
if (!PATTERN_TAG_HANDLE.test(handle)) {
|
|
14327
|
+
throwError(state, "ill-formed tag handle (first argument) of the TAG directive");
|
|
14328
|
+
}
|
|
14329
|
+
if (_hasOwnProperty.call(state.tagMap, handle)) {
|
|
14330
|
+
throwError(state, 'there is a previously declared suffix for "' + handle + '" tag handle');
|
|
14331
|
+
}
|
|
14332
|
+
if (!PATTERN_TAG_URI.test(prefix)) {
|
|
14333
|
+
throwError(state, "ill-formed tag prefix (second argument) of the TAG directive");
|
|
14334
|
+
}
|
|
14335
|
+
try {
|
|
14336
|
+
prefix = decodeURIComponent(prefix);
|
|
14337
|
+
} catch (err) {
|
|
14338
|
+
throwError(state, "tag prefix is malformed: " + prefix);
|
|
14339
|
+
}
|
|
14340
|
+
state.tagMap[handle] = prefix;
|
|
14341
|
+
}
|
|
14342
|
+
};
|
|
14343
|
+
function captureSegment(state, start, end, checkJson) {
|
|
14344
|
+
var _position, _length, _character, _result;
|
|
14345
|
+
if (start < end) {
|
|
14346
|
+
_result = state.input.slice(start, end);
|
|
14347
|
+
if (checkJson) {
|
|
14348
|
+
for (_position = 0, _length = _result.length; _position < _length; _position += 1) {
|
|
14349
|
+
_character = _result.charCodeAt(_position);
|
|
14350
|
+
if (!(_character === 9 || 32 <= _character && _character <= 1114111)) {
|
|
14351
|
+
throwError(state, "expected valid JSON character");
|
|
14352
|
+
}
|
|
14353
|
+
}
|
|
14354
|
+
} else if (PATTERN_NON_PRINTABLE.test(_result)) {
|
|
14355
|
+
throwError(state, "the stream contains non-printable characters");
|
|
14356
|
+
}
|
|
14357
|
+
state.result += _result;
|
|
14358
|
+
}
|
|
14359
|
+
}
|
|
14360
|
+
function mergeMappings(state, destination, source, overridableKeys) {
|
|
14361
|
+
var sourceKeys, key, index, quantity;
|
|
14362
|
+
if (!common.isObject(source)) {
|
|
14363
|
+
throwError(state, "cannot merge mappings; the provided source object is unacceptable");
|
|
14364
|
+
}
|
|
14365
|
+
sourceKeys = Object.keys(source);
|
|
14366
|
+
for (index = 0, quantity = sourceKeys.length; index < quantity; index += 1) {
|
|
14367
|
+
key = sourceKeys[index];
|
|
14368
|
+
if (!_hasOwnProperty.call(destination, key)) {
|
|
14369
|
+
destination[key] = source[key];
|
|
14370
|
+
overridableKeys[key] = true;
|
|
14371
|
+
}
|
|
14372
|
+
}
|
|
14373
|
+
}
|
|
14374
|
+
function storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, startLine, startLineStart, startPos) {
|
|
14375
|
+
var index, quantity;
|
|
14376
|
+
if (Array.isArray(keyNode)) {
|
|
14377
|
+
keyNode = Array.prototype.slice.call(keyNode);
|
|
14378
|
+
for (index = 0, quantity = keyNode.length; index < quantity; index += 1) {
|
|
14379
|
+
if (Array.isArray(keyNode[index])) {
|
|
14380
|
+
throwError(state, "nested arrays are not supported inside keys");
|
|
14381
|
+
}
|
|
14382
|
+
if (typeof keyNode === "object" && _class(keyNode[index]) === "[object Object]") {
|
|
14383
|
+
keyNode[index] = "[object Object]";
|
|
14384
|
+
}
|
|
14385
|
+
}
|
|
14386
|
+
}
|
|
14387
|
+
if (typeof keyNode === "object" && _class(keyNode) === "[object Object]") {
|
|
14388
|
+
keyNode = "[object Object]";
|
|
14389
|
+
}
|
|
14390
|
+
keyNode = String(keyNode);
|
|
14391
|
+
if (_result === null) {
|
|
14392
|
+
_result = {};
|
|
14393
|
+
}
|
|
14394
|
+
if (keyTag === "tag:yaml.org,2002:merge") {
|
|
14395
|
+
if (Array.isArray(valueNode)) {
|
|
14396
|
+
for (index = 0, quantity = valueNode.length; index < quantity; index += 1) {
|
|
14397
|
+
mergeMappings(state, _result, valueNode[index], overridableKeys);
|
|
14398
|
+
}
|
|
14399
|
+
} else {
|
|
14400
|
+
mergeMappings(state, _result, valueNode, overridableKeys);
|
|
14401
|
+
}
|
|
14402
|
+
} else {
|
|
14403
|
+
if (!state.json && !_hasOwnProperty.call(overridableKeys, keyNode) && _hasOwnProperty.call(_result, keyNode)) {
|
|
14404
|
+
state.line = startLine || state.line;
|
|
14405
|
+
state.lineStart = startLineStart || state.lineStart;
|
|
14406
|
+
state.position = startPos || state.position;
|
|
14407
|
+
throwError(state, "duplicated mapping key");
|
|
14408
|
+
}
|
|
14409
|
+
if (keyNode === "__proto__") {
|
|
14410
|
+
Object.defineProperty(_result, keyNode, {
|
|
14411
|
+
configurable: true,
|
|
14412
|
+
enumerable: true,
|
|
14413
|
+
writable: true,
|
|
14414
|
+
value: valueNode
|
|
14415
|
+
});
|
|
14416
|
+
} else {
|
|
14417
|
+
_result[keyNode] = valueNode;
|
|
14418
|
+
}
|
|
14419
|
+
delete overridableKeys[keyNode];
|
|
14420
|
+
}
|
|
14421
|
+
return _result;
|
|
14422
|
+
}
|
|
14423
|
+
function readLineBreak(state) {
|
|
14424
|
+
var ch;
|
|
14425
|
+
ch = state.input.charCodeAt(state.position);
|
|
14426
|
+
if (ch === 10) {
|
|
14427
|
+
state.position++;
|
|
14428
|
+
} else if (ch === 13) {
|
|
14429
|
+
state.position++;
|
|
14430
|
+
if (state.input.charCodeAt(state.position) === 10) {
|
|
14431
|
+
state.position++;
|
|
14432
|
+
}
|
|
14433
|
+
} else {
|
|
14434
|
+
throwError(state, "a line break is expected");
|
|
14435
|
+
}
|
|
14436
|
+
state.line += 1;
|
|
14437
|
+
state.lineStart = state.position;
|
|
14438
|
+
state.firstTabInLine = -1;
|
|
14439
|
+
}
|
|
14440
|
+
function skipSeparationSpace(state, allowComments, checkIndent) {
|
|
14441
|
+
var lineBreaks = 0, ch = state.input.charCodeAt(state.position);
|
|
14442
|
+
while (ch !== 0) {
|
|
14443
|
+
while (is_WHITE_SPACE(ch)) {
|
|
14444
|
+
if (ch === 9 && state.firstTabInLine === -1) {
|
|
14445
|
+
state.firstTabInLine = state.position;
|
|
14446
|
+
}
|
|
14447
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14448
|
+
}
|
|
14449
|
+
if (allowComments && ch === 35) {
|
|
14450
|
+
do {
|
|
14451
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14452
|
+
} while (ch !== 10 && ch !== 13 && ch !== 0);
|
|
14453
|
+
}
|
|
14454
|
+
if (is_EOL(ch)) {
|
|
14455
|
+
readLineBreak(state);
|
|
14456
|
+
ch = state.input.charCodeAt(state.position);
|
|
14457
|
+
lineBreaks++;
|
|
14458
|
+
state.lineIndent = 0;
|
|
14459
|
+
while (ch === 32) {
|
|
14460
|
+
state.lineIndent++;
|
|
14461
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14462
|
+
}
|
|
14463
|
+
} else {
|
|
14464
|
+
break;
|
|
14465
|
+
}
|
|
14466
|
+
}
|
|
14467
|
+
if (checkIndent !== -1 && lineBreaks !== 0 && state.lineIndent < checkIndent) {
|
|
14468
|
+
throwWarning(state, "deficient indentation");
|
|
14469
|
+
}
|
|
14470
|
+
return lineBreaks;
|
|
14471
|
+
}
|
|
14472
|
+
function testDocumentSeparator(state) {
|
|
14473
|
+
var _position = state.position, ch;
|
|
14474
|
+
ch = state.input.charCodeAt(_position);
|
|
14475
|
+
if ((ch === 45 || ch === 46) && ch === state.input.charCodeAt(_position + 1) && ch === state.input.charCodeAt(_position + 2)) {
|
|
14476
|
+
_position += 3;
|
|
14477
|
+
ch = state.input.charCodeAt(_position);
|
|
14478
|
+
if (ch === 0 || is_WS_OR_EOL(ch)) {
|
|
14479
|
+
return true;
|
|
14480
|
+
}
|
|
14481
|
+
}
|
|
14482
|
+
return false;
|
|
14483
|
+
}
|
|
14484
|
+
function writeFoldedLines(state, count) {
|
|
14485
|
+
if (count === 1) {
|
|
14486
|
+
state.result += " ";
|
|
14487
|
+
} else if (count > 1) {
|
|
14488
|
+
state.result += common.repeat("\n", count - 1);
|
|
14489
|
+
}
|
|
14490
|
+
}
|
|
14491
|
+
function readPlainScalar(state, nodeIndent, withinFlowCollection) {
|
|
14492
|
+
var preceding, following, captureStart, captureEnd, hasPendingContent, _line, _lineStart, _lineIndent, _kind = state.kind, _result = state.result, ch;
|
|
14493
|
+
ch = state.input.charCodeAt(state.position);
|
|
14494
|
+
if (is_WS_OR_EOL(ch) || is_FLOW_INDICATOR(ch) || ch === 35 || ch === 38 || ch === 42 || ch === 33 || ch === 124 || ch === 62 || ch === 39 || ch === 34 || ch === 37 || ch === 64 || ch === 96) {
|
|
14495
|
+
return false;
|
|
14496
|
+
}
|
|
14497
|
+
if (ch === 63 || ch === 45) {
|
|
14498
|
+
following = state.input.charCodeAt(state.position + 1);
|
|
14499
|
+
if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
|
|
14500
|
+
return false;
|
|
14501
|
+
}
|
|
14502
|
+
}
|
|
14503
|
+
state.kind = "scalar";
|
|
14504
|
+
state.result = "";
|
|
14505
|
+
captureStart = captureEnd = state.position;
|
|
14506
|
+
hasPendingContent = false;
|
|
14507
|
+
while (ch !== 0) {
|
|
14508
|
+
if (ch === 58) {
|
|
14509
|
+
following = state.input.charCodeAt(state.position + 1);
|
|
14510
|
+
if (is_WS_OR_EOL(following) || withinFlowCollection && is_FLOW_INDICATOR(following)) {
|
|
14511
|
+
break;
|
|
14512
|
+
}
|
|
14513
|
+
} else if (ch === 35) {
|
|
14514
|
+
preceding = state.input.charCodeAt(state.position - 1);
|
|
14515
|
+
if (is_WS_OR_EOL(preceding)) {
|
|
14516
|
+
break;
|
|
14517
|
+
}
|
|
14518
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state) || withinFlowCollection && is_FLOW_INDICATOR(ch)) {
|
|
14519
|
+
break;
|
|
14520
|
+
} else if (is_EOL(ch)) {
|
|
14521
|
+
_line = state.line;
|
|
14522
|
+
_lineStart = state.lineStart;
|
|
14523
|
+
_lineIndent = state.lineIndent;
|
|
14524
|
+
skipSeparationSpace(state, false, -1);
|
|
14525
|
+
if (state.lineIndent >= nodeIndent) {
|
|
14526
|
+
hasPendingContent = true;
|
|
14527
|
+
ch = state.input.charCodeAt(state.position);
|
|
14528
|
+
continue;
|
|
14529
|
+
} else {
|
|
14530
|
+
state.position = captureEnd;
|
|
14531
|
+
state.line = _line;
|
|
14532
|
+
state.lineStart = _lineStart;
|
|
14533
|
+
state.lineIndent = _lineIndent;
|
|
14534
|
+
break;
|
|
14535
|
+
}
|
|
14536
|
+
}
|
|
14537
|
+
if (hasPendingContent) {
|
|
14538
|
+
captureSegment(state, captureStart, captureEnd, false);
|
|
14539
|
+
writeFoldedLines(state, state.line - _line);
|
|
14540
|
+
captureStart = captureEnd = state.position;
|
|
14541
|
+
hasPendingContent = false;
|
|
14542
|
+
}
|
|
14543
|
+
if (!is_WHITE_SPACE(ch)) {
|
|
14544
|
+
captureEnd = state.position + 1;
|
|
14545
|
+
}
|
|
14546
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14547
|
+
}
|
|
14548
|
+
captureSegment(state, captureStart, captureEnd, false);
|
|
14549
|
+
if (state.result) {
|
|
14550
|
+
return true;
|
|
14551
|
+
}
|
|
14552
|
+
state.kind = _kind;
|
|
14553
|
+
state.result = _result;
|
|
14554
|
+
return false;
|
|
14555
|
+
}
|
|
14556
|
+
function readSingleQuotedScalar(state, nodeIndent) {
|
|
14557
|
+
var ch, captureStart, captureEnd;
|
|
14558
|
+
ch = state.input.charCodeAt(state.position);
|
|
14559
|
+
if (ch !== 39) {
|
|
14560
|
+
return false;
|
|
14561
|
+
}
|
|
14562
|
+
state.kind = "scalar";
|
|
14563
|
+
state.result = "";
|
|
14564
|
+
state.position++;
|
|
14565
|
+
captureStart = captureEnd = state.position;
|
|
14566
|
+
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
14567
|
+
if (ch === 39) {
|
|
14568
|
+
captureSegment(state, captureStart, state.position, true);
|
|
14569
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14570
|
+
if (ch === 39) {
|
|
14571
|
+
captureStart = state.position;
|
|
14572
|
+
state.position++;
|
|
14573
|
+
captureEnd = state.position;
|
|
14574
|
+
} else {
|
|
14575
|
+
return true;
|
|
14576
|
+
}
|
|
14577
|
+
} else if (is_EOL(ch)) {
|
|
14578
|
+
captureSegment(state, captureStart, captureEnd, true);
|
|
14579
|
+
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
14580
|
+
captureStart = captureEnd = state.position;
|
|
14581
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
14582
|
+
throwError(state, "unexpected end of the document within a single quoted scalar");
|
|
14583
|
+
} else {
|
|
14584
|
+
state.position++;
|
|
14585
|
+
captureEnd = state.position;
|
|
14586
|
+
}
|
|
14587
|
+
}
|
|
14588
|
+
throwError(state, "unexpected end of the stream within a single quoted scalar");
|
|
14589
|
+
}
|
|
14590
|
+
function readDoubleQuotedScalar(state, nodeIndent) {
|
|
14591
|
+
var captureStart, captureEnd, hexLength, hexResult, tmp, ch;
|
|
14592
|
+
ch = state.input.charCodeAt(state.position);
|
|
14593
|
+
if (ch !== 34) {
|
|
14594
|
+
return false;
|
|
14595
|
+
}
|
|
14596
|
+
state.kind = "scalar";
|
|
14597
|
+
state.result = "";
|
|
14598
|
+
state.position++;
|
|
14599
|
+
captureStart = captureEnd = state.position;
|
|
14600
|
+
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
14601
|
+
if (ch === 34) {
|
|
14602
|
+
captureSegment(state, captureStart, state.position, true);
|
|
14603
|
+
state.position++;
|
|
14604
|
+
return true;
|
|
14605
|
+
} else if (ch === 92) {
|
|
14606
|
+
captureSegment(state, captureStart, state.position, true);
|
|
14607
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14608
|
+
if (is_EOL(ch)) {
|
|
14609
|
+
skipSeparationSpace(state, false, nodeIndent);
|
|
14610
|
+
} else if (ch < 256 && simpleEscapeCheck[ch]) {
|
|
14611
|
+
state.result += simpleEscapeMap[ch];
|
|
14612
|
+
state.position++;
|
|
14613
|
+
} else if ((tmp = escapedHexLen(ch)) > 0) {
|
|
14614
|
+
hexLength = tmp;
|
|
14615
|
+
hexResult = 0;
|
|
14616
|
+
for (; hexLength > 0; hexLength--) {
|
|
14617
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14618
|
+
if ((tmp = fromHexCode(ch)) >= 0) {
|
|
14619
|
+
hexResult = (hexResult << 4) + tmp;
|
|
14620
|
+
} else {
|
|
14621
|
+
throwError(state, "expected hexadecimal character");
|
|
14622
|
+
}
|
|
14623
|
+
}
|
|
14624
|
+
state.result += charFromCodepoint(hexResult);
|
|
14625
|
+
state.position++;
|
|
14626
|
+
} else {
|
|
14627
|
+
throwError(state, "unknown escape sequence");
|
|
14628
|
+
}
|
|
14629
|
+
captureStart = captureEnd = state.position;
|
|
14630
|
+
} else if (is_EOL(ch)) {
|
|
14631
|
+
captureSegment(state, captureStart, captureEnd, true);
|
|
14632
|
+
writeFoldedLines(state, skipSeparationSpace(state, false, nodeIndent));
|
|
14633
|
+
captureStart = captureEnd = state.position;
|
|
14634
|
+
} else if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
14635
|
+
throwError(state, "unexpected end of the document within a double quoted scalar");
|
|
14636
|
+
} else {
|
|
14637
|
+
state.position++;
|
|
14638
|
+
captureEnd = state.position;
|
|
14639
|
+
}
|
|
14640
|
+
}
|
|
14641
|
+
throwError(state, "unexpected end of the stream within a double quoted scalar");
|
|
14642
|
+
}
|
|
14643
|
+
function readFlowCollection(state, nodeIndent) {
|
|
14644
|
+
var readNext = true, _line, _lineStart, _pos, _tag = state.tag, _result, _anchor = state.anchor, following, terminator, isPair, isExplicitPair, isMapping, overridableKeys = /* @__PURE__ */ Object.create(null), keyNode, keyTag, valueNode, ch;
|
|
14645
|
+
ch = state.input.charCodeAt(state.position);
|
|
14646
|
+
if (ch === 91) {
|
|
14647
|
+
terminator = 93;
|
|
14648
|
+
isMapping = false;
|
|
14649
|
+
_result = [];
|
|
14650
|
+
} else if (ch === 123) {
|
|
14651
|
+
terminator = 125;
|
|
14652
|
+
isMapping = true;
|
|
14653
|
+
_result = {};
|
|
14654
|
+
} else {
|
|
14655
|
+
return false;
|
|
14656
|
+
}
|
|
14657
|
+
if (state.anchor !== null) {
|
|
14658
|
+
state.anchorMap[state.anchor] = _result;
|
|
14659
|
+
}
|
|
14660
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14661
|
+
while (ch !== 0) {
|
|
14662
|
+
skipSeparationSpace(state, true, nodeIndent);
|
|
14663
|
+
ch = state.input.charCodeAt(state.position);
|
|
14664
|
+
if (ch === terminator) {
|
|
14665
|
+
state.position++;
|
|
14666
|
+
state.tag = _tag;
|
|
14667
|
+
state.anchor = _anchor;
|
|
14668
|
+
state.kind = isMapping ? "mapping" : "sequence";
|
|
14669
|
+
state.result = _result;
|
|
14670
|
+
return true;
|
|
14671
|
+
} else if (!readNext) {
|
|
14672
|
+
throwError(state, "missed comma between flow collection entries");
|
|
14673
|
+
} else if (ch === 44) {
|
|
14674
|
+
throwError(state, "expected the node content, but found ','");
|
|
14675
|
+
}
|
|
14676
|
+
keyTag = keyNode = valueNode = null;
|
|
14677
|
+
isPair = isExplicitPair = false;
|
|
14678
|
+
if (ch === 63) {
|
|
14679
|
+
following = state.input.charCodeAt(state.position + 1);
|
|
14680
|
+
if (is_WS_OR_EOL(following)) {
|
|
14681
|
+
isPair = isExplicitPair = true;
|
|
14682
|
+
state.position++;
|
|
14683
|
+
skipSeparationSpace(state, true, nodeIndent);
|
|
14684
|
+
}
|
|
14685
|
+
}
|
|
14686
|
+
_line = state.line;
|
|
14687
|
+
_lineStart = state.lineStart;
|
|
14688
|
+
_pos = state.position;
|
|
14689
|
+
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
|
|
14690
|
+
keyTag = state.tag;
|
|
14691
|
+
keyNode = state.result;
|
|
14692
|
+
skipSeparationSpace(state, true, nodeIndent);
|
|
14693
|
+
ch = state.input.charCodeAt(state.position);
|
|
14694
|
+
if ((isExplicitPair || state.line === _line) && ch === 58) {
|
|
14695
|
+
isPair = true;
|
|
14696
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14697
|
+
skipSeparationSpace(state, true, nodeIndent);
|
|
14698
|
+
composeNode(state, nodeIndent, CONTEXT_FLOW_IN, false, true);
|
|
14699
|
+
valueNode = state.result;
|
|
14700
|
+
}
|
|
14701
|
+
if (isMapping) {
|
|
14702
|
+
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos);
|
|
14703
|
+
} else if (isPair) {
|
|
14704
|
+
_result.push(storeMappingPair(state, null, overridableKeys, keyTag, keyNode, valueNode, _line, _lineStart, _pos));
|
|
14705
|
+
} else {
|
|
14706
|
+
_result.push(keyNode);
|
|
14707
|
+
}
|
|
14708
|
+
skipSeparationSpace(state, true, nodeIndent);
|
|
14709
|
+
ch = state.input.charCodeAt(state.position);
|
|
14710
|
+
if (ch === 44) {
|
|
14711
|
+
readNext = true;
|
|
14712
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14713
|
+
} else {
|
|
14714
|
+
readNext = false;
|
|
14715
|
+
}
|
|
14716
|
+
}
|
|
14717
|
+
throwError(state, "unexpected end of the stream within a flow collection");
|
|
14718
|
+
}
|
|
14719
|
+
function readBlockScalar(state, nodeIndent) {
|
|
14720
|
+
var captureStart, folding, chomping = CHOMPING_CLIP, didReadContent = false, detectedIndent = false, textIndent = nodeIndent, emptyLines = 0, atMoreIndented = false, tmp, ch;
|
|
14721
|
+
ch = state.input.charCodeAt(state.position);
|
|
14722
|
+
if (ch === 124) {
|
|
14723
|
+
folding = false;
|
|
14724
|
+
} else if (ch === 62) {
|
|
14725
|
+
folding = true;
|
|
14726
|
+
} else {
|
|
14727
|
+
return false;
|
|
14728
|
+
}
|
|
14729
|
+
state.kind = "scalar";
|
|
14730
|
+
state.result = "";
|
|
14731
|
+
while (ch !== 0) {
|
|
14732
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14733
|
+
if (ch === 43 || ch === 45) {
|
|
14734
|
+
if (CHOMPING_CLIP === chomping) {
|
|
14735
|
+
chomping = ch === 43 ? CHOMPING_KEEP : CHOMPING_STRIP;
|
|
14736
|
+
} else {
|
|
14737
|
+
throwError(state, "repeat of a chomping mode identifier");
|
|
14738
|
+
}
|
|
14739
|
+
} else if ((tmp = fromDecimalCode(ch)) >= 0) {
|
|
14740
|
+
if (tmp === 0) {
|
|
14741
|
+
throwError(state, "bad explicit indentation width of a block scalar; it cannot be less than one");
|
|
14742
|
+
} else if (!detectedIndent) {
|
|
14743
|
+
textIndent = nodeIndent + tmp - 1;
|
|
14744
|
+
detectedIndent = true;
|
|
14745
|
+
} else {
|
|
14746
|
+
throwError(state, "repeat of an indentation width identifier");
|
|
14747
|
+
}
|
|
14748
|
+
} else {
|
|
14749
|
+
break;
|
|
14750
|
+
}
|
|
14751
|
+
}
|
|
14752
|
+
if (is_WHITE_SPACE(ch)) {
|
|
14753
|
+
do {
|
|
14754
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14755
|
+
} while (is_WHITE_SPACE(ch));
|
|
14756
|
+
if (ch === 35) {
|
|
14757
|
+
do {
|
|
14758
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14759
|
+
} while (!is_EOL(ch) && ch !== 0);
|
|
14760
|
+
}
|
|
14761
|
+
}
|
|
14762
|
+
while (ch !== 0) {
|
|
14763
|
+
readLineBreak(state);
|
|
14764
|
+
state.lineIndent = 0;
|
|
14765
|
+
ch = state.input.charCodeAt(state.position);
|
|
14766
|
+
while ((!detectedIndent || state.lineIndent < textIndent) && ch === 32) {
|
|
14767
|
+
state.lineIndent++;
|
|
14768
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14769
|
+
}
|
|
14770
|
+
if (!detectedIndent && state.lineIndent > textIndent) {
|
|
14771
|
+
textIndent = state.lineIndent;
|
|
14772
|
+
}
|
|
14773
|
+
if (is_EOL(ch)) {
|
|
14774
|
+
emptyLines++;
|
|
14775
|
+
continue;
|
|
14776
|
+
}
|
|
14777
|
+
if (state.lineIndent < textIndent) {
|
|
14778
|
+
if (chomping === CHOMPING_KEEP) {
|
|
14779
|
+
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
14780
|
+
} else if (chomping === CHOMPING_CLIP) {
|
|
14781
|
+
if (didReadContent) {
|
|
14782
|
+
state.result += "\n";
|
|
14783
|
+
}
|
|
14784
|
+
}
|
|
14785
|
+
break;
|
|
14786
|
+
}
|
|
14787
|
+
if (folding) {
|
|
14788
|
+
if (is_WHITE_SPACE(ch)) {
|
|
14789
|
+
atMoreIndented = true;
|
|
14790
|
+
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
14791
|
+
} else if (atMoreIndented) {
|
|
14792
|
+
atMoreIndented = false;
|
|
14793
|
+
state.result += common.repeat("\n", emptyLines + 1);
|
|
14794
|
+
} else if (emptyLines === 0) {
|
|
14795
|
+
if (didReadContent) {
|
|
14796
|
+
state.result += " ";
|
|
14797
|
+
}
|
|
14798
|
+
} else {
|
|
14799
|
+
state.result += common.repeat("\n", emptyLines);
|
|
14800
|
+
}
|
|
14801
|
+
} else {
|
|
14802
|
+
state.result += common.repeat("\n", didReadContent ? 1 + emptyLines : emptyLines);
|
|
14803
|
+
}
|
|
14804
|
+
didReadContent = true;
|
|
14805
|
+
detectedIndent = true;
|
|
14806
|
+
emptyLines = 0;
|
|
14807
|
+
captureStart = state.position;
|
|
14808
|
+
while (!is_EOL(ch) && ch !== 0) {
|
|
14809
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14810
|
+
}
|
|
14811
|
+
captureSegment(state, captureStart, state.position, false);
|
|
14812
|
+
}
|
|
14813
|
+
return true;
|
|
14814
|
+
}
|
|
14815
|
+
function readBlockSequence(state, nodeIndent) {
|
|
14816
|
+
var _line, _tag = state.tag, _anchor = state.anchor, _result = [], following, detected = false, ch;
|
|
14817
|
+
if (state.firstTabInLine !== -1)
|
|
14818
|
+
return false;
|
|
14819
|
+
if (state.anchor !== null) {
|
|
14820
|
+
state.anchorMap[state.anchor] = _result;
|
|
14821
|
+
}
|
|
14822
|
+
ch = state.input.charCodeAt(state.position);
|
|
14823
|
+
while (ch !== 0) {
|
|
14824
|
+
if (state.firstTabInLine !== -1) {
|
|
14825
|
+
state.position = state.firstTabInLine;
|
|
14826
|
+
throwError(state, "tab characters must not be used in indentation");
|
|
14827
|
+
}
|
|
14828
|
+
if (ch !== 45) {
|
|
14829
|
+
break;
|
|
14830
|
+
}
|
|
14831
|
+
following = state.input.charCodeAt(state.position + 1);
|
|
14832
|
+
if (!is_WS_OR_EOL(following)) {
|
|
14833
|
+
break;
|
|
14834
|
+
}
|
|
14835
|
+
detected = true;
|
|
14836
|
+
state.position++;
|
|
14837
|
+
if (skipSeparationSpace(state, true, -1)) {
|
|
14838
|
+
if (state.lineIndent <= nodeIndent) {
|
|
14839
|
+
_result.push(null);
|
|
14840
|
+
ch = state.input.charCodeAt(state.position);
|
|
14841
|
+
continue;
|
|
14842
|
+
}
|
|
14843
|
+
}
|
|
14844
|
+
_line = state.line;
|
|
14845
|
+
composeNode(state, nodeIndent, CONTEXT_BLOCK_IN, false, true);
|
|
14846
|
+
_result.push(state.result);
|
|
14847
|
+
skipSeparationSpace(state, true, -1);
|
|
14848
|
+
ch = state.input.charCodeAt(state.position);
|
|
14849
|
+
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
|
|
14850
|
+
throwError(state, "bad indentation of a sequence entry");
|
|
14851
|
+
} else if (state.lineIndent < nodeIndent) {
|
|
14852
|
+
break;
|
|
14853
|
+
}
|
|
14854
|
+
}
|
|
14855
|
+
if (detected) {
|
|
14856
|
+
state.tag = _tag;
|
|
14857
|
+
state.anchor = _anchor;
|
|
14858
|
+
state.kind = "sequence";
|
|
14859
|
+
state.result = _result;
|
|
14860
|
+
return true;
|
|
14861
|
+
}
|
|
14862
|
+
return false;
|
|
14863
|
+
}
|
|
14864
|
+
function readBlockMapping(state, nodeIndent, flowIndent) {
|
|
14865
|
+
var following, allowCompact, _line, _keyLine, _keyLineStart, _keyPos, _tag = state.tag, _anchor = state.anchor, _result = {}, overridableKeys = /* @__PURE__ */ Object.create(null), keyTag = null, keyNode = null, valueNode = null, atExplicitKey = false, detected = false, ch;
|
|
14866
|
+
if (state.firstTabInLine !== -1)
|
|
14867
|
+
return false;
|
|
14868
|
+
if (state.anchor !== null) {
|
|
14869
|
+
state.anchorMap[state.anchor] = _result;
|
|
14870
|
+
}
|
|
14871
|
+
ch = state.input.charCodeAt(state.position);
|
|
14872
|
+
while (ch !== 0) {
|
|
14873
|
+
if (!atExplicitKey && state.firstTabInLine !== -1) {
|
|
14874
|
+
state.position = state.firstTabInLine;
|
|
14875
|
+
throwError(state, "tab characters must not be used in indentation");
|
|
14876
|
+
}
|
|
14877
|
+
following = state.input.charCodeAt(state.position + 1);
|
|
14878
|
+
_line = state.line;
|
|
14879
|
+
if ((ch === 63 || ch === 58) && is_WS_OR_EOL(following)) {
|
|
14880
|
+
if (ch === 63) {
|
|
14881
|
+
if (atExplicitKey) {
|
|
14882
|
+
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
14883
|
+
keyTag = keyNode = valueNode = null;
|
|
14884
|
+
}
|
|
14885
|
+
detected = true;
|
|
14886
|
+
atExplicitKey = true;
|
|
14887
|
+
allowCompact = true;
|
|
14888
|
+
} else if (atExplicitKey) {
|
|
14889
|
+
atExplicitKey = false;
|
|
14890
|
+
allowCompact = true;
|
|
14891
|
+
} else {
|
|
14892
|
+
throwError(state, "incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line");
|
|
14893
|
+
}
|
|
14894
|
+
state.position += 1;
|
|
14895
|
+
ch = following;
|
|
14896
|
+
} else {
|
|
14897
|
+
_keyLine = state.line;
|
|
14898
|
+
_keyLineStart = state.lineStart;
|
|
14899
|
+
_keyPos = state.position;
|
|
14900
|
+
if (!composeNode(state, flowIndent, CONTEXT_FLOW_OUT, false, true)) {
|
|
14901
|
+
break;
|
|
14902
|
+
}
|
|
14903
|
+
if (state.line === _line) {
|
|
14904
|
+
ch = state.input.charCodeAt(state.position);
|
|
14905
|
+
while (is_WHITE_SPACE(ch)) {
|
|
14906
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14907
|
+
}
|
|
14908
|
+
if (ch === 58) {
|
|
14909
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14910
|
+
if (!is_WS_OR_EOL(ch)) {
|
|
14911
|
+
throwError(state, "a whitespace character is expected after the key-value separator within a block mapping");
|
|
14912
|
+
}
|
|
14913
|
+
if (atExplicitKey) {
|
|
14914
|
+
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
14915
|
+
keyTag = keyNode = valueNode = null;
|
|
14916
|
+
}
|
|
14917
|
+
detected = true;
|
|
14918
|
+
atExplicitKey = false;
|
|
14919
|
+
allowCompact = false;
|
|
14920
|
+
keyTag = state.tag;
|
|
14921
|
+
keyNode = state.result;
|
|
14922
|
+
} else if (detected) {
|
|
14923
|
+
throwError(state, "can not read an implicit mapping pair; a colon is missed");
|
|
14924
|
+
} else {
|
|
14925
|
+
state.tag = _tag;
|
|
14926
|
+
state.anchor = _anchor;
|
|
14927
|
+
return true;
|
|
14928
|
+
}
|
|
14929
|
+
} else if (detected) {
|
|
14930
|
+
throwError(state, "can not read a block mapping entry; a multiline key may not be an implicit key");
|
|
14931
|
+
} else {
|
|
14932
|
+
state.tag = _tag;
|
|
14933
|
+
state.anchor = _anchor;
|
|
14934
|
+
return true;
|
|
14935
|
+
}
|
|
14936
|
+
}
|
|
14937
|
+
if (state.line === _line || state.lineIndent > nodeIndent) {
|
|
14938
|
+
if (atExplicitKey) {
|
|
14939
|
+
_keyLine = state.line;
|
|
14940
|
+
_keyLineStart = state.lineStart;
|
|
14941
|
+
_keyPos = state.position;
|
|
14942
|
+
}
|
|
14943
|
+
if (composeNode(state, nodeIndent, CONTEXT_BLOCK_OUT, true, allowCompact)) {
|
|
14944
|
+
if (atExplicitKey) {
|
|
14945
|
+
keyNode = state.result;
|
|
14946
|
+
} else {
|
|
14947
|
+
valueNode = state.result;
|
|
14948
|
+
}
|
|
14949
|
+
}
|
|
14950
|
+
if (!atExplicitKey) {
|
|
14951
|
+
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, valueNode, _keyLine, _keyLineStart, _keyPos);
|
|
14952
|
+
keyTag = keyNode = valueNode = null;
|
|
14953
|
+
}
|
|
14954
|
+
skipSeparationSpace(state, true, -1);
|
|
14955
|
+
ch = state.input.charCodeAt(state.position);
|
|
14956
|
+
}
|
|
14957
|
+
if ((state.line === _line || state.lineIndent > nodeIndent) && ch !== 0) {
|
|
14958
|
+
throwError(state, "bad indentation of a mapping entry");
|
|
14959
|
+
} else if (state.lineIndent < nodeIndent) {
|
|
14960
|
+
break;
|
|
14961
|
+
}
|
|
14962
|
+
}
|
|
14963
|
+
if (atExplicitKey) {
|
|
14964
|
+
storeMappingPair(state, _result, overridableKeys, keyTag, keyNode, null, _keyLine, _keyLineStart, _keyPos);
|
|
14965
|
+
}
|
|
14966
|
+
if (detected) {
|
|
14967
|
+
state.tag = _tag;
|
|
14968
|
+
state.anchor = _anchor;
|
|
14969
|
+
state.kind = "mapping";
|
|
14970
|
+
state.result = _result;
|
|
14971
|
+
}
|
|
14972
|
+
return detected;
|
|
14973
|
+
}
|
|
14974
|
+
function readTagProperty(state) {
|
|
14975
|
+
var _position, isVerbatim = false, isNamed = false, tagHandle, tagName, ch;
|
|
14976
|
+
ch = state.input.charCodeAt(state.position);
|
|
14977
|
+
if (ch !== 33)
|
|
14978
|
+
return false;
|
|
14979
|
+
if (state.tag !== null) {
|
|
14980
|
+
throwError(state, "duplication of a tag property");
|
|
14981
|
+
}
|
|
14982
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14983
|
+
if (ch === 60) {
|
|
14984
|
+
isVerbatim = true;
|
|
14985
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14986
|
+
} else if (ch === 33) {
|
|
14987
|
+
isNamed = true;
|
|
14988
|
+
tagHandle = "!!";
|
|
14989
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14990
|
+
} else {
|
|
14991
|
+
tagHandle = "!";
|
|
14992
|
+
}
|
|
14993
|
+
_position = state.position;
|
|
14994
|
+
if (isVerbatim) {
|
|
14995
|
+
do {
|
|
14996
|
+
ch = state.input.charCodeAt(++state.position);
|
|
14997
|
+
} while (ch !== 0 && ch !== 62);
|
|
14998
|
+
if (state.position < state.length) {
|
|
14999
|
+
tagName = state.input.slice(_position, state.position);
|
|
15000
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15001
|
+
} else {
|
|
15002
|
+
throwError(state, "unexpected end of the stream within a verbatim tag");
|
|
15003
|
+
}
|
|
15004
|
+
} else {
|
|
15005
|
+
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
|
15006
|
+
if (ch === 33) {
|
|
15007
|
+
if (!isNamed) {
|
|
15008
|
+
tagHandle = state.input.slice(_position - 1, state.position + 1);
|
|
15009
|
+
if (!PATTERN_TAG_HANDLE.test(tagHandle)) {
|
|
15010
|
+
throwError(state, "named tag handle cannot contain such characters");
|
|
15011
|
+
}
|
|
15012
|
+
isNamed = true;
|
|
15013
|
+
_position = state.position + 1;
|
|
15014
|
+
} else {
|
|
15015
|
+
throwError(state, "tag suffix cannot contain exclamation marks");
|
|
15016
|
+
}
|
|
15017
|
+
}
|
|
15018
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15019
|
+
}
|
|
15020
|
+
tagName = state.input.slice(_position, state.position);
|
|
15021
|
+
if (PATTERN_FLOW_INDICATORS.test(tagName)) {
|
|
15022
|
+
throwError(state, "tag suffix cannot contain flow indicator characters");
|
|
15023
|
+
}
|
|
15024
|
+
}
|
|
15025
|
+
if (tagName && !PATTERN_TAG_URI.test(tagName)) {
|
|
15026
|
+
throwError(state, "tag name cannot contain such characters: " + tagName);
|
|
15027
|
+
}
|
|
15028
|
+
try {
|
|
15029
|
+
tagName = decodeURIComponent(tagName);
|
|
15030
|
+
} catch (err) {
|
|
15031
|
+
throwError(state, "tag name is malformed: " + tagName);
|
|
15032
|
+
}
|
|
15033
|
+
if (isVerbatim) {
|
|
15034
|
+
state.tag = tagName;
|
|
15035
|
+
} else if (_hasOwnProperty.call(state.tagMap, tagHandle)) {
|
|
15036
|
+
state.tag = state.tagMap[tagHandle] + tagName;
|
|
15037
|
+
} else if (tagHandle === "!") {
|
|
15038
|
+
state.tag = "!" + tagName;
|
|
15039
|
+
} else if (tagHandle === "!!") {
|
|
15040
|
+
state.tag = "tag:yaml.org,2002:" + tagName;
|
|
15041
|
+
} else {
|
|
15042
|
+
throwError(state, 'undeclared tag handle "' + tagHandle + '"');
|
|
15043
|
+
}
|
|
15044
|
+
return true;
|
|
15045
|
+
}
|
|
15046
|
+
function readAnchorProperty(state) {
|
|
15047
|
+
var _position, ch;
|
|
15048
|
+
ch = state.input.charCodeAt(state.position);
|
|
15049
|
+
if (ch !== 38)
|
|
15050
|
+
return false;
|
|
15051
|
+
if (state.anchor !== null) {
|
|
15052
|
+
throwError(state, "duplication of an anchor property");
|
|
15053
|
+
}
|
|
15054
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15055
|
+
_position = state.position;
|
|
15056
|
+
while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
|
|
15057
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15058
|
+
}
|
|
15059
|
+
if (state.position === _position) {
|
|
15060
|
+
throwError(state, "name of an anchor node must contain at least one character");
|
|
15061
|
+
}
|
|
15062
|
+
state.anchor = state.input.slice(_position, state.position);
|
|
15063
|
+
return true;
|
|
15064
|
+
}
|
|
15065
|
+
function readAlias(state) {
|
|
15066
|
+
var _position, alias, ch;
|
|
15067
|
+
ch = state.input.charCodeAt(state.position);
|
|
15068
|
+
if (ch !== 42)
|
|
15069
|
+
return false;
|
|
15070
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15071
|
+
_position = state.position;
|
|
15072
|
+
while (ch !== 0 && !is_WS_OR_EOL(ch) && !is_FLOW_INDICATOR(ch)) {
|
|
15073
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15074
|
+
}
|
|
15075
|
+
if (state.position === _position) {
|
|
15076
|
+
throwError(state, "name of an alias node must contain at least one character");
|
|
15077
|
+
}
|
|
15078
|
+
alias = state.input.slice(_position, state.position);
|
|
15079
|
+
if (!_hasOwnProperty.call(state.anchorMap, alias)) {
|
|
15080
|
+
throwError(state, 'unidentified alias "' + alias + '"');
|
|
15081
|
+
}
|
|
15082
|
+
state.result = state.anchorMap[alias];
|
|
15083
|
+
skipSeparationSpace(state, true, -1);
|
|
15084
|
+
return true;
|
|
15085
|
+
}
|
|
15086
|
+
function composeNode(state, parentIndent, nodeContext, allowToSeek, allowCompact) {
|
|
15087
|
+
var allowBlockStyles, allowBlockScalars, allowBlockCollections, indentStatus = 1, atNewLine = false, hasContent = false, typeIndex, typeQuantity, typeList, type, flowIndent, blockIndent;
|
|
15088
|
+
if (state.listener !== null) {
|
|
15089
|
+
state.listener("open", state);
|
|
15090
|
+
}
|
|
15091
|
+
state.tag = null;
|
|
15092
|
+
state.anchor = null;
|
|
15093
|
+
state.kind = null;
|
|
15094
|
+
state.result = null;
|
|
15095
|
+
allowBlockStyles = allowBlockScalars = allowBlockCollections = CONTEXT_BLOCK_OUT === nodeContext || CONTEXT_BLOCK_IN === nodeContext;
|
|
15096
|
+
if (allowToSeek) {
|
|
15097
|
+
if (skipSeparationSpace(state, true, -1)) {
|
|
15098
|
+
atNewLine = true;
|
|
15099
|
+
if (state.lineIndent > parentIndent) {
|
|
15100
|
+
indentStatus = 1;
|
|
15101
|
+
} else if (state.lineIndent === parentIndent) {
|
|
15102
|
+
indentStatus = 0;
|
|
15103
|
+
} else if (state.lineIndent < parentIndent) {
|
|
15104
|
+
indentStatus = -1;
|
|
15105
|
+
}
|
|
15106
|
+
}
|
|
15107
|
+
}
|
|
15108
|
+
if (indentStatus === 1) {
|
|
15109
|
+
while (readTagProperty(state) || readAnchorProperty(state)) {
|
|
15110
|
+
if (skipSeparationSpace(state, true, -1)) {
|
|
15111
|
+
atNewLine = true;
|
|
15112
|
+
allowBlockCollections = allowBlockStyles;
|
|
15113
|
+
if (state.lineIndent > parentIndent) {
|
|
15114
|
+
indentStatus = 1;
|
|
15115
|
+
} else if (state.lineIndent === parentIndent) {
|
|
15116
|
+
indentStatus = 0;
|
|
15117
|
+
} else if (state.lineIndent < parentIndent) {
|
|
15118
|
+
indentStatus = -1;
|
|
15119
|
+
}
|
|
15120
|
+
} else {
|
|
15121
|
+
allowBlockCollections = false;
|
|
15122
|
+
}
|
|
15123
|
+
}
|
|
15124
|
+
}
|
|
15125
|
+
if (allowBlockCollections) {
|
|
15126
|
+
allowBlockCollections = atNewLine || allowCompact;
|
|
15127
|
+
}
|
|
15128
|
+
if (indentStatus === 1 || CONTEXT_BLOCK_OUT === nodeContext) {
|
|
15129
|
+
if (CONTEXT_FLOW_IN === nodeContext || CONTEXT_FLOW_OUT === nodeContext) {
|
|
15130
|
+
flowIndent = parentIndent;
|
|
15131
|
+
} else {
|
|
15132
|
+
flowIndent = parentIndent + 1;
|
|
15133
|
+
}
|
|
15134
|
+
blockIndent = state.position - state.lineStart;
|
|
15135
|
+
if (indentStatus === 1) {
|
|
15136
|
+
if (allowBlockCollections && (readBlockSequence(state, blockIndent) || readBlockMapping(state, blockIndent, flowIndent)) || readFlowCollection(state, flowIndent)) {
|
|
15137
|
+
hasContent = true;
|
|
15138
|
+
} else {
|
|
15139
|
+
if (allowBlockScalars && readBlockScalar(state, flowIndent) || readSingleQuotedScalar(state, flowIndent) || readDoubleQuotedScalar(state, flowIndent)) {
|
|
15140
|
+
hasContent = true;
|
|
15141
|
+
} else if (readAlias(state)) {
|
|
15142
|
+
hasContent = true;
|
|
15143
|
+
if (state.tag !== null || state.anchor !== null) {
|
|
15144
|
+
throwError(state, "alias node should not have any properties");
|
|
15145
|
+
}
|
|
15146
|
+
} else if (readPlainScalar(state, flowIndent, CONTEXT_FLOW_IN === nodeContext)) {
|
|
15147
|
+
hasContent = true;
|
|
15148
|
+
if (state.tag === null) {
|
|
15149
|
+
state.tag = "?";
|
|
15150
|
+
}
|
|
15151
|
+
}
|
|
15152
|
+
if (state.anchor !== null) {
|
|
15153
|
+
state.anchorMap[state.anchor] = state.result;
|
|
15154
|
+
}
|
|
15155
|
+
}
|
|
15156
|
+
} else if (indentStatus === 0) {
|
|
15157
|
+
hasContent = allowBlockCollections && readBlockSequence(state, blockIndent);
|
|
15158
|
+
}
|
|
15159
|
+
}
|
|
15160
|
+
if (state.tag === null) {
|
|
15161
|
+
if (state.anchor !== null) {
|
|
15162
|
+
state.anchorMap[state.anchor] = state.result;
|
|
15163
|
+
}
|
|
15164
|
+
} else if (state.tag === "?") {
|
|
15165
|
+
if (state.result !== null && state.kind !== "scalar") {
|
|
15166
|
+
throwError(state, 'unacceptable node kind for !<?> tag; it should be "scalar", not "' + state.kind + '"');
|
|
15167
|
+
}
|
|
15168
|
+
for (typeIndex = 0, typeQuantity = state.implicitTypes.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
15169
|
+
type = state.implicitTypes[typeIndex];
|
|
15170
|
+
if (type.resolve(state.result)) {
|
|
15171
|
+
state.result = type.construct(state.result);
|
|
15172
|
+
state.tag = type.tag;
|
|
15173
|
+
if (state.anchor !== null) {
|
|
15174
|
+
state.anchorMap[state.anchor] = state.result;
|
|
15175
|
+
}
|
|
15176
|
+
break;
|
|
15177
|
+
}
|
|
15178
|
+
}
|
|
15179
|
+
} else if (state.tag !== "!") {
|
|
15180
|
+
if (_hasOwnProperty.call(state.typeMap[state.kind || "fallback"], state.tag)) {
|
|
15181
|
+
type = state.typeMap[state.kind || "fallback"][state.tag];
|
|
15182
|
+
} else {
|
|
15183
|
+
type = null;
|
|
15184
|
+
typeList = state.typeMap.multi[state.kind || "fallback"];
|
|
15185
|
+
for (typeIndex = 0, typeQuantity = typeList.length; typeIndex < typeQuantity; typeIndex += 1) {
|
|
15186
|
+
if (state.tag.slice(0, typeList[typeIndex].tag.length) === typeList[typeIndex].tag) {
|
|
15187
|
+
type = typeList[typeIndex];
|
|
15188
|
+
break;
|
|
15189
|
+
}
|
|
15190
|
+
}
|
|
15191
|
+
}
|
|
15192
|
+
if (!type) {
|
|
15193
|
+
throwError(state, "unknown tag !<" + state.tag + ">");
|
|
15194
|
+
}
|
|
15195
|
+
if (state.result !== null && type.kind !== state.kind) {
|
|
15196
|
+
throwError(state, "unacceptable node kind for !<" + state.tag + '> tag; it should be "' + type.kind + '", not "' + state.kind + '"');
|
|
15197
|
+
}
|
|
15198
|
+
if (!type.resolve(state.result, state.tag)) {
|
|
15199
|
+
throwError(state, "cannot resolve a node with !<" + state.tag + "> explicit tag");
|
|
15200
|
+
} else {
|
|
15201
|
+
state.result = type.construct(state.result, state.tag);
|
|
15202
|
+
if (state.anchor !== null) {
|
|
15203
|
+
state.anchorMap[state.anchor] = state.result;
|
|
15204
|
+
}
|
|
15205
|
+
}
|
|
15206
|
+
}
|
|
15207
|
+
if (state.listener !== null) {
|
|
15208
|
+
state.listener("close", state);
|
|
15209
|
+
}
|
|
15210
|
+
return state.tag !== null || state.anchor !== null || hasContent;
|
|
15211
|
+
}
|
|
15212
|
+
function readDocument(state) {
|
|
15213
|
+
var documentStart = state.position, _position, directiveName, directiveArgs, hasDirectives = false, ch;
|
|
15214
|
+
state.version = null;
|
|
15215
|
+
state.checkLineBreaks = state.legacy;
|
|
15216
|
+
state.tagMap = /* @__PURE__ */ Object.create(null);
|
|
15217
|
+
state.anchorMap = /* @__PURE__ */ Object.create(null);
|
|
15218
|
+
while ((ch = state.input.charCodeAt(state.position)) !== 0) {
|
|
15219
|
+
skipSeparationSpace(state, true, -1);
|
|
15220
|
+
ch = state.input.charCodeAt(state.position);
|
|
15221
|
+
if (state.lineIndent > 0 || ch !== 37) {
|
|
15222
|
+
break;
|
|
15223
|
+
}
|
|
15224
|
+
hasDirectives = true;
|
|
15225
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15226
|
+
_position = state.position;
|
|
15227
|
+
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
|
15228
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15229
|
+
}
|
|
15230
|
+
directiveName = state.input.slice(_position, state.position);
|
|
15231
|
+
directiveArgs = [];
|
|
15232
|
+
if (directiveName.length < 1) {
|
|
15233
|
+
throwError(state, "directive name must not be less than one character in length");
|
|
15234
|
+
}
|
|
15235
|
+
while (ch !== 0) {
|
|
15236
|
+
while (is_WHITE_SPACE(ch)) {
|
|
15237
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15238
|
+
}
|
|
15239
|
+
if (ch === 35) {
|
|
15240
|
+
do {
|
|
15241
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15242
|
+
} while (ch !== 0 && !is_EOL(ch));
|
|
15243
|
+
break;
|
|
15244
|
+
}
|
|
15245
|
+
if (is_EOL(ch))
|
|
15246
|
+
break;
|
|
15247
|
+
_position = state.position;
|
|
15248
|
+
while (ch !== 0 && !is_WS_OR_EOL(ch)) {
|
|
15249
|
+
ch = state.input.charCodeAt(++state.position);
|
|
15250
|
+
}
|
|
15251
|
+
directiveArgs.push(state.input.slice(_position, state.position));
|
|
15252
|
+
}
|
|
15253
|
+
if (ch !== 0)
|
|
15254
|
+
readLineBreak(state);
|
|
15255
|
+
if (_hasOwnProperty.call(directiveHandlers, directiveName)) {
|
|
15256
|
+
directiveHandlers[directiveName](state, directiveName, directiveArgs);
|
|
15257
|
+
} else {
|
|
15258
|
+
throwWarning(state, 'unknown document directive "' + directiveName + '"');
|
|
15259
|
+
}
|
|
15260
|
+
}
|
|
15261
|
+
skipSeparationSpace(state, true, -1);
|
|
15262
|
+
if (state.lineIndent === 0 && state.input.charCodeAt(state.position) === 45 && state.input.charCodeAt(state.position + 1) === 45 && state.input.charCodeAt(state.position + 2) === 45) {
|
|
15263
|
+
state.position += 3;
|
|
15264
|
+
skipSeparationSpace(state, true, -1);
|
|
15265
|
+
} else if (hasDirectives) {
|
|
15266
|
+
throwError(state, "directives end mark is expected");
|
|
15267
|
+
}
|
|
15268
|
+
composeNode(state, state.lineIndent - 1, CONTEXT_BLOCK_OUT, false, true);
|
|
15269
|
+
skipSeparationSpace(state, true, -1);
|
|
15270
|
+
if (state.checkLineBreaks && PATTERN_NON_ASCII_LINE_BREAKS.test(state.input.slice(documentStart, state.position))) {
|
|
15271
|
+
throwWarning(state, "non-ASCII line breaks are interpreted as content");
|
|
15272
|
+
}
|
|
15273
|
+
state.documents.push(state.result);
|
|
15274
|
+
if (state.position === state.lineStart && testDocumentSeparator(state)) {
|
|
15275
|
+
if (state.input.charCodeAt(state.position) === 46) {
|
|
15276
|
+
state.position += 3;
|
|
15277
|
+
skipSeparationSpace(state, true, -1);
|
|
15278
|
+
}
|
|
15279
|
+
return;
|
|
15280
|
+
}
|
|
15281
|
+
if (state.position < state.length - 1) {
|
|
15282
|
+
throwError(state, "end of the stream or a document separator is expected");
|
|
15283
|
+
} else {
|
|
15284
|
+
return;
|
|
15285
|
+
}
|
|
15286
|
+
}
|
|
15287
|
+
function loadDocuments(input, options8) {
|
|
15288
|
+
input = String(input);
|
|
15289
|
+
options8 = options8 || {};
|
|
15290
|
+
if (input.length !== 0) {
|
|
15291
|
+
if (input.charCodeAt(input.length - 1) !== 10 && input.charCodeAt(input.length - 1) !== 13) {
|
|
15292
|
+
input += "\n";
|
|
15293
|
+
}
|
|
15294
|
+
if (input.charCodeAt(0) === 65279) {
|
|
15295
|
+
input = input.slice(1);
|
|
15296
|
+
}
|
|
15297
|
+
}
|
|
15298
|
+
var state = new State(input, options8);
|
|
15299
|
+
var nullpos = input.indexOf("\0");
|
|
15300
|
+
if (nullpos !== -1) {
|
|
15301
|
+
state.position = nullpos;
|
|
15302
|
+
throwError(state, "null byte is not allowed in input");
|
|
15303
|
+
}
|
|
15304
|
+
state.input += "\0";
|
|
15305
|
+
while (state.input.charCodeAt(state.position) === 32) {
|
|
15306
|
+
state.lineIndent += 1;
|
|
15307
|
+
state.position += 1;
|
|
15308
|
+
}
|
|
15309
|
+
while (state.position < state.length - 1) {
|
|
15310
|
+
readDocument(state);
|
|
15311
|
+
}
|
|
15312
|
+
return state.documents;
|
|
15313
|
+
}
|
|
15314
|
+
function loadAll(input, iterator, options8) {
|
|
15315
|
+
if (iterator !== null && typeof iterator === "object" && typeof options8 === "undefined") {
|
|
15316
|
+
options8 = iterator;
|
|
15317
|
+
iterator = null;
|
|
15318
|
+
}
|
|
15319
|
+
var documents = loadDocuments(input, options8);
|
|
15320
|
+
if (typeof iterator !== "function") {
|
|
15321
|
+
return documents;
|
|
15322
|
+
}
|
|
15323
|
+
for (var index = 0, length = documents.length; index < length; index += 1) {
|
|
15324
|
+
iterator(documents[index]);
|
|
15325
|
+
}
|
|
15326
|
+
}
|
|
15327
|
+
function load(input, options8) {
|
|
15328
|
+
var documents = loadDocuments(input, options8);
|
|
15329
|
+
if (documents.length === 0) {
|
|
15330
|
+
return void 0;
|
|
15331
|
+
} else if (documents.length === 1) {
|
|
15332
|
+
return documents[0];
|
|
15333
|
+
}
|
|
15334
|
+
throw new YAMLException("expected a single document in the stream, but found more");
|
|
15335
|
+
}
|
|
15336
|
+
module.exports.loadAll = loadAll;
|
|
15337
|
+
module.exports.load = load;
|
|
15338
|
+
}
|
|
15339
|
+
});
|
|
15340
|
+
|
|
15341
|
+
// node_modules/json-parse-even-better-errors/lib/index.js
|
|
15342
|
+
var require_lib4 = __commonJS({
|
|
15343
|
+
"node_modules/json-parse-even-better-errors/lib/index.js"(exports, module) {
|
|
15344
|
+
"use strict";
|
|
15345
|
+
var hexify = (char) => {
|
|
15346
|
+
const h = char.charCodeAt(0).toString(16).toUpperCase();
|
|
15347
|
+
return "0x" + (h.length % 2 ? "0" : "") + h;
|
|
15348
|
+
};
|
|
15349
|
+
var parseError = (e, txt, context) => {
|
|
15350
|
+
if (!txt) {
|
|
15351
|
+
return {
|
|
15352
|
+
message: e.message + " while parsing empty string",
|
|
15353
|
+
position: 0
|
|
15354
|
+
};
|
|
15355
|
+
}
|
|
15356
|
+
const badToken = e.message.match(/^Unexpected token (.) .*position\s+(\d+)/i);
|
|
15357
|
+
const errIdx = badToken ? +badToken[2] : e.message.match(/^Unexpected end of JSON.*/i) ? txt.length - 1 : null;
|
|
15358
|
+
const msg = badToken ? e.message.replace(/^Unexpected token ./, `Unexpected token ${JSON.stringify(badToken[1])} (${hexify(badToken[1])})`) : e.message;
|
|
15359
|
+
if (errIdx !== null && errIdx !== void 0) {
|
|
15360
|
+
const start = errIdx <= context ? 0 : errIdx - context;
|
|
15361
|
+
const end = errIdx + context >= txt.length ? txt.length : errIdx + context;
|
|
15362
|
+
const slice = (start === 0 ? "" : "...") + txt.slice(start, end) + (end === txt.length ? "" : "...");
|
|
15363
|
+
const near = txt === slice ? "" : "near ";
|
|
15364
|
+
return {
|
|
15365
|
+
message: msg + ` while parsing ${near}${JSON.stringify(slice)}`,
|
|
15366
|
+
position: errIdx
|
|
15367
|
+
};
|
|
15368
|
+
} else {
|
|
15369
|
+
return {
|
|
15370
|
+
message: msg + ` while parsing '${txt.slice(0, context * 2)}'`,
|
|
15371
|
+
position: 0
|
|
15372
|
+
};
|
|
15373
|
+
}
|
|
15374
|
+
};
|
|
15375
|
+
var JSONParseError = class extends SyntaxError {
|
|
15376
|
+
constructor(er, txt, context, caller) {
|
|
15377
|
+
context = context || 20;
|
|
15378
|
+
const metadata = parseError(er, txt, context);
|
|
15379
|
+
super(metadata.message);
|
|
15380
|
+
Object.assign(this, metadata);
|
|
15381
|
+
this.code = "EJSONPARSE";
|
|
15382
|
+
this.systemError = er;
|
|
15383
|
+
Error.captureStackTrace(this, caller || this.constructor);
|
|
15384
|
+
}
|
|
15385
|
+
get name() {
|
|
15386
|
+
return this.constructor.name;
|
|
15387
|
+
}
|
|
15388
|
+
set name(n) {
|
|
15389
|
+
}
|
|
15390
|
+
get [Symbol.toStringTag]() {
|
|
15391
|
+
return this.constructor.name;
|
|
15392
|
+
}
|
|
15393
|
+
};
|
|
15394
|
+
var kIndent = Symbol.for("indent");
|
|
15395
|
+
var kNewline = Symbol.for("newline");
|
|
15396
|
+
var formatRE = /^\s*[{[]((?:\r?\n)+)([\s\t]*)/;
|
|
15397
|
+
var emptyRE = /^(?:\{\}|\[\])((?:\r?\n)+)?$/;
|
|
15398
|
+
var parseJson2 = (txt, reviver, context) => {
|
|
15399
|
+
const parseText = stripBOM(txt);
|
|
15400
|
+
context = context || 20;
|
|
15401
|
+
try {
|
|
15402
|
+
const [, newline = "\n", indent2 = " "] = parseText.match(emptyRE) || parseText.match(formatRE) || [null, "", ""];
|
|
15403
|
+
const result = JSON.parse(parseText, reviver);
|
|
15404
|
+
if (result && typeof result === "object") {
|
|
15405
|
+
result[kNewline] = newline;
|
|
15406
|
+
result[kIndent] = indent2;
|
|
15407
|
+
}
|
|
15408
|
+
return result;
|
|
15409
|
+
} catch (e) {
|
|
15410
|
+
if (typeof txt !== "string" && !Buffer.isBuffer(txt)) {
|
|
15411
|
+
const isEmptyArray = Array.isArray(txt) && txt.length === 0;
|
|
15412
|
+
throw Object.assign(new TypeError(
|
|
15413
|
+
`Cannot parse ${isEmptyArray ? "an empty array" : String(txt)}`
|
|
15414
|
+
), {
|
|
15415
|
+
code: "EJSONPARSE",
|
|
15416
|
+
systemError: e
|
|
15417
|
+
});
|
|
15418
|
+
}
|
|
15419
|
+
throw new JSONParseError(e, parseText, context, parseJson2);
|
|
15420
|
+
}
|
|
15421
|
+
};
|
|
15422
|
+
var stripBOM = (txt) => String(txt).replace(/^\uFEFF/, "");
|
|
15423
|
+
module.exports = parseJson2;
|
|
15424
|
+
parseJson2.JSONParseError = JSONParseError;
|
|
15425
|
+
parseJson2.noExceptions = (txt, reviver) => {
|
|
15426
|
+
try {
|
|
15427
|
+
return JSON.parse(stripBOM(txt), reviver);
|
|
15428
|
+
} catch (e) {
|
|
15429
|
+
}
|
|
15430
|
+
};
|
|
15431
|
+
}
|
|
15432
|
+
});
|
|
15433
|
+
|
|
15434
|
+
// node_modules/ignore/index.js
|
|
15435
|
+
var require_ignore = __commonJS({
|
|
15436
|
+
"node_modules/ignore/index.js"(exports, module) {
|
|
15437
|
+
function makeArray(subject) {
|
|
15438
|
+
return Array.isArray(subject) ? subject : [subject];
|
|
15439
|
+
}
|
|
15440
|
+
var EMPTY = "";
|
|
15441
|
+
var SPACE = " ";
|
|
15442
|
+
var ESCAPE = "\\";
|
|
15443
|
+
var REGEX_TEST_BLANK_LINE = /^\s+$/;
|
|
15444
|
+
var REGEX_INVALID_TRAILING_BACKSLASH = /(?:[^\\]|^)\\$/;
|
|
15445
|
+
var REGEX_REPLACE_LEADING_EXCAPED_EXCLAMATION = /^\\!/;
|
|
15446
|
+
var REGEX_REPLACE_LEADING_EXCAPED_HASH = /^\\#/;
|
|
15447
|
+
var REGEX_SPLITALL_CRLF = /\r?\n/g;
|
|
15448
|
+
var REGEX_TEST_INVALID_PATH = /^\.*\/|^\.+$/;
|
|
15449
|
+
var SLASH = "/";
|
|
15450
|
+
var TMP_KEY_IGNORE = "node-ignore";
|
|
15451
|
+
if (typeof Symbol !== "undefined") {
|
|
15452
|
+
TMP_KEY_IGNORE = Symbol.for("node-ignore");
|
|
15453
|
+
}
|
|
15454
|
+
var KEY_IGNORE = TMP_KEY_IGNORE;
|
|
15455
|
+
var define = (object, key, value) => Object.defineProperty(object, key, { value });
|
|
15456
|
+
var REGEX_REGEXP_RANGE = /([0-z])-([0-z])/g;
|
|
15457
|
+
var RETURN_FALSE = () => false;
|
|
15458
|
+
var sanitizeRange = (range) => range.replace(
|
|
15459
|
+
REGEX_REGEXP_RANGE,
|
|
15460
|
+
(match, from, to) => from.charCodeAt(0) <= to.charCodeAt(0) ? match : EMPTY
|
|
15461
|
+
);
|
|
15462
|
+
var cleanRangeBackSlash = (slashes) => {
|
|
15463
|
+
const { length } = slashes;
|
|
15464
|
+
return slashes.slice(0, length - length % 2);
|
|
15465
|
+
};
|
|
15466
|
+
var REPLACERS = [
|
|
15467
|
+
// > Trailing spaces are ignored unless they are quoted with backslash ("\")
|
|
15468
|
+
[
|
|
15469
|
+
// (a\ ) -> (a )
|
|
15470
|
+
// (a ) -> (a)
|
|
15471
|
+
// (a \ ) -> (a )
|
|
15472
|
+
/\\?\s+$/,
|
|
15473
|
+
(match) => match.indexOf("\\") === 0 ? SPACE : EMPTY
|
|
15474
|
+
],
|
|
15475
|
+
// replace (\ ) with ' '
|
|
15476
|
+
[
|
|
15477
|
+
/\\\s/g,
|
|
15478
|
+
() => SPACE
|
|
15479
|
+
],
|
|
15480
|
+
// Escape metacharacters
|
|
15481
|
+
// which is written down by users but means special for regular expressions.
|
|
15482
|
+
// > There are 12 characters with special meanings:
|
|
15483
|
+
// > - the backslash \,
|
|
15484
|
+
// > - the caret ^,
|
|
15485
|
+
// > - the dollar sign $,
|
|
15486
|
+
// > - the period or dot .,
|
|
15487
|
+
// > - the vertical bar or pipe symbol |,
|
|
15488
|
+
// > - the question mark ?,
|
|
15489
|
+
// > - the asterisk or star *,
|
|
15490
|
+
// > - the plus sign +,
|
|
15491
|
+
// > - the opening parenthesis (,
|
|
15492
|
+
// > - the closing parenthesis ),
|
|
15493
|
+
// > - and the opening square bracket [,
|
|
15494
|
+
// > - the opening curly brace {,
|
|
15495
|
+
// > These special characters are often called "metacharacters".
|
|
15496
|
+
[
|
|
15497
|
+
/[\\$.|*+(){^]/g,
|
|
15498
|
+
(match) => `\\${match}`
|
|
15499
|
+
],
|
|
15500
|
+
[
|
|
15501
|
+
// > a question mark (?) matches a single character
|
|
15502
|
+
/(?!\\)\?/g,
|
|
15503
|
+
() => "[^/]"
|
|
15504
|
+
],
|
|
15505
|
+
// leading slash
|
|
15506
|
+
[
|
|
15507
|
+
// > A leading slash matches the beginning of the pathname.
|
|
15508
|
+
// > For example, "/*.c" matches "cat-file.c" but not "mozilla-sha1/sha1.c".
|
|
15509
|
+
// A leading slash matches the beginning of the pathname
|
|
15510
|
+
/^\//,
|
|
15511
|
+
() => "^"
|
|
15512
|
+
],
|
|
15513
|
+
// replace special metacharacter slash after the leading slash
|
|
15514
|
+
[
|
|
15515
|
+
/\//g,
|
|
15516
|
+
() => "\\/"
|
|
15517
|
+
],
|
|
15518
|
+
[
|
|
15519
|
+
// > A leading "**" followed by a slash means match in all directories.
|
|
15520
|
+
// > For example, "**/foo" matches file or directory "foo" anywhere,
|
|
15521
|
+
// > the same as pattern "foo".
|
|
15522
|
+
// > "**/foo/bar" matches file or directory "bar" anywhere that is directly
|
|
15523
|
+
// > under directory "foo".
|
|
15524
|
+
// Notice that the '*'s have been replaced as '\\*'
|
|
15525
|
+
/^\^*\\\*\\\*\\\//,
|
|
15526
|
+
// '**/foo' <-> 'foo'
|
|
15527
|
+
() => "^(?:.*\\/)?"
|
|
15528
|
+
],
|
|
15529
|
+
// starting
|
|
15530
|
+
[
|
|
15531
|
+
// there will be no leading '/'
|
|
15532
|
+
// (which has been replaced by section "leading slash")
|
|
15533
|
+
// If starts with '**', adding a '^' to the regular expression also works
|
|
15534
|
+
/^(?=[^^])/,
|
|
15535
|
+
function startingReplacer() {
|
|
15536
|
+
return !/\/(?!$)/.test(this) ? "(?:^|\\/)" : "^";
|
|
15537
|
+
}
|
|
15538
|
+
],
|
|
15539
|
+
// two globstars
|
|
15540
|
+
[
|
|
15541
|
+
// Use lookahead assertions so that we could match more than one `'/**'`
|
|
15542
|
+
/\\\/\\\*\\\*(?=\\\/|$)/g,
|
|
15543
|
+
// Zero, one or several directories
|
|
15544
|
+
// should not use '*', or it will be replaced by the next replacer
|
|
15545
|
+
// Check if it is not the last `'/**'`
|
|
15546
|
+
(_, index, str) => index + 6 < str.length ? "(?:\\/[^\\/]+)*" : "\\/.+"
|
|
15547
|
+
],
|
|
15548
|
+
// normal intermediate wildcards
|
|
15549
|
+
[
|
|
15550
|
+
// Never replace escaped '*'
|
|
15551
|
+
// ignore rule '\*' will match the path '*'
|
|
15552
|
+
// 'abc.*/' -> go
|
|
15553
|
+
// 'abc.*' -> skip this rule,
|
|
15554
|
+
// coz trailing single wildcard will be handed by [trailing wildcard]
|
|
15555
|
+
/(^|[^\\]+)(\\\*)+(?=.+)/g,
|
|
15556
|
+
// '*.js' matches '.js'
|
|
15557
|
+
// '*.js' doesn't match 'abc'
|
|
15558
|
+
(_, p1, p2) => {
|
|
15559
|
+
const unescaped = p2.replace(/\\\*/g, "[^\\/]*");
|
|
15560
|
+
return p1 + unescaped;
|
|
15561
|
+
}
|
|
15562
|
+
],
|
|
15563
|
+
[
|
|
15564
|
+
// unescape, revert step 3 except for back slash
|
|
15565
|
+
// For example, if a user escape a '\\*',
|
|
15566
|
+
// after step 3, the result will be '\\\\\\*'
|
|
15567
|
+
/\\\\\\(?=[$.|*+(){^])/g,
|
|
15568
|
+
() => ESCAPE
|
|
15569
|
+
],
|
|
15570
|
+
[
|
|
15571
|
+
// '\\\\' -> '\\'
|
|
15572
|
+
/\\\\/g,
|
|
15573
|
+
() => ESCAPE
|
|
15574
|
+
],
|
|
15575
|
+
[
|
|
15576
|
+
// > The range notation, e.g. [a-zA-Z],
|
|
15577
|
+
// > can be used to match one of the characters in a range.
|
|
15578
|
+
// `\` is escaped by step 3
|
|
15579
|
+
/(\\)?\[([^\]/]*?)(\\*)($|\])/g,
|
|
15580
|
+
(match, leadEscape, range, endEscape, close) => leadEscape === ESCAPE ? `\\[${range}${cleanRangeBackSlash(endEscape)}${close}` : close === "]" ? endEscape.length % 2 === 0 ? `[${sanitizeRange(range)}${endEscape}]` : "[]" : "[]"
|
|
15581
|
+
],
|
|
15582
|
+
// ending
|
|
15583
|
+
[
|
|
15584
|
+
// 'js' will not match 'js.'
|
|
15585
|
+
// 'ab' will not match 'abc'
|
|
15586
|
+
/(?:[^*])$/,
|
|
15587
|
+
// WTF!
|
|
15588
|
+
// https://git-scm.com/docs/gitignore
|
|
15589
|
+
// changes in [2.22.1](https://git-scm.com/docs/gitignore/2.22.1)
|
|
15590
|
+
// which re-fixes #24, #38
|
|
15591
|
+
// > If there is a separator at the end of the pattern then the pattern
|
|
15592
|
+
// > will only match directories, otherwise the pattern can match both
|
|
15593
|
+
// > files and directories.
|
|
15594
|
+
// 'js*' will not match 'a.js'
|
|
15595
|
+
// 'js/' will not match 'a.js'
|
|
15596
|
+
// 'js' will match 'a.js' and 'a.js/'
|
|
15597
|
+
(match) => /\/$/.test(match) ? `${match}$` : `${match}(?=$|\\/$)`
|
|
15598
|
+
],
|
|
15599
|
+
// trailing wildcard
|
|
15600
|
+
[
|
|
15601
|
+
/(\^|\\\/)?\\\*$/,
|
|
15602
|
+
(_, p1) => {
|
|
15603
|
+
const prefix = p1 ? `${p1}[^/]+` : "[^/]*";
|
|
15604
|
+
return `${prefix}(?=$|\\/$)`;
|
|
15605
|
+
}
|
|
15606
|
+
]
|
|
15607
|
+
];
|
|
15608
|
+
var regexCache = /* @__PURE__ */ Object.create(null);
|
|
15609
|
+
var makeRegex = (pattern, ignoreCase) => {
|
|
15610
|
+
let source = regexCache[pattern];
|
|
15611
|
+
if (!source) {
|
|
15612
|
+
source = REPLACERS.reduce(
|
|
15613
|
+
(prev, current) => prev.replace(current[0], current[1].bind(pattern)),
|
|
15614
|
+
pattern
|
|
15615
|
+
);
|
|
15616
|
+
regexCache[pattern] = source;
|
|
15617
|
+
}
|
|
15618
|
+
return ignoreCase ? new RegExp(source, "i") : new RegExp(source);
|
|
15619
|
+
};
|
|
15620
|
+
var isString = (subject) => typeof subject === "string";
|
|
15621
|
+
var checkPattern = (pattern) => pattern && isString(pattern) && !REGEX_TEST_BLANK_LINE.test(pattern) && !REGEX_INVALID_TRAILING_BACKSLASH.test(pattern) && pattern.indexOf("#") !== 0;
|
|
13268
15622
|
var splitPattern = (pattern) => pattern.split(REGEX_SPLITALL_CRLF);
|
|
13269
15623
|
var IgnoreRule = class {
|
|
13270
15624
|
constructor(origin, pattern, negative, regex) {
|
|
@@ -13391,33 +15745,33 @@ var require_ignore = __commonJS({
|
|
|
13391
15745
|
};
|
|
13392
15746
|
}
|
|
13393
15747
|
// @returns {TestResult}
|
|
13394
|
-
_test(originalPath,
|
|
15748
|
+
_test(originalPath, cache2, checkUnignored, slices) {
|
|
13395
15749
|
const path9 = originalPath && checkPath.convert(originalPath);
|
|
13396
15750
|
checkPath(
|
|
13397
15751
|
path9,
|
|
13398
15752
|
originalPath,
|
|
13399
15753
|
this._allowRelativePaths ? RETURN_FALSE : throwError
|
|
13400
15754
|
);
|
|
13401
|
-
return this._t(path9,
|
|
15755
|
+
return this._t(path9, cache2, checkUnignored, slices);
|
|
13402
15756
|
}
|
|
13403
|
-
_t(path9,
|
|
13404
|
-
if (path9 in
|
|
13405
|
-
return
|
|
15757
|
+
_t(path9, cache2, checkUnignored, slices) {
|
|
15758
|
+
if (path9 in cache2) {
|
|
15759
|
+
return cache2[path9];
|
|
13406
15760
|
}
|
|
13407
15761
|
if (!slices) {
|
|
13408
15762
|
slices = path9.split(SLASH);
|
|
13409
15763
|
}
|
|
13410
15764
|
slices.pop();
|
|
13411
15765
|
if (!slices.length) {
|
|
13412
|
-
return
|
|
15766
|
+
return cache2[path9] = this._testOne(path9, checkUnignored);
|
|
13413
15767
|
}
|
|
13414
15768
|
const parent = this._t(
|
|
13415
15769
|
slices.join(SLASH) + SLASH,
|
|
13416
|
-
|
|
15770
|
+
cache2,
|
|
13417
15771
|
checkUnignored,
|
|
13418
15772
|
slices
|
|
13419
15773
|
);
|
|
13420
|
-
return
|
|
15774
|
+
return cache2[path9] = parent.ignored ? parent : this._testOne(path9, checkUnignored);
|
|
13421
15775
|
}
|
|
13422
15776
|
ignores(path9) {
|
|
13423
15777
|
return this._test(path9, this._ignoreCache, false).ignored;
|
|
@@ -14926,30 +17280,19 @@ function normalizeEndOfLine(text) {
|
|
|
14926
17280
|
|
|
14927
17281
|
// node_modules/emoji-regex/index.mjs
|
|
14928
17282
|
var emoji_regex_default = () => {
|
|
14929
|
-
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
17283
|
+
return /[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;
|
|
14930
17284
|
};
|
|
14931
17285
|
|
|
14932
|
-
// node_modules/
|
|
14933
|
-
|
|
14934
|
-
|
|
14935
|
-
|
|
14936
|
-
|
|
14937
|
-
|
|
14938
|
-
|
|
14939
|
-
|
|
14940
|
-
|
|
14941
|
-
|
|
14942
|
-
codePoint += 65536;
|
|
14943
|
-
}
|
|
14944
|
-
if (12288 == codePoint || 65281 <= codePoint && codePoint <= 65376 || 65504 <= codePoint && codePoint <= 65510) {
|
|
14945
|
-
return "F";
|
|
14946
|
-
}
|
|
14947
|
-
if (4352 <= codePoint && codePoint <= 4447 || 4515 <= codePoint && codePoint <= 4519 || 4602 <= codePoint && codePoint <= 4607 || 9001 <= codePoint && codePoint <= 9002 || 11904 <= codePoint && codePoint <= 11929 || 11931 <= codePoint && codePoint <= 12019 || 12032 <= codePoint && codePoint <= 12245 || 12272 <= codePoint && codePoint <= 12283 || 12289 <= codePoint && codePoint <= 12350 || 12353 <= codePoint && codePoint <= 12438 || 12441 <= codePoint && codePoint <= 12543 || 12549 <= codePoint && codePoint <= 12589 || 12593 <= codePoint && codePoint <= 12686 || 12688 <= codePoint && codePoint <= 12730 || 12736 <= codePoint && codePoint <= 12771 || 12784 <= codePoint && codePoint <= 12830 || 12832 <= codePoint && codePoint <= 12871 || 12880 <= codePoint && codePoint <= 13054 || 13056 <= codePoint && codePoint <= 19903 || 19968 <= codePoint && codePoint <= 42124 || 42128 <= codePoint && codePoint <= 42182 || 43360 <= codePoint && codePoint <= 43388 || 44032 <= codePoint && codePoint <= 55203 || 55216 <= codePoint && codePoint <= 55238 || 55243 <= codePoint && codePoint <= 55291 || 63744 <= codePoint && codePoint <= 64255 || 65040 <= codePoint && codePoint <= 65049 || 65072 <= codePoint && codePoint <= 65106 || 65108 <= codePoint && codePoint <= 65126 || 65128 <= codePoint && codePoint <= 65131 || 110592 <= codePoint && codePoint <= 110593 || 127488 <= codePoint && codePoint <= 127490 || 127504 <= codePoint && codePoint <= 127546 || 127552 <= codePoint && codePoint <= 127560 || 127568 <= codePoint && codePoint <= 127569 || 131072 <= codePoint && codePoint <= 194367 || 177984 <= codePoint && codePoint <= 196605 || 196608 <= codePoint && codePoint <= 262141) {
|
|
14948
|
-
return "W";
|
|
14949
|
-
}
|
|
14950
|
-
return "N";
|
|
14951
|
-
}
|
|
14952
|
-
};
|
|
17286
|
+
// node_modules/get-east-asian-width/lookup.js
|
|
17287
|
+
function isFullWidth(x) {
|
|
17288
|
+
return x === 12288 || x >= 65281 && x <= 65376 || x >= 65504 && x <= 65510;
|
|
17289
|
+
}
|
|
17290
|
+
function isWide(x) {
|
|
17291
|
+
return x >= 4352 && x <= 4447 || x === 8986 || x === 8987 || x === 9001 || x === 9002 || x >= 9193 && x <= 9196 || x === 9200 || x === 9203 || x === 9725 || x === 9726 || x === 9748 || x === 9749 || x >= 9800 && x <= 9811 || x === 9855 || x === 9875 || x === 9889 || x === 9898 || x === 9899 || x === 9917 || x === 9918 || x === 9924 || x === 9925 || x === 9934 || x === 9940 || x === 9962 || x === 9970 || x === 9971 || x === 9973 || x === 9978 || x === 9981 || x === 9989 || x === 9994 || x === 9995 || x === 10024 || x === 10060 || x === 10062 || x >= 10067 && x <= 10069 || x === 10071 || x >= 10133 && x <= 10135 || x === 10160 || x === 10175 || x === 11035 || x === 11036 || x === 11088 || x === 11093 || x >= 11904 && x <= 11929 || x >= 11931 && x <= 12019 || x >= 12032 && x <= 12245 || x >= 12272 && x <= 12287 || x >= 12289 && x <= 12350 || x >= 12353 && x <= 12438 || x >= 12441 && x <= 12543 || x >= 12549 && x <= 12591 || x >= 12593 && x <= 12686 || x >= 12688 && x <= 12771 || x >= 12783 && x <= 12830 || x >= 12832 && x <= 12871 || x >= 12880 && x <= 19903 || x >= 19968 && x <= 42124 || x >= 42128 && x <= 42182 || x >= 43360 && x <= 43388 || x >= 44032 && x <= 55203 || x >= 63744 && x <= 64255 || x >= 65040 && x <= 65049 || x >= 65072 && x <= 65106 || x >= 65108 && x <= 65126 || x >= 65128 && x <= 65131 || x >= 94176 && x <= 94180 || x === 94192 || x === 94193 || x >= 94208 && x <= 100343 || x >= 100352 && x <= 101589 || x >= 101632 && x <= 101640 || x >= 110576 && x <= 110579 || x >= 110581 && x <= 110587 || x === 110589 || x === 110590 || x >= 110592 && x <= 110882 || x === 110898 || x >= 110928 && x <= 110930 || x === 110933 || x >= 110948 && x <= 110951 || x >= 110960 && x <= 111355 || x === 126980 || x === 127183 || x === 127374 || x >= 127377 && x <= 127386 || x >= 127488 && x <= 127490 || x >= 127504 && x <= 127547 || x >= 127552 && x <= 127560 || x === 127568 || x === 127569 || x >= 127584 && x <= 127589 || x >= 127744 && x <= 127776 || x >= 127789 && x <= 127797 || x >= 127799 && x <= 127868 || x >= 127870 && x <= 127891 || x >= 127904 && x <= 127946 || x >= 127951 && x <= 127955 || x >= 127968 && x <= 127984 || x === 127988 || x >= 127992 && x <= 128062 || x === 128064 || x >= 128066 && x <= 128252 || x >= 128255 && x <= 128317 || x >= 128331 && x <= 128334 || x >= 128336 && x <= 128359 || x === 128378 || x === 128405 || x === 128406 || x === 128420 || x >= 128507 && x <= 128591 || x >= 128640 && x <= 128709 || x === 128716 || x >= 128720 && x <= 128722 || x >= 128725 && x <= 128727 || x >= 128732 && x <= 128735 || x === 128747 || x === 128748 || x >= 128756 && x <= 128764 || x >= 128992 && x <= 129003 || x === 129008 || x >= 129292 && x <= 129338 || x >= 129340 && x <= 129349 || x >= 129351 && x <= 129535 || x >= 129648 && x <= 129660 || x >= 129664 && x <= 129672 || x >= 129680 && x <= 129725 || x >= 129727 && x <= 129733 || x >= 129742 && x <= 129755 || x >= 129760 && x <= 129768 || x >= 129776 && x <= 129784 || x >= 131072 && x <= 196605 || x >= 196608 && x <= 262141;
|
|
17292
|
+
}
|
|
17293
|
+
|
|
17294
|
+
// node_modules/get-east-asian-width/index.js
|
|
17295
|
+
var _isNarrowWidth = (codePoint) => !(isFullWidth(codePoint) || isWide(codePoint));
|
|
14953
17296
|
|
|
14954
17297
|
// src/utils/get-string-width.js
|
|
14955
17298
|
var notAsciiRegex = /[^\x20-\x7F]/;
|
|
@@ -14970,8 +17313,7 @@ function getStringWidth(text) {
|
|
|
14970
17313
|
if (codePoint >= 768 && codePoint <= 879) {
|
|
14971
17314
|
continue;
|
|
14972
17315
|
}
|
|
14973
|
-
|
|
14974
|
-
width += code === "F" || code === "W" ? 2 : 1;
|
|
17316
|
+
width += _isNarrowWidth(codePoint) ? 1 : 2;
|
|
14975
17317
|
}
|
|
14976
17318
|
return width;
|
|
14977
17319
|
}
|
|
@@ -14997,11 +17339,11 @@ function mapDoc(doc2, cb) {
|
|
|
14997
17339
|
if (mapped.has(doc3)) {
|
|
14998
17340
|
return mapped.get(doc3);
|
|
14999
17341
|
}
|
|
15000
|
-
const result =
|
|
17342
|
+
const result = process4(doc3);
|
|
15001
17343
|
mapped.set(doc3, result);
|
|
15002
17344
|
return result;
|
|
15003
17345
|
}
|
|
15004
|
-
function
|
|
17346
|
+
function process4(doc3) {
|
|
15005
17347
|
switch (get_doc_type_default(doc3)) {
|
|
15006
17348
|
case DOC_TYPE_ARRAY:
|
|
15007
17349
|
return cb(doc3.map(rec));
|
|
@@ -16305,15 +18647,12 @@ function normalizeOptionSettings(settings) {
|
|
|
16305
18647
|
// src/utils/get-interpreter.js
|
|
16306
18648
|
var import_n_readlines = __toESM(require_readlines(), 1);
|
|
16307
18649
|
import fs from "fs";
|
|
16308
|
-
function getInterpreter(
|
|
16309
|
-
if (typeof filepath !== "string") {
|
|
16310
|
-
return "";
|
|
16311
|
-
}
|
|
18650
|
+
function getInterpreter(file) {
|
|
16312
18651
|
let fd;
|
|
16313
18652
|
try {
|
|
16314
|
-
fd = fs.openSync(
|
|
18653
|
+
fd = fs.openSync(file, "r");
|
|
16315
18654
|
} catch {
|
|
16316
|
-
return
|
|
18655
|
+
return;
|
|
16317
18656
|
}
|
|
16318
18657
|
try {
|
|
16319
18658
|
const liner = new import_n_readlines.default(fd);
|
|
@@ -16326,9 +18665,6 @@ function getInterpreter(filepath) {
|
|
|
16326
18665
|
if (m2) {
|
|
16327
18666
|
return m2[1];
|
|
16328
18667
|
}
|
|
16329
|
-
return "";
|
|
16330
|
-
} catch {
|
|
16331
|
-
return "";
|
|
16332
18668
|
} finally {
|
|
16333
18669
|
try {
|
|
16334
18670
|
fs.closeSync(fd);
|
|
@@ -16339,12 +18675,12 @@ function getInterpreter(filepath) {
|
|
|
16339
18675
|
var get_interpreter_default = getInterpreter;
|
|
16340
18676
|
|
|
16341
18677
|
// src/utils/infer-parser.js
|
|
16342
|
-
var getFileBasename = (file) => file.split(/[/\\]/).pop();
|
|
16343
|
-
function
|
|
16344
|
-
if (!
|
|
18678
|
+
var getFileBasename = (file) => String(file).split(/[/\\]/).pop();
|
|
18679
|
+
function getLanguageByFileName(languages2, file) {
|
|
18680
|
+
if (!file) {
|
|
16345
18681
|
return;
|
|
16346
18682
|
}
|
|
16347
|
-
const basename = getFileBasename(
|
|
18683
|
+
const basename = getFileBasename(file).toLowerCase();
|
|
16348
18684
|
return languages2.find(
|
|
16349
18685
|
(language) => {
|
|
16350
18686
|
var _a, _b;
|
|
@@ -16380,7 +18716,7 @@ function inferParser(options8, fileInfo) {
|
|
|
16380
18716
|
plugin.languages ?? []
|
|
16381
18717
|
)
|
|
16382
18718
|
);
|
|
16383
|
-
const language = getLanguageByName(languages2, fileInfo.language) ??
|
|
18719
|
+
const language = getLanguageByName(languages2, fileInfo.language) ?? getLanguageByFileName(languages2, fileInfo.physicalFile) ?? getLanguageByFileName(languages2, fileInfo.file) ?? getLanguageByInterpreter(languages2, fileInfo.physicalFile);
|
|
16384
18720
|
return language == null ? void 0 : language.parsers[0];
|
|
16385
18721
|
}
|
|
16386
18722
|
var infer_parser_default = inferParser;
|
|
@@ -17743,7 +20079,7 @@ var print_ignored_default = printIgnored;
|
|
|
17743
20079
|
// src/main/ast-to-doc.js
|
|
17744
20080
|
async function printAstToDoc(ast, options8) {
|
|
17745
20081
|
({ ast } = await prepareToPrint(ast, options8));
|
|
17746
|
-
const
|
|
20082
|
+
const cache2 = /* @__PURE__ */ new Map();
|
|
17747
20083
|
const path9 = new ast_path_default(ast);
|
|
17748
20084
|
const ensurePrintingNode = create_print_pre_check_function_default(options8);
|
|
17749
20085
|
const embeds = /* @__PURE__ */ new Map();
|
|
@@ -17773,12 +20109,12 @@ async function printAstToDoc(ast, options8) {
|
|
|
17773
20109
|
return "";
|
|
17774
20110
|
}
|
|
17775
20111
|
const shouldCache = value && typeof value === "object" && args === void 0;
|
|
17776
|
-
if (shouldCache &&
|
|
17777
|
-
return
|
|
20112
|
+
if (shouldCache && cache2.has(value)) {
|
|
20113
|
+
return cache2.get(value);
|
|
17778
20114
|
}
|
|
17779
20115
|
const doc3 = callPluginPrintFunction(path9, options8, mainPrint, args, embeds);
|
|
17780
20116
|
if (shouldCache) {
|
|
17781
|
-
|
|
20117
|
+
cache2.set(value, doc3);
|
|
17782
20118
|
}
|
|
17783
20119
|
return doc3;
|
|
17784
20120
|
}
|
|
@@ -18360,18 +20696,18 @@ function mimicFunction(to, from, { ignoreNonConfigurable = false } = {}) {
|
|
|
18360
20696
|
// node_modules/mem/dist/index.js
|
|
18361
20697
|
var import_map_age_cleaner = __toESM(require_dist(), 1);
|
|
18362
20698
|
var cacheStore = /* @__PURE__ */ new WeakMap();
|
|
18363
|
-
function mem(fn, { cacheKey, cache = /* @__PURE__ */ new Map(), maxAge } = {}) {
|
|
20699
|
+
function mem(fn, { cacheKey, cache: cache2 = /* @__PURE__ */ new Map(), maxAge } = {}) {
|
|
18364
20700
|
if (typeof maxAge === "number") {
|
|
18365
|
-
(0, import_map_age_cleaner.default)(
|
|
20701
|
+
(0, import_map_age_cleaner.default)(cache2);
|
|
18366
20702
|
}
|
|
18367
20703
|
const memoized = function(...arguments_) {
|
|
18368
20704
|
const key = cacheKey ? cacheKey(arguments_) : arguments_[0];
|
|
18369
|
-
const cacheItem =
|
|
20705
|
+
const cacheItem = cache2.get(key);
|
|
18370
20706
|
if (cacheItem) {
|
|
18371
20707
|
return cacheItem.data;
|
|
18372
20708
|
}
|
|
18373
20709
|
const result = fn.apply(this, arguments_);
|
|
18374
|
-
|
|
20710
|
+
cache2.set(key, {
|
|
18375
20711
|
data: result,
|
|
18376
20712
|
maxAge: maxAge ? Date.now() + maxAge : Number.POSITIVE_INFINITY
|
|
18377
20713
|
});
|
|
@@ -18380,20 +20716,27 @@ function mem(fn, { cacheKey, cache = /* @__PURE__ */ new Map(), maxAge } = {}) {
|
|
|
18380
20716
|
mimicFunction(memoized, fn, {
|
|
18381
20717
|
ignoreNonConfigurable: true
|
|
18382
20718
|
});
|
|
18383
|
-
cacheStore.set(memoized,
|
|
20719
|
+
cacheStore.set(memoized, cache2);
|
|
18384
20720
|
return memoized;
|
|
18385
20721
|
}
|
|
18386
20722
|
function memClear(fn) {
|
|
18387
|
-
const
|
|
18388
|
-
if (!
|
|
20723
|
+
const cache2 = cacheStore.get(fn);
|
|
20724
|
+
if (!cache2) {
|
|
18389
20725
|
throw new TypeError("Can't clear a function that was not memoized!");
|
|
18390
20726
|
}
|
|
18391
|
-
if (typeof
|
|
20727
|
+
if (typeof cache2.clear !== "function") {
|
|
18392
20728
|
throw new TypeError("The cache Map can't be cleared!");
|
|
18393
20729
|
}
|
|
18394
|
-
|
|
20730
|
+
cache2.clear();
|
|
18395
20731
|
}
|
|
18396
20732
|
|
|
20733
|
+
// node_modules/url-or-path/index.js
|
|
20734
|
+
import { fileURLToPath, pathToFileURL } from "url";
|
|
20735
|
+
var isUrlInstance = (urlOrPath) => urlOrPath instanceof URL;
|
|
20736
|
+
var isUrlString = (urlOrPath) => typeof urlOrPath === "string" && urlOrPath.startsWith("file://");
|
|
20737
|
+
var isUrl = (urlOrPath) => isUrlInstance(urlOrPath) || isUrlString(urlOrPath);
|
|
20738
|
+
var toPath = (urlOrPath) => isUrl(urlOrPath) ? fileURLToPath(urlOrPath) : urlOrPath;
|
|
20739
|
+
|
|
18397
20740
|
// src/utils/partition.js
|
|
18398
20741
|
function partition2(array2, predicate) {
|
|
18399
20742
|
const result = [[], []];
|
|
@@ -18406,9 +20749,62 @@ var partition_default = partition2;
|
|
|
18406
20749
|
|
|
18407
20750
|
// src/config/resolve-editorconfig.js
|
|
18408
20751
|
var import_editorconfig = __toESM(require_src(), 1);
|
|
18409
|
-
var import_editorconfig_to_prettier = __toESM(require_editorconfig_to_prettier(), 1);
|
|
18410
20752
|
import path2 from "path";
|
|
18411
20753
|
|
|
20754
|
+
// src/config/editorconfig-to-prettier.js
|
|
20755
|
+
function removeUnset(editorConfig) {
|
|
20756
|
+
const result = {};
|
|
20757
|
+
const keys = Object.keys(editorConfig);
|
|
20758
|
+
for (let i = 0; i < keys.length; i++) {
|
|
20759
|
+
const key = keys[i];
|
|
20760
|
+
if (editorConfig[key] === "unset") {
|
|
20761
|
+
continue;
|
|
20762
|
+
}
|
|
20763
|
+
result[key] = editorConfig[key];
|
|
20764
|
+
}
|
|
20765
|
+
return result;
|
|
20766
|
+
}
|
|
20767
|
+
function editorConfigToPrettier(editorConfig) {
|
|
20768
|
+
if (!editorConfig) {
|
|
20769
|
+
return null;
|
|
20770
|
+
}
|
|
20771
|
+
editorConfig = removeUnset(editorConfig);
|
|
20772
|
+
if (Object.keys(editorConfig).length === 0) {
|
|
20773
|
+
return null;
|
|
20774
|
+
}
|
|
20775
|
+
const result = {};
|
|
20776
|
+
if (editorConfig.indent_style) {
|
|
20777
|
+
result.useTabs = editorConfig.indent_style === "tab";
|
|
20778
|
+
}
|
|
20779
|
+
if (editorConfig.indent_size === "tab") {
|
|
20780
|
+
result.useTabs = true;
|
|
20781
|
+
}
|
|
20782
|
+
if (result.useTabs && editorConfig.tab_width) {
|
|
20783
|
+
result.tabWidth = editorConfig.tab_width;
|
|
20784
|
+
} else if (editorConfig.indent_style === "space" && editorConfig.indent_size && editorConfig.indent_size !== "tab") {
|
|
20785
|
+
result.tabWidth = editorConfig.indent_size;
|
|
20786
|
+
} else if (editorConfig.tab_width !== void 0) {
|
|
20787
|
+
result.tabWidth = editorConfig.tab_width;
|
|
20788
|
+
}
|
|
20789
|
+
if (editorConfig.max_line_length) {
|
|
20790
|
+
if (editorConfig.max_line_length === "off") {
|
|
20791
|
+
result.printWidth = Number.POSITIVE_INFINITY;
|
|
20792
|
+
} else {
|
|
20793
|
+
result.printWidth = editorConfig.max_line_length;
|
|
20794
|
+
}
|
|
20795
|
+
}
|
|
20796
|
+
if (editorConfig.quote_type === "single") {
|
|
20797
|
+
result.singleQuote = true;
|
|
20798
|
+
} else if (editorConfig.quote_type === "double") {
|
|
20799
|
+
result.singleQuote = false;
|
|
20800
|
+
}
|
|
20801
|
+
if (["cr", "crlf", "lf"].includes(editorConfig.end_of_line)) {
|
|
20802
|
+
result.endOfLine = editorConfig.end_of_line;
|
|
20803
|
+
}
|
|
20804
|
+
return result;
|
|
20805
|
+
}
|
|
20806
|
+
var editorconfig_to_prettier_default = editorConfigToPrettier;
|
|
20807
|
+
|
|
18412
20808
|
// src/config/find-project-root.js
|
|
18413
20809
|
import fs2 from "fs";
|
|
18414
20810
|
import path from "path";
|
|
@@ -18431,10 +20827,7 @@ async function loadEditorConfig(filePath) {
|
|
|
18431
20827
|
const editorConfig = await import_editorconfig.default.parse(filePath, {
|
|
18432
20828
|
root: find_project_root_default(path2.dirname(path2.resolve(filePath)))
|
|
18433
20829
|
});
|
|
18434
|
-
const config = (
|
|
18435
|
-
if (config) {
|
|
18436
|
-
delete config.insertFinalNewline;
|
|
18437
|
-
}
|
|
20830
|
+
const config = editorconfig_to_prettier_default(editorConfig);
|
|
18438
20831
|
return config;
|
|
18439
20832
|
}
|
|
18440
20833
|
var resolve_editorconfig_default = loadEditorConfig;
|
|
@@ -18442,6 +20835,111 @@ var resolve_editorconfig_default = loadEditorConfig;
|
|
|
18442
20835
|
// src/config/get-prettier-config-explorer.js
|
|
18443
20836
|
var import_parse_async = __toESM(require_parse_async(), 1);
|
|
18444
20837
|
var import_parse3 = __toESM(require_parse3(), 1);
|
|
20838
|
+
var import_js_yaml = __toESM(require_loader(), 1);
|
|
20839
|
+
import { pathToFileURL as pathToFileURL4 } from "url";
|
|
20840
|
+
|
|
20841
|
+
// node_modules/parse-json/index.js
|
|
20842
|
+
var import_json_parse_even_better_errors = __toESM(require_lib4(), 1);
|
|
20843
|
+
var import_code_frame2 = __toESM(require_lib3(), 1);
|
|
20844
|
+
|
|
20845
|
+
// node_modules/index-to-position/index.js
|
|
20846
|
+
var safeLastIndexOf = (string, searchString, index) => index < 0 ? -1 : string.lastIndexOf(searchString, index);
|
|
20847
|
+
function getPosition(text, textIndex) {
|
|
20848
|
+
const lineBreakBefore = safeLastIndexOf(text, "\n", textIndex - 1);
|
|
20849
|
+
const column = textIndex - lineBreakBefore - 1;
|
|
20850
|
+
let line2 = 0;
|
|
20851
|
+
for (let index = lineBreakBefore; index >= 0; index = safeLastIndexOf(text, "\n", index - 1)) {
|
|
20852
|
+
line2++;
|
|
20853
|
+
}
|
|
20854
|
+
return { line: line2, column };
|
|
20855
|
+
}
|
|
20856
|
+
function indexToLineColumn(text, textIndex, { oneBased = false } = {}) {
|
|
20857
|
+
if (textIndex < 0 || textIndex >= text.length && text.length > 0) {
|
|
20858
|
+
throw new RangeError("Index out of bounds");
|
|
20859
|
+
}
|
|
20860
|
+
const position = getPosition(text, textIndex);
|
|
20861
|
+
return oneBased ? { line: position.line + 1, column: position.column + 1 } : position;
|
|
20862
|
+
}
|
|
20863
|
+
|
|
20864
|
+
// node_modules/parse-json/index.js
|
|
20865
|
+
var _message;
|
|
20866
|
+
var _JSONError = class _JSONError extends Error {
|
|
20867
|
+
constructor(message) {
|
|
20868
|
+
var _a;
|
|
20869
|
+
super();
|
|
20870
|
+
__publicField(this, "name", "JSONError");
|
|
20871
|
+
__publicField(this, "fileName");
|
|
20872
|
+
__publicField(this, "codeFrame");
|
|
20873
|
+
__publicField(this, "rawCodeFrame");
|
|
20874
|
+
__privateAdd(this, _message, void 0);
|
|
20875
|
+
__privateSet(this, _message, message);
|
|
20876
|
+
(_a = Error.captureStackTrace) == null ? void 0 : _a.call(Error, this, _JSONError);
|
|
20877
|
+
}
|
|
20878
|
+
get message() {
|
|
20879
|
+
const { fileName, codeFrame } = this;
|
|
20880
|
+
return `${__privateGet(this, _message)}${fileName ? ` in ${fileName}` : ""}${codeFrame ? `
|
|
20881
|
+
|
|
20882
|
+
${codeFrame}
|
|
20883
|
+
` : ""}`;
|
|
20884
|
+
}
|
|
20885
|
+
set message(message) {
|
|
20886
|
+
__privateSet(this, _message, message);
|
|
20887
|
+
}
|
|
20888
|
+
};
|
|
20889
|
+
_message = new WeakMap();
|
|
20890
|
+
var JSONError = _JSONError;
|
|
20891
|
+
var generateCodeFrame = (string, location, highlightCode = true) => (0, import_code_frame2.codeFrameColumns)(string, { start: location }, { highlightCode });
|
|
20892
|
+
var getErrorLocation = (string, message) => {
|
|
20893
|
+
const match = message.match(/in JSON at position (?<index>\d+)(?: \(line (?<line>\d+) column (?<column>\d+)\))? while parsing/);
|
|
20894
|
+
if (!match) {
|
|
20895
|
+
return;
|
|
20896
|
+
}
|
|
20897
|
+
let { index, line: line2, column } = match.groups;
|
|
20898
|
+
if (line2 && column) {
|
|
20899
|
+
return { line: Number(line2), column: Number(column) };
|
|
20900
|
+
}
|
|
20901
|
+
index = Number(index);
|
|
20902
|
+
if (index === string.length) {
|
|
20903
|
+
const { line: line3, column: column2 } = indexToLineColumn(string, string.length - 1, { oneBased: true });
|
|
20904
|
+
return { line: line3, column: column2 + 1 };
|
|
20905
|
+
}
|
|
20906
|
+
return indexToLineColumn(string, index, { oneBased: true });
|
|
20907
|
+
};
|
|
20908
|
+
function parseJson(string, reviver, filename) {
|
|
20909
|
+
if (typeof reviver === "string") {
|
|
20910
|
+
filename = reviver;
|
|
20911
|
+
reviver = void 0;
|
|
20912
|
+
}
|
|
20913
|
+
let message;
|
|
20914
|
+
try {
|
|
20915
|
+
return JSON.parse(string, reviver);
|
|
20916
|
+
} catch (error) {
|
|
20917
|
+
message = error.message;
|
|
20918
|
+
}
|
|
20919
|
+
try {
|
|
20920
|
+
(0, import_json_parse_even_better_errors.default)(string, reviver);
|
|
20921
|
+
} catch (error) {
|
|
20922
|
+
message = error.message;
|
|
20923
|
+
}
|
|
20924
|
+
message = message.replaceAll("\n", "");
|
|
20925
|
+
const jsonError = new JSONError(message);
|
|
20926
|
+
if (filename) {
|
|
20927
|
+
jsonError.fileName = filename;
|
|
20928
|
+
}
|
|
20929
|
+
const location = getErrorLocation(string, message);
|
|
20930
|
+
if (location) {
|
|
20931
|
+
jsonError.codeFrame = generateCodeFrame(string, location);
|
|
20932
|
+
jsonError.rawCodeFrame = generateCodeFrame(
|
|
20933
|
+
string,
|
|
20934
|
+
location,
|
|
20935
|
+
/* highlightCode */
|
|
20936
|
+
false
|
|
20937
|
+
);
|
|
20938
|
+
}
|
|
20939
|
+
throw jsonError;
|
|
20940
|
+
}
|
|
20941
|
+
|
|
20942
|
+
// src/config/get-prettier-config-explorer.js
|
|
18445
20943
|
import mockable from "./internal/internal.mjs";
|
|
18446
20944
|
|
|
18447
20945
|
// src/utils/require-from-file.js
|
|
@@ -18453,28 +20951,31 @@ function requireFromFile(id, parent) {
|
|
|
18453
20951
|
var require_from_file_default = requireFromFile;
|
|
18454
20952
|
|
|
18455
20953
|
// src/utils/import-from-file.js
|
|
18456
|
-
import { pathToFileURL as
|
|
20954
|
+
import { pathToFileURL as pathToFileURL3 } from "url";
|
|
18457
20955
|
|
|
18458
20956
|
// node_modules/import-meta-resolve/lib/resolve.js
|
|
18459
20957
|
import assert5 from "assert";
|
|
18460
20958
|
import { Stats, statSync, realpathSync } from "fs";
|
|
18461
|
-
import
|
|
18462
|
-
import { URL as URL3, fileURLToPath as
|
|
20959
|
+
import process3 from "process";
|
|
20960
|
+
import { URL as URL3, fileURLToPath as fileURLToPath5, pathToFileURL as pathToFileURL2 } from "url";
|
|
18463
20961
|
import path4 from "path";
|
|
18464
20962
|
import { builtinModules } from "module";
|
|
18465
20963
|
|
|
18466
20964
|
// node_modules/import-meta-resolve/lib/get-format.js
|
|
18467
|
-
import {
|
|
20965
|
+
import { fileURLToPath as fileURLToPath4 } from "url";
|
|
18468
20966
|
|
|
18469
20967
|
// node_modules/import-meta-resolve/lib/package-config.js
|
|
18470
|
-
import { URL, fileURLToPath } from "url";
|
|
20968
|
+
import { URL as URL2, fileURLToPath as fileURLToPath3 } from "url";
|
|
20969
|
+
|
|
20970
|
+
// node_modules/import-meta-resolve/lib/package-json-reader.js
|
|
20971
|
+
import fs3 from "fs";
|
|
20972
|
+
import path3 from "path";
|
|
20973
|
+
import { fileURLToPath as fileURLToPath2 } from "url";
|
|
18471
20974
|
|
|
18472
20975
|
// node_modules/import-meta-resolve/lib/errors.js
|
|
18473
20976
|
import v8 from "v8";
|
|
18474
|
-
import process3 from "process";
|
|
18475
20977
|
import assert4 from "assert";
|
|
18476
20978
|
import { format, inspect } from "util";
|
|
18477
|
-
var isWindows = process3.platform === "win32";
|
|
18478
20979
|
var own = {}.hasOwnProperty;
|
|
18479
20980
|
var classRegExp = /^([A-Z][a-z\d]*)+$/;
|
|
18480
20981
|
var kTypes = /* @__PURE__ */ new Set([
|
|
@@ -18620,10 +21121,10 @@ codes.ERR_MODULE_NOT_FOUND = createError(
|
|
|
18620
21121
|
/**
|
|
18621
21122
|
* @param {string} path
|
|
18622
21123
|
* @param {string} base
|
|
18623
|
-
* @param {
|
|
21124
|
+
* @param {boolean} [exactUrl]
|
|
18624
21125
|
*/
|
|
18625
|
-
(path9, base,
|
|
18626
|
-
return `Cannot find ${
|
|
21126
|
+
(path9, base, exactUrl = false) => {
|
|
21127
|
+
return `Cannot find ${exactUrl ? "module" : "package"} '${path9}' imported from ${base}`;
|
|
18627
21128
|
},
|
|
18628
21129
|
Error
|
|
18629
21130
|
);
|
|
@@ -18693,24 +21194,6 @@ codes.ERR_INVALID_ARG_VALUE = createError(
|
|
|
18693
21194
|
// Note: extra classes have been shaken out.
|
|
18694
21195
|
// , RangeError
|
|
18695
21196
|
);
|
|
18696
|
-
codes.ERR_UNSUPPORTED_ESM_URL_SCHEME = createError(
|
|
18697
|
-
"ERR_UNSUPPORTED_ESM_URL_SCHEME",
|
|
18698
|
-
/**
|
|
18699
|
-
* @param {URL} url
|
|
18700
|
-
* @param {Array<string>} supported
|
|
18701
|
-
*/
|
|
18702
|
-
(url, supported) => {
|
|
18703
|
-
let message = `Only URLs with a scheme in: ${formatList(
|
|
18704
|
-
supported
|
|
18705
|
-
)} are supported by the default ESM loader`;
|
|
18706
|
-
if (isWindows && url.protocol.length === 2) {
|
|
18707
|
-
message += ". On Windows, absolute paths must be valid file:// URLs";
|
|
18708
|
-
}
|
|
18709
|
-
message += `. Received protocol '${url.protocol}'`;
|
|
18710
|
-
return message;
|
|
18711
|
-
},
|
|
18712
|
-
Error
|
|
18713
|
-
);
|
|
18714
21197
|
function createError(sym, value, def) {
|
|
18715
21198
|
messages.set(sym, value);
|
|
18716
21199
|
return makeNodeErrorWithCode(def, sym);
|
|
@@ -18830,100 +21313,100 @@ function determineSpecificType(value) {
|
|
|
18830
21313
|
}
|
|
18831
21314
|
|
|
18832
21315
|
// node_modules/import-meta-resolve/lib/package-json-reader.js
|
|
18833
|
-
|
|
18834
|
-
|
|
21316
|
+
var hasOwnProperty = {}.hasOwnProperty;
|
|
21317
|
+
var { ERR_INVALID_PACKAGE_CONFIG } = codes;
|
|
21318
|
+
var cache = /* @__PURE__ */ new Map();
|
|
18835
21319
|
var reader = { read };
|
|
18836
21320
|
var package_json_reader_default = reader;
|
|
18837
|
-
function read(jsonPath) {
|
|
18838
|
-
|
|
18839
|
-
|
|
18840
|
-
path3.toNamespacedPath(path3.join(path3.dirname(jsonPath), "package.json")),
|
|
18841
|
-
"utf8"
|
|
18842
|
-
);
|
|
18843
|
-
return { string };
|
|
18844
|
-
} catch (error) {
|
|
18845
|
-
const exception = (
|
|
18846
|
-
/** @type {ErrnoException} */
|
|
18847
|
-
error
|
|
18848
|
-
);
|
|
18849
|
-
if (exception.code === "ENOENT") {
|
|
18850
|
-
return { string: void 0 };
|
|
18851
|
-
}
|
|
18852
|
-
throw exception;
|
|
18853
|
-
}
|
|
18854
|
-
}
|
|
18855
|
-
|
|
18856
|
-
// node_modules/import-meta-resolve/lib/package-config.js
|
|
18857
|
-
var { ERR_INVALID_PACKAGE_CONFIG } = codes;
|
|
18858
|
-
var packageJsonCache = /* @__PURE__ */ new Map();
|
|
18859
|
-
function getPackageConfig(path9, specifier, base) {
|
|
18860
|
-
const existing = packageJsonCache.get(path9);
|
|
18861
|
-
if (existing !== void 0) {
|
|
21321
|
+
function read(jsonPath, { base, specifier }) {
|
|
21322
|
+
const existing = cache.get(jsonPath);
|
|
21323
|
+
if (existing) {
|
|
18862
21324
|
return existing;
|
|
18863
21325
|
}
|
|
18864
|
-
|
|
18865
|
-
if (source === void 0) {
|
|
18866
|
-
const packageConfig2 = {
|
|
18867
|
-
pjsonPath: path9,
|
|
18868
|
-
exists: false,
|
|
18869
|
-
main: void 0,
|
|
18870
|
-
name: void 0,
|
|
18871
|
-
type: "none",
|
|
18872
|
-
exports: void 0,
|
|
18873
|
-
imports: void 0
|
|
18874
|
-
};
|
|
18875
|
-
packageJsonCache.set(path9, packageConfig2);
|
|
18876
|
-
return packageConfig2;
|
|
18877
|
-
}
|
|
18878
|
-
let packageJson;
|
|
21326
|
+
let string;
|
|
18879
21327
|
try {
|
|
18880
|
-
|
|
21328
|
+
string = fs3.readFileSync(path3.toNamespacedPath(jsonPath), "utf8");
|
|
18881
21329
|
} catch (error) {
|
|
18882
21330
|
const exception = (
|
|
18883
21331
|
/** @type {ErrnoException} */
|
|
18884
21332
|
error
|
|
18885
21333
|
);
|
|
18886
|
-
|
|
18887
|
-
|
|
18888
|
-
|
|
18889
|
-
exception.message
|
|
18890
|
-
);
|
|
21334
|
+
if (exception.code !== "ENOENT") {
|
|
21335
|
+
throw exception;
|
|
21336
|
+
}
|
|
18891
21337
|
}
|
|
18892
|
-
const
|
|
18893
|
-
|
|
18894
|
-
pjsonPath:
|
|
18895
|
-
|
|
18896
|
-
|
|
18897
|
-
|
|
18898
|
-
|
|
18899
|
-
|
|
18900
|
-
|
|
18901
|
-
// @ts-expect-error Assume `Record<string, unknown>`.
|
|
18902
|
-
imports: imports && typeof imports === "object" ? imports : void 0
|
|
21338
|
+
const result = {
|
|
21339
|
+
exists: false,
|
|
21340
|
+
pjsonPath: jsonPath,
|
|
21341
|
+
main: void 0,
|
|
21342
|
+
name: void 0,
|
|
21343
|
+
type: "none",
|
|
21344
|
+
// Ignore unknown types for forwards compatibility
|
|
21345
|
+
exports: void 0,
|
|
21346
|
+
imports: void 0
|
|
18903
21347
|
};
|
|
18904
|
-
|
|
18905
|
-
|
|
21348
|
+
if (string !== void 0) {
|
|
21349
|
+
let parsed;
|
|
21350
|
+
try {
|
|
21351
|
+
parsed = JSON.parse(string);
|
|
21352
|
+
} catch (error_) {
|
|
21353
|
+
const cause = (
|
|
21354
|
+
/** @type {ErrnoException} */
|
|
21355
|
+
error_
|
|
21356
|
+
);
|
|
21357
|
+
const error = new ERR_INVALID_PACKAGE_CONFIG(
|
|
21358
|
+
jsonPath,
|
|
21359
|
+
(base ? `"${specifier}" from ` : "") + fileURLToPath2(base || specifier),
|
|
21360
|
+
cause.message
|
|
21361
|
+
);
|
|
21362
|
+
error.cause = cause;
|
|
21363
|
+
throw error;
|
|
21364
|
+
}
|
|
21365
|
+
result.exists = true;
|
|
21366
|
+
if (hasOwnProperty.call(parsed, "name") && typeof parsed.name === "string") {
|
|
21367
|
+
result.name = parsed.name;
|
|
21368
|
+
}
|
|
21369
|
+
if (hasOwnProperty.call(parsed, "main") && typeof parsed.main === "string") {
|
|
21370
|
+
result.main = parsed.main;
|
|
21371
|
+
}
|
|
21372
|
+
if (hasOwnProperty.call(parsed, "exports")) {
|
|
21373
|
+
result.exports = parsed.exports;
|
|
21374
|
+
}
|
|
21375
|
+
if (hasOwnProperty.call(parsed, "imports")) {
|
|
21376
|
+
result.imports = parsed.imports;
|
|
21377
|
+
}
|
|
21378
|
+
if (hasOwnProperty.call(parsed, "type") && (parsed.type === "commonjs" || parsed.type === "module")) {
|
|
21379
|
+
result.type = parsed.type;
|
|
21380
|
+
}
|
|
21381
|
+
}
|
|
21382
|
+
cache.set(jsonPath, result);
|
|
21383
|
+
return result;
|
|
18906
21384
|
}
|
|
21385
|
+
|
|
21386
|
+
// node_modules/import-meta-resolve/lib/package-config.js
|
|
18907
21387
|
function getPackageScopeConfig(resolved) {
|
|
18908
|
-
let
|
|
21388
|
+
let packageJSONUrl = new URL2("package.json", resolved);
|
|
18909
21389
|
while (true) {
|
|
18910
|
-
const
|
|
18911
|
-
if (
|
|
21390
|
+
const packageJSONPath2 = packageJSONUrl.pathname;
|
|
21391
|
+
if (packageJSONPath2.endsWith("node_modules/package.json")) {
|
|
18912
21392
|
break;
|
|
18913
|
-
|
|
18914
|
-
|
|
18915
|
-
|
|
21393
|
+
}
|
|
21394
|
+
const packageConfig = package_json_reader_default.read(
|
|
21395
|
+
fileURLToPath3(packageJSONUrl),
|
|
21396
|
+
{ specifier: resolved }
|
|
18916
21397
|
);
|
|
18917
|
-
if (
|
|
18918
|
-
return
|
|
18919
|
-
|
|
18920
|
-
|
|
18921
|
-
|
|
21398
|
+
if (packageConfig.exists) {
|
|
21399
|
+
return packageConfig;
|
|
21400
|
+
}
|
|
21401
|
+
const lastPackageJSONUrl = packageJSONUrl;
|
|
21402
|
+
packageJSONUrl = new URL2("../package.json", packageJSONUrl);
|
|
21403
|
+
if (packageJSONUrl.pathname === lastPackageJSONUrl.pathname) {
|
|
18922
21404
|
break;
|
|
21405
|
+
}
|
|
18923
21406
|
}
|
|
18924
|
-
const
|
|
18925
|
-
|
|
18926
|
-
pjsonPath:
|
|
21407
|
+
const packageJSONPath = fileURLToPath3(packageJSONUrl);
|
|
21408
|
+
return {
|
|
21409
|
+
pjsonPath: packageJSONPath,
|
|
18927
21410
|
exists: false,
|
|
18928
21411
|
main: void 0,
|
|
18929
21412
|
name: void 0,
|
|
@@ -18931,19 +21414,17 @@ function getPackageScopeConfig(resolved) {
|
|
|
18931
21414
|
exports: void 0,
|
|
18932
21415
|
imports: void 0
|
|
18933
21416
|
};
|
|
18934
|
-
packageJsonCache.set(packageJsonPath, packageConfig);
|
|
18935
|
-
return packageConfig;
|
|
18936
21417
|
}
|
|
18937
21418
|
|
|
18938
21419
|
// node_modules/import-meta-resolve/lib/resolve-get-package-type.js
|
|
18939
|
-
function getPackageType(
|
|
18940
|
-
const packageConfig = getPackageScopeConfig(
|
|
21420
|
+
function getPackageType(url2) {
|
|
21421
|
+
const packageConfig = getPackageScopeConfig(url2);
|
|
18941
21422
|
return packageConfig.type;
|
|
18942
21423
|
}
|
|
18943
21424
|
|
|
18944
21425
|
// node_modules/import-meta-resolve/lib/get-format.js
|
|
18945
21426
|
var { ERR_UNKNOWN_FILE_EXTENSION } = codes;
|
|
18946
|
-
var
|
|
21427
|
+
var hasOwnProperty2 = {}.hasOwnProperty;
|
|
18947
21428
|
var extensionFormatMap = {
|
|
18948
21429
|
// @ts-expect-error: hush.
|
|
18949
21430
|
__proto__: null,
|
|
@@ -18976,8 +21457,8 @@ function getDataProtocolModuleFormat(parsed) {
|
|
|
18976
21457
|
) || [null, null, null];
|
|
18977
21458
|
return mimeToFormat(mime);
|
|
18978
21459
|
}
|
|
18979
|
-
function extname(
|
|
18980
|
-
const pathname =
|
|
21460
|
+
function extname(url2) {
|
|
21461
|
+
const pathname = url2.pathname;
|
|
18981
21462
|
let index = pathname.length;
|
|
18982
21463
|
while (index--) {
|
|
18983
21464
|
const code = pathname.codePointAt(index);
|
|
@@ -18990,10 +21471,21 @@ function extname(url) {
|
|
|
18990
21471
|
}
|
|
18991
21472
|
return "";
|
|
18992
21473
|
}
|
|
18993
|
-
function getFileProtocolModuleFormat(
|
|
18994
|
-
const ext = extname(
|
|
21474
|
+
function getFileProtocolModuleFormat(url2, _context, ignoreErrors) {
|
|
21475
|
+
const ext = extname(url2);
|
|
18995
21476
|
if (ext === ".js") {
|
|
18996
|
-
|
|
21477
|
+
const packageType = getPackageType(url2);
|
|
21478
|
+
if (packageType !== "none") {
|
|
21479
|
+
return packageType;
|
|
21480
|
+
}
|
|
21481
|
+
return "commonjs";
|
|
21482
|
+
}
|
|
21483
|
+
if (ext === "") {
|
|
21484
|
+
const packageType = getPackageType(url2);
|
|
21485
|
+
if (packageType === "none" || packageType === "commonjs") {
|
|
21486
|
+
return "commonjs";
|
|
21487
|
+
}
|
|
21488
|
+
return "module";
|
|
18997
21489
|
}
|
|
18998
21490
|
const format3 = extensionFormatMap[ext];
|
|
18999
21491
|
if (format3)
|
|
@@ -19001,16 +21493,17 @@ function getFileProtocolModuleFormat(url, _context, ignoreErrors) {
|
|
|
19001
21493
|
if (ignoreErrors) {
|
|
19002
21494
|
return void 0;
|
|
19003
21495
|
}
|
|
19004
|
-
const filepath =
|
|
21496
|
+
const filepath = fileURLToPath4(url2);
|
|
19005
21497
|
throw new ERR_UNKNOWN_FILE_EXTENSION(ext, filepath);
|
|
19006
21498
|
}
|
|
19007
21499
|
function getHttpProtocolModuleFormat() {
|
|
19008
21500
|
}
|
|
19009
|
-
function defaultGetFormatWithoutErrors(
|
|
19010
|
-
|
|
21501
|
+
function defaultGetFormatWithoutErrors(url2, context) {
|
|
21502
|
+
const protocol = url2.protocol;
|
|
21503
|
+
if (!hasOwnProperty2.call(protocolHandlers, protocol)) {
|
|
19011
21504
|
return null;
|
|
19012
21505
|
}
|
|
19013
|
-
return protocolHandlers[
|
|
21506
|
+
return protocolHandlers[protocol](url2, context, true) || null;
|
|
19014
21507
|
}
|
|
19015
21508
|
|
|
19016
21509
|
// node_modules/import-meta-resolve/lib/utils.js
|
|
@@ -19039,7 +21532,6 @@ function getConditionsSet(conditions) {
|
|
|
19039
21532
|
|
|
19040
21533
|
// node_modules/import-meta-resolve/lib/resolve.js
|
|
19041
21534
|
var RegExpPrototypeSymbolReplace = RegExp.prototype[Symbol.replace];
|
|
19042
|
-
var experimentalNetworkImports = false;
|
|
19043
21535
|
var {
|
|
19044
21536
|
ERR_NETWORK_IMPORT_DISALLOWED,
|
|
19045
21537
|
ERR_INVALID_MODULE_SPECIFIER,
|
|
@@ -19048,8 +21540,7 @@ var {
|
|
|
19048
21540
|
ERR_MODULE_NOT_FOUND,
|
|
19049
21541
|
ERR_PACKAGE_IMPORT_NOT_DEFINED,
|
|
19050
21542
|
ERR_PACKAGE_PATH_NOT_EXPORTED,
|
|
19051
|
-
ERR_UNSUPPORTED_DIR_IMPORT
|
|
19052
|
-
ERR_UNSUPPORTED_ESM_URL_SCHEME
|
|
21543
|
+
ERR_UNSUPPORTED_DIR_IMPORT
|
|
19053
21544
|
} = codes;
|
|
19054
21545
|
var own2 = {}.hasOwnProperty;
|
|
19055
21546
|
var invalidSegmentRegEx = /(^|\\|\/)((\.|%2e)(\.|%2e)?|(n|%6e|%4e)(o|%6f|%4f)(d|%64|%44)(e|%65|%45)(_|%5f)(m|%6d|%4d)(o|%6f|%4f)(d|%64|%44)(u|%75|%55)(l|%6c|%4c)(e|%65|%45)(s|%73|%53))?(\\|\/|$)/i;
|
|
@@ -19060,39 +21551,46 @@ var encodedSepRegEx = /%2f|%5c/i;
|
|
|
19060
21551
|
var emittedPackageWarnings = /* @__PURE__ */ new Set();
|
|
19061
21552
|
var doubleSlashRegEx = /[/\\]{2}/;
|
|
19062
21553
|
function emitInvalidSegmentDeprecation(target, request, match, packageJsonUrl, internal, base, isTarget) {
|
|
19063
|
-
|
|
21554
|
+
if (process3.noDeprecation) {
|
|
21555
|
+
return;
|
|
21556
|
+
}
|
|
21557
|
+
const pjsonPath = fileURLToPath5(packageJsonUrl);
|
|
19064
21558
|
const double = doubleSlashRegEx.exec(isTarget ? target : request) !== null;
|
|
19065
|
-
|
|
19066
|
-
`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${
|
|
21559
|
+
process3.emitWarning(
|
|
21560
|
+
`Use of deprecated ${double ? "double slash" : "leading or trailing slash matching"} resolving "${target}" for module request "${request}" ${request === match ? "" : `matched to "${match}" `}in the "${internal ? "imports" : "exports"}" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath5(base)}` : ""}.`,
|
|
19067
21561
|
"DeprecationWarning",
|
|
19068
21562
|
"DEP0166"
|
|
19069
21563
|
);
|
|
19070
21564
|
}
|
|
19071
|
-
function emitLegacyIndexDeprecation(
|
|
19072
|
-
|
|
21565
|
+
function emitLegacyIndexDeprecation(url2, packageJsonUrl, base, main) {
|
|
21566
|
+
if (process3.noDeprecation) {
|
|
21567
|
+
return;
|
|
21568
|
+
}
|
|
21569
|
+
const format3 = defaultGetFormatWithoutErrors(url2, { parentURL: base.href });
|
|
19073
21570
|
if (format3 !== "module")
|
|
19074
21571
|
return;
|
|
19075
|
-
const
|
|
19076
|
-
const pkgPath =
|
|
19077
|
-
const basePath =
|
|
19078
|
-
if (main)
|
|
19079
|
-
|
|
19080
|
-
`
|
|
21572
|
+
const urlPath = fileURLToPath5(url2.href);
|
|
21573
|
+
const pkgPath = fileURLToPath5(new URL3(".", packageJsonUrl));
|
|
21574
|
+
const basePath = fileURLToPath5(base);
|
|
21575
|
+
if (!main) {
|
|
21576
|
+
process3.emitWarning(
|
|
21577
|
+
`No "main" or "exports" field defined in the package.json for ${pkgPath} resolving the main entry point "${urlPath.slice(
|
|
19081
21578
|
pkgPath.length
|
|
19082
21579
|
)}", imported from ${basePath}.
|
|
19083
|
-
|
|
21580
|
+
Default "index" lookups for the main are deprecated for ES modules.`,
|
|
19084
21581
|
"DeprecationWarning",
|
|
19085
21582
|
"DEP0151"
|
|
19086
21583
|
);
|
|
19087
|
-
else
|
|
19088
|
-
|
|
19089
|
-
`
|
|
21584
|
+
} else if (path4.resolve(pkgPath, main) !== urlPath) {
|
|
21585
|
+
process3.emitWarning(
|
|
21586
|
+
`Package ${pkgPath} has a "main" field set to "${main}", excluding the full filename and extension to the resolved file at "${urlPath.slice(
|
|
19090
21587
|
pkgPath.length
|
|
19091
21588
|
)}", imported from ${basePath}.
|
|
19092
|
-
|
|
21589
|
+
Automatic extension resolution of the "main" field is deprecated for ES modules.`,
|
|
19093
21590
|
"DeprecationWarning",
|
|
19094
21591
|
"DEP0151"
|
|
19095
21592
|
);
|
|
21593
|
+
}
|
|
19096
21594
|
}
|
|
19097
21595
|
function tryStatSync(path9) {
|
|
19098
21596
|
try {
|
|
@@ -19101,8 +21599,8 @@ function tryStatSync(path9) {
|
|
|
19101
21599
|
return new Stats();
|
|
19102
21600
|
}
|
|
19103
21601
|
}
|
|
19104
|
-
function fileExists(
|
|
19105
|
-
const stats = statSync(
|
|
21602
|
+
function fileExists(url2) {
|
|
21603
|
+
const stats = statSync(url2, { throwIfNoEntry: false });
|
|
19106
21604
|
const isFile = stats ? stats.isFile() : void 0;
|
|
19107
21605
|
return isFile === null || isFile === void 0 ? false : isFile;
|
|
19108
21606
|
}
|
|
@@ -19150,37 +21648,51 @@ function legacyMainResolve(packageJsonUrl, packageConfig, base) {
|
|
|
19150
21648
|
return guess;
|
|
19151
21649
|
}
|
|
19152
21650
|
throw new ERR_MODULE_NOT_FOUND(
|
|
19153
|
-
|
|
19154
|
-
|
|
21651
|
+
fileURLToPath5(new URL3(".", packageJsonUrl)),
|
|
21652
|
+
fileURLToPath5(base)
|
|
19155
21653
|
);
|
|
19156
21654
|
}
|
|
19157
21655
|
function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
19158
|
-
if (encodedSepRegEx.exec(resolved.pathname) !== null)
|
|
21656
|
+
if (encodedSepRegEx.exec(resolved.pathname) !== null) {
|
|
19159
21657
|
throw new ERR_INVALID_MODULE_SPECIFIER(
|
|
19160
21658
|
resolved.pathname,
|
|
19161
21659
|
'must not include encoded "/" or "\\" characters',
|
|
19162
|
-
|
|
21660
|
+
fileURLToPath5(base)
|
|
21661
|
+
);
|
|
21662
|
+
}
|
|
21663
|
+
let filePath;
|
|
21664
|
+
try {
|
|
21665
|
+
filePath = fileURLToPath5(resolved);
|
|
21666
|
+
} catch (error) {
|
|
21667
|
+
const cause = (
|
|
21668
|
+
/** @type {ErrnoException} */
|
|
21669
|
+
error
|
|
19163
21670
|
);
|
|
19164
|
-
|
|
21671
|
+
Object.defineProperty(cause, "input", { value: String(resolved) });
|
|
21672
|
+
Object.defineProperty(cause, "module", { value: String(base) });
|
|
21673
|
+
throw cause;
|
|
21674
|
+
}
|
|
19165
21675
|
const stats = tryStatSync(
|
|
19166
21676
|
filePath.endsWith("/") ? filePath.slice(-1) : filePath
|
|
19167
21677
|
);
|
|
19168
21678
|
if (stats.isDirectory()) {
|
|
19169
|
-
const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath,
|
|
21679
|
+
const error = new ERR_UNSUPPORTED_DIR_IMPORT(filePath, fileURLToPath5(base));
|
|
19170
21680
|
error.url = String(resolved);
|
|
19171
21681
|
throw error;
|
|
19172
21682
|
}
|
|
19173
21683
|
if (!stats.isFile()) {
|
|
19174
|
-
|
|
21684
|
+
const error = new ERR_MODULE_NOT_FOUND(
|
|
19175
21685
|
filePath || resolved.pathname,
|
|
19176
|
-
base &&
|
|
19177
|
-
|
|
21686
|
+
base && fileURLToPath5(base),
|
|
21687
|
+
true
|
|
19178
21688
|
);
|
|
21689
|
+
error.url = String(resolved);
|
|
21690
|
+
throw error;
|
|
19179
21691
|
}
|
|
19180
21692
|
if (!preserveSymlinks) {
|
|
19181
21693
|
const real = realpathSync(filePath);
|
|
19182
21694
|
const { search, hash } = resolved;
|
|
19183
|
-
resolved =
|
|
21695
|
+
resolved = pathToFileURL2(real + (filePath.endsWith(path4.sep) ? "/" : ""));
|
|
19184
21696
|
resolved.search = search;
|
|
19185
21697
|
resolved.hash = hash;
|
|
19186
21698
|
}
|
|
@@ -19189,33 +21701,33 @@ function finalizeResolution(resolved, base, preserveSymlinks) {
|
|
|
19189
21701
|
function importNotDefined(specifier, packageJsonUrl, base) {
|
|
19190
21702
|
return new ERR_PACKAGE_IMPORT_NOT_DEFINED(
|
|
19191
21703
|
specifier,
|
|
19192
|
-
packageJsonUrl &&
|
|
19193
|
-
|
|
21704
|
+
packageJsonUrl && fileURLToPath5(new URL3(".", packageJsonUrl)),
|
|
21705
|
+
fileURLToPath5(base)
|
|
19194
21706
|
);
|
|
19195
21707
|
}
|
|
19196
21708
|
function exportsNotFound(subpath, packageJsonUrl, base) {
|
|
19197
21709
|
return new ERR_PACKAGE_PATH_NOT_EXPORTED(
|
|
19198
|
-
|
|
21710
|
+
fileURLToPath5(new URL3(".", packageJsonUrl)),
|
|
19199
21711
|
subpath,
|
|
19200
|
-
base &&
|
|
21712
|
+
base && fileURLToPath5(base)
|
|
19201
21713
|
);
|
|
19202
21714
|
}
|
|
19203
21715
|
function throwInvalidSubpath(request, match, packageJsonUrl, internal, base) {
|
|
19204
|
-
const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${
|
|
21716
|
+
const reason = `request is not a valid match in pattern "${match}" for the "${internal ? "imports" : "exports"}" resolution of ${fileURLToPath5(packageJsonUrl)}`;
|
|
19205
21717
|
throw new ERR_INVALID_MODULE_SPECIFIER(
|
|
19206
21718
|
request,
|
|
19207
21719
|
reason,
|
|
19208
|
-
base &&
|
|
21720
|
+
base && fileURLToPath5(base)
|
|
19209
21721
|
);
|
|
19210
21722
|
}
|
|
19211
21723
|
function invalidPackageTarget(subpath, target, packageJsonUrl, internal, base) {
|
|
19212
21724
|
target = typeof target === "object" && target !== null ? JSON.stringify(target, null, "") : `${target}`;
|
|
19213
21725
|
return new ERR_INVALID_PACKAGE_TARGET(
|
|
19214
|
-
|
|
21726
|
+
fileURLToPath5(new URL3(".", packageJsonUrl)),
|
|
19215
21727
|
subpath,
|
|
19216
21728
|
target,
|
|
19217
21729
|
internal,
|
|
19218
|
-
base &&
|
|
21730
|
+
base && fileURLToPath5(base)
|
|
19219
21731
|
);
|
|
19220
21732
|
}
|
|
19221
21733
|
function resolvePackageTargetString(target, subpath, match, packageJsonUrl, base, pattern, internal, isPathMap, conditions) {
|
|
@@ -19375,7 +21887,7 @@ function resolvePackageTarget(packageJsonUrl, target, subpath, packageSubpath, b
|
|
|
19375
21887
|
const key = keys[i];
|
|
19376
21888
|
if (isArrayIndex(key)) {
|
|
19377
21889
|
throw new ERR_INVALID_PACKAGE_CONFIG2(
|
|
19378
|
-
|
|
21890
|
+
fileURLToPath5(packageJsonUrl),
|
|
19379
21891
|
base,
|
|
19380
21892
|
'"exports" cannot contain numeric property keys.'
|
|
19381
21893
|
);
|
|
@@ -19434,7 +21946,7 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
|
|
|
19434
21946
|
isConditionalSugar = curIsConditionalSugar;
|
|
19435
21947
|
} else if (isConditionalSugar !== curIsConditionalSugar) {
|
|
19436
21948
|
throw new ERR_INVALID_PACKAGE_CONFIG2(
|
|
19437
|
-
|
|
21949
|
+
fileURLToPath5(packageJsonUrl),
|
|
19438
21950
|
base,
|
|
19439
21951
|
`"exports" cannot contain some keys starting with '.' and some not. The exports object must either be an object of package subpath keys or an object of main entry condition name keys only.`
|
|
19440
21952
|
);
|
|
@@ -19443,12 +21955,15 @@ function isConditionalExportsMainSugar(exports, packageJsonUrl, base) {
|
|
|
19443
21955
|
return isConditionalSugar;
|
|
19444
21956
|
}
|
|
19445
21957
|
function emitTrailingSlashPatternDeprecation(match, pjsonUrl, base) {
|
|
19446
|
-
|
|
21958
|
+
if (process3.noDeprecation) {
|
|
21959
|
+
return;
|
|
21960
|
+
}
|
|
21961
|
+
const pjsonPath = fileURLToPath5(pjsonUrl);
|
|
19447
21962
|
if (emittedPackageWarnings.has(pjsonPath + "|" + match))
|
|
19448
21963
|
return;
|
|
19449
21964
|
emittedPackageWarnings.add(pjsonPath + "|" + match);
|
|
19450
|
-
|
|
19451
|
-
`Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${
|
|
21965
|
+
process3.emitWarning(
|
|
21966
|
+
`Use of deprecated trailing slash pattern mapping "${match}" in the "exports" field module resolution of the package at ${pjsonPath}${base ? ` imported from ${fileURLToPath5(base)}` : ""}. Mapping specifiers ending in "/" is no longer supported.`,
|
|
19452
21967
|
"DeprecationWarning",
|
|
19453
21968
|
"DEP0155"
|
|
19454
21969
|
);
|
|
@@ -19546,12 +22061,12 @@ function patternKeyCompare(a, b) {
|
|
|
19546
22061
|
function packageImportsResolve(name, base, conditions) {
|
|
19547
22062
|
if (name === "#" || name.startsWith("#/") || name.endsWith("/")) {
|
|
19548
22063
|
const reason = "is not a valid internal imports specifier name";
|
|
19549
|
-
throw new ERR_INVALID_MODULE_SPECIFIER(name, reason,
|
|
22064
|
+
throw new ERR_INVALID_MODULE_SPECIFIER(name, reason, fileURLToPath5(base));
|
|
19550
22065
|
}
|
|
19551
22066
|
let packageJsonUrl;
|
|
19552
22067
|
const packageConfig = getPackageScopeConfig(base);
|
|
19553
22068
|
if (packageConfig.exists) {
|
|
19554
|
-
packageJsonUrl =
|
|
22069
|
+
packageJsonUrl = pathToFileURL2(packageConfig.pjsonPath);
|
|
19555
22070
|
const imports = packageConfig.imports;
|
|
19556
22071
|
if (imports) {
|
|
19557
22072
|
if (own2.call(imports, name) && !name.includes("*")) {
|
|
@@ -19630,7 +22145,7 @@ function parsePackageName(specifier, base) {
|
|
|
19630
22145
|
throw new ERR_INVALID_MODULE_SPECIFIER(
|
|
19631
22146
|
specifier,
|
|
19632
22147
|
"is not a valid package name",
|
|
19633
|
-
|
|
22148
|
+
fileURLToPath5(base)
|
|
19634
22149
|
);
|
|
19635
22150
|
}
|
|
19636
22151
|
const packageSubpath = "." + (separatorIndex === -1 ? "" : specifier.slice(separatorIndex));
|
|
@@ -19646,7 +22161,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
19646
22161
|
);
|
|
19647
22162
|
const packageConfig = getPackageScopeConfig(base);
|
|
19648
22163
|
if (packageConfig.exists) {
|
|
19649
|
-
const packageJsonUrl2 =
|
|
22164
|
+
const packageJsonUrl2 = pathToFileURL2(packageConfig.pjsonPath);
|
|
19650
22165
|
if (packageConfig.name === packageName && packageConfig.exports !== void 0 && packageConfig.exports !== null) {
|
|
19651
22166
|
return packageExportsResolve(
|
|
19652
22167
|
packageJsonUrl2,
|
|
@@ -19661,7 +22176,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
19661
22176
|
"./node_modules/" + packageName + "/package.json",
|
|
19662
22177
|
base
|
|
19663
22178
|
);
|
|
19664
|
-
let packageJsonPath =
|
|
22179
|
+
let packageJsonPath = fileURLToPath5(packageJsonUrl);
|
|
19665
22180
|
let lastPath;
|
|
19666
22181
|
do {
|
|
19667
22182
|
const stat = tryStatSync(packageJsonPath.slice(0, -13));
|
|
@@ -19671,10 +22186,13 @@ function packageResolve(specifier, base, conditions) {
|
|
|
19671
22186
|
(isScoped ? "../../../../node_modules/" : "../../../node_modules/") + packageName + "/package.json",
|
|
19672
22187
|
packageJsonUrl
|
|
19673
22188
|
);
|
|
19674
|
-
packageJsonPath =
|
|
22189
|
+
packageJsonPath = fileURLToPath5(packageJsonUrl);
|
|
19675
22190
|
continue;
|
|
19676
22191
|
}
|
|
19677
|
-
const packageConfig2 =
|
|
22192
|
+
const packageConfig2 = package_json_reader_default.read(packageJsonPath, {
|
|
22193
|
+
base,
|
|
22194
|
+
specifier
|
|
22195
|
+
});
|
|
19678
22196
|
if (packageConfig2.exports !== void 0 && packageConfig2.exports !== null) {
|
|
19679
22197
|
return packageExportsResolve(
|
|
19680
22198
|
packageJsonUrl,
|
|
@@ -19689,7 +22207,7 @@ function packageResolve(specifier, base, conditions) {
|
|
|
19689
22207
|
}
|
|
19690
22208
|
return new URL3(packageSubpath, packageJsonUrl);
|
|
19691
22209
|
} while (packageJsonPath.length !== lastPath.length);
|
|
19692
|
-
throw new ERR_MODULE_NOT_FOUND(packageName,
|
|
22210
|
+
throw new ERR_MODULE_NOT_FOUND(packageName, fileURLToPath5(base), false);
|
|
19693
22211
|
}
|
|
19694
22212
|
function isRelativeSpecifier(specifier) {
|
|
19695
22213
|
if (specifier[0] === ".") {
|
|
@@ -19778,23 +22296,6 @@ function throwIfInvalidParentURL(parentURL) {
|
|
|
19778
22296
|
);
|
|
19779
22297
|
}
|
|
19780
22298
|
}
|
|
19781
|
-
function throwIfUnsupportedURLProtocol(url) {
|
|
19782
|
-
const protocol = url.protocol;
|
|
19783
|
-
if (protocol !== "file:" && protocol !== "data:" && protocol !== "node:") {
|
|
19784
|
-
throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(url);
|
|
19785
|
-
}
|
|
19786
|
-
}
|
|
19787
|
-
function throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports2) {
|
|
19788
|
-
const protocol = parsed == null ? void 0 : parsed.protocol;
|
|
19789
|
-
if (protocol && protocol !== "file:" && protocol !== "data:" && (!experimentalNetworkImports2 || protocol !== "https:" && protocol !== "http:")) {
|
|
19790
|
-
throw new ERR_UNSUPPORTED_ESM_URL_SCHEME(
|
|
19791
|
-
parsed,
|
|
19792
|
-
["file", "data"].concat(
|
|
19793
|
-
experimentalNetworkImports2 ? ["https", "http"] : []
|
|
19794
|
-
)
|
|
19795
|
-
);
|
|
19796
|
-
}
|
|
19797
|
-
}
|
|
19798
22299
|
function defaultResolve(specifier, context = {}) {
|
|
19799
22300
|
const { parentURL } = context;
|
|
19800
22301
|
assert5(parentURL !== void 0, "expected `parentURL` to be defined");
|
|
@@ -19810,7 +22311,7 @@ function defaultResolve(specifier, context = {}) {
|
|
|
19810
22311
|
try {
|
|
19811
22312
|
parsed = shouldBeTreatedAsRelativeOrAbsolutePath(specifier) ? new URL3(specifier, parsedParentURL) : new URL3(specifier);
|
|
19812
22313
|
const protocol = parsed.protocol;
|
|
19813
|
-
if (protocol === "data:"
|
|
22314
|
+
if (protocol === "data:") {
|
|
19814
22315
|
return { url: parsed.href, format: null };
|
|
19815
22316
|
}
|
|
19816
22317
|
} catch {
|
|
@@ -19824,15 +22325,13 @@ function defaultResolve(specifier, context = {}) {
|
|
|
19824
22325
|
return maybeReturn;
|
|
19825
22326
|
if (parsed && parsed.protocol === "node:")
|
|
19826
22327
|
return { url: specifier };
|
|
19827
|
-
throwIfUnsupportedURLScheme(parsed, experimentalNetworkImports);
|
|
19828
22328
|
const conditions = getConditionsSet(context.conditions);
|
|
19829
|
-
const
|
|
19830
|
-
throwIfUnsupportedURLProtocol(url);
|
|
22329
|
+
const url2 = moduleResolve(specifier, new URL3(parentURL), conditions, false);
|
|
19831
22330
|
return {
|
|
19832
22331
|
// Do NOT cast `url` to a string: that will work even when there are real
|
|
19833
22332
|
// problems, silencing them
|
|
19834
|
-
url:
|
|
19835
|
-
format: defaultGetFormatWithoutErrors(
|
|
22333
|
+
url: url2.href,
|
|
22334
|
+
format: defaultGetFormatWithoutErrors(url2, { parentURL })
|
|
19836
22335
|
};
|
|
19837
22336
|
}
|
|
19838
22337
|
|
|
@@ -19850,7 +22349,7 @@ function resolve(specifier, parent) {
|
|
|
19850
22349
|
/** @type {ErrnoException} */
|
|
19851
22350
|
error
|
|
19852
22351
|
);
|
|
19853
|
-
if (exception.code === "ERR_UNSUPPORTED_DIR_IMPORT" && typeof exception.url === "string") {
|
|
22352
|
+
if ((exception.code === "ERR_UNSUPPORTED_DIR_IMPORT" || exception.code === "ERR_MODULE_NOT_FOUND") && typeof exception.url === "string") {
|
|
19854
22353
|
return exception.url;
|
|
19855
22354
|
}
|
|
19856
22355
|
throw error;
|
|
@@ -19859,17 +22358,22 @@ function resolve(specifier, parent) {
|
|
|
19859
22358
|
|
|
19860
22359
|
// src/utils/import-from-file.js
|
|
19861
22360
|
function importFromFile(specifier, parent) {
|
|
19862
|
-
const
|
|
19863
|
-
return import(
|
|
22361
|
+
const url2 = resolve(specifier, pathToFileURL3(parent).href);
|
|
22362
|
+
return import(url2);
|
|
19864
22363
|
}
|
|
19865
22364
|
var import_from_file_default = importFromFile;
|
|
19866
22365
|
|
|
19867
22366
|
// src/config/load-external-config.js
|
|
22367
|
+
var requireErrorCodesShouldBeIgnored = /* @__PURE__ */ new Set([
|
|
22368
|
+
"MODULE_NOT_FOUND",
|
|
22369
|
+
"ERR_REQUIRE_ESM",
|
|
22370
|
+
"ERR_PACKAGE_PATH_NOT_EXPORTED"
|
|
22371
|
+
]);
|
|
19868
22372
|
async function loadExternalConfig(config, filepath) {
|
|
19869
22373
|
try {
|
|
19870
22374
|
return require_from_file_default(config, filepath);
|
|
19871
22375
|
} catch (error) {
|
|
19872
|
-
if (
|
|
22376
|
+
if (!requireErrorCodesShouldBeIgnored.has(error == null ? void 0 : error.code)) {
|
|
19873
22377
|
throw error;
|
|
19874
22378
|
}
|
|
19875
22379
|
}
|
|
@@ -19879,7 +22383,7 @@ async function loadExternalConfig(config, filepath) {
|
|
|
19879
22383
|
var load_external_config_default = loadExternalConfig;
|
|
19880
22384
|
|
|
19881
22385
|
// src/config/get-prettier-config-explorer.js
|
|
19882
|
-
var {
|
|
22386
|
+
var { lilconfig } = mockable;
|
|
19883
22387
|
var searchPlaces = [
|
|
19884
22388
|
"package.json",
|
|
19885
22389
|
".prettierrc",
|
|
@@ -19895,6 +22399,19 @@ var searchPlaces = [
|
|
|
19895
22399
|
"prettier.config.cjs",
|
|
19896
22400
|
".prettierrc.toml"
|
|
19897
22401
|
];
|
|
22402
|
+
async function loadJs(filepath) {
|
|
22403
|
+
const module = await import(pathToFileURL4(filepath).href);
|
|
22404
|
+
return module.default;
|
|
22405
|
+
}
|
|
22406
|
+
function loadYaml(filepath, content) {
|
|
22407
|
+
try {
|
|
22408
|
+
return import_js_yaml.default.load(content);
|
|
22409
|
+
} catch (error) {
|
|
22410
|
+
error.message = `YAML Error in ${filepath}:
|
|
22411
|
+
${error.message}`;
|
|
22412
|
+
throw error;
|
|
22413
|
+
}
|
|
22414
|
+
}
|
|
19898
22415
|
var loaders = {
|
|
19899
22416
|
async ".toml"(filePath, content) {
|
|
19900
22417
|
try {
|
|
@@ -19913,7 +22430,21 @@ ${error.message}`;
|
|
|
19913
22430
|
${error.message}`;
|
|
19914
22431
|
throw error;
|
|
19915
22432
|
}
|
|
19916
|
-
}
|
|
22433
|
+
},
|
|
22434
|
+
".json"(filePath, content) {
|
|
22435
|
+
try {
|
|
22436
|
+
return parseJson(content);
|
|
22437
|
+
} catch (error) {
|
|
22438
|
+
error.message = `JSON Error in ${filePath}:
|
|
22439
|
+
${error.message}`;
|
|
22440
|
+
throw error;
|
|
22441
|
+
}
|
|
22442
|
+
},
|
|
22443
|
+
".js": loadJs,
|
|
22444
|
+
".mjs": loadJs,
|
|
22445
|
+
".yaml": loadYaml,
|
|
22446
|
+
".yml": loadYaml,
|
|
22447
|
+
noExt: loadYaml
|
|
19917
22448
|
};
|
|
19918
22449
|
async function transform(result) {
|
|
19919
22450
|
if (!(result == null ? void 0 : result.config)) {
|
|
@@ -19932,13 +22463,8 @@ async function transform(result) {
|
|
|
19932
22463
|
delete config.$schema;
|
|
19933
22464
|
return result;
|
|
19934
22465
|
}
|
|
19935
|
-
function getExplorer(
|
|
19936
|
-
return
|
|
19937
|
-
cache: options8.cache,
|
|
19938
|
-
transform,
|
|
19939
|
-
searchPlaces,
|
|
19940
|
-
loaders
|
|
19941
|
-
});
|
|
22466
|
+
function getExplorer() {
|
|
22467
|
+
return lilconfig("prettier", { searchPlaces, loaders, transform });
|
|
19942
22468
|
}
|
|
19943
22469
|
var get_prettier_config_explorer_default = getExplorer;
|
|
19944
22470
|
|
|
@@ -19962,10 +22488,11 @@ function loadPrettierConfig(filePath, options8) {
|
|
|
19962
22488
|
const { load, search } = getPrettierConfigExplorer({
|
|
19963
22489
|
cache: Boolean(useCache)
|
|
19964
22490
|
});
|
|
19965
|
-
return configPath ? load(configPath) : search(filePath);
|
|
22491
|
+
return configPath ? load(configPath) : search(filePath ? path5.resolve(filePath) : void 0);
|
|
19966
22492
|
}
|
|
19967
|
-
async function resolveConfig(
|
|
22493
|
+
async function resolveConfig(fileUrlOrPath, options8) {
|
|
19968
22494
|
options8 = { useCache: true, ...options8 };
|
|
22495
|
+
const filePath = toPath(fileUrlOrPath);
|
|
19969
22496
|
const [result, editorConfigured] = await Promise.all([
|
|
19970
22497
|
loadPrettierConfig(filePath, options8),
|
|
19971
22498
|
loadEditorConfig2(filePath, options8)
|
|
@@ -19984,10 +22511,12 @@ async function resolveConfig(filePath, options8) {
|
|
|
19984
22511
|
}
|
|
19985
22512
|
return merged;
|
|
19986
22513
|
}
|
|
19987
|
-
async function resolveConfigFile(
|
|
22514
|
+
async function resolveConfigFile(fileUrlOrPath) {
|
|
19988
22515
|
const { search } = getPrettierConfigExplorer({ cache: false });
|
|
19989
|
-
const result = await search(
|
|
19990
|
-
|
|
22516
|
+
const result = await search(
|
|
22517
|
+
fileUrlOrPath ? path5.resolve(toPath(fileUrlOrPath)) : void 0
|
|
22518
|
+
);
|
|
22519
|
+
return (result == null ? void 0 : result.filepath) ?? null;
|
|
19991
22520
|
}
|
|
19992
22521
|
function mergeOverrides(configResult, filePath) {
|
|
19993
22522
|
const { config, filepath: configPath } = configResult || {};
|
|
@@ -20024,36 +22553,53 @@ function pathMatchesGlobs(filePath, patterns, excludedPatterns) {
|
|
|
20024
22553
|
}
|
|
20025
22554
|
|
|
20026
22555
|
// src/utils/ignore.js
|
|
20027
|
-
var import_ignore = __toESM(require_ignore(), 1);
|
|
20028
22556
|
import path6 from "path";
|
|
22557
|
+
import url from "url";
|
|
22558
|
+
var import_ignore = __toESM(require_ignore(), 1);
|
|
20029
22559
|
|
|
20030
22560
|
// src/utils/read-file.js
|
|
20031
22561
|
import fs4 from "fs/promises";
|
|
20032
|
-
async function readFile(
|
|
22562
|
+
async function readFile(file) {
|
|
22563
|
+
if (isUrlString(file)) {
|
|
22564
|
+
file = new URL(file);
|
|
22565
|
+
}
|
|
20033
22566
|
try {
|
|
20034
|
-
return await fs4.readFile(
|
|
22567
|
+
return await fs4.readFile(file, "utf8");
|
|
20035
22568
|
} catch (error) {
|
|
20036
22569
|
if (error.code === "ENOENT") {
|
|
20037
22570
|
return;
|
|
20038
22571
|
}
|
|
20039
|
-
throw new Error(`Unable to read '${
|
|
22572
|
+
throw new Error(`Unable to read '${file}': ${error.message}`);
|
|
20040
22573
|
}
|
|
20041
22574
|
}
|
|
20042
22575
|
var read_file_default = readFile;
|
|
20043
22576
|
|
|
20044
22577
|
// src/utils/ignore.js
|
|
20045
22578
|
var createIgnore = import_ignore.default.default;
|
|
20046
|
-
var slash = path6.sep === "\\" ? (
|
|
22579
|
+
var slash = path6.sep === "\\" ? (filePath) => string_replace_all_default(
|
|
20047
22580
|
/* isOptionalObject*/
|
|
20048
22581
|
false,
|
|
20049
|
-
|
|
22582
|
+
filePath,
|
|
20050
22583
|
"\\",
|
|
20051
22584
|
"/"
|
|
20052
|
-
) : (
|
|
20053
|
-
|
|
22585
|
+
) : (filePath) => filePath;
|
|
22586
|
+
function getRelativePath(file, ignoreFile) {
|
|
22587
|
+
const ignoreFilePath = toPath(ignoreFile);
|
|
22588
|
+
const filePath = isUrl(file) ? url.fileURLToPath(file) : (
|
|
22589
|
+
// @ts-expect-error -- URLs handled by `isUrl`
|
|
22590
|
+
path6.resolve(file)
|
|
22591
|
+
);
|
|
22592
|
+
return path6.relative(
|
|
22593
|
+
// If there's an ignore-path set, the filename must be relative to the
|
|
22594
|
+
// ignore path, not the current working directory.
|
|
22595
|
+
ignoreFilePath ? path6.dirname(ignoreFilePath) : process.cwd(),
|
|
22596
|
+
filePath
|
|
22597
|
+
);
|
|
22598
|
+
}
|
|
22599
|
+
async function createSingleIsIgnoredFunction(ignoreFile, withNodeModules) {
|
|
20054
22600
|
let content = "";
|
|
20055
|
-
if (
|
|
20056
|
-
content += await read_file_default(
|
|
22601
|
+
if (ignoreFile) {
|
|
22602
|
+
content += await read_file_default(ignoreFile) ?? "";
|
|
20057
22603
|
}
|
|
20058
22604
|
if (!withNodeModules) {
|
|
20059
22605
|
content += "\nnode_modules";
|
|
@@ -20064,60 +22610,56 @@ async function createSingleIsIgnoredFunction(ignoreFilePath, withNodeModules) {
|
|
|
20064
22610
|
const ignore = createIgnore({
|
|
20065
22611
|
allowRelativePaths: true
|
|
20066
22612
|
}).add(content);
|
|
20067
|
-
return (
|
|
20068
|
-
filepath = path6.resolve(filepath);
|
|
20069
|
-
const relativePath = ignoreFilePath ? path6.relative(path6.dirname(ignoreFilePath), filepath) : path6.relative(process.cwd(), filepath);
|
|
20070
|
-
return ignore.ignores(slash(relativePath));
|
|
20071
|
-
};
|
|
22613
|
+
return (file) => ignore.ignores(slash(getRelativePath(file, ignoreFile)));
|
|
20072
22614
|
}
|
|
20073
|
-
async function createIsIgnoredFunction(
|
|
20074
|
-
if (
|
|
20075
|
-
|
|
22615
|
+
async function createIsIgnoredFunction(ignoreFiles, withNodeModules) {
|
|
22616
|
+
if (ignoreFiles.length === 0 && !withNodeModules) {
|
|
22617
|
+
ignoreFiles = [void 0];
|
|
20076
22618
|
}
|
|
20077
|
-
const isIgnoredFunctions = (await Promise.all(
|
|
20078
|
-
return (
|
|
22619
|
+
const isIgnoredFunctions = (await Promise.all(ignoreFiles.map((ignoreFile) => createSingleIsIgnoredFunction(ignoreFile, withNodeModules)))).filter(Boolean);
|
|
22620
|
+
return (file) => isIgnoredFunctions.some((isIgnored2) => isIgnored2(file));
|
|
20079
22621
|
}
|
|
20080
|
-
async function isIgnored(
|
|
22622
|
+
async function isIgnored(file, options8) {
|
|
20081
22623
|
const {
|
|
20082
|
-
ignorePath,
|
|
22624
|
+
ignorePath: ignoreFiles,
|
|
20083
22625
|
withNodeModules
|
|
20084
22626
|
} = options8;
|
|
20085
|
-
const isIgnored2 = await createIsIgnoredFunction(
|
|
20086
|
-
return isIgnored2(
|
|
22627
|
+
const isIgnored2 = await createIsIgnoredFunction(ignoreFiles, withNodeModules);
|
|
22628
|
+
return isIgnored2(file);
|
|
20087
22629
|
}
|
|
20088
22630
|
|
|
20089
22631
|
// src/common/get-file-info.js
|
|
20090
|
-
async function getFileInfo(
|
|
20091
|
-
if (typeof
|
|
22632
|
+
async function getFileInfo(file, options8) {
|
|
22633
|
+
if (typeof file !== "string" && !(file instanceof URL)) {
|
|
20092
22634
|
throw new TypeError(
|
|
20093
|
-
`expect \`
|
|
22635
|
+
`expect \`file\` to be a string or URL, got \`${typeof file}\``
|
|
20094
22636
|
);
|
|
20095
22637
|
}
|
|
20096
22638
|
let { ignorePath, withNodeModules } = options8;
|
|
20097
22639
|
if (!Array.isArray(ignorePath)) {
|
|
20098
22640
|
ignorePath = [ignorePath];
|
|
20099
22641
|
}
|
|
20100
|
-
const ignored = await isIgnored(
|
|
22642
|
+
const ignored = await isIgnored(file, { ignorePath, withNodeModules });
|
|
20101
22643
|
let inferredParser;
|
|
20102
22644
|
if (!ignored) {
|
|
20103
|
-
inferredParser = await getParser(
|
|
22645
|
+
inferredParser = await getParser(file, options8);
|
|
20104
22646
|
}
|
|
20105
22647
|
return {
|
|
20106
22648
|
ignored,
|
|
20107
22649
|
inferredParser: inferredParser ?? null
|
|
20108
22650
|
};
|
|
20109
22651
|
}
|
|
20110
|
-
async function getParser(
|
|
22652
|
+
async function getParser(file, options8) {
|
|
20111
22653
|
let config;
|
|
20112
22654
|
if (options8.resolveConfig !== false) {
|
|
20113
|
-
config = await resolveConfig(
|
|
22655
|
+
config = await resolveConfig(file);
|
|
20114
22656
|
}
|
|
20115
|
-
return (config == null ? void 0 : config.parser) ?? infer_parser_default(options8, { physicalFile:
|
|
22657
|
+
return (config == null ? void 0 : config.parser) ?? infer_parser_default(options8, { physicalFile: file });
|
|
20116
22658
|
}
|
|
20117
22659
|
var get_file_info_default = getFileInfo;
|
|
20118
22660
|
|
|
20119
22661
|
// src/main/plugins/load-plugin.js
|
|
20120
|
-
import { pathToFileURL as
|
|
22662
|
+
import { pathToFileURL as pathToFileURL5 } from "url";
|
|
20121
22663
|
import path8 from "path";
|
|
20122
22664
|
|
|
20123
22665
|
// src/utils/import-from-directory.js
|
|
@@ -20138,7 +22680,7 @@ var loadPluginFromDirectory = mem(
|
|
|
20138
22680
|
);
|
|
20139
22681
|
var importPlugin = mem(async (name) => {
|
|
20140
22682
|
try {
|
|
20141
|
-
return await import(
|
|
22683
|
+
return await import(pathToFileURL5(path8.resolve(name)).href);
|
|
20142
22684
|
} catch {
|
|
20143
22685
|
return import_from_directory_default(name, process.cwd());
|
|
20144
22686
|
}
|
|
@@ -20519,6 +23061,13 @@ var options4 = {
|
|
|
20519
23061
|
description: "Print semicolons.",
|
|
20520
23062
|
oppositeDescription: "Do not print semicolons, except at the beginning of lines which may need them."
|
|
20521
23063
|
},
|
|
23064
|
+
experimentalTernaries: {
|
|
23065
|
+
category: CATEGORY_JAVASCRIPT,
|
|
23066
|
+
type: "boolean",
|
|
23067
|
+
default: false,
|
|
23068
|
+
description: "Use curious ternaries, with the question mark after the condition.",
|
|
23069
|
+
oppositeDescription: "Default behavior of ternaries; keep question marks on the same line as the consequent."
|
|
23070
|
+
},
|
|
20522
23071
|
singleQuote: common_options_evaluate_default.singleQuote,
|
|
20523
23072
|
jsxSingleQuote: {
|
|
20524
23073
|
category: CATEGORY_JAVASCRIPT,
|
|
@@ -20858,6 +23407,7 @@ var languages_evaluate_default6 = [
|
|
|
20858
23407
|
"extensions": [
|
|
20859
23408
|
".jsonc",
|
|
20860
23409
|
".code-snippets",
|
|
23410
|
+
".code-workspace",
|
|
20861
23411
|
".sublime-build",
|
|
20862
23412
|
".sublime-commands",
|
|
20863
23413
|
".sublime-completions",
|
|
@@ -21426,7 +23976,7 @@ function isNextLineEmpty2(text, startIndex) {
|
|
|
21426
23976
|
import * as doc from "./doc.mjs";
|
|
21427
23977
|
|
|
21428
23978
|
// src/main/version.evaluate.cjs
|
|
21429
|
-
var version_evaluate_default = "3.0
|
|
23979
|
+
var version_evaluate_default = "3.1.0";
|
|
21430
23980
|
|
|
21431
23981
|
// src/index.js
|
|
21432
23982
|
function withPlugins(fn, optionsArgumentIndex = 1) {
|