@storm-software/linting-tools 1.132.80 → 1.132.81
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/bin/lint.cjs +422 -380
- package/bin/lint.js +51 -9
- package/package.json +2 -2
package/bin/lint.cjs
CHANGED
|
@@ -282802,6 +282802,35 @@ var DEFAULT_COLOR_CONFIG = {
|
|
|
282802
282802
|
gradient: ["#1fb2a6", "#db2777", "#818cf8"]
|
|
282803
282803
|
}
|
|
282804
282804
|
};
|
|
282805
|
+
function getColors(config2) {
|
|
282806
|
+
if (!_optionalChain([config2, 'optionalAccess', _428 => _428.colors]) || typeof config2.colors !== "object" || !config2.colors["dark"] && (!config2.colors["base"] || typeof config2.colors !== "object" || !_optionalChain([config2, 'access', _429 => _429.colors, 'access', _430 => _430["base"], 'optionalAccess', _431 => _431["dark"]]))) {
|
|
282807
|
+
return DEFAULT_COLOR_CONFIG;
|
|
282808
|
+
}
|
|
282809
|
+
if (config2.colors["base"]) {
|
|
282810
|
+
if (typeof config2.colors["base"]["dark"] === "object") {
|
|
282811
|
+
return config2.colors["base"]["dark"];
|
|
282812
|
+
} else if (config2.colors["base"]["dark"] === "string") {
|
|
282813
|
+
return config2.colors["base"];
|
|
282814
|
+
}
|
|
282815
|
+
}
|
|
282816
|
+
if (typeof config2.colors["dark"] === "object") {
|
|
282817
|
+
return config2.colors["dark"];
|
|
282818
|
+
}
|
|
282819
|
+
return _nullishCoalesce(config2.colors, () => ( DEFAULT_COLOR_CONFIG));
|
|
282820
|
+
}
|
|
282821
|
+
function getColor(key, config2) {
|
|
282822
|
+
const colors = getColors(config2);
|
|
282823
|
+
const result = (typeof colors["dark"] === "object" ? colors["dark"][key] : colors[key]) || DEFAULT_COLOR_CONFIG["dark"][key] || DEFAULT_COLOR_CONFIG[key];
|
|
282824
|
+
if (result) {
|
|
282825
|
+
return result;
|
|
282826
|
+
}
|
|
282827
|
+
if (key === "link" || key === "debug") {
|
|
282828
|
+
return getColor("info", config2);
|
|
282829
|
+
} else if (key === "fatal") {
|
|
282830
|
+
return getColor("danger", config2);
|
|
282831
|
+
}
|
|
282832
|
+
return getColor("brand", config2);
|
|
282833
|
+
}
|
|
282805
282834
|
|
|
282806
282835
|
// ../config-tools/src/logger/chalk.ts
|
|
282807
282836
|
_chunk6B2W5NCRcjs.init_cjs_shims.call(void 0, );
|
|
@@ -282831,7 +282860,7 @@ var chalkDefault = {
|
|
|
282831
282860
|
};
|
|
282832
282861
|
var getChalk = () => {
|
|
282833
282862
|
let _chalk = import_chalk.default;
|
|
282834
|
-
if (!_optionalChain([_chalk, 'optionalAccess',
|
|
282863
|
+
if (!_optionalChain([_chalk, 'optionalAccess', _432 => _432.hex]) || !_optionalChain([_chalk, 'optionalAccess', _433 => _433.bold, 'optionalAccess', _434 => _434.hex]) || !_optionalChain([_chalk, 'optionalAccess', _435 => _435.bgHex]) || !_optionalChain([_chalk, 'optionalAccess', _436 => _436.whiteBright]) || !_optionalChain([_chalk, 'optionalAccess', _437 => _437.white])) {
|
|
282835
282864
|
_chalk = chalkDefault;
|
|
282836
282865
|
}
|
|
282837
282866
|
return _chalk;
|
|
@@ -282925,7 +282954,7 @@ var getLogLevelLabel = (logLevel = LogLevel.INFO) => {
|
|
|
282925
282954
|
|
|
282926
282955
|
// ../config-tools/src/logger/console.ts
|
|
282927
282956
|
var getLogFn = (logLevel = LogLevel.INFO, config2 = {}, _chalk = getChalk()) => {
|
|
282928
|
-
const colors = !_optionalChain([config2, 'access',
|
|
282957
|
+
const colors = !_optionalChain([config2, 'access', _438 => _438.colors, 'optionalAccess', _439 => _439.dark]) && !_optionalChain([config2, 'access', _440 => _440.colors, 'optionalAccess', _441 => _441["base"]]) && !_optionalChain([config2, 'access', _442 => _442.colors, 'optionalAccess', _443 => _443["base"], 'optionalAccess', _444 => _444.dark]) ? DEFAULT_COLOR_CONFIG : _optionalChain([config2, 'access', _445 => _445.colors, 'optionalAccess', _446 => _446.dark]) && typeof config2.colors.dark === "string" ? config2.colors : _optionalChain([config2, 'access', _447 => _447.colors, 'optionalAccess', _448 => _448["base"], 'optionalAccess', _449 => _449.dark]) && typeof config2.colors["base"].dark === "string" ? config2.colors["base"].dark : _optionalChain([config2, 'access', _450 => _450.colors, 'optionalAccess', _451 => _451["base"]]) ? _optionalChain([config2, 'access', _452 => _452.colors, 'optionalAccess', _453 => _453["base"]]) : DEFAULT_COLOR_CONFIG;
|
|
282929
282958
|
const configLogLevel = config2.logLevel || process.env.STORM_LOG_LEVEL || LogLevelLabel.INFO;
|
|
282930
282959
|
if (logLevel > getLogLevel(configLogLevel) || logLevel <= LogLevel.SILENT || getLogLevel(configLogLevel) <= LogLevel.SILENT) {
|
|
282931
282960
|
return (_) => {
|
|
@@ -283058,11 +283087,12 @@ ${Object.keys(message).filter((key) => !skip3.includes(key)).map(
|
|
|
283058
283087
|
};
|
|
283059
283088
|
var _isFunction = (value) => {
|
|
283060
283089
|
try {
|
|
283061
|
-
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess',
|
|
283090
|
+
return value instanceof Function || typeof value === "function" || !!(_optionalChain([value, 'optionalAccess', _454 => _454.constructor]) && _optionalChain([value, 'optionalAccess', _455 => _455.call]) && _optionalChain([value, 'optionalAccess', _456 => _456.apply]));
|
|
283062
283091
|
} catch (e50) {
|
|
283063
283092
|
return false;
|
|
283064
283093
|
}
|
|
283065
283094
|
};
|
|
283095
|
+
var brandIcon = (config2 = {}, _chalk = getChalk()) => _chalk.hex(getColor("brand", config2))("\u{1F5F2}");
|
|
283066
283096
|
|
|
283067
283097
|
// ../config-tools/src/utilities/find-workspace-root.ts
|
|
283068
283098
|
_chunk6B2W5NCRcjs.init_cjs_shims.call(void 0, );
|
|
@@ -283084,7 +283114,7 @@ var correctPaths = function(path32) {
|
|
|
283084
283114
|
return ".";
|
|
283085
283115
|
}
|
|
283086
283116
|
path32 = normalizeWindowsPath(path32);
|
|
283087
|
-
const isUNCPath = _optionalChain([path32, 'optionalAccess',
|
|
283117
|
+
const isUNCPath = _optionalChain([path32, 'optionalAccess', _457 => _457.match, 'call', _458 => _458(_UNC_REGEX)]);
|
|
283088
283118
|
const isPathAbsolute = isAbsolute(path32);
|
|
283089
283119
|
const trailingSeparator = path32[path32.length - 1] === "/";
|
|
283090
283120
|
path32 = normalizeString(path32, !isPathAbsolute);
|
|
@@ -283362,13 +283392,13 @@ function $constructor(name2, initializer2, params) {
|
|
|
283362
283392
|
}
|
|
283363
283393
|
}
|
|
283364
283394
|
}
|
|
283365
|
-
const Parent = _nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
283395
|
+
const Parent = _nullishCoalesce(_optionalChain([params, 'optionalAccess', _459 => _459.Parent]), () => ( Object));
|
|
283366
283396
|
class Definition extends Parent {
|
|
283367
283397
|
}
|
|
283368
283398
|
Object.defineProperty(Definition, "name", { value: name2 });
|
|
283369
283399
|
function _(def) {
|
|
283370
283400
|
var _a2;
|
|
283371
|
-
const inst = _optionalChain([params, 'optionalAccess',
|
|
283401
|
+
const inst = _optionalChain([params, 'optionalAccess', _460 => _460.Parent]) ? new Definition() : this;
|
|
283372
283402
|
init(inst, def);
|
|
283373
283403
|
_nullishCoalesce((_a2 = inst._zod).deferred, () => ( (_a2.deferred = [])));
|
|
283374
283404
|
for (const fn of inst._zod.deferred) {
|
|
@@ -283379,9 +283409,9 @@ function $constructor(name2, initializer2, params) {
|
|
|
283379
283409
|
Object.defineProperty(_, "init", { value: init });
|
|
283380
283410
|
Object.defineProperty(_, Symbol.hasInstance, {
|
|
283381
283411
|
value: (inst) => {
|
|
283382
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
283412
|
+
if (_optionalChain([params, 'optionalAccess', _461 => _461.Parent]) && inst instanceof params.Parent)
|
|
283383
283413
|
return true;
|
|
283384
|
-
return _optionalChain([inst, 'optionalAccess',
|
|
283414
|
+
return _optionalChain([inst, 'optionalAccess', _462 => _462._zod, 'optionalAccess', _463 => _463.traits, 'optionalAccess', _464 => _464.has, 'call', _465 => _465(name2)]);
|
|
283385
283415
|
}
|
|
283386
283416
|
});
|
|
283387
283417
|
Object.defineProperty(_, "name", { value: name2 });
|
|
@@ -283525,7 +283555,7 @@ function floatSafeRemainder(val, step) {
|
|
|
283525
283555
|
let stepDecCount = (stepString.split(".")[1] || "").length;
|
|
283526
283556
|
if (stepDecCount === 0 && /\d?e-\d?/.test(stepString)) {
|
|
283527
283557
|
const match4 = stepString.match(/\d?e-(\d?)/);
|
|
283528
|
-
if (_optionalChain([match4, 'optionalAccess',
|
|
283558
|
+
if (_optionalChain([match4, 'optionalAccess', _466 => _466[1]])) {
|
|
283529
283559
|
stepDecCount = Number.parseInt(match4[1]);
|
|
283530
283560
|
}
|
|
283531
283561
|
}
|
|
@@ -283582,7 +283612,7 @@ function cloneDef(schema2) {
|
|
|
283582
283612
|
function getElementAtPath(obj, path32) {
|
|
283583
283613
|
if (!path32)
|
|
283584
283614
|
return obj;
|
|
283585
|
-
return path32.reduce((acc, key) => _optionalChain([acc, 'optionalAccess',
|
|
283615
|
+
return path32.reduce((acc, key) => _optionalChain([acc, 'optionalAccess', _467 => _467[key]]), obj);
|
|
283586
283616
|
}
|
|
283587
283617
|
function promiseAllObject(promisesObj) {
|
|
283588
283618
|
const keys3 = Object.keys(promisesObj);
|
|
@@ -283615,7 +283645,7 @@ function isObject(data) {
|
|
|
283615
283645
|
return typeof data === "object" && data !== null && !Array.isArray(data);
|
|
283616
283646
|
}
|
|
283617
283647
|
var allowsEval = cached(() => {
|
|
283618
|
-
if (typeof navigator !== "undefined" && _optionalChain([navigator, 'optionalAccess',
|
|
283648
|
+
if (typeof navigator !== "undefined" && _optionalChain([navigator, 'optionalAccess', _468 => _468.userAgent, 'optionalAccess', _469 => _469.includes, 'call', _470 => _470("Cloudflare")])) {
|
|
283619
283649
|
return false;
|
|
283620
283650
|
}
|
|
283621
283651
|
try {
|
|
@@ -283709,7 +283739,7 @@ function escapeRegex(str2) {
|
|
|
283709
283739
|
}
|
|
283710
283740
|
function clone(inst, def, params) {
|
|
283711
283741
|
const cl = new inst._zod.constr(_nullishCoalesce(def, () => ( inst._zod.def)));
|
|
283712
|
-
if (!def || _optionalChain([params, 'optionalAccess',
|
|
283742
|
+
if (!def || _optionalChain([params, 'optionalAccess', _471 => _471.parent]))
|
|
283713
283743
|
cl._zod.parent = inst;
|
|
283714
283744
|
return cl;
|
|
283715
283745
|
}
|
|
@@ -283719,8 +283749,8 @@ function normalizeParams(_params) {
|
|
|
283719
283749
|
return {};
|
|
283720
283750
|
if (typeof params === "string")
|
|
283721
283751
|
return { error: () => params };
|
|
283722
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
283723
|
-
if (_optionalChain([params, 'optionalAccess',
|
|
283752
|
+
if (_optionalChain([params, 'optionalAccess', _472 => _472.message]) !== void 0) {
|
|
283753
|
+
if (_optionalChain([params, 'optionalAccess', _473 => _473.error]) !== void 0)
|
|
283724
283754
|
throw new Error("Cannot specify both `message` and `error` params");
|
|
283725
283755
|
params.error = params.message;
|
|
283726
283756
|
}
|
|
@@ -283942,7 +283972,7 @@ function aborted(x, startIndex = 0) {
|
|
|
283942
283972
|
if (x.aborted === true)
|
|
283943
283973
|
return true;
|
|
283944
283974
|
for (let i = startIndex; i < x.issues.length; i++) {
|
|
283945
|
-
if (_optionalChain([x, 'access',
|
|
283975
|
+
if (_optionalChain([x, 'access', _474 => _474.issues, 'access', _475 => _475[i], 'optionalAccess', _476 => _476.continue]) !== true) {
|
|
283946
283976
|
return true;
|
|
283947
283977
|
}
|
|
283948
283978
|
}
|
|
@@ -283957,17 +283987,17 @@ function prefixIssues(path32, issues) {
|
|
|
283957
283987
|
});
|
|
283958
283988
|
}
|
|
283959
283989
|
function unwrapMessage(message) {
|
|
283960
|
-
return typeof message === "string" ? message : _optionalChain([message, 'optionalAccess',
|
|
283990
|
+
return typeof message === "string" ? message : _optionalChain([message, 'optionalAccess', _477 => _477.message]);
|
|
283961
283991
|
}
|
|
283962
283992
|
function finalizeIssue(iss, ctx, config2) {
|
|
283963
283993
|
const full = { ...iss, path: _nullishCoalesce(iss.path, () => ( [])) };
|
|
283964
283994
|
if (!iss.message) {
|
|
283965
|
-
const message = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(unwrapMessage(_optionalChain([iss, 'access',
|
|
283995
|
+
const message = _nullishCoalesce(_nullishCoalesce(_nullishCoalesce(_nullishCoalesce(unwrapMessage(_optionalChain([iss, 'access', _478 => _478.inst, 'optionalAccess', _479 => _479._zod, 'access', _480 => _480.def, 'optionalAccess', _481 => _481.error, 'optionalCall', _482 => _482(iss)])), () => ( unwrapMessage(_optionalChain([ctx, 'optionalAccess', _483 => _483.error, 'optionalCall', _484 => _484(iss)])))), () => ( unwrapMessage(_optionalChain([config2, 'access', _485 => _485.customError, 'optionalCall', _486 => _486(iss)])))), () => ( unwrapMessage(_optionalChain([config2, 'access', _487 => _487.localeError, 'optionalCall', _488 => _488(iss)])))), () => ( "Invalid input"));
|
|
283966
283996
|
full.message = message;
|
|
283967
283997
|
}
|
|
283968
283998
|
delete full.inst;
|
|
283969
283999
|
delete full.continue;
|
|
283970
|
-
if (!_optionalChain([ctx, 'optionalAccess',
|
|
284000
|
+
if (!_optionalChain([ctx, 'optionalAccess', _489 => _489.reportInput])) {
|
|
283971
284001
|
delete full.input;
|
|
283972
284002
|
}
|
|
283973
284003
|
return full;
|
|
@@ -284075,8 +284105,8 @@ var _parse = (_Err) => (schema2, value, _ctx, _params) => {
|
|
|
284075
284105
|
throw new $ZodAsyncError();
|
|
284076
284106
|
}
|
|
284077
284107
|
if (result.issues.length) {
|
|
284078
|
-
const e = new (_nullishCoalesce(_optionalChain([_params, 'optionalAccess',
|
|
284079
|
-
captureStackTrace(e, _optionalChain([_params, 'optionalAccess',
|
|
284108
|
+
const e = new (_nullishCoalesce(_optionalChain([_params, 'optionalAccess', _490 => _490.Err]), () => ( _Err)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
284109
|
+
captureStackTrace(e, _optionalChain([_params, 'optionalAccess', _491 => _491.callee]));
|
|
284080
284110
|
throw e;
|
|
284081
284111
|
}
|
|
284082
284112
|
return result.value;
|
|
@@ -284088,8 +284118,8 @@ var _parseAsync = (_Err) => async (schema2, value, _ctx, params) => {
|
|
|
284088
284118
|
if (result instanceof Promise)
|
|
284089
284119
|
result = await result;
|
|
284090
284120
|
if (result.issues.length) {
|
|
284091
|
-
const e = new (_nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
284092
|
-
captureStackTrace(e, _optionalChain([params, 'optionalAccess',
|
|
284121
|
+
const e = new (_nullishCoalesce(_optionalChain([params, 'optionalAccess', _492 => _492.Err]), () => ( _Err)))(result.issues.map((iss) => finalizeIssue(iss, ctx, config())));
|
|
284122
|
+
captureStackTrace(e, _optionalChain([params, 'optionalAccess', _493 => _493.callee]));
|
|
284093
284123
|
throw e;
|
|
284094
284124
|
}
|
|
284095
284125
|
return result.value;
|
|
@@ -284130,7 +284160,7 @@ _chunk6B2W5NCRcjs.init_cjs_shims.call(void 0, );
|
|
|
284130
284160
|
var dateSource = `(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))`;
|
|
284131
284161
|
var date = /* @__PURE__ */ new RegExp(`^${dateSource}$`);
|
|
284132
284162
|
var string = (params) => {
|
|
284133
|
-
const regex3 = params ? `[\\s\\S]{${_nullishCoalesce(_optionalChain([params, 'optionalAccess',
|
|
284163
|
+
const regex3 = params ? `[\\s\\S]{${_nullishCoalesce(_optionalChain([params, 'optionalAccess', _494 => _494.minimum]), () => ( 0))},${_nullishCoalesce(_optionalChain([params, 'optionalAccess', _495 => _495.maximum]), () => ( ""))}}` : `[\\s\\S]*`;
|
|
284134
284164
|
return new RegExp(`^${regex3}$`);
|
|
284135
284165
|
};
|
|
284136
284166
|
var boolean = /^(?:true|false)$/i;
|
|
@@ -284256,7 +284286,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
284256
284286
|
}
|
|
284257
284287
|
if (checks2.length === 0) {
|
|
284258
284288
|
_nullishCoalesce((_a2 = inst._zod).deferred, () => ( (_a2.deferred = [])));
|
|
284259
|
-
_optionalChain([inst, 'access',
|
|
284289
|
+
_optionalChain([inst, 'access', _496 => _496._zod, 'access', _497 => _497.deferred, 'optionalAccess', _498 => _498.push, 'call', _499 => _499(() => {
|
|
284260
284290
|
inst._zod.run = inst._zod.parse;
|
|
284261
284291
|
})]);
|
|
284262
284292
|
} else {
|
|
@@ -284273,7 +284303,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
284273
284303
|
}
|
|
284274
284304
|
const currLen = payload.issues.length;
|
|
284275
284305
|
const _ = ch._zod.check(payload);
|
|
284276
|
-
if (_ instanceof Promise && _optionalChain([ctx, 'optionalAccess',
|
|
284306
|
+
if (_ instanceof Promise && _optionalChain([ctx, 'optionalAccess', _500 => _500.async]) === false) {
|
|
284277
284307
|
throw new $ZodAsyncError();
|
|
284278
284308
|
}
|
|
284279
284309
|
if (asyncResult || _ instanceof Promise) {
|
|
@@ -284339,9 +284369,9 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
284339
284369
|
validate: (value) => {
|
|
284340
284370
|
try {
|
|
284341
284371
|
const r = safeParse(inst, value);
|
|
284342
|
-
return r.success ? { value: r.data } : { issues: _optionalChain([r, 'access',
|
|
284372
|
+
return r.success ? { value: r.data } : { issues: _optionalChain([r, 'access', _501 => _501.error, 'optionalAccess', _502 => _502.issues]) };
|
|
284343
284373
|
} catch (_) {
|
|
284344
|
-
return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: _optionalChain([r, 'access',
|
|
284374
|
+
return safeParseAsync(inst, value).then((r) => r.success ? { value: r.data } : { issues: _optionalChain([r, 'access', _503 => _503.error, 'optionalAccess', _504 => _504.issues]) });
|
|
284345
284375
|
}
|
|
284346
284376
|
},
|
|
284347
284377
|
vendor: "zod",
|
|
@@ -284350,7 +284380,7 @@ var $ZodType = /* @__PURE__ */ $constructor("$ZodType", (inst, def) => {
|
|
|
284350
284380
|
});
|
|
284351
284381
|
var $ZodString = /* @__PURE__ */ $constructor("$ZodString", (inst, def) => {
|
|
284352
284382
|
$ZodType.init(inst, def);
|
|
284353
|
-
inst._zod.pattern = _nullishCoalesce([..._nullishCoalesce(_optionalChain([inst, 'optionalAccess',
|
|
284383
|
+
inst._zod.pattern = _nullishCoalesce([..._nullishCoalesce(_optionalChain([inst, 'optionalAccess', _505 => _505._zod, 'access', _506 => _506.bag, 'optionalAccess', _507 => _507.patterns]), () => ( []))].pop(), () => ( string(inst._zod.bag)));
|
|
284354
284384
|
inst._zod.parse = (payload, _) => {
|
|
284355
284385
|
if (def.coerce)
|
|
284356
284386
|
try {
|
|
@@ -284502,7 +284532,7 @@ function handlePropertyResult(result, final, key, input) {
|
|
|
284502
284532
|
function normalizeDef(def) {
|
|
284503
284533
|
const keys3 = Object.keys(def.shape);
|
|
284504
284534
|
for (const k of keys3) {
|
|
284505
|
-
if (!_optionalChain([def, 'access',
|
|
284535
|
+
if (!_optionalChain([def, 'access', _508 => _508.shape, 'optionalAccess', _509 => _509[k], 'optionalAccess', _510 => _510._zod, 'optionalAccess', _511 => _511.traits, 'optionalAccess', _512 => _512.has, 'call', _513 => _513("$ZodType")])) {
|
|
284506
284536
|
throw new Error(`Invalid element at key "${k}": expected a Zod schema`);
|
|
284507
284537
|
}
|
|
284508
284538
|
}
|
|
@@ -284551,7 +284581,7 @@ function handleCatchall(proms, input, payload, ctx, def, inst) {
|
|
|
284551
284581
|
var $ZodObject = /* @__PURE__ */ $constructor("$ZodObject", (inst, def) => {
|
|
284552
284582
|
$ZodType.init(inst, def);
|
|
284553
284583
|
const desc = Object.getOwnPropertyDescriptor(def, "shape");
|
|
284554
|
-
if (!_optionalChain([desc, 'optionalAccess',
|
|
284584
|
+
if (!_optionalChain([desc, 'optionalAccess', _514 => _514.get])) {
|
|
284555
284585
|
const sh = def.shape;
|
|
284556
284586
|
Object.defineProperty(def, "shape", {
|
|
284557
284587
|
get: () => {
|
|
@@ -285992,7 +286022,7 @@ function applyDefaultConfig(config2) {
|
|
|
285992
286022
|
if (!config2.contact) {
|
|
285993
286023
|
config2.contact = `${config2.homepage}/contact`;
|
|
285994
286024
|
}
|
|
285995
|
-
if (!_optionalChain([config2, 'access',
|
|
286025
|
+
if (!_optionalChain([config2, 'access', _515 => _515.error, 'optionalAccess', _516 => _516.codesFile]) || !_optionalChain([config2, 'optionalAccess', _517 => _517.error, 'optionalAccess', _518 => _518.url])) {
|
|
285996
286026
|
config2.error ??= { codesFile: STORM_DEFAULT_ERROR_CODES_FILE };
|
|
285997
286027
|
if (config2.homepage) {
|
|
285998
286028
|
config2.error.url ??= `${config2.homepage}/errors`;
|
|
@@ -286074,7 +286104,7 @@ var getConfigFileByName = async (fileName, filePath2, options = {}) => {
|
|
|
286074
286104
|
cwd: workspacePath,
|
|
286075
286105
|
packageJson: true,
|
|
286076
286106
|
name: fileName,
|
|
286077
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
286107
|
+
envName: _optionalChain([fileName, 'optionalAccess', _519 => _519.toUpperCase, 'call', _520 => _520()]),
|
|
286078
286108
|
jitiOptions: {
|
|
286079
286109
|
debug: false,
|
|
286080
286110
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
@@ -286088,7 +286118,7 @@ var getConfigFileByName = async (fileName, filePath2, options = {}) => {
|
|
|
286088
286118
|
cwd: workspacePath,
|
|
286089
286119
|
packageJson: true,
|
|
286090
286120
|
name: fileName,
|
|
286091
|
-
envName: _optionalChain([fileName, 'optionalAccess',
|
|
286121
|
+
envName: _optionalChain([fileName, 'optionalAccess', _521 => _521.toUpperCase, 'call', _522 => _522()]),
|
|
286092
286122
|
jitiOptions: {
|
|
286093
286123
|
debug: false,
|
|
286094
286124
|
fsCache: process.env.STORM_SKIP_CACHE === "true" ? false : joinPaths(
|
|
@@ -286122,7 +286152,7 @@ var getConfigFile = async (filePath2, additionalFileNames = []) => {
|
|
|
286122
286152
|
)
|
|
286123
286153
|
);
|
|
286124
286154
|
for (const result2 of results) {
|
|
286125
|
-
if (_optionalChain([result2, 'optionalAccess',
|
|
286155
|
+
if (_optionalChain([result2, 'optionalAccess', _523 => _523.config]) && _optionalChain([result2, 'optionalAccess', _524 => _524.configFile]) && Object.keys(result2.config).length > 0) {
|
|
286126
286156
|
if (!config2.skipConfigLogging && !result2.config.skipConfigLogging) {
|
|
286127
286157
|
writeTrace(
|
|
286128
286158
|
`Found alternative configuration file "${result2.configFile.includes(`${workspacePath}/`) ? result2.configFile.replace(`${workspacePath}/`, "") : result2.configFile}" at "${workspacePath}"`,
|
|
@@ -286366,16 +286396,16 @@ _chunk6B2W5NCRcjs.init_cjs_shims.call(void 0, );
|
|
|
286366
286396
|
var setExtensionEnv = (extensionName, extension) => {
|
|
286367
286397
|
for (const key of Object.keys(_nullishCoalesce(extension, () => ( {})))) {
|
|
286368
286398
|
if (extension[key]) {
|
|
286369
|
-
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess',
|
|
286399
|
+
const result = _nullishCoalesce(_optionalChain([key, 'optionalAccess', _525 => _525.replace, 'call', _526 => _526(
|
|
286370
286400
|
/([A-Z])+/g,
|
|
286371
|
-
(input) => input ? _optionalChain([input, 'access',
|
|
286372
|
-
), 'access',
|
|
286401
|
+
(input) => input ? _optionalChain([input, 'access', _527 => _527[0], 'optionalAccess', _528 => _528.toUpperCase, 'call', _529 => _529()]) + input.slice(1) : ""
|
|
286402
|
+
), 'access', _530 => _530.split, 'call', _531 => _531(/(?=[A-Z])|[.\-\s_]/), 'access', _532 => _532.map, 'call', _533 => _533((x) => x.toLowerCase())]), () => ( []));
|
|
286373
286403
|
let extensionKey;
|
|
286374
286404
|
if (result.length === 0) {
|
|
286375
286405
|
return;
|
|
286376
286406
|
}
|
|
286377
286407
|
if (result.length === 1) {
|
|
286378
|
-
extensionKey = _nullishCoalesce(_optionalChain([result, 'access',
|
|
286408
|
+
extensionKey = _nullishCoalesce(_optionalChain([result, 'access', _534 => _534[0], 'optionalAccess', _535 => _535.toUpperCase, 'call', _536 => _536()]), () => ( ""));
|
|
286379
286409
|
} else {
|
|
286380
286410
|
extensionKey = result.reduce((ret, part) => {
|
|
286381
286411
|
return `${ret}_${part.toLowerCase()}`;
|
|
@@ -286563,7 +286593,7 @@ var setConfigEnv = (config2) => {
|
|
|
286563
286593
|
process.env.NODE_ENV = config2.mode;
|
|
286564
286594
|
process.env.ENVIRONMENT = config2.mode;
|
|
286565
286595
|
}
|
|
286566
|
-
if (_optionalChain([config2, 'access',
|
|
286596
|
+
if (_optionalChain([config2, 'access', _537 => _537.colors, 'optionalAccess', _538 => _538.base, 'optionalAccess', _539 => _539.light]) || _optionalChain([config2, 'access', _540 => _540.colors, 'optionalAccess', _541 => _541.base, 'optionalAccess', _542 => _542.dark])) {
|
|
286567
286597
|
for (const key of Object.keys(config2.colors)) {
|
|
286568
286598
|
setThemeColorsEnv(`${prefix}COLOR_${key}_`, config2.colors[key]);
|
|
286569
286599
|
}
|
|
@@ -286624,7 +286654,7 @@ var setConfigEnv = (config2) => {
|
|
|
286624
286654
|
}
|
|
286625
286655
|
};
|
|
286626
286656
|
var setThemeColorsEnv = (prefix, config2) => {
|
|
286627
|
-
return _optionalChain([config2, 'optionalAccess',
|
|
286657
|
+
return _optionalChain([config2, 'optionalAccess', _543 => _543.light, 'optionalAccess', _544 => _544.brand]) || _optionalChain([config2, 'optionalAccess', _545 => _545.dark, 'optionalAccess', _546 => _546.brand]) ? setMultiThemeColorsEnv(prefix, config2) : setSingleThemeColorsEnv(prefix, config2);
|
|
286628
286658
|
};
|
|
286629
286659
|
var setSingleThemeColorsEnv = (prefix, config2) => {
|
|
286630
286660
|
if (config2.dark) {
|
|
@@ -286742,7 +286772,7 @@ var _extension_cache = /* @__PURE__ */ new WeakMap();
|
|
|
286742
286772
|
var _static_cache = void 0;
|
|
286743
286773
|
var createStormWorkspaceConfig = async (extensionName, schema2, workspaceRoot, skipLogs = false, useDefault = true) => {
|
|
286744
286774
|
let result;
|
|
286745
|
-
if (!_optionalChain([_static_cache, 'optionalAccess',
|
|
286775
|
+
if (!_optionalChain([_static_cache, 'optionalAccess', _547 => _547.data]) || !_optionalChain([_static_cache, 'optionalAccess', _548 => _548.timestamp]) || _static_cache.timestamp < Date.now() - 8e3) {
|
|
286746
286776
|
let _workspaceRoot = workspaceRoot;
|
|
286747
286777
|
if (!_workspaceRoot) {
|
|
286748
286778
|
_workspaceRoot = findWorkspaceRoot();
|
|
@@ -286776,7 +286806,7 @@ var createStormWorkspaceConfig = async (extensionName, schema2, workspaceRoot, s
|
|
|
286776
286806
|
result.workspaceRoot ??= _workspaceRoot;
|
|
286777
286807
|
} catch (error2) {
|
|
286778
286808
|
throw new Error(
|
|
286779
|
-
`Failed to parse Storm Workspace configuration${_optionalChain([error2, 'optionalAccess',
|
|
286809
|
+
`Failed to parse Storm Workspace configuration${_optionalChain([error2, 'optionalAccess', _549 => _549.message]) ? `: ${error2.message}` : ""}
|
|
286780
286810
|
|
|
286781
286811
|
Please ensure your configuration file is valid JSON and matches the expected schema. The current workspace configuration input is: ${formatLogMessage(
|
|
286782
286812
|
configInput
|
|
@@ -290834,7 +290864,7 @@ function* iteratorToIterable(iterator3) {
|
|
|
290834
290864
|
}
|
|
290835
290865
|
throw e;
|
|
290836
290866
|
} finally {
|
|
290837
|
-
_optionalChain([iterator3, 'access',
|
|
290867
|
+
_optionalChain([iterator3, 'access', _550 => _550.return, 'optionalCall', _551 => _551()]);
|
|
290838
290868
|
}
|
|
290839
290869
|
}
|
|
290840
290870
|
async function* asyncIteratorToAsyncIterable(iterator3) {
|
|
@@ -290849,7 +290879,7 @@ async function* asyncIteratorToAsyncIterable(iterator3) {
|
|
|
290849
290879
|
}
|
|
290850
290880
|
throw e;
|
|
290851
290881
|
} finally {
|
|
290852
|
-
_optionalChain([iterator3, 'access',
|
|
290882
|
+
_optionalChain([iterator3, 'access', _552 => _552.return, 'optionalCall', _553 => _553()]);
|
|
290853
290883
|
}
|
|
290854
290884
|
}
|
|
290855
290885
|
|
|
@@ -292062,9 +292092,9 @@ function findWordNode(root, word2, options) {
|
|
|
292062
292092
|
}
|
|
292063
292093
|
function findWord(root, word2, options) {
|
|
292064
292094
|
if (root.find) {
|
|
292065
|
-
const found2 = root.find(word2, _optionalChain([options, 'optionalAccess',
|
|
292095
|
+
const found2 = root.find(word2, _optionalChain([options, 'optionalAccess', _554 => _554.matchCase]) || false);
|
|
292066
292096
|
if (found2) {
|
|
292067
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
292097
|
+
if (_optionalChain([options, 'optionalAccess', _555 => _555.checkForbidden]) && found2.forbidden === void 0) {
|
|
292068
292098
|
found2.forbidden = isForbiddenWord(root, word2, root.forbidPrefix);
|
|
292069
292099
|
}
|
|
292070
292100
|
return found2;
|
|
@@ -292075,19 +292105,19 @@ function findWord(root, word2, options) {
|
|
|
292075
292105
|
}
|
|
292076
292106
|
const { found, compoundUsed, caseMatched, forbidden } = _findWordNode(root, word2, options);
|
|
292077
292107
|
const result = { found, compoundUsed, caseMatched, forbidden };
|
|
292078
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
292108
|
+
if (_optionalChain([options, 'optionalAccess', _556 => _556.checkForbidden]) && forbidden === void 0) {
|
|
292079
292109
|
result.forbidden = isForbiddenWord(root, word2, root.forbidPrefix);
|
|
292080
292110
|
}
|
|
292081
292111
|
return result;
|
|
292082
292112
|
}
|
|
292083
292113
|
function _findWordNode(root, word2, options) {
|
|
292084
292114
|
const trieInfo = root.info;
|
|
292085
|
-
const matchCase3 = _optionalChain([options, 'optionalAccess',
|
|
292086
|
-
const compoundMode = knownCompoundModes.get(_optionalChain([options, 'optionalAccess',
|
|
292115
|
+
const matchCase3 = _optionalChain([options, 'optionalAccess', _557 => _557.matchCase]) || false;
|
|
292116
|
+
const compoundMode = knownCompoundModes.get(_optionalChain([options, 'optionalAccess', _558 => _558.compoundMode])) || _defaultFindOptions.compoundMode;
|
|
292087
292117
|
const compoundPrefix = compoundMode === "compound" ? _nullishCoalesce(trieInfo.compoundCharacter, () => ( root.compoundFix)) : "";
|
|
292088
292118
|
const ignoreCasePrefix = matchCase3 ? "" : _nullishCoalesce(trieInfo.stripCaseAndAccentsPrefix, () => ( root.caseInsensitivePrefix));
|
|
292089
|
-
const mustCheckForbidden = _optionalChain([options, 'optionalAccess',
|
|
292090
|
-
const checkForbidden = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
292119
|
+
const mustCheckForbidden = _optionalChain([options, 'optionalAccess', _559 => _559.checkForbidden]) === true;
|
|
292120
|
+
const checkForbidden = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _560 => _560.checkForbidden]), () => ( true));
|
|
292091
292121
|
function __findCompound() {
|
|
292092
292122
|
const f = findCompoundWord(root, word2, compoundPrefix, ignoreCasePrefix);
|
|
292093
292123
|
if (f.found !== false && (mustCheckForbidden || f.compoundUsed && checkForbidden)) {
|
|
@@ -292122,10 +292152,10 @@ function _findWordNode(root, word2, options) {
|
|
|
292122
292152
|
}
|
|
292123
292153
|
function findLegacyCompound(root, word2, options) {
|
|
292124
292154
|
const roots = [root];
|
|
292125
|
-
if (!_optionalChain([options, 'optionalAccess',
|
|
292155
|
+
if (!_optionalChain([options, 'optionalAccess', _561 => _561.matchCase])) {
|
|
292126
292156
|
roots.push(walk(root, root.caseInsensitivePrefix));
|
|
292127
292157
|
}
|
|
292128
|
-
return findLegacyCompoundNode(roots, word2, _optionalChain([options, 'optionalAccess',
|
|
292158
|
+
return findLegacyCompoundNode(roots, word2, _optionalChain([options, 'optionalAccess', _562 => _562.legacyMinCompoundLength]) || defaultLegacyMinCompoundLength);
|
|
292129
292159
|
}
|
|
292130
292160
|
function findCompoundNode(root, word2, compoundCharacter, ignoreCasePrefix) {
|
|
292131
292161
|
const stack = [
|
|
@@ -292159,7 +292189,7 @@ function findCompoundNode(root, word2, compoundCharacter, ignoreCasePrefix) {
|
|
|
292159
292189
|
const s = stack[i];
|
|
292160
292190
|
const h = w[i++];
|
|
292161
292191
|
const n = s.cr || s.n;
|
|
292162
|
-
const c = h && _optionalChain([n, 'optionalAccess',
|
|
292192
|
+
const c = h && _optionalChain([n, 'optionalAccess', _563 => _563.get, 'call', _564 => _564(h)]) || void 0;
|
|
292163
292193
|
if (c && i < word2.length) {
|
|
292164
292194
|
caseMatched = s.caseMatched;
|
|
292165
292195
|
stack[i] = { n: c, compoundPrefix, cr: void 0, caseMatched };
|
|
@@ -292167,7 +292197,7 @@ function findCompoundNode(root, word2, compoundCharacter, ignoreCasePrefix) {
|
|
|
292167
292197
|
node = node || c;
|
|
292168
292198
|
while (--i > 0) {
|
|
292169
292199
|
const s2 = stack[i];
|
|
292170
|
-
if (!s2.compoundPrefix || !_optionalChain([s2, 'access',
|
|
292200
|
+
if (!s2.compoundPrefix || !_optionalChain([s2, 'access', _565 => _565.n, 'optionalAccess', _566 => _566.hasChildren, 'call', _567 => _567()])) continue;
|
|
292171
292201
|
if (s2.n.get(compoundCharacter)) break;
|
|
292172
292202
|
}
|
|
292173
292203
|
if (i >= 0 && stack[i].compoundPrefix) {
|
|
@@ -292207,11 +292237,11 @@ function findCompoundWord(root, word2, compoundCharacter, ignoreCasePrefix) {
|
|
|
292207
292237
|
}
|
|
292208
292238
|
function findWordExact(root, word2) {
|
|
292209
292239
|
const r = root;
|
|
292210
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
292240
|
+
if (_optionalChain([r, 'optionalAccess', _568 => _568.findExact])) return r.findExact(word2);
|
|
292211
292241
|
return isEndOfWordNode(walk(root, word2));
|
|
292212
292242
|
}
|
|
292213
292243
|
function isEndOfWordNode(n) {
|
|
292214
|
-
return !!_optionalChain([n, 'optionalAccess',
|
|
292244
|
+
return !!_optionalChain([n, 'optionalAccess', _569 => _569.eow]);
|
|
292215
292245
|
}
|
|
292216
292246
|
function walk(root, word2) {
|
|
292217
292247
|
const w = [...word2];
|
|
@@ -292239,7 +292269,7 @@ function findLegacyCompoundNode(roots, word2, minCompoundLength) {
|
|
|
292239
292269
|
const s = stack[i];
|
|
292240
292270
|
const h = w[i++];
|
|
292241
292271
|
const n = s.cr || s.n;
|
|
292242
|
-
const c = _optionalChain([n, 'optionalAccess',
|
|
292272
|
+
const c = _optionalChain([n, 'optionalAccess', _570 => _570.get, 'call', _571 => _571(h)]);
|
|
292243
292273
|
if (c && i < wLen) {
|
|
292244
292274
|
stack[i] = {
|
|
292245
292275
|
n: c,
|
|
@@ -292252,7 +292282,7 @@ function findLegacyCompoundNode(roots, word2, minCompoundLength) {
|
|
|
292252
292282
|
} else if (!c || !c.eow || c.eow && s.subLength < minCompoundLength - 1) {
|
|
292253
292283
|
while (--i > 0) {
|
|
292254
292284
|
const s2 = stack[i];
|
|
292255
|
-
if (s2.usedRoots < numRoots && _optionalChain([s2, 'access',
|
|
292285
|
+
if (s2.usedRoots < numRoots && _optionalChain([s2, 'access', _572 => _572.n, 'optionalAccess', _573 => _573.eow]) && (s2.subLength >= minCompoundLength || !s2.subLength) && wLen - i >= minCompoundLength) {
|
|
292256
292286
|
break;
|
|
292257
292287
|
}
|
|
292258
292288
|
}
|
|
@@ -292292,8 +292322,8 @@ function findLegacyCompoundNode(roots, word2, minCompoundLength) {
|
|
|
292292
292322
|
}
|
|
292293
292323
|
function isForbiddenWord(root, word2, forbiddenPrefix) {
|
|
292294
292324
|
const r = root;
|
|
292295
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
292296
|
-
return findWordExact(_optionalChain([root, 'optionalAccess',
|
|
292325
|
+
if (_optionalChain([r, 'optionalAccess', _574 => _574.isForbidden])) return r.isForbidden(word2);
|
|
292326
|
+
return findWordExact(_optionalChain([root, 'optionalAccess', _575 => _575.get, 'call', _576 => _576(forbiddenPrefix)]), word2);
|
|
292297
292327
|
}
|
|
292298
292328
|
var createFindOptions = memorizeLastCall(_createFindOptions);
|
|
292299
292329
|
function _createFindOptions(options) {
|
|
@@ -292502,7 +292532,7 @@ var ImplITrieNode = class _ImplITrieNode {
|
|
|
292502
292532
|
}
|
|
292503
292533
|
/** get child ITrieNode */
|
|
292504
292534
|
get(char) {
|
|
292505
|
-
const n = _optionalChain([this, 'access',
|
|
292535
|
+
const n = _optionalChain([this, 'access', _577 => _577.node, 'access', _578 => _578.c, 'optionalAccess', _579 => _579[char]]);
|
|
292506
292536
|
if (!n) return void 0;
|
|
292507
292537
|
return _ImplITrieNode.toITrieNode(n);
|
|
292508
292538
|
}
|
|
@@ -292526,7 +292556,7 @@ var ImplITrieNode = class _ImplITrieNode {
|
|
|
292526
292556
|
let node = this.node;
|
|
292527
292557
|
for (const char of word2) {
|
|
292528
292558
|
if (!node) return void 0;
|
|
292529
|
-
node = _optionalChain([node, 'access',
|
|
292559
|
+
node = _optionalChain([node, 'access', _580 => _580.c, 'optionalAccess', _581 => _581[char]]);
|
|
292530
292560
|
}
|
|
292531
292561
|
return node;
|
|
292532
292562
|
}
|
|
@@ -292721,7 +292751,7 @@ var PairingHeap = (_class22 = class {
|
|
|
292721
292751
|
}
|
|
292722
292752
|
/** peek at the next value without removing it. */
|
|
292723
292753
|
peek() {
|
|
292724
|
-
return _optionalChain([this, 'access',
|
|
292754
|
+
return _optionalChain([this, 'access', _582 => _582._heap, 'optionalAccess', _583 => _583.v]);
|
|
292725
292755
|
}
|
|
292726
292756
|
[Symbol.iterator]() {
|
|
292727
292757
|
return this;
|
|
@@ -293443,7 +293473,7 @@ function impersonateCollector(collector, word2) {
|
|
|
293443
293473
|
}
|
|
293444
293474
|
function isSuggestionResult(s) {
|
|
293445
293475
|
const r = s;
|
|
293446
|
-
return !!r && typeof r === "object" && _optionalChain([r, 'optionalAccess',
|
|
293476
|
+
return !!r && typeof r === "object" && _optionalChain([r, 'optionalAccess', _584 => _584.cost]) !== void 0 && r.word != void 0;
|
|
293447
293477
|
}
|
|
293448
293478
|
function comparePath(a, b) {
|
|
293449
293479
|
return a.c / (a.i + 1) - b.c / (b.i + 1) + (b.i - a.i);
|
|
@@ -293553,7 +293583,7 @@ function* getSuggestionsAStar(trie, srcWord, options = {}) {
|
|
|
293553
293583
|
}
|
|
293554
293584
|
storePath(t, n, i + 1, cost, "", p, "d", "");
|
|
293555
293585
|
for (const [ss, node] of n.entries()) {
|
|
293556
|
-
if (node.id === _optionalChain([m, 'optionalAccess',
|
|
293586
|
+
if (node.id === _optionalChain([m, 'optionalAccess', _585 => _585.id]) || ss in sc) continue;
|
|
293557
293587
|
const g = visMap[ss] || 0;
|
|
293558
293588
|
const c = sg & g ? costVis : cost;
|
|
293559
293589
|
storePath(t, node, i + 1, c, ss, p, "r", ss);
|
|
@@ -293563,7 +293593,7 @@ function* getSuggestionsAStar(trie, srcWord, options = {}) {
|
|
|
293563
293593
|
}
|
|
293564
293594
|
if (ns) {
|
|
293565
293595
|
const n1 = n.get(ns);
|
|
293566
|
-
const n2 = _optionalChain([n1, 'optionalAccess',
|
|
293596
|
+
const n2 = _optionalChain([n1, 'optionalAccess', _586 => _586.get, 'call', _587 => _587(s)]);
|
|
293567
293597
|
if (n2) {
|
|
293568
293598
|
const ss = ns + s;
|
|
293569
293599
|
storePath(t, n2, i + 2, cost0 + opCosts.swapCost, ss, p, "s", ss);
|
|
@@ -295652,7 +295682,7 @@ var ITrieImpl = class _ITrieImpl {
|
|
|
295652
295682
|
return !!f.found;
|
|
295653
295683
|
}
|
|
295654
295684
|
findWord(word2, options) {
|
|
295655
|
-
if (_optionalChain([options, 'optionalAccess',
|
|
295685
|
+
if (_optionalChain([options, 'optionalAccess', _588 => _588.useLegacyWordCompounds])) {
|
|
295656
295686
|
const len = options.useLegacyWordCompounds !== true ? options.useLegacyWordCompounds : defaultLegacyMinCompoundLength2;
|
|
295657
295687
|
const findOptions = this.createFindOptions({
|
|
295658
295688
|
legacyMinCompoundLength: len,
|
|
@@ -295661,8 +295691,8 @@ var ITrieImpl = class _ITrieImpl {
|
|
|
295661
295691
|
return findLegacyCompound(this.root, word2, findOptions);
|
|
295662
295692
|
}
|
|
295663
295693
|
return findWord(this.root, word2, {
|
|
295664
|
-
matchCase: _optionalChain([options, 'optionalAccess',
|
|
295665
|
-
checkForbidden: _optionalChain([options, 'optionalAccess',
|
|
295694
|
+
matchCase: _optionalChain([options, 'optionalAccess', _589 => _589.caseSensitive]),
|
|
295695
|
+
checkForbidden: _optionalChain([options, 'optionalAccess', _590 => _590.checkForbidden])
|
|
295666
295696
|
});
|
|
295667
295697
|
}
|
|
295668
295698
|
/**
|
|
@@ -295835,7 +295865,7 @@ function trieStackToWord(stack) {
|
|
|
295835
295865
|
let lastMap = reverseMapTrieNode(stack[0]);
|
|
295836
295866
|
for (let i = 1; i < stack.length; ++i) {
|
|
295837
295867
|
const n = stack[i];
|
|
295838
|
-
const char = _optionalChain([lastMap, 'optionalAccess',
|
|
295868
|
+
const char = _optionalChain([lastMap, 'optionalAccess', _591 => _591.get, 'call', _592 => _592(n)]);
|
|
295839
295869
|
if (char) {
|
|
295840
295870
|
word2 += char;
|
|
295841
295871
|
}
|
|
@@ -295947,7 +295977,7 @@ function findWordExact2(root, word2) {
|
|
|
295947
295977
|
return isEndOfWordNode2(walk3(root, word2));
|
|
295948
295978
|
}
|
|
295949
295979
|
function isEndOfWordNode2(n) {
|
|
295950
|
-
return _optionalChain([n, 'optionalAccess',
|
|
295980
|
+
return _optionalChain([n, 'optionalAccess', _593 => _593.f]) === FLAG_WORD;
|
|
295951
295981
|
}
|
|
295952
295982
|
function walk3(root, word2) {
|
|
295953
295983
|
const w = [...word2];
|
|
@@ -295955,7 +295985,7 @@ function walk3(root, word2) {
|
|
|
295955
295985
|
let i = 0;
|
|
295956
295986
|
while (n && i < w.length) {
|
|
295957
295987
|
const h = w[i++];
|
|
295958
|
-
n = _optionalChain([n, 'access',
|
|
295988
|
+
n = _optionalChain([n, 'access', _594 => _594.c, 'optionalAccess', _595 => _595[h]]);
|
|
295959
295989
|
}
|
|
295960
295990
|
return n;
|
|
295961
295991
|
}
|
|
@@ -297413,7 +297443,7 @@ function hunspellInformationToSuggestionCostDef(hunInfo, locales) {
|
|
|
297413
297443
|
return parseAff(hunInfo.aff, costs);
|
|
297414
297444
|
}
|
|
297415
297445
|
function calcCosts(costs = {}, locale) {
|
|
297416
|
-
const useLocale = _optionalChain([locale, 'optionalAccess',
|
|
297446
|
+
const useLocale = _optionalChain([locale, 'optionalAccess', _596 => _596.length]) ? locale.map((loc) => loc.locale) : void 0;
|
|
297417
297447
|
const hunCosts = mapHunspellCosts(costs);
|
|
297418
297448
|
const c = {
|
|
297419
297449
|
...hunCosts,
|
|
@@ -297549,7 +297579,7 @@ function asArrayOf(v) {
|
|
|
297549
297579
|
function mapDictionaryInformation(dictInfo) {
|
|
297550
297580
|
const _locale = dictInfo.locale;
|
|
297551
297581
|
const locale = _locale ? parseLocale(_locale).filter((loc) => loc.isValid()) : void 0;
|
|
297552
|
-
const locales = _optionalChain([locale, 'optionalAccess',
|
|
297582
|
+
const locales = _optionalChain([locale, 'optionalAccess', _597 => _597.map, 'call', _598 => _598((loc) => loc.locale)]);
|
|
297553
297583
|
const costs = mapEditCosts(dictInfo.costs);
|
|
297554
297584
|
const defsEC = dictInfo.suggestionEditCosts || [];
|
|
297555
297585
|
const defsHI = dictInfo.hunspellInformation ? hunspellInformationToSuggestionCostDef(dictInfo.hunspellInformation, locale) : [];
|
|
@@ -297912,7 +297942,7 @@ var CachedDict = (_class30 = class {
|
|
|
297912
297942
|
} : this.#has}
|
|
297913
297943
|
__init60() {this.isNoSuggestWord = autoCache((word2) => this.dict.isNoSuggestWord(word2, this.options), DefaultAutoCacheSize)}
|
|
297914
297944
|
__init61() {this.isForbidden = autoCache((word2) => this.dict.isForbidden(word2), DefaultAutoCacheSize)}
|
|
297915
|
-
__init62() {this.getPreferredSuggestions = autoCache((word2) => _optionalChain([this, 'access',
|
|
297945
|
+
__init62() {this.getPreferredSuggestions = autoCache((word2) => _optionalChain([this, 'access', _602 => _602.dict, 'access', _603 => _603.getPreferredSuggestions, 'optionalCall', _604 => _604(word2)]), DefaultAutoCacheSize)}
|
|
297916
297946
|
stats() {
|
|
297917
297947
|
return {
|
|
297918
297948
|
name: this.name,
|
|
@@ -298732,8 +298762,8 @@ var SpellingDictionaryFromTrie = (_class34 = class {
|
|
|
298732
298762
|
this.name = name2;
|
|
298733
298763
|
this.options = options;
|
|
298734
298764
|
this.source = source;
|
|
298735
|
-
this.mapWord = createMapper(options.repMap, _optionalChain([options, 'access',
|
|
298736
|
-
this.remapWord = createRepMapper(options.repMap, _optionalChain([options, 'access',
|
|
298765
|
+
this.mapWord = createMapper(options.repMap, _optionalChain([options, 'access', _605 => _605.dictionaryInformation, 'optionalAccess', _606 => _606.ignore]));
|
|
298766
|
+
this.remapWord = createRepMapper(options.repMap, _optionalChain([options, 'access', _607 => _607.dictionaryInformation, 'optionalAccess', _608 => _608.ignore]));
|
|
298737
298767
|
this.isDictionaryCaseSensitive = _nullishCoalesce(options.caseSensitive, () => ( trie.isCaseAware));
|
|
298738
298768
|
this.containsNoSuggestWords = options.noSuggest || false;
|
|
298739
298769
|
this._size = size || 0;
|
|
@@ -298908,7 +298938,7 @@ function createSpellingDictionary(wordList, name2, source, options) {
|
|
|
298908
298938
|
}
|
|
298909
298939
|
function _createSpellingDictionary(params) {
|
|
298910
298940
|
const [wordList, name2, source, options] = params;
|
|
298911
|
-
const parseOptions = { stripCaseAndAccents: _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
298941
|
+
const parseOptions = { stripCaseAndAccents: _nullishCoalesce(_optionalChain([options, 'optionalAccess', _609 => _609.supportNonStrictSearches]), () => ( true)) };
|
|
298912
298942
|
const words = parseDictionaryLines(wordList, parseOptions);
|
|
298913
298943
|
const trie = buildITrieFromWords(words);
|
|
298914
298944
|
const opts = { ...options || defaultOptions };
|
|
@@ -299178,7 +299208,7 @@ var TyposDictionaryImpl = (_class35 = class {
|
|
|
299178
299208
|
}
|
|
299179
299209
|
/** A more detailed search for a word, might take longer than `has` */
|
|
299180
299210
|
find(word2, options) {
|
|
299181
|
-
const result = this._findForms(word2, _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
299211
|
+
const result = this._findForms(word2, _nullishCoalesce(_optionalChain([options, 'optionalAccess', _610 => _610.ignoreCase]), () => ( ignoreCase)));
|
|
299182
299212
|
if (result === false)
|
|
299183
299213
|
return void 0;
|
|
299184
299214
|
const { found, ignore: ignore3 } = result;
|
|
@@ -299212,7 +299242,7 @@ var TyposDictionaryImpl = (_class35 = class {
|
|
|
299212
299242
|
}
|
|
299213
299243
|
isNoSuggestWord(word2, options) {
|
|
299214
299244
|
const result = this.find(word2, options);
|
|
299215
|
-
return _nullishCoalesce(_optionalChain([result, 'optionalAccess',
|
|
299245
|
+
return _nullishCoalesce(_optionalChain([result, 'optionalAccess', _611 => _611.noSuggest]), () => ( false));
|
|
299216
299246
|
}
|
|
299217
299247
|
/**
|
|
299218
299248
|
* Determine if the word can appear in a list of suggestions.
|
|
@@ -299329,24 +299359,24 @@ var FlagWordsDictionary = (_class37 = class {
|
|
|
299329
299359
|
* @returns always false
|
|
299330
299360
|
*/
|
|
299331
299361
|
has(word2, options) {
|
|
299332
|
-
return this.dictTypos.has(word2, options) || _optionalChain([this, 'access',
|
|
299362
|
+
return this.dictTypos.has(word2, options) || _optionalChain([this, 'access', _612 => _612.dictTrie, 'optionalAccess', _613 => _613.has, 'call', _614 => _614(word2, options)]) || false;
|
|
299333
299363
|
}
|
|
299334
299364
|
/** A more detailed search for a word, might take longer than `has` */
|
|
299335
299365
|
find(word2, options) {
|
|
299336
299366
|
const findTypos = this.dictTypos.find(word2, options);
|
|
299337
299367
|
if (findTypos)
|
|
299338
299368
|
return findTypos;
|
|
299339
|
-
const ignoreCase2 = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
299369
|
+
const ignoreCase2 = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _615 => _615.ignoreCase]), () => ( ignoreCase));
|
|
299340
299370
|
if (this.dictTypos.isSuggestedWord(word2, ignoreCase2))
|
|
299341
299371
|
return void 0;
|
|
299342
|
-
return _optionalChain([this, 'access',
|
|
299372
|
+
return _optionalChain([this, 'access', _616 => _616.dictTrie, 'optionalAccess', _617 => _617.find, 'call', _618 => _618(word2, options)]);
|
|
299343
299373
|
}
|
|
299344
299374
|
isForbidden(word2, ignoreCaseAndAccents = isForbiddenIgnoreCaseAndAccents) {
|
|
299345
299375
|
const findResult = this.find(word2, { ignoreCase: ignoreCaseAndAccents });
|
|
299346
|
-
return _optionalChain([findResult, 'optionalAccess',
|
|
299376
|
+
return _optionalChain([findResult, 'optionalAccess', _619 => _619.forbidden]) || false;
|
|
299347
299377
|
}
|
|
299348
299378
|
isNoSuggestWord(word2, options) {
|
|
299349
|
-
return _optionalChain([this, 'access',
|
|
299379
|
+
return _optionalChain([this, 'access', _620 => _620.dictTrie, 'optionalAccess', _621 => _621.isNoSuggestWord, 'call', _622 => _622(word2, options)]) || this.dictTypos.isNoSuggestWord(word2, options);
|
|
299350
299380
|
}
|
|
299351
299381
|
suggest(word2, suggestOptions = {}) {
|
|
299352
299382
|
return this.dictTypos.suggest(word2, suggestOptions);
|
|
@@ -299361,7 +299391,7 @@ var FlagWordsDictionary = (_class37 = class {
|
|
|
299361
299391
|
return word2;
|
|
299362
299392
|
}
|
|
299363
299393
|
get size() {
|
|
299364
|
-
return this.dictTypos.size + (_optionalChain([this, 'access',
|
|
299394
|
+
return this.dictTypos.size + (_optionalChain([this, 'access', _623 => _623.dictTrie, 'optionalAccess', _624 => _624.size]) || 0);
|
|
299365
299395
|
}
|
|
299366
299396
|
__init85() {this.isDictionaryCaseSensitive = true}
|
|
299367
299397
|
getErrors() {
|
|
@@ -299429,7 +299459,7 @@ var IgnoreWordsDictionary = (_class38 = class {
|
|
|
299429
299459
|
const lcWord = nWord.toLowerCase();
|
|
299430
299460
|
if (this.dict.has(lcWord))
|
|
299431
299461
|
return true;
|
|
299432
|
-
const ignoreCase2 = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
299462
|
+
const ignoreCase2 = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _625 => _625.ignoreCase]), () => ( ignoreCase));
|
|
299433
299463
|
return ignoreCase2 && (this.dictNonStrict.has(nWord) || this.dictNonStrict.has(lcWord));
|
|
299434
299464
|
}
|
|
299435
299465
|
/** A more detailed search for a word, might take longer than `has` */
|
|
@@ -299440,7 +299470,7 @@ var IgnoreWordsDictionary = (_class38 = class {
|
|
|
299440
299470
|
const lcWord = nWord.toLowerCase();
|
|
299441
299471
|
if (this.dict.has(lcWord))
|
|
299442
299472
|
return { found: lcWord, forbidden: false, noSuggest: true };
|
|
299443
|
-
const ignoreCase2 = _nullishCoalesce(_optionalChain([options, 'optionalAccess',
|
|
299473
|
+
const ignoreCase2 = _nullishCoalesce(_optionalChain([options, 'optionalAccess', _626 => _626.ignoreCase]), () => ( ignoreCase));
|
|
299444
299474
|
if (!ignoreCase2)
|
|
299445
299475
|
return void 0;
|
|
299446
299476
|
if (this.dictNonStrict.has(nWord))
|
|
@@ -299550,7 +299580,7 @@ var SpellingDictionaryCollectionImpl = (_class39 = class {
|
|
|
299550
299580
|
return this.dictionaries.reduce((a, b) => a + b.size, 0);
|
|
299551
299581
|
}
|
|
299552
299582
|
getPreferredSuggestions(word2) {
|
|
299553
|
-
const sugs = this.dictionaries.flatMap((dict) => _optionalChain([dict, 'access',
|
|
299583
|
+
const sugs = this.dictionaries.flatMap((dict) => _optionalChain([dict, 'access', _627 => _627.getPreferredSuggestions, 'optionalCall', _628 => _628(word2)])).filter(isDefined);
|
|
299554
299584
|
if (sugs.length <= 1)
|
|
299555
299585
|
return sugs;
|
|
299556
299586
|
const unique2 = /* @__PURE__ */ new Set();
|
|
@@ -299568,7 +299598,7 @@ var SpellingDictionaryCollectionImpl = (_class39 = class {
|
|
|
299568
299598
|
this.dictionaries.forEach((dict) => dict.genSuggestions(collector, _suggestOptions));
|
|
299569
299599
|
}
|
|
299570
299600
|
getErrors() {
|
|
299571
|
-
return this.dictionaries.reduce((errors, dict) => [...errors, ..._optionalChain([dict, 'access',
|
|
299601
|
+
return this.dictionaries.reduce((errors, dict) => [...errors, ..._optionalChain([dict, 'access', _629 => _629.getErrors, 'optionalCall', _630 => _630()]) || []], []);
|
|
299572
299602
|
}
|
|
299573
299603
|
_isForbiddenInDict(word2, ignoreCase2) {
|
|
299574
299604
|
return isWordForbiddenInAnyDictionary(this.dictionaries, word2, ignoreCase2);
|
|
@@ -299933,7 +299963,7 @@ var AutoResolveWeakWeakCache = (_class44 = class {constructor() { _class44.proto
|
|
|
299933
299963
|
get(k, resolve11) {
|
|
299934
299964
|
const map4 = this._map;
|
|
299935
299965
|
const found = map4.get(k);
|
|
299936
|
-
const foundValue = _optionalChain([found, 'optionalAccess',
|
|
299966
|
+
const foundValue = _optionalChain([found, 'optionalAccess', _631 => _631.deref, 'call', _632 => _632()]);
|
|
299937
299967
|
if (found !== void 0 && foundValue) {
|
|
299938
299968
|
++this._stats.hits;
|
|
299939
299969
|
return foundValue;
|
|
@@ -299954,7 +299984,7 @@ var AutoResolveWeakWeakCache = (_class44 = class {constructor() { _class44.proto
|
|
|
299954
299984
|
return this._map;
|
|
299955
299985
|
}
|
|
299956
299986
|
has(k) {
|
|
299957
|
-
return !!_optionalChain([this, 'access',
|
|
299987
|
+
return !!_optionalChain([this, 'access', _633 => _633._map, 'access', _634 => _634.get, 'call', _635 => _635(k), 'optionalAccess', _636 => _636.deref, 'call', _637 => _637()]);
|
|
299958
299988
|
}
|
|
299959
299989
|
set(k, v) {
|
|
299960
299990
|
++this._stats.sets;
|
|
@@ -300261,7 +300291,7 @@ var FileUrlBuilder = class {
|
|
|
300261
300291
|
|
|
300262
300292
|
|
|
300263
300293
|
constructor(options = {}) {
|
|
300264
|
-
const sep8 = _optionalChain([options, 'access',
|
|
300294
|
+
const sep8 = _optionalChain([options, 'access', _638 => _638.path, 'optionalAccess', _639 => _639.sep]);
|
|
300265
300295
|
this.windows = _nullishCoalesce(_nullishCoalesce(options.windows, () => ( (sep8 ? sep8 === "\\" : void 0))), () => ( isWindows2));
|
|
300266
300296
|
this.path = _nullishCoalesce(options.path, () => ( (this.windows ? path6.default.win32 : path6.default.posix)));
|
|
300267
300297
|
this.cwd = _nullishCoalesce(options.cwd, () => ( this.pathToFileURL(this.path.resolve() + "/", this.rootFileURL())));
|
|
@@ -300271,9 +300301,9 @@ var FileUrlBuilder = class {
|
|
|
300271
300301
|
isWindows: isWindows2,
|
|
300272
300302
|
sep: `${sep8}`,
|
|
300273
300303
|
windows: options.windows,
|
|
300274
|
-
pathSep: _optionalChain([options, 'access',
|
|
300275
|
-
n: _optionalChain([options, 'access',
|
|
300276
|
-
cwd: _optionalChain([options, 'access',
|
|
300304
|
+
pathSep: _optionalChain([options, 'access', _640 => _640.path, 'optionalAccess', _641 => _641.sep]),
|
|
300305
|
+
n: _optionalChain([options, 'access', _642 => _642.path, 'optionalAccess', _643 => _643.normalize, 'call', _644 => _644("path/file.txt")]),
|
|
300306
|
+
cwd: _optionalChain([options, 'access', _645 => _645.cwd, 'optionalAccess', _646 => _646.href]),
|
|
300277
300307
|
win32: this.path === path6.default.win32,
|
|
300278
300308
|
posix: this.path === path6.default.posix,
|
|
300279
300309
|
"win32.normalize": this.path.normalize === path6.default.win32.normalize,
|
|
@@ -301711,7 +301741,7 @@ function checkIfDisallowedImport(specifier, parsed, parsedParentURL) {
|
|
|
301711
301741
|
const parentProtocol = parsedParentURL.protocol;
|
|
301712
301742
|
if (parentProtocol === "http:" || parentProtocol === "https:") {
|
|
301713
301743
|
if (shouldBeTreatedAsRelativeOrAbsolutePath(specifier)) {
|
|
301714
|
-
const parsedProtocol = _optionalChain([parsed, 'optionalAccess',
|
|
301744
|
+
const parsedProtocol = _optionalChain([parsed, 'optionalAccess', _647 => _647.protocol]);
|
|
301715
301745
|
if (parsedProtocol && parsedProtocol !== "https:" && parsedProtocol !== "http:") {
|
|
301716
301746
|
throw new ERR_NETWORK_IMPORT_DISALLOWED(
|
|
301717
301747
|
specifier,
|
|
@@ -301719,7 +301749,7 @@ function checkIfDisallowedImport(specifier, parsed, parsedParentURL) {
|
|
|
301719
301749
|
"remote imports cannot import from a local location."
|
|
301720
301750
|
);
|
|
301721
301751
|
}
|
|
301722
|
-
return { url: _optionalChain([parsed, 'optionalAccess',
|
|
301752
|
+
return { url: _optionalChain([parsed, 'optionalAccess', _648 => _648.href]) || "" };
|
|
301723
301753
|
}
|
|
301724
301754
|
if (_module.builtinModules.includes(specifier)) {
|
|
301725
301755
|
throw new ERR_NETWORK_IMPORT_DISALLOWED(
|
|
@@ -301863,7 +301893,7 @@ function normalizeModuleName(moduleName) {
|
|
|
301863
301893
|
function toError2(e) {
|
|
301864
301894
|
if (isError2(e))
|
|
301865
301895
|
return e;
|
|
301866
|
-
return new Error(_optionalChain([e, 'optionalAccess',
|
|
301896
|
+
return new Error(_optionalChain([e, 'optionalAccess', _649 => _649.toString, 'call', _650 => _650()]));
|
|
301867
301897
|
}
|
|
301868
301898
|
function isError2(e) {
|
|
301869
301899
|
return e instanceof Error;
|
|
@@ -302049,7 +302079,7 @@ var CFileReference = class _CFileReference {
|
|
|
302049
302079
|
this.url = url3;
|
|
302050
302080
|
this.encoding = encoding;
|
|
302051
302081
|
this.baseFilename = baseFilename;
|
|
302052
|
-
this.gz = _nullishCoalesce(_nullishCoalesce(gz, () => ( (_optionalChain([baseFilename, 'optionalAccess',
|
|
302082
|
+
this.gz = _nullishCoalesce(_nullishCoalesce(gz, () => ( (_optionalChain([baseFilename, 'optionalAccess', _651 => _651.endsWith, 'call', _652 => _652(".gz")]) || void 0))), () => ( (url3.pathname.endsWith(".gz") || void 0)));
|
|
302053
302083
|
}
|
|
302054
302084
|
/**
|
|
302055
302085
|
* Use to ensure the nominal type separation between CFileReference and FileReference
|
|
@@ -302625,9 +302655,9 @@ var handleRequestFsWriteFileDataUrl = RequestFsWriteFile.createRequestHandler(
|
|
|
302625
302655
|
const gz = isGZipped(fileResource.content);
|
|
302626
302656
|
const baseFilename = fileResource.baseFilename || "file.txt" + (gz ? ".gz" : "");
|
|
302627
302657
|
const mt = guessMimeType(baseFilename);
|
|
302628
|
-
const mediaType = _optionalChain([mt, 'optionalAccess',
|
|
302658
|
+
const mediaType = _optionalChain([mt, 'optionalAccess', _653 => _653.mimeType]) || "text/plain";
|
|
302629
302659
|
const dataUrl = toDataUrl(fileResource.content, mediaType, [["filename", baseFilename]]);
|
|
302630
|
-
return createResponse(Promise.resolve({ url: dataUrl, baseFilename, gz, encoding: _optionalChain([mt, 'optionalAccess',
|
|
302660
|
+
return createResponse(Promise.resolve({ url: dataUrl, baseFilename, gz, encoding: _optionalChain([mt, 'optionalAccess', _654 => _654.encoding]) }));
|
|
302631
302661
|
},
|
|
302632
302662
|
void 0,
|
|
302633
302663
|
"Node: fs.writeFile DataUrl"
|
|
@@ -302702,7 +302732,7 @@ var CSpellIONode = class {
|
|
|
302702
302732
|
}
|
|
302703
302733
|
readFile(urlOrFilename, options) {
|
|
302704
302734
|
const readOptions = toReadFileOptions(options);
|
|
302705
|
-
const ref = toFileResourceRequest(urlOrFilename, _optionalChain([readOptions, 'optionalAccess',
|
|
302735
|
+
const ref = toFileResourceRequest(urlOrFilename, _optionalChain([readOptions, 'optionalAccess', _655 => _655.encoding]), _optionalChain([readOptions, 'optionalAccess', _656 => _656.signal]));
|
|
302706
302736
|
const res = this.serviceBus.dispatch(RequestFsReadFile.create(ref));
|
|
302707
302737
|
if (!isServiceResponseSuccess(res)) {
|
|
302708
302738
|
throw genError(res.error, "readFile");
|
|
@@ -302884,7 +302914,7 @@ var VFSErrorUnsupportedRequest = class extends VFSError {
|
|
|
302884
302914
|
super(`Unsupported request: ${request2}`);
|
|
302885
302915
|
this.request = request2;
|
|
302886
302916
|
this.parameters = parameters;
|
|
302887
|
-
this.url = _optionalChain([url3, 'optionalAccess',
|
|
302917
|
+
this.url = _optionalChain([url3, 'optionalAccess', _657 => _657.toString, 'call', _658 => _658()]);
|
|
302888
302918
|
}
|
|
302889
302919
|
|
|
302890
302920
|
};
|
|
@@ -302916,9 +302946,9 @@ var WrappedProviderFs = class _WrappedProviderFs {
|
|
|
302916
302946
|
this.fs = fs52;
|
|
302917
302947
|
this.eventLogger = eventLogger;
|
|
302918
302948
|
this.hasProvider = !!fs52;
|
|
302919
|
-
this.capabilities = _optionalChain([fs52, 'optionalAccess',
|
|
302949
|
+
this.capabilities = _optionalChain([fs52, 'optionalAccess', _659 => _659.capabilities]) || 0;
|
|
302920
302950
|
this._capabilities = fsCapabilities(this.capabilities);
|
|
302921
|
-
this.providerInfo = _optionalChain([fs52, 'optionalAccess',
|
|
302951
|
+
this.providerInfo = _optionalChain([fs52, 'optionalAccess', _660 => _660.providerInfo]) || { name: "unknown" };
|
|
302922
302952
|
}
|
|
302923
302953
|
|
|
302924
302954
|
|
|
@@ -302928,7 +302958,7 @@ var WrappedProviderFs = class _WrappedProviderFs {
|
|
|
302928
302958
|
this.eventLogger({ method, event, url: url3, traceID, ts: performance.now(), message });
|
|
302929
302959
|
}
|
|
302930
302960
|
getCapabilities(url3) {
|
|
302931
|
-
if (_optionalChain([this, 'access',
|
|
302961
|
+
if (_optionalChain([this, 'access', _661 => _661.fs, 'optionalAccess', _662 => _662.getCapabilities])) return this.fs.getCapabilities(url3);
|
|
302932
302962
|
return this._capabilities;
|
|
302933
302963
|
}
|
|
302934
302964
|
async stat(urlRef) {
|
|
@@ -302952,7 +302982,7 @@ var WrappedProviderFs = class _WrappedProviderFs {
|
|
|
302952
302982
|
try {
|
|
302953
302983
|
checkCapabilityOrThrow(this.fs, this.capabilities, 2, "readFile", url3);
|
|
302954
302984
|
const readOptions = toOptions(optionsOrEncoding);
|
|
302955
|
-
return fromFileResource(await this.fs.readFile(urlRef, readOptions), _optionalChain([readOptions, 'optionalAccess',
|
|
302985
|
+
return fromFileResource(await this.fs.readFile(urlRef, readOptions), _optionalChain([readOptions, 'optionalAccess', _663 => _663.encoding]));
|
|
302956
302986
|
} catch (e) {
|
|
302957
302987
|
this.logEvent("readFile", "error", traceID, url3, e instanceof Error ? e.message : "");
|
|
302958
302988
|
throw wrapError(e);
|
|
@@ -302988,7 +303018,7 @@ var WrappedProviderFs = class _WrappedProviderFs {
|
|
|
302988
303018
|
}
|
|
302989
303019
|
}
|
|
302990
303020
|
static disposeOf(fs52) {
|
|
302991
|
-
fs52 instanceof _WrappedProviderFs && _optionalChain([fs52, 'access',
|
|
303021
|
+
fs52 instanceof _WrappedProviderFs && _optionalChain([fs52, 'access', _664 => _664.fs, 'optionalAccess', _665 => _665.dispose, 'call', _666 => _666()]);
|
|
302992
303022
|
}
|
|
302993
303023
|
};
|
|
302994
303024
|
function checkCapabilityOrThrow(fs52, capabilities, flag, name2, url3) {
|
|
@@ -303167,7 +303197,7 @@ var CVirtualFS = (_class46 = class {
|
|
|
303167
303197
|
const providers = [...this.providers].reverse();
|
|
303168
303198
|
for (const provider of providers) {
|
|
303169
303199
|
try {
|
|
303170
|
-
_optionalChain([provider, 'access',
|
|
303200
|
+
_optionalChain([provider, 'access', _667 => _667.dispose, 'optionalCall', _668 => _668()]);
|
|
303171
303201
|
} catch (e66) {
|
|
303172
303202
|
}
|
|
303173
303203
|
}
|
|
@@ -303341,7 +303371,7 @@ var FileResolver = (_class47 = class {
|
|
|
303341
303371
|
];
|
|
303342
303372
|
for (const step of steps) {
|
|
303343
303373
|
const r = await step.fn(step.filename, relativeTo);
|
|
303344
|
-
if (_optionalChain([r, 'optionalAccess',
|
|
303374
|
+
if (_optionalChain([r, 'optionalAccess', _672 => _672.found]))
|
|
303345
303375
|
return r;
|
|
303346
303376
|
}
|
|
303347
303377
|
const result = await this.tryUrl(filename, relativeTo) || {
|
|
@@ -303478,7 +303508,7 @@ var FileResolver = (_class47 = class {
|
|
|
303478
303508
|
for (const { filename: filename2, relativeTo: relativeTo2 } of toTry) {
|
|
303479
303509
|
const found = path5.isAbsolute(filename2) && await this.doesExist(toFileUrl(filename2));
|
|
303480
303510
|
if (found)
|
|
303481
|
-
return { filename: filename2, relativeTo: _optionalChain([relativeTo2, 'optionalAccess',
|
|
303511
|
+
return { filename: filename2, relativeTo: _optionalChain([relativeTo2, 'optionalAccess', _673 => _673.toString, 'call', _674 => _674()]), found, method: "tryResolveExists" };
|
|
303482
303512
|
}
|
|
303483
303513
|
filename = path5.resolve(filename);
|
|
303484
303514
|
return {
|
|
@@ -303511,7 +303541,7 @@ var FileResolver = (_class47 = class {
|
|
|
303511
303541
|
if (match4) {
|
|
303512
303542
|
const fixedFilename = filename.replace(regExpStartsWidthNodeModules, "");
|
|
303513
303543
|
const found = this.tryImportResolve(fixedFilename, relativeToPath) || this.tryResolveFrom(fixedFilename, relativeToPath);
|
|
303514
|
-
if (_optionalChain([found, 'optionalAccess',
|
|
303544
|
+
if (_optionalChain([found, 'optionalAccess', _675 => _675.found])) {
|
|
303515
303545
|
found.method = "tryLegacyResolve";
|
|
303516
303546
|
return found;
|
|
303517
303547
|
}
|
|
@@ -303639,7 +303669,7 @@ function fixDicPath(defPath, defFile) {
|
|
|
303639
303669
|
return parts.length > 1 ? path6.join(...parts) : parts[0] || "";
|
|
303640
303670
|
}
|
|
303641
303671
|
function mapDictDefsToInternal(defs, pathToSettingsFile) {
|
|
303642
|
-
return _optionalChain([defs, 'optionalAccess',
|
|
303672
|
+
return _optionalChain([defs, 'optionalAccess', _676 => _676.map, 'call', _677 => _677((def) => mapDictDefToInternal(def, pathToSettingsFile))]);
|
|
303643
303673
|
}
|
|
303644
303674
|
var internalDefs = createAutoResolveWeakWeakCache();
|
|
303645
303675
|
function mapDictDefToInternal(def, pathToSettingsFile) {
|
|
@@ -303751,7 +303781,7 @@ _chunk6B2W5NCRcjs.init_cjs_shims.call(void 0, );
|
|
|
303751
303781
|
var StrongWeakMap = (_class48 = class {
|
|
303752
303782
|
|
|
303753
303783
|
constructor(init) {;_class48.prototype.__init127.call(this);
|
|
303754
|
-
this.map = new Map(_optionalChain([init, 'optionalAccess',
|
|
303784
|
+
this.map = new Map(_optionalChain([init, 'optionalAccess', _678 => _678.map, 'call', _679 => _679(([k, v]) => [k, new WeakRef(v)])]));
|
|
303755
303785
|
}
|
|
303756
303786
|
clear() {
|
|
303757
303787
|
this.map.clear();
|
|
@@ -304098,7 +304128,7 @@ var DictionaryLoader = (_class50 = class {
|
|
|
304098
304128
|
calcKey(def) {
|
|
304099
304129
|
const path32 = def.path;
|
|
304100
304130
|
const loaderType = determineType(toFileURL(path32), def);
|
|
304101
|
-
const optValues = importantOptionKeys.map((k) => _optionalChain([def, 'access',
|
|
304131
|
+
const optValues = importantOptionKeys.map((k) => _optionalChain([def, 'access', _680 => _680[k], 'optionalAccess', _681 => _681.toString, 'call', _682 => _682()]) || "");
|
|
304102
304132
|
const parts = [path32, loaderType, ...optValues];
|
|
304103
304133
|
return parts.join("|");
|
|
304104
304134
|
}
|
|
@@ -304659,7 +304689,7 @@ function buildLanguageExtensionMapSet(defs) {
|
|
|
304659
304689
|
autoResolve2(map4, value, () => /* @__PURE__ */ new Set()).add(def.id);
|
|
304660
304690
|
}
|
|
304661
304691
|
def.extensions.forEach(addId);
|
|
304662
|
-
_optionalChain([def, 'access',
|
|
304692
|
+
_optionalChain([def, 'access', _683 => _683.filenames, 'optionalAccess', _684 => _684.forEach, 'call', _685 => _685((filename) => typeof filename === "string" ? addId(filename) : void 0)]);
|
|
304663
304693
|
return map4;
|
|
304664
304694
|
}, /* @__PURE__ */ new Map());
|
|
304665
304695
|
}
|
|
@@ -305228,7 +305258,7 @@ function isBinaryFile2(filename, languageId, text) {
|
|
|
305228
305258
|
const ids = findMatchingFileTypes(file);
|
|
305229
305259
|
if (ids.length)
|
|
305230
305260
|
return isFileTypeGenerated(ids);
|
|
305231
|
-
return _optionalChain([text, 'optionalAccess',
|
|
305261
|
+
return _optionalChain([text, 'optionalAccess', _686 => _686.slice, 'call', _687 => _687(0, 1024), 'access', _688 => _688.includes, 'call', _689 => _689("\0")]) || false;
|
|
305232
305262
|
}
|
|
305233
305263
|
|
|
305234
305264
|
// ../../node_modules/.pnpm/cspell-lib@8.19.4/node_modules/cspell-lib/dist/lib/Document/resolveDocument.js
|
|
@@ -306187,7 +306217,7 @@ var CalcLeftRightResultWeakCache = (_class52 = class {
|
|
|
306187
306217
|
}
|
|
306188
306218
|
dispose() {
|
|
306189
306219
|
this.map.dispose();
|
|
306190
|
-
_optionalChain([this, 'access',
|
|
306220
|
+
_optionalChain([this, 'access', _690 => _690._toDispose, 'optionalAccess', _691 => _691.dispose, 'call', _692 => _692()]);
|
|
306191
306221
|
this._toDispose = void 0;
|
|
306192
306222
|
}
|
|
306193
306223
|
stats() {
|
|
@@ -306495,7 +306525,7 @@ function _merge(left, right) {
|
|
|
306495
306525
|
return _left;
|
|
306496
306526
|
}
|
|
306497
306527
|
const includeRegExpList = takeRightOtherwiseLeft(_left.includeRegExpList, _right.includeRegExpList);
|
|
306498
|
-
const optionals = _optionalChain([includeRegExpList, 'optionalAccess',
|
|
306528
|
+
const optionals = _optionalChain([includeRegExpList, 'optionalAccess', _693 => _693.length]) ? { includeRegExpList } : {};
|
|
306499
306529
|
const version5 = max3(_left.version, _right.version);
|
|
306500
306530
|
const valuesToClear = {
|
|
306501
306531
|
name: void 0,
|
|
@@ -306549,7 +306579,7 @@ function doesLeftHaveRightAncestor(left, right) {
|
|
|
306549
306579
|
return hasAncestor(left, right, 1);
|
|
306550
306580
|
}
|
|
306551
306581
|
function hasAncestor(s, ancestor, side) {
|
|
306552
|
-
const sources = _optionalChain([s, 'access',
|
|
306582
|
+
const sources = _optionalChain([s, 'access', _694 => _694.source, 'optionalAccess', _695 => _695.sources]);
|
|
306553
306583
|
if (!sources)
|
|
306554
306584
|
return false;
|
|
306555
306585
|
const i = side ? sources.length - 1 : 0;
|
|
@@ -306557,7 +306587,7 @@ function hasAncestor(s, ancestor, side) {
|
|
|
306557
306587
|
return src === ancestor || src && hasAncestor(src, ancestor, side) || false;
|
|
306558
306588
|
}
|
|
306559
306589
|
function takeRightOtherwiseLeft(left, right) {
|
|
306560
|
-
if (_optionalChain([right, 'optionalAccess',
|
|
306590
|
+
if (_optionalChain([right, 'optionalAccess', _696 => _696.length])) {
|
|
306561
306591
|
return right;
|
|
306562
306592
|
}
|
|
306563
306593
|
return left || right;
|
|
@@ -306586,7 +306616,7 @@ function toInternalSettings(settings) {
|
|
|
306586
306616
|
}
|
|
306587
306617
|
function _toInternalSettings(settings) {
|
|
306588
306618
|
const { dictionaryDefinitions: defs, ...rest } = settings;
|
|
306589
|
-
const dictionaryDefinitions = defs && mapDictDefsToInternal(defs, _optionalChain([settings, 'access',
|
|
306619
|
+
const dictionaryDefinitions = defs && mapDictDefsToInternal(defs, _optionalChain([settings, 'access', _697 => _697.source, 'optionalAccess', _698 => _698.filename]) && toFileUrl(_optionalChain([settings, 'access', _699 => _699.source, 'optionalAccess', _700 => _700.filename])) || resolveCwd());
|
|
306590
306620
|
const setting = dictionaryDefinitions ? { ...rest, dictionaryDefinitions } : rest;
|
|
306591
306621
|
return cleanCSpellSettingsInternal(setting);
|
|
306592
306622
|
}
|
|
@@ -306610,7 +306640,7 @@ function getSources(settings) {
|
|
|
306610
306640
|
if (!settings2 || visited.has(settings2))
|
|
306611
306641
|
return;
|
|
306612
306642
|
visited.add(settings2);
|
|
306613
|
-
if (!_optionalChain([settings2, 'access',
|
|
306643
|
+
if (!_optionalChain([settings2, 'access', _701 => _701.source, 'optionalAccess', _702 => _702.sources, 'optionalAccess', _703 => _703.length])) {
|
|
306614
306644
|
sources.push(settings2);
|
|
306615
306645
|
return;
|
|
306616
306646
|
}
|
|
@@ -306627,7 +306657,7 @@ function mergeImportRefs(left, right = {}) {
|
|
|
306627
306657
|
if (right.__importRef) {
|
|
306628
306658
|
imports.set(right.__importRef.filename, right.__importRef);
|
|
306629
306659
|
}
|
|
306630
|
-
const rightImports = _optionalChain([right, 'access',
|
|
306660
|
+
const rightImports = _optionalChain([right, 'access', _704 => _704.__imports, 'optionalAccess', _705 => _705.values, 'call', _706 => _706()]) || [];
|
|
306631
306661
|
for (const ref of rightImports) {
|
|
306632
306662
|
imports.set(ref.filename, ref);
|
|
306633
306663
|
}
|
|
@@ -306712,7 +306742,7 @@ var SimpleTimer = (_class53 = class {
|
|
|
306712
306742
|
this._running = false;
|
|
306713
306743
|
const end = performance.now();
|
|
306714
306744
|
this._elapsed = end - this._start;
|
|
306715
|
-
_optionalChain([this, 'access',
|
|
306745
|
+
_optionalChain([this, 'access', _707 => _707.onEnd, 'optionalCall', _708 => _708(this._elapsed, this.name)]);
|
|
306716
306746
|
}
|
|
306717
306747
|
start() {
|
|
306718
306748
|
this._start = performance.now();
|
|
@@ -307125,7 +307155,7 @@ var CSpellConfigFileReaderWriterImpl = (_class55 = class {
|
|
|
307125
307155
|
}
|
|
307126
307156
|
clearCachedFiles() {
|
|
307127
307157
|
for (const loader3 of this.loaders) {
|
|
307128
|
-
_optionalChain([loader3, 'access',
|
|
307158
|
+
_optionalChain([loader3, 'access', _709 => _709.reset, 'optionalCall', _710 => _710()]);
|
|
307129
307159
|
}
|
|
307130
307160
|
}
|
|
307131
307161
|
}, _class55);
|
|
@@ -307468,7 +307498,7 @@ function normalizeRawConfig(config2) {
|
|
|
307468
307498
|
}
|
|
307469
307499
|
function normalizeDictionaryDefs(settings, settingsFileUrl) {
|
|
307470
307500
|
const dictionaryDefinitions = mapDictDefsToInternal(settings.dictionaryDefinitions, settingsFileUrl);
|
|
307471
|
-
const languageSettings = _optionalChain([settings, 'access',
|
|
307501
|
+
const languageSettings = _optionalChain([settings, 'access', _711 => _711.languageSettings, 'optionalAccess', _712 => _712.map, 'call', _713 => _713((langSetting) => clean4({
|
|
307472
307502
|
...langSetting,
|
|
307473
307503
|
dictionaryDefinitions: mapDictDefsToInternal(langSetting.dictionaryDefinitions, settingsFileUrl)
|
|
307474
307504
|
}))]);
|
|
@@ -307479,7 +307509,7 @@ function normalizeDictionaryDefs(settings, settingsFileUrl) {
|
|
|
307479
307509
|
}
|
|
307480
307510
|
function normalizeOverrides(settings, pathToSettingsFile) {
|
|
307481
307511
|
const { globRoot = toFilePathOrHref(new URL(".", pathToSettingsFile)) } = settings;
|
|
307482
|
-
const overrides = _optionalChain([settings, 'access',
|
|
307512
|
+
const overrides = _optionalChain([settings, 'access', _714 => _714.overrides, 'optionalAccess', _715 => _715.map, 'call', _716 => _716((override) => {
|
|
307483
307513
|
const filename = toGlobDef(override.filename, globRoot, toFilePathOrHref(pathToSettingsFile));
|
|
307484
307514
|
const { dictionaryDefinitions, languageSettings } = normalizeDictionaryDefs(override, pathToSettingsFile);
|
|
307485
307515
|
return clean4({
|
|
@@ -307964,14 +307994,14 @@ var DirConfigScanner = class {
|
|
|
307964
307994
|
const parentInfo = await parentInfoP;
|
|
307965
307995
|
const name3 = urlBasename(dir).slice(0, -1);
|
|
307966
307996
|
const found2 = parentInfo.get(name3);
|
|
307967
|
-
if (!_optionalChain([found2, 'optionalAccess',
|
|
307997
|
+
if (!_optionalChain([found2, 'optionalAccess', _717 => _717.isDirectory, 'call', _718 => _718()]) && !_optionalChain([found2, 'optionalAccess', _719 => _719.isSymbolicLink, 'call', _720 => _720()]))
|
|
307968
307998
|
return false;
|
|
307969
307999
|
}
|
|
307970
308000
|
const dirUrlHref = dir.href;
|
|
307971
308001
|
const dirInfo = await dirInfoCache.get(dirUrlHref, async () => await this.#readDir(dir));
|
|
307972
308002
|
const name2 = urlBasename(filename);
|
|
307973
308003
|
const found = dirInfo.get(name2);
|
|
307974
|
-
return _optionalChain([found, 'optionalAccess',
|
|
308004
|
+
return _optionalChain([found, 'optionalAccess', _721 => _721.isFile, 'call', _722 => _722()]) || _optionalChain([found, 'optionalAccess', _723 => _723.isSymbolicLink, 'call', _724 => _724()]) || false;
|
|
307975
308005
|
};
|
|
307976
308006
|
return hasFile;
|
|
307977
308007
|
}
|
|
@@ -307986,7 +308016,7 @@ var DirConfigScanner = class {
|
|
|
307986
308016
|
#createHasFileStatCheck() {
|
|
307987
308017
|
const hasFile = async (filename) => {
|
|
307988
308018
|
const stat3 = await this.fs.stat(filename).catch(() => void 0);
|
|
307989
|
-
return !!_optionalChain([stat3, 'optionalAccess',
|
|
308019
|
+
return !!_optionalChain([stat3, 'optionalAccess', _725 => _725.isFile, 'call', _726 => _726()]);
|
|
307990
308020
|
};
|
|
307991
308021
|
return hasFile;
|
|
307992
308022
|
}
|
|
@@ -308046,7 +308076,7 @@ function normalizePnPSettings(settings) {
|
|
|
308046
308076
|
return lastPnP = clean4({ usePnP, pnpFiles });
|
|
308047
308077
|
}
|
|
308048
308078
|
function equal(a, b) {
|
|
308049
|
-
return a === b || a.usePnP === b.usePnP && (a.pnpFiles === b.pnpFiles || _optionalChain([a, 'access',
|
|
308079
|
+
return a === b || a.usePnP === b.usePnP && (a.pnpFiles === b.pnpFiles || _optionalChain([a, 'access', _727 => _727.pnpFiles, 'optionalAccess', _728 => _728.join, 'call', _729 => _729("|")]) === _optionalChain([b, 'access', _730 => _730.pnpFiles, 'optionalAccess', _731 => _731.join, 'call', _732 => _732("|")]));
|
|
308050
308080
|
}
|
|
308051
308081
|
|
|
308052
308082
|
// ../../node_modules/.pnpm/cspell-lib@8.19.4/node_modules/cspell-lib/dist/lib/Settings/Controller/configLoader/configLoader.js
|
|
@@ -308262,7 +308292,7 @@ var ConfigLoader = (_class58 = class {
|
|
|
308262
308292
|
}
|
|
308263
308293
|
}
|
|
308264
308294
|
async setupPnp(cfgFile, pnpSettings) {
|
|
308265
|
-
if (!_optionalChain([pnpSettings, 'optionalAccess',
|
|
308295
|
+
if (!_optionalChain([pnpSettings, 'optionalAccess', _733 => _733.usePnP]) || pnpSettings === defaultPnPSettings)
|
|
308266
308296
|
return;
|
|
308267
308297
|
if (cfgFile.url.protocol !== "file:")
|
|
308268
308298
|
return;
|
|
@@ -308278,8 +308308,8 @@ var ConfigLoader = (_class58 = class {
|
|
|
308278
308308
|
return cached2.result;
|
|
308279
308309
|
}
|
|
308280
308310
|
const pnp = {
|
|
308281
|
-
usePnP: _nullishCoalesce(_nullishCoalesce(cfg.settings.usePnP, () => ( _optionalChain([pnpSettings, 'optionalAccess',
|
|
308282
|
-
pnpFiles: _nullishCoalesce(cfg.settings.pnpFiles, () => ( _optionalChain([pnpSettings, 'optionalAccess',
|
|
308311
|
+
usePnP: _nullishCoalesce(_nullishCoalesce(cfg.settings.usePnP, () => ( _optionalChain([pnpSettings, 'optionalAccess', _734 => _734.usePnP]))), () => ( !!process.versions.pnp)),
|
|
308312
|
+
pnpFiles: _nullishCoalesce(cfg.settings.pnpFiles, () => ( _optionalChain([pnpSettings, 'optionalAccess', _735 => _735.pnpFiles])))
|
|
308283
308313
|
};
|
|
308284
308314
|
const result = this._mergeConfigFileWithImports(cfgFile, pnp, referencedBy);
|
|
308285
308315
|
this.cachedMergedConfig.set(cfgFile, { pnpSettings, referencedBy, result });
|
|
@@ -308359,7 +308389,7 @@ var ConfigLoader = (_class58 = class {
|
|
|
308359
308389
|
dispose() {
|
|
308360
308390
|
while (this.toDispose.length) {
|
|
308361
308391
|
try {
|
|
308362
|
-
_optionalChain([this, 'access',
|
|
308392
|
+
_optionalChain([this, 'access', _736 => _736.toDispose, 'access', _737 => _737.pop, 'call', _738 => _738(), 'optionalAccess', _739 => _739.dispose, 'call', _740 => _740()]);
|
|
308363
308393
|
} catch (e) {
|
|
308364
308394
|
logError(e);
|
|
308365
308395
|
}
|
|
@@ -308538,7 +308568,7 @@ function mergeImportRefs2(left, right = {}) {
|
|
|
308538
308568
|
if (right.__importRef) {
|
|
308539
308569
|
imports.set(right.__importRef.filename, right.__importRef);
|
|
308540
308570
|
}
|
|
308541
|
-
const rightImports = _optionalChain([right, 'access',
|
|
308571
|
+
const rightImports = _optionalChain([right, 'access', _741 => _741.__imports, 'optionalAccess', _742 => _742.values, 'call', _743 => _743()]) || [];
|
|
308542
308572
|
for (const ref of rightImports) {
|
|
308543
308573
|
imports.set(ref.filename, ref);
|
|
308544
308574
|
}
|
|
@@ -308814,7 +308844,7 @@ function findInPatterns(patterns2, line, rule) {
|
|
|
308814
308844
|
if (pat.disabled)
|
|
308815
308845
|
continue;
|
|
308816
308846
|
const er = pat.findMatch(line, rule);
|
|
308817
|
-
if (_optionalChain([er, 'optionalAccess',
|
|
308847
|
+
if (_optionalChain([er, 'optionalAccess', _744 => _744.match]) !== void 0 && !er.rule.pattern.disabled) {
|
|
308818
308848
|
r = r && r.match && r.match.index <= er.match.index && r || er;
|
|
308819
308849
|
}
|
|
308820
308850
|
}
|
|
@@ -308943,7 +308973,7 @@ var ImplNGrammar = class {
|
|
|
308943
308973
|
}
|
|
308944
308974
|
return factoryRuleBase(parent, grammar2, repository2, grammar2, findNext, end);
|
|
308945
308975
|
}
|
|
308946
|
-
return grammarToRule(this, _nullishCoalesce(_optionalChain([parentRule, 'optionalAccess',
|
|
308976
|
+
return grammarToRule(this, _nullishCoalesce(_optionalChain([parentRule, 'optionalAccess', _745 => _745.grammar]), () => ( this)), parentRule);
|
|
308947
308977
|
}
|
|
308948
308978
|
};
|
|
308949
308979
|
var ImplNPatternPatterns = class {
|
|
@@ -308964,7 +308994,7 @@ var ImplNPatternPatterns = class {
|
|
|
308964
308994
|
function findNext(line2) {
|
|
308965
308995
|
return findInPatterns(patterns2, line2, this);
|
|
308966
308996
|
}
|
|
308967
|
-
return _optionalChain([rule, 'access',
|
|
308997
|
+
return _optionalChain([rule, 'access', _746 => _746.findNext, 'optionalCall', _747 => _747(line)]);
|
|
308968
308998
|
}
|
|
308969
308999
|
};
|
|
308970
309000
|
|
|
@@ -309119,19 +309149,19 @@ function tokenizeLine(line, rule) {
|
|
|
309119
309149
|
const parsedText = [];
|
|
309120
309150
|
let ctx = buildContext({ ...line, offset: 0, anchor: -1 }, rule);
|
|
309121
309151
|
while (ctx.line.offset <= lineLen) {
|
|
309122
|
-
let endMatch = _optionalChain([ctx, 'access',
|
|
309123
|
-
while (_optionalChain([endMatch, 'optionalAccess',
|
|
309152
|
+
let endMatch = _optionalChain([ctx, 'access', _748 => _748.rule, 'access', _749 => _749.end, 'optionalCall', _750 => _750(ctx.line)]);
|
|
309153
|
+
while (_optionalChain([endMatch, 'optionalAccess', _751 => _751.index]) === ctx.line.offset) {
|
|
309124
309154
|
parsedText.push(...applyCaptureToEnd(ctx.rule, endMatch));
|
|
309125
309155
|
ctx = findParentWithEnd(ctx);
|
|
309126
309156
|
ctx.line.offset = endMatch.index + endMatch.match.length;
|
|
309127
|
-
endMatch = _optionalChain([ctx, 'access',
|
|
309157
|
+
endMatch = _optionalChain([ctx, 'access', _752 => _752.rule, 'access', _753 => _753.end, 'optionalCall', _754 => _754(ctx.line)]);
|
|
309128
309158
|
}
|
|
309129
309159
|
if (ctx.line.offset >= lineLen)
|
|
309130
309160
|
break;
|
|
309131
309161
|
const { line: line2, rule: rule2 } = ctx;
|
|
309132
309162
|
const offset = line2.offset;
|
|
309133
|
-
const match4 = _optionalChain([rule2, 'access',
|
|
309134
|
-
const limit = _nullishCoalesce(_optionalChain([endMatch, 'optionalAccess',
|
|
309163
|
+
const match4 = _optionalChain([rule2, 'access', _755 => _755.findNext, 'optionalCall', _756 => _756(line2)]);
|
|
309164
|
+
const limit = _nullishCoalesce(_optionalChain([endMatch, 'optionalAccess', _757 => _757.index]), () => ( lineLen));
|
|
309135
309165
|
const emitTil = match4 ? Math.min(match4.match.index, limit) : limit;
|
|
309136
309166
|
if (offset < emitTil) {
|
|
309137
309167
|
const scope = extractScope(rule2);
|
|
@@ -309609,7 +309639,7 @@ function* transform(texts) {
|
|
|
309609
309639
|
const scope = parsed.scope ? pool.parseScope(parsed.scope) : void 0;
|
|
309610
309640
|
yield {
|
|
309611
309641
|
text: mapped.text,
|
|
309612
|
-
scope: _optionalChain([scope, 'optionalAccess',
|
|
309642
|
+
scope: _optionalChain([scope, 'optionalAccess', _758 => _758.parent]),
|
|
309613
309643
|
map: mapped.map,
|
|
309614
309644
|
range: parsed.range
|
|
309615
309645
|
};
|
|
@@ -310427,7 +310457,7 @@ async function determineTextDocumentSettings(doc, settings) {
|
|
|
310427
310457
|
const filename = uriToFilePath(doc.uri);
|
|
310428
310458
|
const settingsWithDefaults = mergeSettings(await getDefaultSettings(_nullishCoalesce(settings.loadDefaultConfiguration, () => ( true))), await getGlobalSettingsAsync(), settings);
|
|
310429
310459
|
const fileSettings = calcOverrideSettings(settingsWithDefaults, filename);
|
|
310430
|
-
const languageIds2 = _optionalChain([fileSettings, 'optionalAccess',
|
|
310460
|
+
const languageIds2 = _optionalChain([fileSettings, 'optionalAccess', _759 => _759.languageId, 'optionalAccess', _760 => _760.length]) ? fileSettings.languageId : doc.languageId ? doc.languageId : getLanguageForFilename(filename);
|
|
310431
310461
|
if (doc.locale) {
|
|
310432
310462
|
fileSettings.language = doc.locale;
|
|
310433
310463
|
}
|
|
@@ -310498,10 +310528,10 @@ async function _suggestionsForWord(word2, options, settings) {
|
|
|
310498
310528
|
}));
|
|
310499
310529
|
const withLanguageId = calcSettingsForLanguageId(withLocale, _nullishCoalesce(_nullishCoalesce(languageId, () => ( withLocale.languageId)), () => ( "plaintext")));
|
|
310500
310530
|
const settings2 = finalizeSettings(withLanguageId);
|
|
310501
|
-
settings2.dictionaries = _optionalChain([dictionaries, 'optionalAccess',
|
|
310531
|
+
settings2.dictionaries = _optionalChain([dictionaries, 'optionalAccess', _761 => _761.length]) ? dictionaries : settings2.dictionaries || [];
|
|
310502
310532
|
validateDictionaries(settings2, dictionaries);
|
|
310503
310533
|
const dictionaryCollection2 = await getDictionaryInternal(settings2);
|
|
310504
|
-
settings2.dictionaries = _optionalChain([settings2, 'access',
|
|
310534
|
+
settings2.dictionaries = _optionalChain([settings2, 'access', _762 => _762.dictionaryDefinitions, 'optionalAccess', _763 => _763.map, 'call', _764 => _764((def) => def.name)]) || [];
|
|
310505
310535
|
const allDictionaryCollection2 = await getDictionaryInternal(settings2);
|
|
310506
310536
|
return {
|
|
310507
310537
|
dictionaryCollection: dictionaryCollection2,
|
|
@@ -310528,8 +310558,8 @@ async function _suggestionsForWordAsync(word2, options, settings, dictionaryColl
|
|
|
310528
310558
|
const found = extendsDictionaryCollection.find(sug.word);
|
|
310529
310559
|
return {
|
|
310530
310560
|
...sug,
|
|
310531
|
-
forbidden: _optionalChain([found, 'optionalAccess',
|
|
310532
|
-
noSuggest: _optionalChain([found, 'optionalAccess',
|
|
310561
|
+
forbidden: _optionalChain([found, 'optionalAccess', _765 => _765.forbidden]) || false,
|
|
310562
|
+
noSuggest: _optionalChain([found, 'optionalAccess', _766 => _766.noSuggest]) || false
|
|
310533
310563
|
};
|
|
310534
310564
|
});
|
|
310535
310565
|
return {
|
|
@@ -310576,7 +310606,7 @@ function calcSuggestionAdjustedToToMatchCase(originalWord, sugs, locale, ignoreC
|
|
|
310576
310606
|
});
|
|
310577
310607
|
}
|
|
310578
310608
|
function limitResults(suggestions, numSuggestions, includeTies) {
|
|
310579
|
-
let cost = _optionalChain([suggestions, 'access',
|
|
310609
|
+
let cost = _optionalChain([suggestions, 'access', _767 => _767[0], 'optionalAccess', _768 => _768.cost]);
|
|
310580
310610
|
let i = 0;
|
|
310581
310611
|
for (; i < suggestions.length; ++i) {
|
|
310582
310612
|
if (i >= numSuggestions && (!includeTies || suggestions[i].cost > cost)) {
|
|
@@ -310587,9 +310617,9 @@ function limitResults(suggestions, numSuggestions, includeTies) {
|
|
|
310587
310617
|
return suggestions.slice(0, i);
|
|
310588
310618
|
}
|
|
310589
310619
|
function validateDictionaries(settings, dictionaries) {
|
|
310590
|
-
if (!_optionalChain([dictionaries, 'optionalAccess',
|
|
310620
|
+
if (!_optionalChain([dictionaries, 'optionalAccess', _769 => _769.length]))
|
|
310591
310621
|
return;
|
|
310592
|
-
const knownDicts2 = new Set(_optionalChain([settings, 'access',
|
|
310622
|
+
const knownDicts2 = new Set(_optionalChain([settings, 'access', _770 => _770.dictionaryDefinitions, 'optionalAccess', _771 => _771.map, 'call', _772 => _772((def) => def.name)]) || []);
|
|
310593
310623
|
for (const dict of dictionaries) {
|
|
310594
310624
|
if (!knownDicts2.has(dict)) {
|
|
310595
310625
|
throw new SuggestionError(`Unknown dictionary: "${dict}"`, "E_dictionary_unknown");
|
|
@@ -310693,7 +310723,7 @@ var PairingHeap2 = (_class61 = class {
|
|
|
310693
310723
|
return { value };
|
|
310694
310724
|
}
|
|
310695
310725
|
peek() {
|
|
310696
|
-
return _optionalChain([this, 'access',
|
|
310726
|
+
return _optionalChain([this, 'access', _773 => _773._heap, 'optionalAccess', _774 => _774.v]);
|
|
310697
310727
|
}
|
|
310698
310728
|
[Symbol.iterator]() {
|
|
310699
310729
|
return this;
|
|
@@ -310987,7 +311017,7 @@ function splitIntoWords(lineSeg, breaks, has) {
|
|
|
310987
311017
|
for (let can = candidate; can !== void 0; can = can.p) {
|
|
310988
311018
|
const t = can.text;
|
|
310989
311019
|
const i = can.i;
|
|
310990
|
-
const cost = (!t || t.isFound ? 0 : t.text.length) + (_nullishCoalesce(_optionalChain([path32, 'optionalAccess',
|
|
311020
|
+
const cost = (!t || t.isFound ? 0 : t.text.length) + (_nullishCoalesce(_optionalChain([path32, 'optionalAccess', _775 => _775.c]), () => ( 0)));
|
|
310991
311021
|
const exitingPath = knownPathsByIndex.get(i);
|
|
310992
311022
|
if (exitingPath && exitingPath.c <= cost) {
|
|
310993
311023
|
return void 0;
|
|
@@ -311040,7 +311070,7 @@ function splitIntoWords(lineSeg, breaks, has) {
|
|
|
311040
311070
|
best.c += cost;
|
|
311041
311071
|
best.ec = best.c;
|
|
311042
311072
|
best.text = t;
|
|
311043
|
-
const segText = t || _optionalChain([best, 'access',
|
|
311073
|
+
const segText = t || _optionalChain([best, 'access', _776 => _776.p, 'optionalAccess', _777 => _777.text]) || checkTextOffset("", best.i);
|
|
311044
311074
|
const can = t ? { ...best, text: segText } : { ...best, ...best.p, text: segText };
|
|
311045
311075
|
const f = addToKnownPaths(can, void 0);
|
|
311046
311076
|
bestPath = !bestPath || f && f.c < bestPath.c ? f : bestPath;
|
|
@@ -311691,18 +311721,18 @@ function unpackDictionaryFindResult(found, config2) {
|
|
|
311691
311721
|
const dictPreferred = getPreferred(dict, word2);
|
|
311692
311722
|
const baseResult = {
|
|
311693
311723
|
word: word2,
|
|
311694
|
-
found: !!_optionalChain([findResult, 'optionalAccess',
|
|
311695
|
-
foundWord: _optionalChain([findResult, 'optionalAccess',
|
|
311696
|
-
forbidden: _optionalChain([findResult, 'optionalAccess',
|
|
311697
|
-
noSuggest: _optionalChain([findResult, 'optionalAccess',
|
|
311724
|
+
found: !!_optionalChain([findResult, 'optionalAccess', _778 => _778.found]),
|
|
311725
|
+
foundWord: _optionalChain([findResult, 'optionalAccess', _779 => _779.found]) || void 0,
|
|
311726
|
+
forbidden: _optionalChain([findResult, 'optionalAccess', _780 => _780.forbidden]) || false,
|
|
311727
|
+
noSuggest: _optionalChain([findResult, 'optionalAccess', _781 => _781.noSuggest]) || false,
|
|
311698
311728
|
dictName: dict.name,
|
|
311699
311729
|
dictSource: dict.source,
|
|
311700
311730
|
configSource: void 0,
|
|
311701
311731
|
preferredSuggestions: dictPreferred,
|
|
311702
|
-
errors: normalizeErrors(_optionalChain([dict, 'access',
|
|
311732
|
+
errors: normalizeErrors(_optionalChain([dict, 'access', _782 => _782.getErrors, 'optionalCall', _783 => _783()]))
|
|
311703
311733
|
};
|
|
311704
311734
|
const configFieldName = mapSpecialDictionaryNamesToSettings.get(dict.name);
|
|
311705
|
-
if (!_optionalChain([findResult, 'optionalAccess',
|
|
311735
|
+
if (!_optionalChain([findResult, 'optionalAccess', _784 => _784.found]) || !configFieldName || !config2.source) {
|
|
311706
311736
|
return [baseResult];
|
|
311707
311737
|
}
|
|
311708
311738
|
const opts = {
|
|
@@ -311712,7 +311742,7 @@ function unpackDictionaryFindResult(found, config2) {
|
|
|
311712
311742
|
const sources = getSources(config2);
|
|
311713
311743
|
const results = [];
|
|
311714
311744
|
for (const src of sources) {
|
|
311715
|
-
if (!src[configFieldName] || !Array.isArray(src[configFieldName]) || !_optionalChain([src, 'access',
|
|
311745
|
+
if (!src[configFieldName] || !Array.isArray(src[configFieldName]) || !_optionalChain([src, 'access', _785 => _785[configFieldName], 'optionalAccess', _786 => _786.length]) || !_optionalChain([src, 'access', _787 => _787.source, 'optionalAccess', _788 => _788.filename])) {
|
|
311716
311746
|
continue;
|
|
311717
311747
|
}
|
|
311718
311748
|
const configSource = toFileUrl(src.source.filename).href;
|
|
@@ -311720,30 +311750,30 @@ function unpackDictionaryFindResult(found, config2) {
|
|
|
311720
311750
|
const cfgDict = createCollection(getInlineConfigDictionaries(cfg), dict.name, configSource);
|
|
311721
311751
|
const findResult2 = cfgDict.find(word2, opts);
|
|
311722
311752
|
const preferredSuggestions = getPreferred(cfgDict, word2);
|
|
311723
|
-
if (!_optionalChain([findResult2, 'optionalAccess',
|
|
311753
|
+
if (!_optionalChain([findResult2, 'optionalAccess', _789 => _789.found]) && !preferredSuggestions)
|
|
311724
311754
|
continue;
|
|
311725
311755
|
const result = {
|
|
311726
311756
|
word: word2,
|
|
311727
|
-
found: !!_optionalChain([findResult2, 'optionalAccess',
|
|
311728
|
-
foundWord: _optionalChain([findResult2, 'optionalAccess',
|
|
311729
|
-
forbidden: _optionalChain([findResult2, 'optionalAccess',
|
|
311730
|
-
noSuggest: _optionalChain([findResult2, 'optionalAccess',
|
|
311757
|
+
found: !!_optionalChain([findResult2, 'optionalAccess', _790 => _790.found]),
|
|
311758
|
+
foundWord: _optionalChain([findResult2, 'optionalAccess', _791 => _791.found]) || void 0,
|
|
311759
|
+
forbidden: _optionalChain([findResult2, 'optionalAccess', _792 => _792.forbidden]) || false,
|
|
311760
|
+
noSuggest: _optionalChain([findResult2, 'optionalAccess', _793 => _793.noSuggest]) || false,
|
|
311731
311761
|
dictName: dict.name,
|
|
311732
311762
|
dictSource: configSource,
|
|
311733
311763
|
configSource,
|
|
311734
311764
|
preferredSuggestions,
|
|
311735
|
-
errors: normalizeErrors(_optionalChain([dict, 'access',
|
|
311765
|
+
errors: normalizeErrors(_optionalChain([dict, 'access', _794 => _794.getErrors, 'optionalCall', _795 => _795()]))
|
|
311736
311766
|
};
|
|
311737
311767
|
results.push(result);
|
|
311738
311768
|
}
|
|
311739
311769
|
return results.length ? results : [baseResult];
|
|
311740
311770
|
}
|
|
311741
311771
|
function normalizeErrors(errors) {
|
|
311742
|
-
return _optionalChain([errors, 'optionalAccess',
|
|
311772
|
+
return _optionalChain([errors, 'optionalAccess', _796 => _796.length]) ? errors : void 0;
|
|
311743
311773
|
}
|
|
311744
311774
|
function getPreferred(dict, word2) {
|
|
311745
|
-
const sugs = _optionalChain([dict, 'access',
|
|
311746
|
-
const preferred = _optionalChain([sugs, 'optionalAccess',
|
|
311775
|
+
const sugs = _optionalChain([dict, 'access', _797 => _797.getPreferredSuggestions, 'optionalCall', _798 => _798(word2)]);
|
|
311776
|
+
const preferred = _optionalChain([sugs, 'optionalAccess', _799 => _799.length]) ? sugs.filter((s) => s.isPreferred).map((s) => s.word) : void 0;
|
|
311747
311777
|
return preferred;
|
|
311748
311778
|
}
|
|
311749
311779
|
var CTraceResult = (_class62 = class extends Array {
|
|
@@ -311803,17 +311833,17 @@ var DocumentValidator = (_class63 = class _DocumentValidator {
|
|
|
311803
311833
|
const timer = createPerfTimer2("_prepareAsync");
|
|
311804
311834
|
const { options, settings: rawSettings } = this;
|
|
311805
311835
|
const resolveImportsRelativeTo = toFileURL(options.resolveImportsRelativeTo || toFileURL("./virtual.settings.json"));
|
|
311806
|
-
const settings = _optionalChain([rawSettings, 'access',
|
|
311836
|
+
const settings = _optionalChain([rawSettings, 'access', _800 => _800.import, 'optionalAccess', _801 => _801.length]) ? await resolveSettingsImports(rawSettings, resolveImportsRelativeTo) : rawSettings;
|
|
311807
311837
|
const useSearchForConfig = !options.noConfigSearch && !settings.noConfigSearch || options.noConfigSearch === false;
|
|
311808
311838
|
const pLocalConfig = options.configFile ? loadConfig2(options.configFile, settings) : useSearchForConfig ? timePromise(this.perfTiming, "__searchForDocumentConfig", searchForDocumentConfig(this._document, settings, settings)) : void 0;
|
|
311809
311839
|
pLocalConfig && timePromise(this.perfTiming, "_loadConfig", pLocalConfig);
|
|
311810
311840
|
const localConfig = await catchPromiseError(pLocalConfig, (e) => this.addPossibleError(e)) || {};
|
|
311811
|
-
this.addPossibleError(_optionalChain([localConfig, 'optionalAccess',
|
|
311841
|
+
this.addPossibleError(_optionalChain([localConfig, 'optionalAccess', _802 => _802.__importRef, 'optionalAccess', _803 => _803.error]));
|
|
311812
311842
|
const config2 = mergeSettings(settings, localConfig);
|
|
311813
311843
|
const docSettings = await timePromise(this.perfTiming, "_determineTextDocumentSettings", determineTextDocumentSettings(this._document, config2));
|
|
311814
311844
|
const dict = await timePromise(this.perfTiming, "_getDictionaryInternal", getDictionaryInternal(docSettings));
|
|
311815
311845
|
const recGlobMatcherTime = recordPerfTime(this.perfTiming, "_GlobMatcher");
|
|
311816
|
-
const matcher = getGlobMatcherForExcluding(_optionalChain([localConfig, 'optionalAccess',
|
|
311846
|
+
const matcher = getGlobMatcherForExcluding(_optionalChain([localConfig, 'optionalAccess', _804 => _804.ignorePaths]));
|
|
311817
311847
|
const uri = this._document.uri;
|
|
311818
311848
|
recGlobMatcherTime();
|
|
311819
311849
|
const recShouldCheckTime = recordPerfTime(this.perfTiming, "_shouldCheck");
|
|
@@ -311837,7 +311867,7 @@ var DocumentValidator = (_class63 = class _DocumentValidator {
|
|
|
311837
311867
|
segmenter,
|
|
311838
311868
|
textValidator,
|
|
311839
311869
|
localConfig,
|
|
311840
|
-
localConfigFilepath: _optionalChain([localConfig, 'optionalAccess',
|
|
311870
|
+
localConfigFilepath: _optionalChain([localConfig, 'optionalAccess', _805 => _805.__importRef, 'optionalAccess', _806 => _806.filename])
|
|
311841
311871
|
};
|
|
311842
311872
|
this._ready = true;
|
|
311843
311873
|
this._preparationTime = timer.elapsed;
|
|
@@ -311874,7 +311904,7 @@ var DocumentValidator = (_class63 = class _DocumentValidator {
|
|
|
311874
311904
|
return this._preparationTime;
|
|
311875
311905
|
}
|
|
311876
311906
|
get validateDirectives() {
|
|
311877
|
-
return _nullishCoalesce(_nullishCoalesce(this.options.validateDirectives, () => ( _optionalChain([this, 'access',
|
|
311907
|
+
return _nullishCoalesce(_nullishCoalesce(this.options.validateDirectives, () => ( _optionalChain([this, 'access', _807 => _807._preparations, 'optionalAccess', _808 => _808.config, 'access', _809 => _809.validateDirectives]))), () => ( false));
|
|
311878
311908
|
}
|
|
311879
311909
|
/**
|
|
311880
311910
|
* Check a range of text for validation issues.
|
|
@@ -312113,9 +312143,9 @@ async function shouldCheckDocument(doc, options, settings) {
|
|
|
312113
312143
|
const useSearchForConfig = !options.noConfigSearch && !settings.noConfigSearch || options.noConfigSearch === false;
|
|
312114
312144
|
const pLocalConfig = options.configFile ? loadConfig2(options.configFile, settings) : useSearchForConfig ? searchForDocumentConfig(doc, settings, settings) : void 0;
|
|
312115
312145
|
const localConfig = await catchPromiseError(pLocalConfig, addPossibleError) || {};
|
|
312116
|
-
addPossibleError(_optionalChain([localConfig, 'optionalAccess',
|
|
312146
|
+
addPossibleError(_optionalChain([localConfig, 'optionalAccess', _810 => _810.__importRef, 'optionalAccess', _811 => _811.error]));
|
|
312117
312147
|
const config2 = mergeSettings(settings, localConfig);
|
|
312118
|
-
const matcher = getGlobMatcherForExcluding(_optionalChain([localConfig, 'optionalAccess',
|
|
312148
|
+
const matcher = getGlobMatcherForExcluding(_optionalChain([localConfig, 'optionalAccess', _812 => _812.ignorePaths]));
|
|
312119
312149
|
const docSettings = await determineTextDocumentSettings(doc, config2);
|
|
312120
312150
|
return !matcher.match(uriToFilePath(doc.uri)) && (_nullishCoalesce(docSettings.enabled, () => ( true)));
|
|
312121
312151
|
}
|
|
@@ -312189,8 +312219,8 @@ async function spellCheckFullDocument(document2, options, settingsOrConfigFile)
|
|
|
312189
312219
|
return {
|
|
312190
312220
|
document: document2,
|
|
312191
312221
|
options,
|
|
312192
|
-
settingsUsed: _optionalChain([prep, 'optionalAccess',
|
|
312193
|
-
localConfigFilepath: _optionalChain([prep, 'optionalAccess',
|
|
312222
|
+
settingsUsed: _optionalChain([prep, 'optionalAccess', _813 => _813.localConfig]) || (satisfiesCSpellConfigFile(settingsOrConfigFile) ? settingsOrConfigFile.settings : settingsOrConfigFile),
|
|
312223
|
+
localConfigFilepath: _optionalChain([prep, 'optionalAccess', _814 => _814.localConfigFilepath]),
|
|
312194
312224
|
issues: [],
|
|
312195
312225
|
checked: false,
|
|
312196
312226
|
errors: docValidator.errors,
|
|
@@ -312205,7 +312235,7 @@ async function spellCheckFullDocument(document2, options, settingsOrConfigFile)
|
|
|
312205
312235
|
document: document2,
|
|
312206
312236
|
options,
|
|
312207
312237
|
settingsUsed: docValidator.getFinalizedDocSettings(),
|
|
312208
|
-
localConfigFilepath: _optionalChain([prep, 'optionalAccess',
|
|
312238
|
+
localConfigFilepath: _optionalChain([prep, 'optionalAccess', _815 => _815.localConfigFilepath]),
|
|
312209
312239
|
issues,
|
|
312210
312240
|
checked: docValidator.shouldCheckDocument(),
|
|
312211
312241
|
errors: void 0,
|
|
@@ -312412,8 +312442,8 @@ var ImplChannel = (_class64 = class {
|
|
|
312412
312442
|
}
|
|
312413
312443
|
__init163() {this.write = (msg) => this.stream.write(msg)}
|
|
312414
312444
|
__init164() {this.writeLine = (msg) => this.write(msg + "\n")}
|
|
312415
|
-
__init165() {this.clearLine = (dir, callback2) => _nullishCoalesce(_optionalChain([this, 'access',
|
|
312416
|
-
__init166() {this.printLine = (...params) => this.writeLine(params.length && _util.formatWithOptions.call(void 0, { colors: _optionalChain([this, 'access',
|
|
312445
|
+
__init165() {this.clearLine = (dir, callback2) => _nullishCoalesce(_optionalChain([this, 'access', _822 => _822.stream, 'access', _823 => _823.clearLine, 'optionalCall', _824 => _824(dir, callback2)]), () => ( false))}
|
|
312446
|
+
__init166() {this.printLine = (...params) => this.writeLine(params.length && _util.formatWithOptions.call(void 0, { colors: _optionalChain([this, 'access', _825 => _825.stream, 'access', _826 => _826.hasColors, 'optionalCall', _827 => _827()]) }, ...params) || "")}
|
|
312417
312447
|
__init167() {this.getColorLevel = () => getColorLevel(this.stream)}
|
|
312418
312448
|
}, _class64);
|
|
312419
312449
|
var Console = (_class65 = class {
|
|
@@ -312434,7 +312464,7 @@ var Console = (_class65 = class {
|
|
|
312434
312464
|
}, _class65);
|
|
312435
312465
|
var console2 = new Console();
|
|
312436
312466
|
function getColorLevel(stream3) {
|
|
312437
|
-
const depth2 = _optionalChain([stream3, 'access',
|
|
312467
|
+
const depth2 = _optionalChain([stream3, 'access', _828 => _828.getColorDepth, 'optionalCall', _829 => _829()]) || 0;
|
|
312438
312468
|
switch (depth2) {
|
|
312439
312469
|
case 1: {
|
|
312440
312470
|
return 1;
|
|
@@ -312561,7 +312591,7 @@ function genIssueEmitter(stdIO, errIO, template2, uniqueIssues, reportedIssuesCo
|
|
|
312561
312591
|
}
|
|
312562
312592
|
maxWidth = Math.max(maxWidth * 0.999, issue2.text.length, 10);
|
|
312563
312593
|
const issueText = formatIssue(stdIO, template2, issue2, Math.ceil(maxWidth));
|
|
312564
|
-
_optionalChain([reportedIssuesCollection, 'optionalAccess',
|
|
312594
|
+
_optionalChain([reportedIssuesCollection, 'optionalAccess', _830 => _830.push, 'call', _831 => _831(formatIssue(errIO, template2, issue2, Math.ceil(maxWidth)))]);
|
|
312565
312595
|
stdIO.writeLine(issueText);
|
|
312566
312596
|
};
|
|
312567
312597
|
}
|
|
@@ -312592,7 +312622,7 @@ function determineFilename(io, p, cwd) {
|
|
|
312592
312622
|
function reportProgressFileBegin(io, p, cwdURL2) {
|
|
312593
312623
|
const { idx: idx2, filename } = determineFilename(io, p, cwdURL2);
|
|
312594
312624
|
if (io.getColorLevel() > 0) {
|
|
312595
|
-
_optionalChain([io, 'access',
|
|
312625
|
+
_optionalChain([io, 'access', _832 => _832.clearLine, 'optionalCall', _833 => _833(0)]);
|
|
312596
312626
|
io.write(`${idx2} ${filename}\r`);
|
|
312597
312627
|
}
|
|
312598
312628
|
}
|
|
@@ -312632,12 +312662,12 @@ function getReporter(options, config2) {
|
|
|
312632
312662
|
};
|
|
312633
312663
|
const noColor = options.color === false;
|
|
312634
312664
|
const forceColor = options.color === true;
|
|
312635
|
-
const uniqueIssues = _optionalChain([config2, 'optionalAccess',
|
|
312665
|
+
const uniqueIssues = _optionalChain([config2, 'optionalAccess', _834 => _834.unique]) || false;
|
|
312636
312666
|
const defaultIssueTemplate = options.wordsOnly ? templateIssueWordsOnly : options.legacy ? templateIssueLegacy : options.showContext ? options.showSuggestions ? templateIssueWithContextWithSuggestions : templateIssueWithContext : options.showSuggestions ? templateIssueWithSuggestions : options.showSuggestions === false ? templateIssueNoFix : templateIssue;
|
|
312637
312667
|
const { fileGlobs, silent, summary, issues, progress: showProgress, verbose, debug: debug14 } = options;
|
|
312638
|
-
const issueTemplate = _optionalChain([config2, 'optionalAccess',
|
|
312668
|
+
const issueTemplate = _optionalChain([config2, 'optionalAccess', _835 => _835.issueTemplate]) || defaultIssueTemplate;
|
|
312639
312669
|
assertCheckTemplate(issueTemplate);
|
|
312640
|
-
const console4 = _optionalChain([config2, 'optionalAccess',
|
|
312670
|
+
const console4 = _optionalChain([config2, 'optionalAccess', _836 => _836.console]) || console2;
|
|
312641
312671
|
const colorLevel = noColor ? 0 : forceColor ? 2 : console4.stdoutChannel.getColorLevel();
|
|
312642
312672
|
const stdio = {
|
|
312643
312673
|
...console4.stdoutChannel,
|
|
@@ -312657,7 +312687,7 @@ function getReporter(options, config2) {
|
|
|
312657
312687
|
Warning: createInfoLog(stdio.chalk.yellow)
|
|
312658
312688
|
};
|
|
312659
312689
|
function infoEmitter(message, msgType) {
|
|
312660
|
-
_optionalChain([emitters, 'access',
|
|
312690
|
+
_optionalChain([emitters, 'access', _837 => _837[msgType], 'optionalCall', _838 => _838(message)]);
|
|
312661
312691
|
}
|
|
312662
312692
|
const rootURL = toFileDirURL(options.root || process.cwd());
|
|
312663
312693
|
function relativeIssue(fn) {
|
|
@@ -312676,8 +312706,8 @@ function getReporter(options, config2) {
|
|
|
312676
312706
|
if (isSpellingDictionaryLoadError(error2)) {
|
|
312677
312707
|
error2 = error2.cause;
|
|
312678
312708
|
}
|
|
312679
|
-
const errorText = _util.formatWithOptions.call(void 0, { colors: _optionalChain([stderr, 'access',
|
|
312680
|
-
_optionalChain([errorCollection, 'optionalAccess',
|
|
312709
|
+
const errorText = _util.formatWithOptions.call(void 0, { colors: _optionalChain([stderr, 'access', _839 => _839.stream, 'access', _840 => _840.hasColors, 'optionalCall', _841 => _841()]) }, stderr.chalk.red(message), debug14 ? error2 : error2.toString());
|
|
312710
|
+
_optionalChain([errorCollection, 'optionalAccess', _842 => _842.push, 'call', _843 => _843(errorText)]);
|
|
312681
312711
|
consoleError2(errorText);
|
|
312682
312712
|
}
|
|
312683
312713
|
const resultEmitter = (result) => {
|
|
@@ -312690,10 +312720,10 @@ function getReporter(options, config2) {
|
|
|
312690
312720
|
stderr.write("\r");
|
|
312691
312721
|
stderr.clearLine(0);
|
|
312692
312722
|
}
|
|
312693
|
-
if (_optionalChain([issuesCollection, 'optionalAccess',
|
|
312723
|
+
if (_optionalChain([issuesCollection, 'optionalAccess', _844 => _844.length]) || _optionalChain([errorCollection, 'optionalAccess', _845 => _845.length])) {
|
|
312694
312724
|
consoleError2("-------------------------------------------");
|
|
312695
312725
|
}
|
|
312696
|
-
if (_optionalChain([issuesCollection, 'optionalAccess',
|
|
312726
|
+
if (_optionalChain([issuesCollection, 'optionalAccess', _846 => _846.length])) {
|
|
312697
312727
|
consoleError2("Issues found:");
|
|
312698
312728
|
issuesCollection.forEach((issue2) => consoleError2(issue2));
|
|
312699
312729
|
}
|
|
@@ -312702,7 +312732,7 @@ function getReporter(options, config2) {
|
|
|
312702
312732
|
const numFilesWidthIssuesText = numFilesWithIssues === 1 ? "1 file" : `${numFilesWithIssues} files`;
|
|
312703
312733
|
const summaryMessage = `CSpell: Files checked: ${files}${cachedFilesText}, Issues found: ${issues2} in ${numFilesWidthIssuesText}${withErrorsText}.`;
|
|
312704
312734
|
consoleError2(summaryMessage);
|
|
312705
|
-
if (_optionalChain([errorCollection, 'optionalAccess',
|
|
312735
|
+
if (_optionalChain([errorCollection, 'optionalAccess', _847 => _847.length]) && issues2 > 5) {
|
|
312706
312736
|
consoleError2("-------------------------------------------");
|
|
312707
312737
|
consoleError2("Errors:");
|
|
312708
312738
|
errorCollection.forEach((error2) => consoleError2(error2));
|
|
@@ -312802,7 +312832,7 @@ function formatSuggestions(io, issue2) {
|
|
|
312802
312832
|
return "";
|
|
312803
312833
|
}
|
|
312804
312834
|
function formatQuickFix(io, issue2) {
|
|
312805
|
-
if (!_optionalChain([issue2, 'access',
|
|
312835
|
+
if (!_optionalChain([issue2, 'access', _848 => _848.suggestionsEx, 'optionalAccess', _849 => _849.length]))
|
|
312806
312836
|
return "";
|
|
312807
312837
|
const preferred = issue2.suggestionsEx.filter((sug) => sug.isPreferred).map((sug) => sug.wordAdjustedToMatchCase || sug.word);
|
|
312808
312838
|
if (!preferred.length)
|
|
@@ -312950,9 +312980,9 @@ var GitIgnoreFile = class _GitIgnoreFile {
|
|
|
312950
312980
|
const { matched } = m;
|
|
312951
312981
|
const partial2 = m;
|
|
312952
312982
|
const pattern = partial2.pattern;
|
|
312953
|
-
const glob5 = _nullishCoalesce(_optionalChain([pattern, 'optionalAccess',
|
|
312983
|
+
const glob5 = _nullishCoalesce(_optionalChain([pattern, 'optionalAccess', _850 => _850.rawGlob]), () => ( partial2.glob));
|
|
312954
312984
|
const root = partial2.root;
|
|
312955
|
-
const line = _optionalChain([pattern, 'optionalAccess',
|
|
312985
|
+
const line = _optionalChain([pattern, 'optionalAccess', _851 => _851.line]);
|
|
312956
312986
|
return { glob: glob5, matched, gitIgnoreFile: toFilePathOrHref(this.gitignore), root, line };
|
|
312957
312987
|
}
|
|
312958
312988
|
getGlobPatters() {
|
|
@@ -313069,7 +313099,7 @@ var GitIgnore = (_class66 = class {
|
|
|
313069
313099
|
isIgnoredQuick(file) {
|
|
313070
313100
|
const uFile = toFileURL(file);
|
|
313071
313101
|
const gh = this.findResolvedGitIgnoreHierarchy(getDir(uFile));
|
|
313072
|
-
return _optionalChain([gh, 'optionalAccess',
|
|
313102
|
+
return _optionalChain([gh, 'optionalAccess', _852 => _852.isIgnored, 'call', _853 => _853(uFile)]);
|
|
313073
313103
|
}
|
|
313074
313104
|
async isIgnored(file) {
|
|
313075
313105
|
const uFile = toFileURL(file);
|
|
@@ -313193,7 +313223,7 @@ function getEnvironmentVariable(key) {
|
|
|
313193
313223
|
return process.env[key];
|
|
313194
313224
|
}
|
|
313195
313225
|
function truthy(value) {
|
|
313196
|
-
switch (_optionalChain([value, 'optionalAccess',
|
|
313226
|
+
switch (_optionalChain([value, 'optionalAccess', _854 => _854.toLowerCase, 'call', _855 => _855(), 'access', _856 => _856.trim, 'call', _857 => _857()])) {
|
|
313197
313227
|
case "t":
|
|
313198
313228
|
case "true":
|
|
313199
313229
|
case "on":
|
|
@@ -314054,11 +314084,11 @@ async function glob(patternsOrOptions, options) {
|
|
|
314054
314084
|
// ../../node_modules/.pnpm/cspell@8.19.4/node_modules/cspell/dist/esm/util/glob.js
|
|
314055
314085
|
var defaultExcludeGlobs = ["node_modules/**"];
|
|
314056
314086
|
async function globP(pattern, options) {
|
|
314057
|
-
const cwd = _optionalChain([options, 'optionalAccess',
|
|
314058
|
-
const ignoreRaw = typeof _optionalChain([options, 'optionalAccess',
|
|
314059
|
-
const ignore3 = _optionalChain([ignoreRaw, 'optionalAccess',
|
|
314060
|
-
const onlyFiles = _optionalChain([options, 'optionalAccess',
|
|
314061
|
-
const dot = _optionalChain([options, 'optionalAccess',
|
|
314087
|
+
const cwd = _optionalChain([options, 'optionalAccess', _858 => _858.root]) || _optionalChain([options, 'optionalAccess', _859 => _859.cwd]) || process.cwd();
|
|
314088
|
+
const ignoreRaw = typeof _optionalChain([options, 'optionalAccess', _860 => _860.ignore]) === "string" ? [options.ignore] : _optionalChain([options, 'optionalAccess', _861 => _861.ignore]);
|
|
314089
|
+
const ignore3 = _optionalChain([ignoreRaw, 'optionalAccess', _862 => _862.filter, 'call', _863 => _863((g) => !g.startsWith("../"))]);
|
|
314090
|
+
const onlyFiles = _optionalChain([options, 'optionalAccess', _864 => _864.nodir]);
|
|
314091
|
+
const dot = _optionalChain([options, 'optionalAccess', _865 => _865.dot]);
|
|
314062
314092
|
const patterns2 = typeof pattern === "string" ? [pattern] : pattern;
|
|
314063
314093
|
const useOptions = clean5({
|
|
314064
314094
|
cwd,
|
|
@@ -314361,7 +314391,7 @@ function createFromFile2(pathToCache, useCheckSum, useRelative) {
|
|
|
314361
314391
|
return normalizePath2(r);
|
|
314362
314392
|
}
|
|
314363
314393
|
function resolveFiles(cwd, files) {
|
|
314364
|
-
return _optionalChain([files, 'optionalAccess',
|
|
314394
|
+
return _optionalChain([files, 'optionalAccess', _866 => _866.map, 'call', _867 => _867((file) => resolveFile2(cwd, file))]);
|
|
314365
314395
|
}
|
|
314366
314396
|
function wrap2(fn) {
|
|
314367
314397
|
return (...params) => {
|
|
@@ -314448,9 +314478,9 @@ var DiskCache = (_class73 = class {
|
|
|
314448
314478
|
filename = normalizePath2(filename);
|
|
314449
314479
|
const fileDescriptor = this.fileEntryCache.getFileDescriptor(filename);
|
|
314450
314480
|
const meta2 = fileDescriptor.meta;
|
|
314451
|
-
const data = _optionalChain([meta2, 'optionalAccess',
|
|
314452
|
-
const result = _optionalChain([data, 'optionalAccess',
|
|
314453
|
-
const versionMatches = this.version === _optionalChain([data, 'optionalAccess',
|
|
314481
|
+
const data = _optionalChain([meta2, 'optionalAccess', _868 => _868.data]);
|
|
314482
|
+
const result = _optionalChain([data, 'optionalAccess', _869 => _869.r]);
|
|
314483
|
+
const versionMatches = this.version === _optionalChain([data, 'optionalAccess', _870 => _870.v]);
|
|
314454
314484
|
if (fileDescriptor.notFound || fileDescriptor.changed || !meta2 || !result || !versionMatches || !this.checkDependencies(data.d)) {
|
|
314455
314485
|
return void 0;
|
|
314456
314486
|
}
|
|
@@ -314503,7 +314533,7 @@ var DiskCache = (_class73 = class {
|
|
|
314503
314533
|
calcDependencyHashes(dependsUponFiles) {
|
|
314504
314534
|
dependsUponFiles.sort();
|
|
314505
314535
|
const c = getTreeEntry(this.dependencyCacheTree, dependsUponFiles);
|
|
314506
|
-
if (_optionalChain([c, 'optionalAccess',
|
|
314536
|
+
if (_optionalChain([c, 'optionalAccess', _871 => _871.d])) {
|
|
314507
314537
|
return c.d;
|
|
314508
314538
|
}
|
|
314509
314539
|
const dependencies = dependsUponFiles.map((f) => this.getDependency(f));
|
|
@@ -314567,7 +314597,7 @@ var DiskCache = (_class73 = class {
|
|
|
314567
314597
|
function getTreeEntry(tree, keys3) {
|
|
314568
314598
|
let r = tree;
|
|
314569
314599
|
for (const k of keys3) {
|
|
314570
|
-
r = _optionalChain([r, 'access',
|
|
314600
|
+
r = _optionalChain([r, 'access', _872 => _872.c, 'optionalAccess', _873 => _873.get, 'call', _874 => _874(k)]);
|
|
314571
314601
|
if (!r)
|
|
314572
314602
|
return r;
|
|
314573
314603
|
}
|
|
@@ -314685,7 +314715,7 @@ async function readConfig(configFile, root) {
|
|
|
314685
314715
|
return configFileToConfigInfo(cfgFile);
|
|
314686
314716
|
}
|
|
314687
314717
|
}
|
|
314688
|
-
return { source: _optionalChain([config2, 'optionalAccess',
|
|
314718
|
+
return { source: _optionalChain([config2, 'optionalAccess', _875 => _875.__importRef, 'optionalAccess', _876 => _876.filename]) || "None found", config: config2 || {} };
|
|
314689
314719
|
}
|
|
314690
314720
|
async function configFileToConfigInfo(cfgFile) {
|
|
314691
314721
|
const config2 = await resolveConfigFileImports(cfgFile);
|
|
@@ -314737,11 +314767,11 @@ function callAll(methods) {
|
|
|
314737
314767
|
};
|
|
314738
314768
|
}
|
|
314739
314769
|
function extractEmitter(reporters, emitterName) {
|
|
314740
|
-
return reporters.map((r) => _optionalChain([r, 'access',
|
|
314770
|
+
return reporters.map((r) => _optionalChain([r, 'access', _877 => _877[emitterName], 'optionalAccess', _878 => _878.bind, 'call', _879 => _879(r)])).filter((r) => !!r);
|
|
314741
314771
|
}
|
|
314742
314772
|
function mergeResultEmitters(reporters) {
|
|
314743
314773
|
return async (result) => {
|
|
314744
|
-
await Promise.all(reporters.map((reporter2) => _optionalChain([reporter2, 'access',
|
|
314774
|
+
await Promise.all(reporters.map((reporter2) => _optionalChain([reporter2, 'access', _880 => _880.result, 'optionalCall', _881 => _881(result)])));
|
|
314745
314775
|
};
|
|
314746
314776
|
}
|
|
314747
314777
|
function mergeReporters(...reporters) {
|
|
@@ -314861,7 +314891,7 @@ async function runLint(cfg) {
|
|
|
314861
314891
|
return { filename, result };
|
|
314862
314892
|
}
|
|
314863
314893
|
async function processFile(filename, configInfo, cache5, prefetch2) {
|
|
314864
|
-
if (_optionalChain([prefetch2, 'optionalAccess',
|
|
314894
|
+
if (_optionalChain([prefetch2, 'optionalAccess', _882 => _882.fileResult]))
|
|
314865
314895
|
return prefetch2.fileResult;
|
|
314866
314896
|
const getElapsedTimeMs = getTimeMeasurer();
|
|
314867
314897
|
const cachedResult = await cache5.getCachedLintResults(filename);
|
|
@@ -314879,7 +314909,7 @@ async function runLint(cfg) {
|
|
|
314879
314909
|
configErrors: 0,
|
|
314880
314910
|
elapsedTimeMs: 0
|
|
314881
314911
|
};
|
|
314882
|
-
const fileInfo = _optionalChain([prefetch2, 'optionalAccess',
|
|
314912
|
+
const fileInfo = _optionalChain([prefetch2, 'optionalAccess', _883 => _883.fileInfo]) || await readFileInfo(filename, void 0, true);
|
|
314883
314913
|
if (fileInfo.errorCode) {
|
|
314884
314914
|
if (fileInfo.errorCode !== "EISDIR" && cfg.options.mustFindFiles) {
|
|
314885
314915
|
const err = new LinterError(`File not found: "${filename}"`);
|
|
@@ -314954,11 +314984,11 @@ async function runLint(cfg) {
|
|
|
314954
314984
|
fileNum,
|
|
314955
314985
|
fileCount: fileCount2,
|
|
314956
314986
|
filename,
|
|
314957
|
-
elapsedTimeMs: _optionalChain([result, 'optionalAccess',
|
|
314958
|
-
processed: _optionalChain([result, 'optionalAccess',
|
|
314959
|
-
numErrors: _optionalChain([result, 'optionalAccess',
|
|
314960
|
-
cached: _optionalChain([result, 'optionalAccess',
|
|
314961
|
-
perf: _optionalChain([result, 'optionalAccess',
|
|
314987
|
+
elapsedTimeMs: _optionalChain([result, 'optionalAccess', _884 => _884.elapsedTimeMs]),
|
|
314988
|
+
processed: _optionalChain([result, 'optionalAccess', _885 => _885.processed]),
|
|
314989
|
+
numErrors: _optionalChain([result, 'optionalAccess', _886 => _886.issues, 'access', _887 => _887.length]) || _optionalChain([result, 'optionalAccess', _888 => _888.errors]),
|
|
314990
|
+
cached: _optionalChain([result, 'optionalAccess', _889 => _889.cached]),
|
|
314991
|
+
perf: _optionalChain([result, 'optionalAccess', _890 => _890.perf])
|
|
314962
314992
|
}));
|
|
314963
314993
|
function* prefetchFiles(files2) {
|
|
314964
314994
|
const iter = prefetchIterable(pipeSync(files2, opMapSync((filename) => prefetch(filename, configInfo, cache5))), BATCH_SIZE);
|
|
@@ -314984,7 +315014,7 @@ async function runLint(cfg) {
|
|
|
314984
315014
|
const getElapsedTimeMs = getTimeMeasurer();
|
|
314985
315015
|
const fetchResult = await pFetchResult;
|
|
314986
315016
|
emitProgressBegin(filename, index2, _nullishCoalesce(fileCount, () => ( index2)));
|
|
314987
|
-
if (_optionalChain([fetchResult, 'optionalAccess',
|
|
315017
|
+
if (_optionalChain([fetchResult, 'optionalAccess', _891 => _891.skip])) {
|
|
314988
315018
|
return {
|
|
314989
315019
|
filename,
|
|
314990
315020
|
fileNum: index2,
|
|
@@ -315043,7 +315073,7 @@ async function runLint(cfg) {
|
|
|
315043
315073
|
});
|
|
315044
315074
|
const dictCollection = await getDictionary(config2);
|
|
315045
315075
|
dictCollection.dictionaries.forEach((dict) => {
|
|
315046
|
-
const dictErrors = _optionalChain([dict, 'access',
|
|
315076
|
+
const dictErrors = _optionalChain([dict, 'access', _892 => _892.getErrors, 'optionalCall', _893 => _893()]) || [];
|
|
315047
315077
|
const msg = `Dictionary Error with (${dict.name})`;
|
|
315048
315078
|
dictErrors.forEach((error2) => {
|
|
315049
315079
|
const key = msg + error2.toString();
|
|
@@ -315080,7 +315110,7 @@ async function runLint(cfg) {
|
|
|
315080
315110
|
const globInfo = await determineGlobs(configInfo, cfg);
|
|
315081
315111
|
const { fileGlobs, excludeGlobs } = globInfo;
|
|
315082
315112
|
const hasFileLists = !!cfg.fileLists.length;
|
|
315083
|
-
if (!fileGlobs.length && !hasFileLists && !_optionalChain([cfg, 'access',
|
|
315113
|
+
if (!fileGlobs.length && !hasFileLists && !_optionalChain([cfg, 'access', _894 => _894.files, 'optionalAccess', _895 => _895.length])) {
|
|
315084
315114
|
return runResult();
|
|
315085
315115
|
}
|
|
315086
315116
|
header(fileGlobs, excludeGlobs);
|
|
@@ -315167,7 +315197,7 @@ async function determineFilesToCheck(configInfo, cfg, reporter2, globInfo) {
|
|
|
315167
315197
|
}
|
|
315168
315198
|
const opFilterExcludedFiles = opFilter(filterOutExcludedFilesFn(globMatcher));
|
|
315169
315199
|
const includeFilter = createIncludeFileFilterFn(allGlobs, root, enableGlobDot);
|
|
315170
|
-
const rawCliFiles = _optionalChain([cfg, 'access',
|
|
315200
|
+
const rawCliFiles = _optionalChain([cfg, 'access', _896 => _896.files, 'optionalAccess', _897 => _897.map, 'call', _898 => _898((file) => resolveFilename(file, root)), 'access', _899 => _899.filter, 'call', _900 => _900(includeFilter)]);
|
|
315171
315201
|
const cliFiles = cfg.options.mustFindFiles ? rawCliFiles : rawCliFiles && pipeAsync(rawCliFiles, opFilterAsync2(isFile));
|
|
315172
315202
|
const foundFiles = hasFileLists ? concatAsyncIterables(cliFiles, await useFileLists(fileLists, includeFilter)) : cliFiles || await findFiles(fileGlobs, globOptions);
|
|
315173
315203
|
const filtered = gitIgnore2 ? await gitIgnore2.filterOutIgnored(foundFiles) : foundFiles;
|
|
@@ -315259,19 +315289,19 @@ function getLoggerFromReporter(reporter2) {
|
|
|
315259
315289
|
}
|
|
315260
315290
|
async function generateGitIgnore(roots) {
|
|
315261
315291
|
const root = (typeof roots === "string" ? [roots].filter((r) => !!r) : roots) || [];
|
|
315262
|
-
if (!_optionalChain([root, 'optionalAccess',
|
|
315292
|
+
if (!_optionalChain([root, 'optionalAccess', _901 => _901.length])) {
|
|
315263
315293
|
const cwd = process.cwd();
|
|
315264
315294
|
const repo = await findRepoRoot(cwd) || cwd;
|
|
315265
315295
|
root.push(repo);
|
|
315266
315296
|
}
|
|
315267
|
-
return new GitIgnore(_optionalChain([root, 'optionalAccess',
|
|
315297
|
+
return new GitIgnore(_optionalChain([root, 'optionalAccess', _902 => _902.map, 'call', _903 => _903((p) => path18.resolve(p))]));
|
|
315268
315298
|
}
|
|
315269
315299
|
async function useFileLists(fileListFiles, filterFiles) {
|
|
315270
315300
|
const files = readFileListFiles(fileListFiles);
|
|
315271
315301
|
return pipeAsync(files, opFilter(filterFiles), opFilterAsync2(isNotDir));
|
|
315272
315302
|
}
|
|
315273
315303
|
function createIncludeFileFilterFn(includeGlobPatterns, root, dot) {
|
|
315274
|
-
if (!_optionalChain([includeGlobPatterns, 'optionalAccess',
|
|
315304
|
+
if (!_optionalChain([includeGlobPatterns, 'optionalAccess', _904 => _904.length])) {
|
|
315275
315305
|
return () => true;
|
|
315276
315306
|
}
|
|
315277
315307
|
const patterns2 = includeGlobPatterns.map((g) => g === "." ? "/**" : g);
|
|
@@ -328555,7 +328585,7 @@ var AST = class _AST {
|
|
|
328555
328585
|
const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())];
|
|
328556
328586
|
if (this.isStart() && !this.type)
|
|
328557
328587
|
ret.unshift([]);
|
|
328558
|
-
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && _optionalChain([this, 'access',
|
|
328588
|
+
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && _optionalChain([this, 'access', _905 => _905.#parent, 'optionalAccess', _906 => _906.type]) === "!")) {
|
|
328559
328589
|
ret.push({});
|
|
328560
328590
|
}
|
|
328561
328591
|
return ret;
|
|
@@ -328563,7 +328593,7 @@ var AST = class _AST {
|
|
|
328563
328593
|
isStart() {
|
|
328564
328594
|
if (this.#root === this)
|
|
328565
328595
|
return true;
|
|
328566
|
-
if (!_optionalChain([this, 'access',
|
|
328596
|
+
if (!_optionalChain([this, 'access', _907 => _907.#parent, 'optionalAccess', _908 => _908.isStart, 'call', _909 => _909()]))
|
|
328567
328597
|
return false;
|
|
328568
328598
|
if (this.#parentIndex === 0)
|
|
328569
328599
|
return true;
|
|
@@ -328579,12 +328609,12 @@ var AST = class _AST {
|
|
|
328579
328609
|
isEnd() {
|
|
328580
328610
|
if (this.#root === this)
|
|
328581
328611
|
return true;
|
|
328582
|
-
if (_optionalChain([this, 'access',
|
|
328612
|
+
if (_optionalChain([this, 'access', _910 => _910.#parent, 'optionalAccess', _911 => _911.type]) === "!")
|
|
328583
328613
|
return true;
|
|
328584
|
-
if (!_optionalChain([this, 'access',
|
|
328614
|
+
if (!_optionalChain([this, 'access', _912 => _912.#parent, 'optionalAccess', _913 => _913.isEnd, 'call', _914 => _914()]))
|
|
328585
328615
|
return false;
|
|
328586
328616
|
if (!this.type)
|
|
328587
|
-
return _optionalChain([this, 'access',
|
|
328617
|
+
return _optionalChain([this, 'access', _915 => _915.#parent, 'optionalAccess', _916 => _916.isEnd, 'call', _917 => _917()]);
|
|
328588
328618
|
const pl = this.#parent ? this.#parent.#parts.length : 0;
|
|
328589
328619
|
return this.#parentIndex === pl - 1;
|
|
328590
328620
|
}
|
|
@@ -328829,7 +328859,7 @@ var AST = class _AST {
|
|
|
328829
328859
|
}
|
|
328830
328860
|
}
|
|
328831
328861
|
let end = "";
|
|
328832
|
-
if (this.isEnd() && this.#root.#filledNegs && _optionalChain([this, 'access',
|
|
328862
|
+
if (this.isEnd() && this.#root.#filledNegs && _optionalChain([this, 'access', _918 => _918.#parent, 'optionalAccess', _919 => _919.type]) === "!") {
|
|
328833
328863
|
end = "(?:$|\\/)";
|
|
328834
328864
|
}
|
|
328835
328865
|
const final2 = start2 + src + end;
|
|
@@ -329696,10 +329726,10 @@ if (typeof AC === "undefined") {
|
|
|
329696
329726
|
for (const fn of this.signal._onabort) {
|
|
329697
329727
|
fn(reason);
|
|
329698
329728
|
}
|
|
329699
|
-
_optionalChain([this, 'access',
|
|
329729
|
+
_optionalChain([this, 'access', _920 => _920.signal, 'access', _921 => _921.onabort, 'optionalCall', _922 => _922(reason)]);
|
|
329700
329730
|
}
|
|
329701
329731
|
}, _class75);
|
|
329702
|
-
let printACPolyfillWarning = _optionalChain([PROCESS, 'access',
|
|
329732
|
+
let printACPolyfillWarning = _optionalChain([PROCESS, 'access', _923 => _923.env, 'optionalAccess', _924 => _924.LRU_CACHE_IGNORE_AC_WARNING]) !== "1";
|
|
329703
329733
|
const warnACPolyfill = () => {
|
|
329704
329734
|
if (!printACPolyfillWarning)
|
|
329705
329735
|
return;
|
|
@@ -330486,18 +330516,18 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
330486
330516
|
const { __staleWhileFetching: s } = oldVal;
|
|
330487
330517
|
if (s !== void 0 && !noDisposeOnSet) {
|
|
330488
330518
|
if (this.#hasDispose) {
|
|
330489
|
-
_optionalChain([this, 'access',
|
|
330519
|
+
_optionalChain([this, 'access', _925 => _925.#dispose, 'optionalCall', _926 => _926(s, k, "set")]);
|
|
330490
330520
|
}
|
|
330491
330521
|
if (this.#hasDisposeAfter) {
|
|
330492
|
-
_optionalChain([this, 'access',
|
|
330522
|
+
_optionalChain([this, 'access', _927 => _927.#disposed, 'optionalAccess', _928 => _928.push, 'call', _929 => _929([s, k, "set"])]);
|
|
330493
330523
|
}
|
|
330494
330524
|
}
|
|
330495
330525
|
} else if (!noDisposeOnSet) {
|
|
330496
330526
|
if (this.#hasDispose) {
|
|
330497
|
-
_optionalChain([this, 'access',
|
|
330527
|
+
_optionalChain([this, 'access', _930 => _930.#dispose, 'optionalCall', _931 => _931(oldVal, k, "set")]);
|
|
330498
330528
|
}
|
|
330499
330529
|
if (this.#hasDisposeAfter) {
|
|
330500
|
-
_optionalChain([this, 'access',
|
|
330530
|
+
_optionalChain([this, 'access', _932 => _932.#disposed, 'optionalAccess', _933 => _933.push, 'call', _934 => _934([oldVal, k, "set"])]);
|
|
330501
330531
|
}
|
|
330502
330532
|
}
|
|
330503
330533
|
this.#removeItemSize(index2);
|
|
@@ -330526,8 +330556,8 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
330526
330556
|
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
|
330527
330557
|
const dt = this.#disposed;
|
|
330528
330558
|
let task;
|
|
330529
|
-
while (task = _optionalChain([dt, 'optionalAccess',
|
|
330530
|
-
_optionalChain([this, 'access',
|
|
330559
|
+
while (task = _optionalChain([dt, 'optionalAccess', _935 => _935.shift, 'call', _936 => _936()])) {
|
|
330560
|
+
_optionalChain([this, 'access', _937 => _937.#disposeAfter, 'optionalCall', _938 => _938(...task)]);
|
|
330531
330561
|
}
|
|
330532
330562
|
}
|
|
330533
330563
|
return this;
|
|
@@ -330553,8 +330583,8 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
330553
330583
|
if (this.#hasDisposeAfter && this.#disposed) {
|
|
330554
330584
|
const dt = this.#disposed;
|
|
330555
330585
|
let task;
|
|
330556
|
-
while (task = _optionalChain([dt, 'optionalAccess',
|
|
330557
|
-
_optionalChain([this, 'access',
|
|
330586
|
+
while (task = _optionalChain([dt, 'optionalAccess', _939 => _939.shift, 'call', _940 => _940()])) {
|
|
330587
|
+
_optionalChain([this, 'access', _941 => _941.#disposeAfter, 'optionalCall', _942 => _942(...task)]);
|
|
330558
330588
|
}
|
|
330559
330589
|
}
|
|
330560
330590
|
}
|
|
@@ -330567,10 +330597,10 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
330567
330597
|
v.__abortController.abort(new Error("evicted"));
|
|
330568
330598
|
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
330569
330599
|
if (this.#hasDispose) {
|
|
330570
|
-
_optionalChain([this, 'access',
|
|
330600
|
+
_optionalChain([this, 'access', _943 => _943.#dispose, 'optionalCall', _944 => _944(v, k, "evict")]);
|
|
330571
330601
|
}
|
|
330572
330602
|
if (this.#hasDisposeAfter) {
|
|
330573
|
-
_optionalChain([this, 'access',
|
|
330603
|
+
_optionalChain([this, 'access', _945 => _945.#disposed, 'optionalAccess', _946 => _946.push, 'call', _947 => _947([v, k, "evict"])]);
|
|
330574
330604
|
}
|
|
330575
330605
|
}
|
|
330576
330606
|
this.#removeItemSize(head);
|
|
@@ -330654,7 +330684,7 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
330654
330684
|
}
|
|
330655
330685
|
const ac = new AC();
|
|
330656
330686
|
const { signal } = options;
|
|
330657
|
-
_optionalChain([signal, 'optionalAccess',
|
|
330687
|
+
_optionalChain([signal, 'optionalAccess', _948 => _948.addEventListener, 'call', _949 => _949("abort", () => ac.abort(signal.reason), {
|
|
330658
330688
|
signal: ac.signal
|
|
330659
330689
|
})]);
|
|
330660
330690
|
const fetchOpts = {
|
|
@@ -330725,7 +330755,7 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
330725
330755
|
}
|
|
330726
330756
|
};
|
|
330727
330757
|
const pcall = (res, rej) => {
|
|
330728
|
-
const fmp = _optionalChain([this, 'access',
|
|
330758
|
+
const fmp = _optionalChain([this, 'access', _950 => _950.#fetchMethod, 'optionalCall', _951 => _951(k, v, fetchOpts)]);
|
|
330729
330759
|
if (fmp && fmp instanceof Promise) {
|
|
330730
330760
|
fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
|
|
330731
330761
|
}
|
|
@@ -330954,10 +330984,10 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
330954
330984
|
v.__abortController.abort(new Error("deleted"));
|
|
330955
330985
|
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
330956
330986
|
if (this.#hasDispose) {
|
|
330957
|
-
_optionalChain([this, 'access',
|
|
330987
|
+
_optionalChain([this, 'access', _952 => _952.#dispose, 'optionalCall', _953 => _953(v, k, reason)]);
|
|
330958
330988
|
}
|
|
330959
330989
|
if (this.#hasDisposeAfter) {
|
|
330960
|
-
_optionalChain([this, 'access',
|
|
330990
|
+
_optionalChain([this, 'access', _954 => _954.#disposed, 'optionalAccess', _955 => _955.push, 'call', _956 => _956([v, k, reason])]);
|
|
330961
330991
|
}
|
|
330962
330992
|
}
|
|
330963
330993
|
this.#keyMap.delete(k);
|
|
@@ -330978,11 +331008,11 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
330978
331008
|
}
|
|
330979
331009
|
}
|
|
330980
331010
|
}
|
|
330981
|
-
if (this.#hasDisposeAfter && _optionalChain([this, 'access',
|
|
331011
|
+
if (this.#hasDisposeAfter && _optionalChain([this, 'access', _957 => _957.#disposed, 'optionalAccess', _958 => _958.length])) {
|
|
330982
331012
|
const dt = this.#disposed;
|
|
330983
331013
|
let task;
|
|
330984
|
-
while (task = _optionalChain([dt, 'optionalAccess',
|
|
330985
|
-
_optionalChain([this, 'access',
|
|
331014
|
+
while (task = _optionalChain([dt, 'optionalAccess', _959 => _959.shift, 'call', _960 => _960()])) {
|
|
331015
|
+
_optionalChain([this, 'access', _961 => _961.#disposeAfter, 'optionalCall', _962 => _962(...task)]);
|
|
330986
331016
|
}
|
|
330987
331017
|
}
|
|
330988
331018
|
return deleted;
|
|
@@ -331001,10 +331031,10 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
331001
331031
|
} else {
|
|
331002
331032
|
const k = this.#keyList[index2];
|
|
331003
331033
|
if (this.#hasDispose) {
|
|
331004
|
-
_optionalChain([this, 'access',
|
|
331034
|
+
_optionalChain([this, 'access', _963 => _963.#dispose, 'optionalCall', _964 => _964(v, k, reason)]);
|
|
331005
331035
|
}
|
|
331006
331036
|
if (this.#hasDisposeAfter) {
|
|
331007
|
-
_optionalChain([this, 'access',
|
|
331037
|
+
_optionalChain([this, 'access', _965 => _965.#disposed, 'optionalAccess', _966 => _966.push, 'call', _967 => _967([v, k, reason])]);
|
|
331008
331038
|
}
|
|
331009
331039
|
}
|
|
331010
331040
|
}
|
|
@@ -331026,8 +331056,8 @@ var LRUCache = (_class76 = class _LRUCache {
|
|
|
331026
331056
|
if (this.#hasDisposeAfter && this.#disposed) {
|
|
331027
331057
|
const dt = this.#disposed;
|
|
331028
331058
|
let task;
|
|
331029
|
-
while (task = _optionalChain([dt, 'optionalAccess',
|
|
331030
|
-
_optionalChain([this, 'access',
|
|
331059
|
+
while (task = _optionalChain([dt, 'optionalAccess', _968 => _968.shift, 'call', _969 => _969()])) {
|
|
331060
|
+
_optionalChain([this, 'access', _970 => _970.#disposeAfter, 'optionalCall', _971 => _971(...task)]);
|
|
331031
331061
|
}
|
|
331032
331062
|
}
|
|
331033
331063
|
}
|
|
@@ -331257,8 +331287,8 @@ var Minipass = (_class77 = class extends _events2.EventEmitter {
|
|
|
331257
331287
|
// drop everything and get out of the flow completely
|
|
331258
331288
|
[ABORT]() {
|
|
331259
331289
|
this[ABORTED] = true;
|
|
331260
|
-
this.emit("abort", _optionalChain([this, 'access',
|
|
331261
|
-
this.destroy(_optionalChain([this, 'access',
|
|
331290
|
+
this.emit("abort", _optionalChain([this, 'access', _972 => _972[SIGNAL], 'optionalAccess', _973 => _973.reason]));
|
|
331291
|
+
this.destroy(_optionalChain([this, 'access', _974 => _974[SIGNAL], 'optionalAccess', _975 => _975.reason]));
|
|
331262
331292
|
}
|
|
331263
331293
|
/**
|
|
331264
331294
|
* True if the stream has been aborted.
|
|
@@ -331318,7 +331348,7 @@ var Minipass = (_class77 = class extends _events2.EventEmitter {
|
|
|
331318
331348
|
return this[FLOWING];
|
|
331319
331349
|
}
|
|
331320
331350
|
if (typeof chunk2 === "string" && // unless it is a string already ready for us to use
|
|
331321
|
-
!(encoding === this[ENCODING] && !_optionalChain([this, 'access',
|
|
331351
|
+
!(encoding === this[ENCODING] && !_optionalChain([this, 'access', _976 => _976[DECODER], 'optionalAccess', _977 => _977.lastNeed]))) {
|
|
331322
331352
|
chunk2 = Buffer.from(chunk2, encoding);
|
|
331323
331353
|
}
|
|
331324
331354
|
if (Buffer.isBuffer(chunk2) && this[ENCODING]) {
|
|
@@ -332506,7 +332536,7 @@ var PathBase = (_class78 = class {
|
|
|
332506
332536
|
}
|
|
332507
332537
|
try {
|
|
332508
332538
|
const read4 = await this.#fs.promises.readlink(this.fullpath());
|
|
332509
|
-
const linkTarget = await _asyncOptionalChain([(await this.parent.realpath()), 'optionalAccess', async
|
|
332539
|
+
const linkTarget = await _asyncOptionalChain([(await this.parent.realpath()), 'optionalAccess', async _978 => _978.resolve, 'call', async _979 => _979(read4)]);
|
|
332510
332540
|
if (linkTarget) {
|
|
332511
332541
|
return this.#linkTarget = linkTarget;
|
|
332512
332542
|
}
|
|
@@ -332531,7 +332561,7 @@ var PathBase = (_class78 = class {
|
|
|
332531
332561
|
}
|
|
332532
332562
|
try {
|
|
332533
332563
|
const read4 = this.#fs.readlinkSync(this.fullpath());
|
|
332534
|
-
const linkTarget = _optionalChain([this, 'access',
|
|
332564
|
+
const linkTarget = _optionalChain([this, 'access', _980 => _980.parent, 'access', _981 => _981.realpathSync, 'call', _982 => _982(), 'optionalAccess', _983 => _983.resolve, 'call', _984 => _984(read4)]);
|
|
332535
332565
|
if (linkTarget) {
|
|
332536
332566
|
return this.#linkTarget = linkTarget;
|
|
332537
332567
|
}
|
|
@@ -333261,7 +333291,7 @@ var PathScurryBase = class {
|
|
|
333261
333291
|
entry = this.cwd;
|
|
333262
333292
|
}
|
|
333263
333293
|
const e = await entry.readlink();
|
|
333264
|
-
return withFileTypes ? e : _optionalChain([e, 'optionalAccess',
|
|
333294
|
+
return withFileTypes ? e : _optionalChain([e, 'optionalAccess', _985 => _985.fullpath, 'call', _986 => _986()]);
|
|
333265
333295
|
}
|
|
333266
333296
|
readlinkSync(entry = this.cwd, { withFileTypes } = {
|
|
333267
333297
|
withFileTypes: false
|
|
@@ -333273,7 +333303,7 @@ var PathScurryBase = class {
|
|
|
333273
333303
|
entry = this.cwd;
|
|
333274
333304
|
}
|
|
333275
333305
|
const e = entry.readlinkSync();
|
|
333276
|
-
return withFileTypes ? e : _optionalChain([e, 'optionalAccess',
|
|
333306
|
+
return withFileTypes ? e : _optionalChain([e, 'optionalAccess', _987 => _987.fullpath, 'call', _988 => _988()]);
|
|
333277
333307
|
}
|
|
333278
333308
|
async realpath(entry = this.cwd, { withFileTypes } = {
|
|
333279
333309
|
withFileTypes: false
|
|
@@ -333285,7 +333315,7 @@ var PathScurryBase = class {
|
|
|
333285
333315
|
entry = this.cwd;
|
|
333286
333316
|
}
|
|
333287
333317
|
const e = await entry.realpath();
|
|
333288
|
-
return withFileTypes ? e : _optionalChain([e, 'optionalAccess',
|
|
333318
|
+
return withFileTypes ? e : _optionalChain([e, 'optionalAccess', _989 => _989.fullpath, 'call', _990 => _990()]);
|
|
333289
333319
|
}
|
|
333290
333320
|
realpathSync(entry = this.cwd, { withFileTypes } = {
|
|
333291
333321
|
withFileTypes: false
|
|
@@ -333297,7 +333327,7 @@ var PathScurryBase = class {
|
|
|
333297
333327
|
entry = this.cwd;
|
|
333298
333328
|
}
|
|
333299
333329
|
const e = entry.realpathSync();
|
|
333300
|
-
return withFileTypes ? e : _optionalChain([e, 'optionalAccess',
|
|
333330
|
+
return withFileTypes ? e : _optionalChain([e, 'optionalAccess', _991 => _991.fullpath, 'call', _992 => _992()]);
|
|
333301
333331
|
}
|
|
333302
333332
|
async walk(entry = this.cwd, opts = {}) {
|
|
333303
333333
|
if (typeof entry === "string") {
|
|
@@ -333331,7 +333361,7 @@ var PathScurryBase = class {
|
|
|
333331
333361
|
results.push(withFileTypes ? e : e.fullpath());
|
|
333332
333362
|
}
|
|
333333
333363
|
if (follow && e.isSymbolicLink()) {
|
|
333334
|
-
e.realpath().then((r) => _optionalChain([r, 'optionalAccess',
|
|
333364
|
+
e.realpath().then((r) => _optionalChain([r, 'optionalAccess', _993 => _993.isUnknown, 'call', _994 => _994()]) ? r.lstat() : r).then((r) => _optionalChain([r, 'optionalAccess', _995 => _995.shouldWalk, 'call', _996 => _996(dirs, walkFilter)]) ? walk2(r, next) : next());
|
|
333335
333365
|
} else {
|
|
333336
333366
|
if (e.shouldWalk(dirs, walkFilter)) {
|
|
333337
333367
|
walk2(e, next);
|
|
@@ -333477,7 +333507,7 @@ var PathScurryBase = class {
|
|
|
333477
333507
|
const promises2 = [];
|
|
333478
333508
|
for (const e of entries) {
|
|
333479
333509
|
if (e.isSymbolicLink()) {
|
|
333480
|
-
promises2.push(e.realpath().then((r) => _optionalChain([r, 'optionalAccess',
|
|
333510
|
+
promises2.push(e.realpath().then((r) => _optionalChain([r, 'optionalAccess', _997 => _997.isUnknown, 'call', _998 => _998()]) ? r.lstat() : r));
|
|
333481
333511
|
}
|
|
333482
333512
|
}
|
|
333483
333513
|
if (promises2.length) {
|
|
@@ -333911,7 +333941,7 @@ var HasWalkedCache = class _HasWalkedCache {
|
|
|
333911
333941
|
return new _HasWalkedCache(new Map(this.store));
|
|
333912
333942
|
}
|
|
333913
333943
|
hasWalked(target, pattern) {
|
|
333914
|
-
return _optionalChain([this, 'access',
|
|
333944
|
+
return _optionalChain([this, 'access', _999 => _999.store, 'access', _1000 => _1000.get, 'call', _1001 => _1001(target.fullpath()), 'optionalAccess', _1002 => _1002.has, 'call', _1003 => _1003(pattern.globString())]);
|
|
333915
333945
|
}
|
|
333916
333946
|
storeWalked(target, pattern) {
|
|
333917
333947
|
const fullpath = target.fullpath();
|
|
@@ -334023,8 +334053,8 @@ var Processor2 = (_class85 = class _Processor {
|
|
|
334023
334053
|
if (!t.isSymbolicLink() || this.follow || pattern.checkFollowGlobstar()) {
|
|
334024
334054
|
this.subwalks.add(t, pattern);
|
|
334025
334055
|
}
|
|
334026
|
-
const rp = _optionalChain([rest, 'optionalAccess',
|
|
334027
|
-
const rrest = _optionalChain([rest, 'optionalAccess',
|
|
334056
|
+
const rp = _optionalChain([rest, 'optionalAccess', _1004 => _1004.pattern, 'call', _1005 => _1005()]);
|
|
334057
|
+
const rrest = _optionalChain([rest, 'optionalAccess', _1006 => _1006.rest, 'call', _1007 => _1007()]);
|
|
334028
334058
|
if (!rest || (rp === "" || rp === ".") && !rrest) {
|
|
334029
334059
|
this.matches.add(t, absolute, rp === "" || rp === ".");
|
|
334030
334060
|
} else {
|
|
@@ -334159,17 +334189,17 @@ var GlobUtil = (_class86 = class {
|
|
|
334159
334189
|
}
|
|
334160
334190
|
}
|
|
334161
334191
|
#ignored(path32) {
|
|
334162
|
-
return this.seen.has(path32) || !!_optionalChain([this, 'access',
|
|
334192
|
+
return this.seen.has(path32) || !!_optionalChain([this, 'access', _1008 => _1008.#ignore, 'optionalAccess', _1009 => _1009.ignored, 'optionalCall', _1010 => _1010(path32)]);
|
|
334163
334193
|
}
|
|
334164
334194
|
#childrenIgnored(path32) {
|
|
334165
|
-
return !!_optionalChain([this, 'access',
|
|
334195
|
+
return !!_optionalChain([this, 'access', _1011 => _1011.#ignore, 'optionalAccess', _1012 => _1012.childrenIgnored, 'optionalCall', _1013 => _1013(path32)]);
|
|
334166
334196
|
}
|
|
334167
334197
|
// backpressure mechanism
|
|
334168
334198
|
pause() {
|
|
334169
334199
|
this.paused = true;
|
|
334170
334200
|
}
|
|
334171
334201
|
resume() {
|
|
334172
|
-
if (_optionalChain([this, 'access',
|
|
334202
|
+
if (_optionalChain([this, 'access', _1014 => _1014.signal, 'optionalAccess', _1015 => _1015.aborted]))
|
|
334173
334203
|
return;
|
|
334174
334204
|
this.paused = false;
|
|
334175
334205
|
let fn = void 0;
|
|
@@ -334178,7 +334208,7 @@ var GlobUtil = (_class86 = class {
|
|
|
334178
334208
|
}
|
|
334179
334209
|
}
|
|
334180
334210
|
onResume(fn) {
|
|
334181
|
-
if (_optionalChain([this, 'access',
|
|
334211
|
+
if (_optionalChain([this, 'access', _1016 => _1016.signal, 'optionalAccess', _1017 => _1017.aborted]))
|
|
334182
334212
|
return;
|
|
334183
334213
|
if (!this.paused) {
|
|
334184
334214
|
fn();
|
|
@@ -334200,7 +334230,7 @@ var GlobUtil = (_class86 = class {
|
|
|
334200
334230
|
}
|
|
334201
334231
|
const needStat = e.isUnknown() || this.opts.stat;
|
|
334202
334232
|
const s = needStat ? await e.lstat() : e;
|
|
334203
|
-
if (this.opts.follow && this.opts.nodir && _optionalChain([s, 'optionalAccess',
|
|
334233
|
+
if (this.opts.follow && this.opts.nodir && _optionalChain([s, 'optionalAccess', _1018 => _1018.isSymbolicLink, 'call', _1019 => _1019()])) {
|
|
334204
334234
|
const target = await s.realpath();
|
|
334205
334235
|
if (target && (target.isUnknown() || this.opts.stat)) {
|
|
334206
334236
|
await target.lstat();
|
|
@@ -334209,7 +334239,7 @@ var GlobUtil = (_class86 = class {
|
|
|
334209
334239
|
return this.matchCheckTest(s, ifDir);
|
|
334210
334240
|
}
|
|
334211
334241
|
matchCheckTest(e, ifDir) {
|
|
334212
|
-
return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!ifDir || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !_optionalChain([e, 'access',
|
|
334242
|
+
return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!ifDir || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !_optionalChain([e, 'access', _1020 => _1020.realpathCached, 'call', _1021 => _1021(), 'optionalAccess', _1022 => _1022.isDirectory, 'call', _1023 => _1023()])) && !this.#ignored(e) ? e : void 0;
|
|
334213
334243
|
}
|
|
334214
334244
|
matchCheckSync(e, ifDir) {
|
|
334215
334245
|
if (ifDir && this.opts.nodir)
|
|
@@ -334223,9 +334253,9 @@ var GlobUtil = (_class86 = class {
|
|
|
334223
334253
|
}
|
|
334224
334254
|
const needStat = e.isUnknown() || this.opts.stat;
|
|
334225
334255
|
const s = needStat ? e.lstatSync() : e;
|
|
334226
|
-
if (this.opts.follow && this.opts.nodir && _optionalChain([s, 'optionalAccess',
|
|
334256
|
+
if (this.opts.follow && this.opts.nodir && _optionalChain([s, 'optionalAccess', _1024 => _1024.isSymbolicLink, 'call', _1025 => _1025()])) {
|
|
334227
334257
|
const target = s.realpathSync();
|
|
334228
|
-
if (target && (_optionalChain([target, 'optionalAccess',
|
|
334258
|
+
if (target && (_optionalChain([target, 'optionalAccess', _1026 => _1026.isUnknown, 'call', _1027 => _1027()]) || this.opts.stat)) {
|
|
334229
334259
|
target.lstatSync();
|
|
334230
334260
|
}
|
|
334231
334261
|
}
|
|
@@ -334234,7 +334264,7 @@ var GlobUtil = (_class86 = class {
|
|
|
334234
334264
|
matchFinish(e, absolute) {
|
|
334235
334265
|
if (this.#ignored(e))
|
|
334236
334266
|
return;
|
|
334237
|
-
if (!this.includeChildMatches && _optionalChain([this, 'access',
|
|
334267
|
+
if (!this.includeChildMatches && _optionalChain([this, 'access', _1028 => _1028.#ignore, 'optionalAccess', _1029 => _1029.add])) {
|
|
334238
334268
|
const ign = `${e.relativePosix()}/**`;
|
|
334239
334269
|
this.#ignore.add(ign);
|
|
334240
334270
|
}
|
|
@@ -334263,14 +334293,14 @@ var GlobUtil = (_class86 = class {
|
|
|
334263
334293
|
this.matchFinish(p, absolute);
|
|
334264
334294
|
}
|
|
334265
334295
|
walkCB(target, patterns2, cb) {
|
|
334266
|
-
if (_optionalChain([this, 'access',
|
|
334296
|
+
if (_optionalChain([this, 'access', _1030 => _1030.signal, 'optionalAccess', _1031 => _1031.aborted]))
|
|
334267
334297
|
cb();
|
|
334268
334298
|
this.walkCB2(target, patterns2, new Processor2(this.opts), cb);
|
|
334269
334299
|
}
|
|
334270
334300
|
walkCB2(target, patterns2, processor, cb) {
|
|
334271
334301
|
if (this.#childrenIgnored(target))
|
|
334272
334302
|
return cb();
|
|
334273
|
-
if (_optionalChain([this, 'access',
|
|
334303
|
+
if (_optionalChain([this, 'access', _1032 => _1032.signal, 'optionalAccess', _1033 => _1033.aborted]))
|
|
334274
334304
|
cb();
|
|
334275
334305
|
if (this.paused) {
|
|
334276
334306
|
this.onResume(() => this.walkCB2(target, patterns2, processor, cb));
|
|
@@ -334322,14 +334352,14 @@ var GlobUtil = (_class86 = class {
|
|
|
334322
334352
|
next();
|
|
334323
334353
|
}
|
|
334324
334354
|
walkCBSync(target, patterns2, cb) {
|
|
334325
|
-
if (_optionalChain([this, 'access',
|
|
334355
|
+
if (_optionalChain([this, 'access', _1034 => _1034.signal, 'optionalAccess', _1035 => _1035.aborted]))
|
|
334326
334356
|
cb();
|
|
334327
334357
|
this.walkCB2Sync(target, patterns2, new Processor2(this.opts), cb);
|
|
334328
334358
|
}
|
|
334329
334359
|
walkCB2Sync(target, patterns2, processor, cb) {
|
|
334330
334360
|
if (this.#childrenIgnored(target))
|
|
334331
334361
|
return cb();
|
|
334332
|
-
if (_optionalChain([this, 'access',
|
|
334362
|
+
if (_optionalChain([this, 'access', _1036 => _1036.signal, 'optionalAccess', _1037 => _1037.aborted]))
|
|
334333
334363
|
cb();
|
|
334334
334364
|
if (this.paused) {
|
|
334335
334365
|
this.onResume(() => this.walkCB2Sync(target, patterns2, processor, cb));
|
|
@@ -334384,14 +334414,14 @@ var GlobWalker = (_class87 = class extends GlobUtil {
|
|
|
334384
334414
|
this.matches.add(e);
|
|
334385
334415
|
}
|
|
334386
334416
|
async walk() {
|
|
334387
|
-
if (_optionalChain([this, 'access',
|
|
334417
|
+
if (_optionalChain([this, 'access', _1038 => _1038.signal, 'optionalAccess', _1039 => _1039.aborted]))
|
|
334388
334418
|
throw this.signal.reason;
|
|
334389
334419
|
if (this.path.isUnknown()) {
|
|
334390
334420
|
await this.path.lstat();
|
|
334391
334421
|
}
|
|
334392
334422
|
await new Promise((res, rej) => {
|
|
334393
334423
|
this.walkCB(this.path, this.patterns, () => {
|
|
334394
|
-
if (_optionalChain([this, 'access',
|
|
334424
|
+
if (_optionalChain([this, 'access', _1040 => _1040.signal, 'optionalAccess', _1041 => _1041.aborted])) {
|
|
334395
334425
|
rej(this.signal.reason);
|
|
334396
334426
|
} else {
|
|
334397
334427
|
res(this.matches);
|
|
@@ -334401,13 +334431,13 @@ var GlobWalker = (_class87 = class extends GlobUtil {
|
|
|
334401
334431
|
return this.matches;
|
|
334402
334432
|
}
|
|
334403
334433
|
walkSync() {
|
|
334404
|
-
if (_optionalChain([this, 'access',
|
|
334434
|
+
if (_optionalChain([this, 'access', _1042 => _1042.signal, 'optionalAccess', _1043 => _1043.aborted]))
|
|
334405
334435
|
throw this.signal.reason;
|
|
334406
334436
|
if (this.path.isUnknown()) {
|
|
334407
334437
|
this.path.lstatSync();
|
|
334408
334438
|
}
|
|
334409
334439
|
this.walkCBSync(this.path, this.patterns, () => {
|
|
334410
|
-
if (_optionalChain([this, 'access',
|
|
334440
|
+
if (_optionalChain([this, 'access', _1044 => _1044.signal, 'optionalAccess', _1045 => _1045.aborted]))
|
|
334411
334441
|
throw this.signal.reason;
|
|
334412
334442
|
});
|
|
334413
334443
|
return this.matches;
|
|
@@ -336981,7 +337011,7 @@ var AST2 = class _AST {
|
|
|
336981
337011
|
const ret = this.type === null ? this.#parts.slice().map((p) => typeof p === "string" ? p : p.toJSON()) : [this.type, ...this.#parts.map((p) => p.toJSON())];
|
|
336982
337012
|
if (this.isStart() && !this.type)
|
|
336983
337013
|
ret.unshift([]);
|
|
336984
|
-
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && _optionalChain([this, 'access',
|
|
337014
|
+
if (this.isEnd() && (this === this.#root || this.#root.#filledNegs && _optionalChain([this, 'access', _1046 => _1046.#parent, 'optionalAccess', _1047 => _1047.type]) === "!")) {
|
|
336985
337015
|
ret.push({});
|
|
336986
337016
|
}
|
|
336987
337017
|
return ret;
|
|
@@ -336989,7 +337019,7 @@ var AST2 = class _AST {
|
|
|
336989
337019
|
isStart() {
|
|
336990
337020
|
if (this.#root === this)
|
|
336991
337021
|
return true;
|
|
336992
|
-
if (!_optionalChain([this, 'access',
|
|
337022
|
+
if (!_optionalChain([this, 'access', _1048 => _1048.#parent, 'optionalAccess', _1049 => _1049.isStart, 'call', _1050 => _1050()]))
|
|
336993
337023
|
return false;
|
|
336994
337024
|
if (this.#parentIndex === 0)
|
|
336995
337025
|
return true;
|
|
@@ -337005,12 +337035,12 @@ var AST2 = class _AST {
|
|
|
337005
337035
|
isEnd() {
|
|
337006
337036
|
if (this.#root === this)
|
|
337007
337037
|
return true;
|
|
337008
|
-
if (_optionalChain([this, 'access',
|
|
337038
|
+
if (_optionalChain([this, 'access', _1051 => _1051.#parent, 'optionalAccess', _1052 => _1052.type]) === "!")
|
|
337009
337039
|
return true;
|
|
337010
|
-
if (!_optionalChain([this, 'access',
|
|
337040
|
+
if (!_optionalChain([this, 'access', _1053 => _1053.#parent, 'optionalAccess', _1054 => _1054.isEnd, 'call', _1055 => _1055()]))
|
|
337011
337041
|
return false;
|
|
337012
337042
|
if (!this.type)
|
|
337013
|
-
return _optionalChain([this, 'access',
|
|
337043
|
+
return _optionalChain([this, 'access', _1056 => _1056.#parent, 'optionalAccess', _1057 => _1057.isEnd, 'call', _1058 => _1058()]);
|
|
337014
337044
|
const pl = this.#parent ? this.#parent.#parts.length : 0;
|
|
337015
337045
|
return this.#parentIndex === pl - 1;
|
|
337016
337046
|
}
|
|
@@ -337255,7 +337285,7 @@ var AST2 = class _AST {
|
|
|
337255
337285
|
}
|
|
337256
337286
|
}
|
|
337257
337287
|
let end = "";
|
|
337258
|
-
if (this.isEnd() && this.#root.#filledNegs && _optionalChain([this, 'access',
|
|
337288
|
+
if (this.isEnd() && this.#root.#filledNegs && _optionalChain([this, 'access', _1059 => _1059.#parent, 'optionalAccess', _1060 => _1060.type]) === "!") {
|
|
337259
337289
|
end = "(?:$|\\/)";
|
|
337260
337290
|
}
|
|
337261
337291
|
const final2 = start2 + src + end;
|
|
@@ -338133,10 +338163,10 @@ if (typeof AC2 === "undefined") {
|
|
|
338133
338163
|
for (const fn of this.signal._onabort) {
|
|
338134
338164
|
fn(reason);
|
|
338135
338165
|
}
|
|
338136
|
-
_optionalChain([this, 'access',
|
|
338166
|
+
_optionalChain([this, 'access', _1061 => _1061.signal, 'access', _1062 => _1062.onabort, 'optionalCall', _1063 => _1063(reason)]);
|
|
338137
338167
|
}
|
|
338138
338168
|
}, _class89);
|
|
338139
|
-
let printACPolyfillWarning = _optionalChain([PROCESS2, 'access',
|
|
338169
|
+
let printACPolyfillWarning = _optionalChain([PROCESS2, 'access', _1064 => _1064.env, 'optionalAccess', _1065 => _1065.LRU_CACHE_IGNORE_AC_WARNING]) !== "1";
|
|
338140
338170
|
const warnACPolyfill = () => {
|
|
338141
338171
|
if (!printACPolyfillWarning)
|
|
338142
338172
|
return;
|
|
@@ -338370,7 +338400,7 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
338370
338400
|
constructor(options) {;_class90.prototype.__init224.call(this);
|
|
338371
338401
|
const { max: max4 = 0, ttl, ttlResolution = 1, ttlAutopurge, updateAgeOnGet, updateAgeOnHas, allowStale, dispose, onInsert, disposeAfter, noDisposeOnSet, noUpdateTTL, maxSize = 0, maxEntrySize = 0, sizeCalculation, fetchMethod, memoMethod, noDeleteOnFetchRejection, noDeleteOnStaleGet, allowStaleOnFetchRejection, allowStaleOnFetchAbort, ignoreFetchAbort, perf: perf2 } = options;
|
|
338372
338402
|
if (perf2 !== void 0) {
|
|
338373
|
-
if (typeof _optionalChain([perf2, 'optionalAccess',
|
|
338403
|
+
if (typeof _optionalChain([perf2, 'optionalAccess', _1066 => _1066.now]) !== "function") {
|
|
338374
338404
|
throw new TypeError("perf option must have a now() method if specified");
|
|
338375
338405
|
}
|
|
338376
338406
|
}
|
|
@@ -338488,7 +338518,7 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
338488
338518
|
this.#setItemTTL = (index2, ttl, start = this.#perf.now()) => {
|
|
338489
338519
|
starts[index2] = ttl !== 0 ? start : 0;
|
|
338490
338520
|
ttls[index2] = ttl;
|
|
338491
|
-
if (_optionalChain([purgeTimers, 'optionalAccess',
|
|
338521
|
+
if (_optionalChain([purgeTimers, 'optionalAccess', _1067 => _1067[index2]])) {
|
|
338492
338522
|
clearTimeout(purgeTimers[index2]);
|
|
338493
338523
|
purgeTimers[index2] = void 0;
|
|
338494
338524
|
}
|
|
@@ -338949,7 +338979,7 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
338949
338979
|
status.set = "add";
|
|
338950
338980
|
noUpdateTTL = false;
|
|
338951
338981
|
if (this.#hasOnInsert) {
|
|
338952
|
-
_optionalChain([this, 'access',
|
|
338982
|
+
_optionalChain([this, 'access', _1068 => _1068.#onInsert, 'optionalCall', _1069 => _1069(v, k, "add")]);
|
|
338953
338983
|
}
|
|
338954
338984
|
} else {
|
|
338955
338985
|
this.#moveToTail(index2);
|
|
@@ -338960,18 +338990,18 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
338960
338990
|
const { __staleWhileFetching: s } = oldVal;
|
|
338961
338991
|
if (s !== void 0 && !noDisposeOnSet) {
|
|
338962
338992
|
if (this.#hasDispose) {
|
|
338963
|
-
_optionalChain([this, 'access',
|
|
338993
|
+
_optionalChain([this, 'access', _1070 => _1070.#dispose, 'optionalCall', _1071 => _1071(s, k, "set")]);
|
|
338964
338994
|
}
|
|
338965
338995
|
if (this.#hasDisposeAfter) {
|
|
338966
|
-
_optionalChain([this, 'access',
|
|
338996
|
+
_optionalChain([this, 'access', _1072 => _1072.#disposed, 'optionalAccess', _1073 => _1073.push, 'call', _1074 => _1074([s, k, "set"])]);
|
|
338967
338997
|
}
|
|
338968
338998
|
}
|
|
338969
338999
|
} else if (!noDisposeOnSet) {
|
|
338970
339000
|
if (this.#hasDispose) {
|
|
338971
|
-
_optionalChain([this, 'access',
|
|
339001
|
+
_optionalChain([this, 'access', _1075 => _1075.#dispose, 'optionalCall', _1076 => _1076(oldVal, k, "set")]);
|
|
338972
339002
|
}
|
|
338973
339003
|
if (this.#hasDisposeAfter) {
|
|
338974
|
-
_optionalChain([this, 'access',
|
|
339004
|
+
_optionalChain([this, 'access', _1077 => _1077.#disposed, 'optionalAccess', _1078 => _1078.push, 'call', _1079 => _1079([oldVal, k, "set"])]);
|
|
338975
339005
|
}
|
|
338976
339006
|
}
|
|
338977
339007
|
this.#removeItemSize(index2);
|
|
@@ -338987,7 +339017,7 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
338987
339017
|
status.set = "update";
|
|
338988
339018
|
}
|
|
338989
339019
|
if (this.#hasOnInsert) {
|
|
338990
|
-
_optionalChain([this, 'access',
|
|
339020
|
+
_optionalChain([this, 'access', _1080 => _1080.onInsert, 'optionalCall', _1081 => _1081(v, k, v === oldVal ? "update" : "replace")]);
|
|
338991
339021
|
}
|
|
338992
339022
|
}
|
|
338993
339023
|
if (ttl !== 0 && !this.#ttls) {
|
|
@@ -339003,8 +339033,8 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339003
339033
|
if (!noDisposeOnSet && this.#hasDisposeAfter && this.#disposed) {
|
|
339004
339034
|
const dt = this.#disposed;
|
|
339005
339035
|
let task;
|
|
339006
|
-
while (task = _optionalChain([dt, 'optionalAccess',
|
|
339007
|
-
_optionalChain([this, 'access',
|
|
339036
|
+
while (task = _optionalChain([dt, 'optionalAccess', _1082 => _1082.shift, 'call', _1083 => _1083()])) {
|
|
339037
|
+
_optionalChain([this, 'access', _1084 => _1084.#disposeAfter, 'optionalCall', _1085 => _1085(...task)]);
|
|
339008
339038
|
}
|
|
339009
339039
|
}
|
|
339010
339040
|
return this;
|
|
@@ -339030,8 +339060,8 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339030
339060
|
if (this.#hasDisposeAfter && this.#disposed) {
|
|
339031
339061
|
const dt = this.#disposed;
|
|
339032
339062
|
let task;
|
|
339033
|
-
while (task = _optionalChain([dt, 'optionalAccess',
|
|
339034
|
-
_optionalChain([this, 'access',
|
|
339063
|
+
while (task = _optionalChain([dt, 'optionalAccess', _1086 => _1086.shift, 'call', _1087 => _1087()])) {
|
|
339064
|
+
_optionalChain([this, 'access', _1088 => _1088.#disposeAfter, 'optionalCall', _1089 => _1089(...task)]);
|
|
339035
339065
|
}
|
|
339036
339066
|
}
|
|
339037
339067
|
}
|
|
@@ -339044,14 +339074,14 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339044
339074
|
v.__abortController.abort(new Error("evicted"));
|
|
339045
339075
|
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
339046
339076
|
if (this.#hasDispose) {
|
|
339047
|
-
_optionalChain([this, 'access',
|
|
339077
|
+
_optionalChain([this, 'access', _1090 => _1090.#dispose, 'optionalCall', _1091 => _1091(v, k, "evict")]);
|
|
339048
339078
|
}
|
|
339049
339079
|
if (this.#hasDisposeAfter) {
|
|
339050
|
-
_optionalChain([this, 'access',
|
|
339080
|
+
_optionalChain([this, 'access', _1092 => _1092.#disposed, 'optionalAccess', _1093 => _1093.push, 'call', _1094 => _1094([v, k, "evict"])]);
|
|
339051
339081
|
}
|
|
339052
339082
|
}
|
|
339053
339083
|
this.#removeItemSize(head);
|
|
339054
|
-
if (_optionalChain([this, 'access',
|
|
339084
|
+
if (_optionalChain([this, 'access', _1095 => _1095.#autopurgeTimers, 'optionalAccess', _1096 => _1096[head]])) {
|
|
339055
339085
|
clearTimeout(this.#autopurgeTimers[head]);
|
|
339056
339086
|
this.#autopurgeTimers[head] = void 0;
|
|
339057
339087
|
}
|
|
@@ -339135,7 +339165,7 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339135
339165
|
}
|
|
339136
339166
|
const ac = new AC2();
|
|
339137
339167
|
const { signal } = options;
|
|
339138
|
-
_optionalChain([signal, 'optionalAccess',
|
|
339168
|
+
_optionalChain([signal, 'optionalAccess', _1097 => _1097.addEventListener, 'call', _1098 => _1098("abort", () => ac.abort(signal.reason), {
|
|
339139
339169
|
signal: ac.signal
|
|
339140
339170
|
})]);
|
|
339141
339171
|
const fetchOpts = {
|
|
@@ -339207,7 +339237,7 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339207
339237
|
}
|
|
339208
339238
|
};
|
|
339209
339239
|
const pcall = (res, rej) => {
|
|
339210
|
-
const fmp = _optionalChain([this, 'access',
|
|
339240
|
+
const fmp = _optionalChain([this, 'access', _1099 => _1099.#fetchMethod, 'optionalCall', _1100 => _1100(k, v, fetchOpts)]);
|
|
339211
339241
|
if (fmp && fmp instanceof Promise) {
|
|
339212
339242
|
fmp.then((v2) => res(v2 === void 0 ? void 0 : v2), rej);
|
|
339213
339243
|
}
|
|
@@ -339426,8 +339456,8 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339426
339456
|
if (this.#size !== 0) {
|
|
339427
339457
|
const index2 = this.#keyMap.get(k);
|
|
339428
339458
|
if (index2 !== void 0) {
|
|
339429
|
-
if (_optionalChain([this, 'access',
|
|
339430
|
-
clearTimeout(_optionalChain([this, 'access',
|
|
339459
|
+
if (_optionalChain([this, 'access', _1101 => _1101.#autopurgeTimers, 'optionalAccess', _1102 => _1102[index2]])) {
|
|
339460
|
+
clearTimeout(_optionalChain([this, 'access', _1103 => _1103.#autopurgeTimers, 'optionalAccess', _1104 => _1104[index2]]));
|
|
339431
339461
|
this.#autopurgeTimers[index2] = void 0;
|
|
339432
339462
|
}
|
|
339433
339463
|
deleted = true;
|
|
@@ -339440,10 +339470,10 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339440
339470
|
v.__abortController.abort(new Error("deleted"));
|
|
339441
339471
|
} else if (this.#hasDispose || this.#hasDisposeAfter) {
|
|
339442
339472
|
if (this.#hasDispose) {
|
|
339443
|
-
_optionalChain([this, 'access',
|
|
339473
|
+
_optionalChain([this, 'access', _1105 => _1105.#dispose, 'optionalCall', _1106 => _1106(v, k, reason)]);
|
|
339444
339474
|
}
|
|
339445
339475
|
if (this.#hasDisposeAfter) {
|
|
339446
|
-
_optionalChain([this, 'access',
|
|
339476
|
+
_optionalChain([this, 'access', _1107 => _1107.#disposed, 'optionalAccess', _1108 => _1108.push, 'call', _1109 => _1109([v, k, reason])]);
|
|
339447
339477
|
}
|
|
339448
339478
|
}
|
|
339449
339479
|
this.#keyMap.delete(k);
|
|
@@ -339464,11 +339494,11 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339464
339494
|
}
|
|
339465
339495
|
}
|
|
339466
339496
|
}
|
|
339467
|
-
if (this.#hasDisposeAfter && _optionalChain([this, 'access',
|
|
339497
|
+
if (this.#hasDisposeAfter && _optionalChain([this, 'access', _1110 => _1110.#disposed, 'optionalAccess', _1111 => _1111.length])) {
|
|
339468
339498
|
const dt = this.#disposed;
|
|
339469
339499
|
let task;
|
|
339470
|
-
while (task = _optionalChain([dt, 'optionalAccess',
|
|
339471
|
-
_optionalChain([this, 'access',
|
|
339500
|
+
while (task = _optionalChain([dt, 'optionalAccess', _1112 => _1112.shift, 'call', _1113 => _1113()])) {
|
|
339501
|
+
_optionalChain([this, 'access', _1114 => _1114.#disposeAfter, 'optionalCall', _1115 => _1115(...task)]);
|
|
339472
339502
|
}
|
|
339473
339503
|
}
|
|
339474
339504
|
return deleted;
|
|
@@ -339487,10 +339517,10 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339487
339517
|
} else {
|
|
339488
339518
|
const k = this.#keyList[index2];
|
|
339489
339519
|
if (this.#hasDispose) {
|
|
339490
|
-
_optionalChain([this, 'access',
|
|
339520
|
+
_optionalChain([this, 'access', _1116 => _1116.#dispose, 'optionalCall', _1117 => _1117(v, k, reason)]);
|
|
339491
339521
|
}
|
|
339492
339522
|
if (this.#hasDisposeAfter) {
|
|
339493
|
-
_optionalChain([this, 'access',
|
|
339523
|
+
_optionalChain([this, 'access', _1118 => _1118.#disposed, 'optionalAccess', _1119 => _1119.push, 'call', _1120 => _1120([v, k, reason])]);
|
|
339494
339524
|
}
|
|
339495
339525
|
}
|
|
339496
339526
|
}
|
|
@@ -339504,7 +339534,7 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339504
339534
|
if (t !== void 0)
|
|
339505
339535
|
clearTimeout(t);
|
|
339506
339536
|
}
|
|
339507
|
-
_optionalChain([this, 'access',
|
|
339537
|
+
_optionalChain([this, 'access', _1121 => _1121.#autopurgeTimers, 'optionalAccess', _1122 => _1122.fill, 'call', _1123 => _1123(void 0)]);
|
|
339508
339538
|
}
|
|
339509
339539
|
if (this.#sizes) {
|
|
339510
339540
|
this.#sizes.fill(0);
|
|
@@ -339517,8 +339547,8 @@ var LRUCache2 = (_class90 = class _LRUCache {
|
|
|
339517
339547
|
if (this.#hasDisposeAfter && this.#disposed) {
|
|
339518
339548
|
const dt = this.#disposed;
|
|
339519
339549
|
let task;
|
|
339520
|
-
while (task = _optionalChain([dt, 'optionalAccess',
|
|
339521
|
-
_optionalChain([this, 'access',
|
|
339550
|
+
while (task = _optionalChain([dt, 'optionalAccess', _1124 => _1124.shift, 'call', _1125 => _1125()])) {
|
|
339551
|
+
_optionalChain([this, 'access', _1126 => _1126.#disposeAfter, 'optionalCall', _1127 => _1127(...task)]);
|
|
339522
339552
|
}
|
|
339523
339553
|
}
|
|
339524
339554
|
}
|
|
@@ -340120,7 +340150,7 @@ var PathBase2 = (_class91 = class {
|
|
|
340120
340150
|
}
|
|
340121
340151
|
try {
|
|
340122
340152
|
const read4 = await this.#fs.promises.readlink(this.fullpath());
|
|
340123
|
-
const linkTarget = await _asyncOptionalChain([(await this.parent.realpath()), 'optionalAccess', async
|
|
340153
|
+
const linkTarget = await _asyncOptionalChain([(await this.parent.realpath()), 'optionalAccess', async _1128 => _1128.resolve, 'call', async _1129 => _1129(read4)]);
|
|
340124
340154
|
if (linkTarget) {
|
|
340125
340155
|
return this.#linkTarget = linkTarget;
|
|
340126
340156
|
}
|
|
@@ -340145,7 +340175,7 @@ var PathBase2 = (_class91 = class {
|
|
|
340145
340175
|
}
|
|
340146
340176
|
try {
|
|
340147
340177
|
const read4 = this.#fs.readlinkSync(this.fullpath());
|
|
340148
|
-
const linkTarget = _optionalChain([this, 'access',
|
|
340178
|
+
const linkTarget = _optionalChain([this, 'access', _1130 => _1130.parent, 'access', _1131 => _1131.realpathSync, 'call', _1132 => _1132(), 'optionalAccess', _1133 => _1133.resolve, 'call', _1134 => _1134(read4)]);
|
|
340149
340179
|
if (linkTarget) {
|
|
340150
340180
|
return this.#linkTarget = linkTarget;
|
|
340151
340181
|
}
|
|
@@ -340875,7 +340905,7 @@ var PathScurryBase2 = class {
|
|
|
340875
340905
|
entry = this.cwd;
|
|
340876
340906
|
}
|
|
340877
340907
|
const e = await entry.readlink();
|
|
340878
|
-
return withFileTypes ? e : _optionalChain([e, 'optionalAccess',
|
|
340908
|
+
return withFileTypes ? e : _optionalChain([e, 'optionalAccess', _1135 => _1135.fullpath, 'call', _1136 => _1136()]);
|
|
340879
340909
|
}
|
|
340880
340910
|
readlinkSync(entry = this.cwd, { withFileTypes } = {
|
|
340881
340911
|
withFileTypes: false
|
|
@@ -340887,7 +340917,7 @@ var PathScurryBase2 = class {
|
|
|
340887
340917
|
entry = this.cwd;
|
|
340888
340918
|
}
|
|
340889
340919
|
const e = entry.readlinkSync();
|
|
340890
|
-
return withFileTypes ? e : _optionalChain([e, 'optionalAccess',
|
|
340920
|
+
return withFileTypes ? e : _optionalChain([e, 'optionalAccess', _1137 => _1137.fullpath, 'call', _1138 => _1138()]);
|
|
340891
340921
|
}
|
|
340892
340922
|
async realpath(entry = this.cwd, { withFileTypes } = {
|
|
340893
340923
|
withFileTypes: false
|
|
@@ -340899,7 +340929,7 @@ var PathScurryBase2 = class {
|
|
|
340899
340929
|
entry = this.cwd;
|
|
340900
340930
|
}
|
|
340901
340931
|
const e = await entry.realpath();
|
|
340902
|
-
return withFileTypes ? e : _optionalChain([e, 'optionalAccess',
|
|
340932
|
+
return withFileTypes ? e : _optionalChain([e, 'optionalAccess', _1139 => _1139.fullpath, 'call', _1140 => _1140()]);
|
|
340903
340933
|
}
|
|
340904
340934
|
realpathSync(entry = this.cwd, { withFileTypes } = {
|
|
340905
340935
|
withFileTypes: false
|
|
@@ -340911,7 +340941,7 @@ var PathScurryBase2 = class {
|
|
|
340911
340941
|
entry = this.cwd;
|
|
340912
340942
|
}
|
|
340913
340943
|
const e = entry.realpathSync();
|
|
340914
|
-
return withFileTypes ? e : _optionalChain([e, 'optionalAccess',
|
|
340944
|
+
return withFileTypes ? e : _optionalChain([e, 'optionalAccess', _1141 => _1141.fullpath, 'call', _1142 => _1142()]);
|
|
340915
340945
|
}
|
|
340916
340946
|
async walk(entry = this.cwd, opts = {}) {
|
|
340917
340947
|
if (typeof entry === "string") {
|
|
@@ -340945,7 +340975,7 @@ var PathScurryBase2 = class {
|
|
|
340945
340975
|
results.push(withFileTypes ? e : e.fullpath());
|
|
340946
340976
|
}
|
|
340947
340977
|
if (follow && e.isSymbolicLink()) {
|
|
340948
|
-
e.realpath().then((r) => _optionalChain([r, 'optionalAccess',
|
|
340978
|
+
e.realpath().then((r) => _optionalChain([r, 'optionalAccess', _1143 => _1143.isUnknown, 'call', _1144 => _1144()]) ? r.lstat() : r).then((r) => _optionalChain([r, 'optionalAccess', _1145 => _1145.shouldWalk, 'call', _1146 => _1146(dirs, walkFilter)]) ? walk2(r, next) : next());
|
|
340949
340979
|
} else {
|
|
340950
340980
|
if (e.shouldWalk(dirs, walkFilter)) {
|
|
340951
340981
|
walk2(e, next);
|
|
@@ -341091,7 +341121,7 @@ var PathScurryBase2 = class {
|
|
|
341091
341121
|
const promises2 = [];
|
|
341092
341122
|
for (const e of entries) {
|
|
341093
341123
|
if (e.isSymbolicLink()) {
|
|
341094
|
-
promises2.push(e.realpath().then((r) => _optionalChain([r, 'optionalAccess',
|
|
341124
|
+
promises2.push(e.realpath().then((r) => _optionalChain([r, 'optionalAccess', _1147 => _1147.isUnknown, 'call', _1148 => _1148()]) ? r.lstat() : r));
|
|
341095
341125
|
}
|
|
341096
341126
|
}
|
|
341097
341127
|
if (promises2.length) {
|
|
@@ -341525,7 +341555,7 @@ var HasWalkedCache2 = class _HasWalkedCache {
|
|
|
341525
341555
|
return new _HasWalkedCache(new Map(this.store));
|
|
341526
341556
|
}
|
|
341527
341557
|
hasWalked(target, pattern) {
|
|
341528
|
-
return _optionalChain([this, 'access',
|
|
341558
|
+
return _optionalChain([this, 'access', _1149 => _1149.store, 'access', _1150 => _1150.get, 'call', _1151 => _1151(target.fullpath()), 'optionalAccess', _1152 => _1152.has, 'call', _1153 => _1153(pattern.globString())]);
|
|
341529
341559
|
}
|
|
341530
341560
|
storeWalked(target, pattern) {
|
|
341531
341561
|
const fullpath = target.fullpath();
|
|
@@ -341637,8 +341667,8 @@ var Processor3 = (_class98 = class _Processor {
|
|
|
341637
341667
|
if (!t.isSymbolicLink() || this.follow || pattern.checkFollowGlobstar()) {
|
|
341638
341668
|
this.subwalks.add(t, pattern);
|
|
341639
341669
|
}
|
|
341640
|
-
const rp = _optionalChain([rest, 'optionalAccess',
|
|
341641
|
-
const rrest = _optionalChain([rest, 'optionalAccess',
|
|
341670
|
+
const rp = _optionalChain([rest, 'optionalAccess', _1154 => _1154.pattern, 'call', _1155 => _1155()]);
|
|
341671
|
+
const rrest = _optionalChain([rest, 'optionalAccess', _1156 => _1156.rest, 'call', _1157 => _1157()]);
|
|
341642
341672
|
if (!rest || (rp === "" || rp === ".") && !rrest) {
|
|
341643
341673
|
this.matches.add(t, absolute, rp === "" || rp === ".");
|
|
341644
341674
|
} else {
|
|
@@ -341773,17 +341803,17 @@ var GlobUtil2 = (_class99 = class {
|
|
|
341773
341803
|
}
|
|
341774
341804
|
}
|
|
341775
341805
|
#ignored(path32) {
|
|
341776
|
-
return this.seen.has(path32) || !!_optionalChain([this, 'access',
|
|
341806
|
+
return this.seen.has(path32) || !!_optionalChain([this, 'access', _1158 => _1158.#ignore, 'optionalAccess', _1159 => _1159.ignored, 'optionalCall', _1160 => _1160(path32)]);
|
|
341777
341807
|
}
|
|
341778
341808
|
#childrenIgnored(path32) {
|
|
341779
|
-
return !!_optionalChain([this, 'access',
|
|
341809
|
+
return !!_optionalChain([this, 'access', _1161 => _1161.#ignore, 'optionalAccess', _1162 => _1162.childrenIgnored, 'optionalCall', _1163 => _1163(path32)]);
|
|
341780
341810
|
}
|
|
341781
341811
|
// backpressure mechanism
|
|
341782
341812
|
pause() {
|
|
341783
341813
|
this.paused = true;
|
|
341784
341814
|
}
|
|
341785
341815
|
resume() {
|
|
341786
|
-
if (_optionalChain([this, 'access',
|
|
341816
|
+
if (_optionalChain([this, 'access', _1164 => _1164.signal, 'optionalAccess', _1165 => _1165.aborted]))
|
|
341787
341817
|
return;
|
|
341788
341818
|
this.paused = false;
|
|
341789
341819
|
let fn = void 0;
|
|
@@ -341792,7 +341822,7 @@ var GlobUtil2 = (_class99 = class {
|
|
|
341792
341822
|
}
|
|
341793
341823
|
}
|
|
341794
341824
|
onResume(fn) {
|
|
341795
|
-
if (_optionalChain([this, 'access',
|
|
341825
|
+
if (_optionalChain([this, 'access', _1166 => _1166.signal, 'optionalAccess', _1167 => _1167.aborted]))
|
|
341796
341826
|
return;
|
|
341797
341827
|
if (!this.paused) {
|
|
341798
341828
|
fn();
|
|
@@ -341814,7 +341844,7 @@ var GlobUtil2 = (_class99 = class {
|
|
|
341814
341844
|
}
|
|
341815
341845
|
const needStat = e.isUnknown() || this.opts.stat;
|
|
341816
341846
|
const s = needStat ? await e.lstat() : e;
|
|
341817
|
-
if (this.opts.follow && this.opts.nodir && _optionalChain([s, 'optionalAccess',
|
|
341847
|
+
if (this.opts.follow && this.opts.nodir && _optionalChain([s, 'optionalAccess', _1168 => _1168.isSymbolicLink, 'call', _1169 => _1169()])) {
|
|
341818
341848
|
const target = await s.realpath();
|
|
341819
341849
|
if (target && (target.isUnknown() || this.opts.stat)) {
|
|
341820
341850
|
await target.lstat();
|
|
@@ -341823,7 +341853,7 @@ var GlobUtil2 = (_class99 = class {
|
|
|
341823
341853
|
return this.matchCheckTest(s, ifDir);
|
|
341824
341854
|
}
|
|
341825
341855
|
matchCheckTest(e, ifDir) {
|
|
341826
|
-
return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!ifDir || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !_optionalChain([e, 'access',
|
|
341856
|
+
return e && (this.maxDepth === Infinity || e.depth() <= this.maxDepth) && (!ifDir || e.canReaddir()) && (!this.opts.nodir || !e.isDirectory()) && (!this.opts.nodir || !this.opts.follow || !e.isSymbolicLink() || !_optionalChain([e, 'access', _1170 => _1170.realpathCached, 'call', _1171 => _1171(), 'optionalAccess', _1172 => _1172.isDirectory, 'call', _1173 => _1173()])) && !this.#ignored(e) ? e : void 0;
|
|
341827
341857
|
}
|
|
341828
341858
|
matchCheckSync(e, ifDir) {
|
|
341829
341859
|
if (ifDir && this.opts.nodir)
|
|
@@ -341837,9 +341867,9 @@ var GlobUtil2 = (_class99 = class {
|
|
|
341837
341867
|
}
|
|
341838
341868
|
const needStat = e.isUnknown() || this.opts.stat;
|
|
341839
341869
|
const s = needStat ? e.lstatSync() : e;
|
|
341840
|
-
if (this.opts.follow && this.opts.nodir && _optionalChain([s, 'optionalAccess',
|
|
341870
|
+
if (this.opts.follow && this.opts.nodir && _optionalChain([s, 'optionalAccess', _1174 => _1174.isSymbolicLink, 'call', _1175 => _1175()])) {
|
|
341841
341871
|
const target = s.realpathSync();
|
|
341842
|
-
if (target && (_optionalChain([target, 'optionalAccess',
|
|
341872
|
+
if (target && (_optionalChain([target, 'optionalAccess', _1176 => _1176.isUnknown, 'call', _1177 => _1177()]) || this.opts.stat)) {
|
|
341843
341873
|
target.lstatSync();
|
|
341844
341874
|
}
|
|
341845
341875
|
}
|
|
@@ -341848,7 +341878,7 @@ var GlobUtil2 = (_class99 = class {
|
|
|
341848
341878
|
matchFinish(e, absolute) {
|
|
341849
341879
|
if (this.#ignored(e))
|
|
341850
341880
|
return;
|
|
341851
|
-
if (!this.includeChildMatches && _optionalChain([this, 'access',
|
|
341881
|
+
if (!this.includeChildMatches && _optionalChain([this, 'access', _1178 => _1178.#ignore, 'optionalAccess', _1179 => _1179.add])) {
|
|
341852
341882
|
const ign = `${e.relativePosix()}/**`;
|
|
341853
341883
|
this.#ignore.add(ign);
|
|
341854
341884
|
}
|
|
@@ -341877,14 +341907,14 @@ var GlobUtil2 = (_class99 = class {
|
|
|
341877
341907
|
this.matchFinish(p, absolute);
|
|
341878
341908
|
}
|
|
341879
341909
|
walkCB(target, patterns2, cb) {
|
|
341880
|
-
if (_optionalChain([this, 'access',
|
|
341910
|
+
if (_optionalChain([this, 'access', _1180 => _1180.signal, 'optionalAccess', _1181 => _1181.aborted]))
|
|
341881
341911
|
cb();
|
|
341882
341912
|
this.walkCB2(target, patterns2, new Processor3(this.opts), cb);
|
|
341883
341913
|
}
|
|
341884
341914
|
walkCB2(target, patterns2, processor, cb) {
|
|
341885
341915
|
if (this.#childrenIgnored(target))
|
|
341886
341916
|
return cb();
|
|
341887
|
-
if (_optionalChain([this, 'access',
|
|
341917
|
+
if (_optionalChain([this, 'access', _1182 => _1182.signal, 'optionalAccess', _1183 => _1183.aborted]))
|
|
341888
341918
|
cb();
|
|
341889
341919
|
if (this.paused) {
|
|
341890
341920
|
this.onResume(() => this.walkCB2(target, patterns2, processor, cb));
|
|
@@ -341936,14 +341966,14 @@ var GlobUtil2 = (_class99 = class {
|
|
|
341936
341966
|
next();
|
|
341937
341967
|
}
|
|
341938
341968
|
walkCBSync(target, patterns2, cb) {
|
|
341939
|
-
if (_optionalChain([this, 'access',
|
|
341969
|
+
if (_optionalChain([this, 'access', _1184 => _1184.signal, 'optionalAccess', _1185 => _1185.aborted]))
|
|
341940
341970
|
cb();
|
|
341941
341971
|
this.walkCB2Sync(target, patterns2, new Processor3(this.opts), cb);
|
|
341942
341972
|
}
|
|
341943
341973
|
walkCB2Sync(target, patterns2, processor, cb) {
|
|
341944
341974
|
if (this.#childrenIgnored(target))
|
|
341945
341975
|
return cb();
|
|
341946
|
-
if (_optionalChain([this, 'access',
|
|
341976
|
+
if (_optionalChain([this, 'access', _1186 => _1186.signal, 'optionalAccess', _1187 => _1187.aborted]))
|
|
341947
341977
|
cb();
|
|
341948
341978
|
if (this.paused) {
|
|
341949
341979
|
this.onResume(() => this.walkCB2Sync(target, patterns2, processor, cb));
|
|
@@ -341998,14 +342028,14 @@ var GlobWalker2 = (_class100 = class extends GlobUtil2 {
|
|
|
341998
342028
|
this.matches.add(e);
|
|
341999
342029
|
}
|
|
342000
342030
|
async walk() {
|
|
342001
|
-
if (_optionalChain([this, 'access',
|
|
342031
|
+
if (_optionalChain([this, 'access', _1188 => _1188.signal, 'optionalAccess', _1189 => _1189.aborted]))
|
|
342002
342032
|
throw this.signal.reason;
|
|
342003
342033
|
if (this.path.isUnknown()) {
|
|
342004
342034
|
await this.path.lstat();
|
|
342005
342035
|
}
|
|
342006
342036
|
await new Promise((res, rej) => {
|
|
342007
342037
|
this.walkCB(this.path, this.patterns, () => {
|
|
342008
|
-
if (_optionalChain([this, 'access',
|
|
342038
|
+
if (_optionalChain([this, 'access', _1190 => _1190.signal, 'optionalAccess', _1191 => _1191.aborted])) {
|
|
342009
342039
|
rej(this.signal.reason);
|
|
342010
342040
|
} else {
|
|
342011
342041
|
res(this.matches);
|
|
@@ -342015,13 +342045,13 @@ var GlobWalker2 = (_class100 = class extends GlobUtil2 {
|
|
|
342015
342045
|
return this.matches;
|
|
342016
342046
|
}
|
|
342017
342047
|
walkSync() {
|
|
342018
|
-
if (_optionalChain([this, 'access',
|
|
342048
|
+
if (_optionalChain([this, 'access', _1192 => _1192.signal, 'optionalAccess', _1193 => _1193.aborted]))
|
|
342019
342049
|
throw this.signal.reason;
|
|
342020
342050
|
if (this.path.isUnknown()) {
|
|
342021
342051
|
this.path.lstatSync();
|
|
342022
342052
|
}
|
|
342023
342053
|
this.walkCBSync(this.path, this.patterns, () => {
|
|
342024
|
-
if (_optionalChain([this, 'access',
|
|
342054
|
+
if (_optionalChain([this, 'access', _1194 => _1194.signal, 'optionalAccess', _1195 => _1195.aborted]))
|
|
342025
342055
|
throw this.signal.reason;
|
|
342026
342056
|
});
|
|
342027
342057
|
return this.matches;
|
|
@@ -342521,7 +342551,7 @@ function merge8(defaults4, route, options) {
|
|
|
342521
342551
|
removeUndefinedProperties(options.headers);
|
|
342522
342552
|
const mergedOptions = mergeDeep(defaults4 || {}, options);
|
|
342523
342553
|
if (options.url === "/graphql") {
|
|
342524
|
-
if (defaults4 && _optionalChain([defaults4, 'access',
|
|
342554
|
+
if (defaults4 && _optionalChain([defaults4, 'access', _1196 => _1196.mediaType, 'access', _1197 => _1197.previews, 'optionalAccess', _1198 => _1198.length])) {
|
|
342525
342555
|
mergedOptions.mediaType.previews = defaults4.mediaType.previews.filter(
|
|
342526
342556
|
(preview) => !mergedOptions.mediaType.previews.includes(preview)
|
|
342527
342557
|
).concat(mergedOptions.mediaType.previews);
|
|
@@ -342724,7 +342754,7 @@ function parse7(options) {
|
|
|
342724
342754
|
).join(",");
|
|
342725
342755
|
}
|
|
342726
342756
|
if (url3.endsWith("/graphql")) {
|
|
342727
|
-
if (_optionalChain([options, 'access',
|
|
342757
|
+
if (_optionalChain([options, 'access', _1199 => _1199.mediaType, 'access', _1200 => _1200.previews, 'optionalAccess', _1201 => _1201.length])) {
|
|
342728
342758
|
const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || [];
|
|
342729
342759
|
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
|
|
342730
342760
|
const format7 = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
|
|
@@ -342830,14 +342860,14 @@ function isPlainObject4(value) {
|
|
|
342830
342860
|
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
|
|
342831
342861
|
}
|
|
342832
342862
|
async function fetchWrapper(requestOptions) {
|
|
342833
|
-
const fetch = _optionalChain([requestOptions, 'access',
|
|
342863
|
+
const fetch = _optionalChain([requestOptions, 'access', _1202 => _1202.request, 'optionalAccess', _1203 => _1203.fetch]) || globalThis.fetch;
|
|
342834
342864
|
if (!fetch) {
|
|
342835
342865
|
throw new Error(
|
|
342836
342866
|
"fetch is not set. Please pass a fetch implementation as new Octokit({ request: { fetch }}). Learn more at https://github.com/octokit/octokit.js/#fetch-missing"
|
|
342837
342867
|
);
|
|
342838
342868
|
}
|
|
342839
|
-
const log4 = _optionalChain([requestOptions, 'access',
|
|
342840
|
-
const parseSuccessResponseBody = _optionalChain([requestOptions, 'access',
|
|
342869
|
+
const log4 = _optionalChain([requestOptions, 'access', _1204 => _1204.request, 'optionalAccess', _1205 => _1205.log]) || console;
|
|
342870
|
+
const parseSuccessResponseBody = _optionalChain([requestOptions, 'access', _1206 => _1206.request, 'optionalAccess', _1207 => _1207.parseSuccessResponseBody]) !== false;
|
|
342841
342871
|
const body = isPlainObject4(requestOptions.body) || Array.isArray(requestOptions.body) ? JSON.stringify(requestOptions.body) : requestOptions.body;
|
|
342842
342872
|
const requestHeaders = Object.fromEntries(
|
|
342843
342873
|
Object.entries(requestOptions.headers).map(([name2, value]) => [
|
|
@@ -342850,9 +342880,9 @@ async function fetchWrapper(requestOptions) {
|
|
|
342850
342880
|
fetchResponse = await fetch(requestOptions.url, {
|
|
342851
342881
|
method: requestOptions.method,
|
|
342852
342882
|
body,
|
|
342853
|
-
redirect: _optionalChain([requestOptions, 'access',
|
|
342883
|
+
redirect: _optionalChain([requestOptions, 'access', _1208 => _1208.request, 'optionalAccess', _1209 => _1209.redirect]),
|
|
342854
342884
|
headers: requestHeaders,
|
|
342855
|
-
signal: _optionalChain([requestOptions, 'access',
|
|
342885
|
+
signal: _optionalChain([requestOptions, 'access', _1210 => _1210.request, 'optionalAccess', _1211 => _1211.signal]),
|
|
342856
342886
|
// duplex must be set if request.body is ReadableStream or Async Iterables.
|
|
342857
342887
|
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
|
|
342858
342888
|
...requestOptions.body && { duplex: "half" }
|
|
@@ -342941,7 +342971,7 @@ async function getResponseData(response) {
|
|
|
342941
342971
|
} catch (err) {
|
|
342942
342972
|
return text;
|
|
342943
342973
|
}
|
|
342944
|
-
} else if (mimetype.type.startsWith("text/") || _optionalChain([mimetype, 'access',
|
|
342974
|
+
} else if (mimetype.type.startsWith("text/") || _optionalChain([mimetype, 'access', _1212 => _1212.parameters, 'access', _1213 => _1213.charset, 'optionalAccess', _1214 => _1214.toLowerCase, 'call', _1215 => _1215()]) === "utf-8") {
|
|
342945
342975
|
return response.text().catch(() => "");
|
|
342946
342976
|
} else {
|
|
342947
342977
|
return response.arrayBuffer().catch(() => new ArrayBuffer(0));
|
|
@@ -346280,7 +346310,7 @@ function throttling(octokit, octokitOptions) {
|
|
|
346280
346310
|
);
|
|
346281
346311
|
return { wantRetry: wantRetry2, retryAfter: retryAfter2 };
|
|
346282
346312
|
}
|
|
346283
|
-
if (error2.response.headers != null && error2.response.headers["x-ratelimit-remaining"] === "0" || (_nullishCoalesce(_optionalChain([error2, 'access',
|
|
346313
|
+
if (error2.response.headers != null && error2.response.headers["x-ratelimit-remaining"] === "0" || (_nullishCoalesce(_optionalChain([error2, 'access', _1216 => _1216.response, 'access', _1217 => _1217.data, 'optionalAccess', _1218 => _1218.errors]), () => ( []))).some(
|
|
346284
346314
|
(error22) => error22.type === "RATE_LIMITED"
|
|
346285
346315
|
)) {
|
|
346286
346316
|
const rateLimitReset = new Date(
|
|
@@ -346847,7 +346877,7 @@ async function auth3(state, options = {}) {
|
|
|
346847
346877
|
if (!currentAuthentication.hasOwnProperty("expiresAt")) {
|
|
346848
346878
|
throw new Error("[@octokit/auth-oauth-user] Refresh token missing");
|
|
346849
346879
|
}
|
|
346850
|
-
await _optionalChain([state, 'access',
|
|
346880
|
+
await _optionalChain([state, 'access', _1219 => _1219.onTokenCreated, 'optionalCall', _1220 => _1220(state.authentication, {
|
|
346851
346881
|
type: options.type
|
|
346852
346882
|
})]);
|
|
346853
346883
|
}
|
|
@@ -346869,7 +346899,7 @@ async function auth3(state, options = {}) {
|
|
|
346869
346899
|
...authentication
|
|
346870
346900
|
};
|
|
346871
346901
|
if (options.type === "reset") {
|
|
346872
|
-
await _optionalChain([state, 'access',
|
|
346902
|
+
await _optionalChain([state, 'access', _1221 => _1221.onTokenCreated, 'optionalCall', _1222 => _1222(state.authentication, {
|
|
346873
346903
|
type: options.type
|
|
346874
346904
|
})]);
|
|
346875
346905
|
}
|
|
@@ -349837,7 +349867,7 @@ var import_normalize_path = _chunk6B2W5NCRcjs.__toESM.call(void 0, require_norma
|
|
|
349837
349867
|
var INCORRECT_REPOSITORY_FIELD_default = makeCheck({
|
|
349838
349868
|
type: "all",
|
|
349839
349869
|
validate: (workspace, allWorkspaces, rootWorkspace, options) => {
|
|
349840
|
-
let rootRepositoryField = _optionalChain([rootWorkspace, 'optionalAccess',
|
|
349870
|
+
let rootRepositoryField = _optionalChain([rootWorkspace, 'optionalAccess', _1223 => _1223.packageJson, 'optionalAccess', _1224 => _1224.repository]);
|
|
349841
349871
|
if (typeof rootRepositoryField === "string") {
|
|
349842
349872
|
let result = (0, import_parse_github_url.default)(rootRepositoryField);
|
|
349843
349873
|
if (result !== null && (result.host === "github.com" || result.host === "dev.azure.com")) {
|
|
@@ -350409,7 +350439,7 @@ async function runManypkg(config2, manypkgType = "fix", manypkgArgs) {
|
|
|
350409
350439
|
const options = {
|
|
350410
350440
|
defaultBranch: "main",
|
|
350411
350441
|
workspaceProtocol: "require",
|
|
350412
|
-
..._optionalChain([rootPackage, 'optionalAccess',
|
|
350442
|
+
..._optionalChain([rootPackage, 'optionalAccess', _1225 => _1225.packageJson, 'access', _1226 => _1226.manypkg])
|
|
350413
350443
|
};
|
|
350414
350444
|
const packagesByName = new Map(
|
|
350415
350445
|
packages.map((x) => [x.packageJson.name, x])
|
|
@@ -350452,7 +350482,7 @@ async function runManypkg(config2, manypkgType = "fix", manypkgArgs) {
|
|
|
350452
350482
|
var _config = {};
|
|
350453
350483
|
function createProgram(config2) {
|
|
350454
350484
|
_config = config2;
|
|
350455
|
-
writeInfo(
|
|
350485
|
+
writeInfo(`${brandIcon(config2)} Running Storm Linting Tools`, config2);
|
|
350456
350486
|
const root = findWorkspaceRootSafe();
|
|
350457
350487
|
process.env.STORM_WORKSPACE_ROOT ??= root;
|
|
350458
350488
|
process.env.NX_WORKSPACE_ROOT_PATH ??= root;
|
|
@@ -350461,7 +350491,7 @@ function createProgram(config2) {
|
|
|
350461
350491
|
}
|
|
350462
350492
|
const program2 = new Command("storm-lint");
|
|
350463
350493
|
program2.version("1.0.0", "-v --version", "display CLI version");
|
|
350464
|
-
program2.description("
|
|
350494
|
+
program2.description("Lint the Storm Workspace").showHelpAfterError().showSuggestionAfterError();
|
|
350465
350495
|
program2.command("cspell").description("Run spell-check lint for the workspace.").option(
|
|
350466
350496
|
"--cspell-config <file>",
|
|
350467
350497
|
"CSpell config file path",
|
|
@@ -350625,7 +350655,7 @@ async function allAction({
|
|
|
350625
350655
|
manypkgArgs = []
|
|
350626
350656
|
}) {
|
|
350627
350657
|
try {
|
|
350628
|
-
writeDebug(
|
|
350658
|
+
writeDebug(`${brandIcon(_config)} Linting the Storm Workspace`, _config);
|
|
350629
350659
|
const promises2 = [];
|
|
350630
350660
|
if (!skipCspell) {
|
|
350631
350661
|
promises2.push(cspellAction({ cspellConfig }));
|
|
@@ -350662,7 +350692,7 @@ async function cspellAction({
|
|
|
350662
350692
|
cspellConfig = "@storm-software/linting-tools/cspell/config.json"
|
|
350663
350693
|
}) {
|
|
350664
350694
|
try {
|
|
350665
|
-
writeInfo(
|
|
350695
|
+
writeInfo(`${brandIcon(_config)} Linting the workspace spelling`, _config);
|
|
350666
350696
|
const result = await lint(["**/*.{txt,js,jsx,ts,tsx,md,mdx}"], {
|
|
350667
350697
|
cache: true,
|
|
350668
350698
|
summary: true,
|
|
@@ -350691,7 +350721,10 @@ ${e.message}`, _config);
|
|
|
350691
350721
|
}
|
|
350692
350722
|
async function codeownersAction() {
|
|
350693
350723
|
try {
|
|
350694
|
-
writeInfo(
|
|
350724
|
+
writeInfo(
|
|
350725
|
+
`${brandIcon(_config)} Linting the workspace CODEOWNERS file`,
|
|
350726
|
+
_config
|
|
350727
|
+
);
|
|
350695
350728
|
await runCodeowners();
|
|
350696
350729
|
writeSuccess("CODEOWNERS linting is complete \u2705", _config);
|
|
350697
350730
|
} catch (e) {
|
|
@@ -350711,7 +350744,10 @@ async function alexAction({
|
|
|
350711
350744
|
alexIgnore = "@storm-software/linting-tools/alex/.alexignore"
|
|
350712
350745
|
}) {
|
|
350713
350746
|
try {
|
|
350714
|
-
writeDebug(
|
|
350747
|
+
writeDebug(
|
|
350748
|
+
`${brandIcon(_config)} Linting the workspace language with alexjs.com`,
|
|
350749
|
+
_config
|
|
350750
|
+
);
|
|
350715
350751
|
const result = await runAlex(alexConfig, alexIgnore);
|
|
350716
350752
|
if (result) {
|
|
350717
350753
|
throw new Error(`Alex CLI Error Code: ${result}`);
|
|
@@ -350738,7 +350774,7 @@ async function depsVersionAction({
|
|
|
350738
350774
|
}) {
|
|
350739
350775
|
try {
|
|
350740
350776
|
writeDebug(
|
|
350741
|
-
|
|
350777
|
+
`${brandIcon(_config)} Linting the workspace dependency version consistency`,
|
|
350742
350778
|
_config
|
|
350743
350779
|
);
|
|
350744
350780
|
const cdvc = new CDVC(".", {
|
|
@@ -350770,7 +350806,10 @@ ${e.message} `,
|
|
|
350770
350806
|
}
|
|
350771
350807
|
async function circularDepsAction() {
|
|
350772
350808
|
try {
|
|
350773
|
-
writeDebug(
|
|
350809
|
+
writeDebug(
|
|
350810
|
+
`${brandIcon(_config)} Linting the workspace circular dependency`,
|
|
350811
|
+
_config
|
|
350812
|
+
);
|
|
350774
350813
|
const circulars = (0, lib_exports2.parseCircular)(
|
|
350775
350814
|
await (0, lib_exports2.parseDependencyTree)(["**/*"], {
|
|
350776
350815
|
exclude: new RegExp(
|
|
@@ -350811,7 +350850,10 @@ async function manypkgAction({
|
|
|
350811
350850
|
manypkgArgs = []
|
|
350812
350851
|
}) {
|
|
350813
350852
|
try {
|
|
350814
|
-
writeDebug(
|
|
350853
|
+
writeDebug(
|
|
350854
|
+
`${brandIcon(_config)} Linting the workspace's packages with Manypkg`,
|
|
350855
|
+
_config
|
|
350856
|
+
);
|
|
350815
350857
|
await runManypkg(_config, manypkgType, manypkgArgs);
|
|
350816
350858
|
writeSuccess("Manypkg linting is complete \u2705", _config);
|
|
350817
350859
|
} catch (e) {
|
|
@@ -350840,7 +350882,7 @@ void (async () => {
|
|
|
350840
350882
|
} catch (error2) {
|
|
350841
350883
|
writeFatal(
|
|
350842
350884
|
`A fatal error occurred while running the Storm Lint tool:
|
|
350843
|
-
${_optionalChain([error2, 'optionalAccess',
|
|
350885
|
+
${_optionalChain([error2, 'optionalAccess', _1227 => _1227.message]) ? error2.message : JSON.stringify(error2)}${_optionalChain([error2, 'optionalAccess', _1228 => _1228.stack]) ? `
|
|
350844
350886
|
Stack Trace: ${error2.stack}` : ""}`,
|
|
350845
350887
|
config2
|
|
350846
350888
|
);
|