@storm-software/linting-tools 1.125.29 → 1.125.30
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/README.md +1 -1
- package/bin/lint.cjs +134 -96
- package/bin/lint.js +134 -96
- package/dist/index.cjs +134 -96
- package/dist/index.d.cts +2 -52
- package/dist/index.d.ts +2 -52
- package/dist/index.js +134 -96
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -21,7 +21,7 @@ This package is part of the <b>⚡Storm-Ops</b> monorepo. The Storm-Ops packages
|
|
|
21
21
|
|
|
22
22
|
<h3 align="center">💻 Visit <a href="https://stormsoftware.com" target="_blank">stormsoftware.com</a> to stay up to date with this developer</h3><br />
|
|
23
23
|
|
|
24
|
-
[](https://prettier.io/) [](http://nx.dev/) [](https://nextjs.org/) [](http://commitizen.github.io/cz-cli/)  [](https://fumadocs.vercel.app/) 
|
|
25
25
|
|
|
26
26
|
<!-- prettier-ignore-start -->
|
|
27
27
|
<!-- markdownlint-disable -->
|
package/bin/lint.cjs
CHANGED
|
@@ -194,12 +194,12 @@ var require_jiti = _chunkM7MYTALKcjs.__commonJS.call(void 0, {
|
|
|
194
194
|
}, Parser.tokenizer = function(input, options) {
|
|
195
195
|
return new this(options, input);
|
|
196
196
|
}, Object.defineProperties(Parser.prototype, prototypeAccessors);
|
|
197
|
-
var pp$9 = Parser.prototype,
|
|
197
|
+
var pp$9 = Parser.prototype, literal2 = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
198
198
|
pp$9.strictDirective = function(start) {
|
|
199
199
|
if (this.options.ecmaVersion < 5) return false;
|
|
200
200
|
for (; ; ) {
|
|
201
201
|
skipWhiteSpace.lastIndex = start, start += skipWhiteSpace.exec(this.input)[0].length;
|
|
202
|
-
var match4 =
|
|
202
|
+
var match4 = literal2.exec(this.input.slice(start));
|
|
203
203
|
if (!match4) return false;
|
|
204
204
|
if ("use strict" === (match4[1] || match4[2])) {
|
|
205
205
|
skipWhiteSpace.lastIndex = start + match4[0].length;
|
|
@@ -16052,17 +16052,17 @@ See https://babeljs.io/docs/configuration#print-effective-configs for more info.
|
|
|
16052
16052
|
const startLoc = this.state.startLoc, endOfInit = () => this.match(12) || this.match(8);
|
|
16053
16053
|
switch (this.state.type) {
|
|
16054
16054
|
case 135: {
|
|
16055
|
-
const
|
|
16056
|
-
return endOfInit() ? { type: "number", loc:
|
|
16055
|
+
const literal2 = this.parseNumericLiteral(this.state.value);
|
|
16056
|
+
return endOfInit() ? { type: "number", loc: literal2.loc.start, value: literal2 } : { type: "invalid", loc: startLoc };
|
|
16057
16057
|
}
|
|
16058
16058
|
case 134: {
|
|
16059
|
-
const
|
|
16060
|
-
return endOfInit() ? { type: "string", loc:
|
|
16059
|
+
const literal2 = this.parseStringLiteral(this.state.value);
|
|
16060
|
+
return endOfInit() ? { type: "string", loc: literal2.loc.start, value: literal2 } : { type: "invalid", loc: startLoc };
|
|
16061
16061
|
}
|
|
16062
16062
|
case 85:
|
|
16063
16063
|
case 86: {
|
|
16064
|
-
const
|
|
16065
|
-
return endOfInit() ? { type: "boolean", loc:
|
|
16064
|
+
const literal2 = this.parseBooleanLiteral(this.match(85));
|
|
16065
|
+
return endOfInit() ? { type: "boolean", loc: literal2.loc.start, value: literal2 } : { type: "invalid", loc: startLoc };
|
|
16066
16066
|
}
|
|
16067
16067
|
default:
|
|
16068
16068
|
return { type: "invalid", loc: startLoc };
|
|
@@ -24615,9 +24615,9 @@ ${str2}
|
|
|
24615
24615
|
return validate(defs.types, node, "types", types3, 1), node;
|
|
24616
24616
|
}, exports2.tSIntrinsicKeyword = exports2.tsIntrinsicKeyword = function() {
|
|
24617
24617
|
return { type: "TSIntrinsicKeyword" };
|
|
24618
|
-
}, exports2.tSLiteralType = exports2.tsLiteralType = function(
|
|
24619
|
-
const node = { type: "TSLiteralType", literal }, defs = NODE_FIELDS.TSLiteralType;
|
|
24620
|
-
return validate(defs.literal, node, "literal",
|
|
24618
|
+
}, exports2.tSLiteralType = exports2.tsLiteralType = function(literal2) {
|
|
24619
|
+
const node = { type: "TSLiteralType", literal: literal2 }, defs = NODE_FIELDS.TSLiteralType;
|
|
24620
|
+
return validate(defs.literal, node, "literal", literal2, 1), node;
|
|
24621
24621
|
}, exports2.tSMappedType = exports2.tsMappedType = function(typeParameter, typeAnnotation = null, nameType = null) {
|
|
24622
24622
|
const node = { type: "TSMappedType", typeParameter, typeAnnotation, nameType }, defs = NODE_FIELDS.TSMappedType;
|
|
24623
24623
|
return validate(defs.typeParameter, node, "typeParameter", typeParameter, 1), validate(defs.typeAnnotation, node, "typeAnnotation", typeAnnotation, 1), validate(defs.nameType, node, "nameType", nameType, 1), node;
|
|
@@ -25863,9 +25863,9 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
|
|
|
25863
25863
|
defineType("TSFunctionType", Object.assign({}, fnOrCtrBase, { fields: signatureDeclarationCommon() })), defineType("TSConstructorType", Object.assign({}, fnOrCtrBase, { fields: Object.assign({}, signatureDeclarationCommon(), { abstract: (0, _utils.validateOptional)(bool2) }) })), defineType("TSTypeReference", { aliases: ["TSType"], visitor: ["typeName", "typeParameters"], fields: { typeName: (0, _utils.validateType)("TSEntityName"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }), defineType("TSTypePredicate", { aliases: ["TSType"], visitor: ["parameterName", "typeAnnotation"], builder: ["parameterName", "typeAnnotation", "asserts"], fields: { parameterName: (0, _utils.validateType)("Identifier", "TSThisType"), typeAnnotation: (0, _utils.validateOptionalType)("TSTypeAnnotation"), asserts: (0, _utils.validateOptional)(bool2) } }), defineType("TSTypeQuery", { aliases: ["TSType"], visitor: ["exprName", "typeParameters"], fields: { exprName: (0, _utils.validateType)("TSEntityName", "TSImportType"), typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation") } }), defineType("TSTypeLiteral", { aliases: ["TSType"], visitor: ["members"], fields: { members: (0, _utils.validateArrayOfType)("TSTypeElement") } }), defineType("TSArrayType", { aliases: ["TSType"], visitor: ["elementType"], fields: { elementType: (0, _utils.validateType)("TSType") } }), defineType("TSTupleType", { aliases: ["TSType"], visitor: ["elementTypes"], fields: { elementTypes: (0, _utils.validateArrayOfType)("TSType", "TSNamedTupleMember") } }), defineType("TSOptionalType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }), defineType("TSRestType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }), defineType("TSNamedTupleMember", { visitor: ["label", "elementType"], builder: ["label", "elementType", "optional"], fields: { label: (0, _utils.validateType)("Identifier"), optional: { validate: bool2, default: false }, elementType: (0, _utils.validateType)("TSType") } });
|
|
25864
25864
|
const unionOrIntersection = { aliases: ["TSType"], visitor: ["types"], fields: { types: (0, _utils.validateArrayOfType)("TSType") } };
|
|
25865
25865
|
defineType("TSUnionType", unionOrIntersection), defineType("TSIntersectionType", unionOrIntersection), defineType("TSConditionalType", { aliases: ["TSType"], visitor: ["checkType", "extendsType", "trueType", "falseType"], fields: { checkType: (0, _utils.validateType)("TSType"), extendsType: (0, _utils.validateType)("TSType"), trueType: (0, _utils.validateType)("TSType"), falseType: (0, _utils.validateType)("TSType") } }), defineType("TSInferType", { aliases: ["TSType"], visitor: ["typeParameter"], fields: { typeParameter: (0, _utils.validateType)("TSTypeParameter") } }), defineType("TSParenthesizedType", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { typeAnnotation: (0, _utils.validateType)("TSType") } }), defineType("TSTypeOperator", { aliases: ["TSType"], visitor: ["typeAnnotation"], fields: { operator: (0, _utils.validate)((0, _utils.assertValueType)("string")), typeAnnotation: (0, _utils.validateType)("TSType") } }), defineType("TSIndexedAccessType", { aliases: ["TSType"], visitor: ["objectType", "indexType"], fields: { objectType: (0, _utils.validateType)("TSType"), indexType: (0, _utils.validateType)("TSType") } }), defineType("TSMappedType", { aliases: ["TSType"], visitor: ["typeParameter", "nameType", "typeAnnotation"], builder: ["typeParameter", "typeAnnotation", "nameType"], fields: Object.assign({}, { typeParameter: (0, _utils.validateType)("TSTypeParameter") }, { readonly: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")), optional: (0, _utils.validateOptional)((0, _utils.assertOneOf)(true, false, "+", "-")), typeAnnotation: (0, _utils.validateOptionalType)("TSType"), nameType: (0, _utils.validateOptionalType)("TSType") }) }), defineType("TSLiteralType", { aliases: ["TSType", "TSBaseType"], visitor: ["literal"], fields: { literal: { validate: function() {
|
|
25866
|
-
const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral"), unaryOperator = (0, _utils.assertOneOf)("-"),
|
|
25866
|
+
const unaryExpression = (0, _utils.assertNodeType)("NumericLiteral", "BigIntLiteral"), unaryOperator = (0, _utils.assertOneOf)("-"), literal2 = (0, _utils.assertNodeType)("NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral");
|
|
25867
25867
|
function validator(parent, key, node) {
|
|
25868
|
-
(0, _is.default)("UnaryExpression", node) ? (unaryOperator(node, "operator", node.operator), unaryExpression(node, "argument", node.argument)) :
|
|
25868
|
+
(0, _is.default)("UnaryExpression", node) ? (unaryOperator(node, "operator", node.operator), unaryExpression(node, "argument", node.argument)) : literal2(parent, key, node);
|
|
25869
25869
|
}
|
|
25870
25870
|
return validator.oneOfNodeTypes = ["NumericLiteral", "StringLiteral", "BooleanLiteral", "BigIntLiteral", "TemplateLiteral", "UnaryExpression"], validator;
|
|
25871
25871
|
}() } } });
|
|
@@ -28431,11 +28431,11 @@ ${trace}`);
|
|
|
28431
28431
|
case "[":
|
|
28432
28432
|
return newToken("punctuator", read4());
|
|
28433
28433
|
case "n":
|
|
28434
|
-
return read4(),
|
|
28434
|
+
return read4(), literal2("ull"), newToken("null", null);
|
|
28435
28435
|
case "t":
|
|
28436
|
-
return read4(),
|
|
28436
|
+
return read4(), literal2("rue"), newToken("boolean", true);
|
|
28437
28437
|
case "f":
|
|
28438
|
-
return read4(),
|
|
28438
|
+
return read4(), literal2("alse"), newToken("boolean", false);
|
|
28439
28439
|
case "-":
|
|
28440
28440
|
case "+":
|
|
28441
28441
|
return "-" === read4() && (sign2 = -1), void (lexState = "sign");
|
|
@@ -28454,9 +28454,9 @@ ${trace}`);
|
|
|
28454
28454
|
case "9":
|
|
28455
28455
|
return buffer = read4(), void (lexState = "decimalInteger");
|
|
28456
28456
|
case "I":
|
|
28457
|
-
return read4(),
|
|
28457
|
+
return read4(), literal2("nfinity"), newToken("numeric", 1 / 0);
|
|
28458
28458
|
case "N":
|
|
28459
|
-
return read4(),
|
|
28459
|
+
return read4(), literal2("aN"), newToken("numeric", NaN);
|
|
28460
28460
|
case '"':
|
|
28461
28461
|
case "'":
|
|
28462
28462
|
return doubleQuote = '"' === read4(), buffer = "", void (lexState = "string");
|
|
@@ -28517,9 +28517,9 @@ ${trace}`);
|
|
|
28517
28517
|
case "9":
|
|
28518
28518
|
return buffer = read4(), void (lexState = "decimalInteger");
|
|
28519
28519
|
case "I":
|
|
28520
|
-
return read4(),
|
|
28520
|
+
return read4(), literal2("nfinity"), newToken("numeric", sign2 * (1 / 0));
|
|
28521
28521
|
case "N":
|
|
28522
|
-
return read4(),
|
|
28522
|
+
return read4(), literal2("aN"), newToken("numeric", NaN);
|
|
28523
28523
|
}
|
|
28524
28524
|
throw invalidChar(read4());
|
|
28525
28525
|
}, zero() {
|
|
@@ -28698,7 +28698,7 @@ ${trace}`);
|
|
|
28698
28698
|
function newToken(type2, value2) {
|
|
28699
28699
|
return { type: type2, value: value2, line, column };
|
|
28700
28700
|
}
|
|
28701
|
-
function
|
|
28701
|
+
function literal2(s) {
|
|
28702
28702
|
for (const c2 of s) {
|
|
28703
28703
|
if (peek() !== c2) throw invalidChar(read4());
|
|
28704
28704
|
read4();
|
|
@@ -29257,12 +29257,12 @@ ${trace}`);
|
|
|
29257
29257
|
}, Parser.tokenizer = function(input, options) {
|
|
29258
29258
|
return new this(options, input);
|
|
29259
29259
|
}, Object.defineProperties(Parser.prototype, prototypeAccessors);
|
|
29260
|
-
var pp$9 = Parser.prototype,
|
|
29260
|
+
var pp$9 = Parser.prototype, literal2 = /^(?:'((?:\\[^]|[^'\\])*?)'|"((?:\\[^]|[^"\\])*?)")/;
|
|
29261
29261
|
pp$9.strictDirective = function(start) {
|
|
29262
29262
|
if (this.options.ecmaVersion < 5) return false;
|
|
29263
29263
|
for (; ; ) {
|
|
29264
29264
|
skipWhiteSpace.lastIndex = start, start += skipWhiteSpace.exec(this.input)[0].length;
|
|
29265
|
-
var match4 =
|
|
29265
|
+
var match4 = literal2.exec(this.input.slice(start));
|
|
29266
29266
|
if (!match4) return false;
|
|
29267
29267
|
if ("use strict" === (match4[1] || match4[2])) {
|
|
29268
29268
|
skipWhiteSpace.lastIndex = start + match4[0].length;
|
|
@@ -58487,9 +58487,9 @@ ${indent2}`) + "'";
|
|
|
58487
58487
|
return quotedString(value2, ctx);
|
|
58488
58488
|
}
|
|
58489
58489
|
const indent2 = ctx.indent || (ctx.forceBlockIndent || containsDocumentMarker(value2) ? " " : "");
|
|
58490
|
-
const
|
|
58490
|
+
const literal2 = blockQuote === "literal" ? true : blockQuote === "folded" || type2 === Scalar.Scalar.BLOCK_FOLDED ? false : type2 === Scalar.Scalar.BLOCK_LITERAL ? true : !lineLengthOverLimit(value2, lineWidth, indent2.length);
|
|
58491
58491
|
if (!value2)
|
|
58492
|
-
return
|
|
58492
|
+
return literal2 ? "|\n" : ">\n";
|
|
58493
58493
|
let chomp;
|
|
58494
58494
|
let endStart;
|
|
58495
58495
|
for (endStart = value2.length; endStart > 0; --endStart) {
|
|
@@ -58538,7 +58538,7 @@ ${indent2}`) + "'";
|
|
|
58538
58538
|
if (onComment)
|
|
58539
58539
|
onComment();
|
|
58540
58540
|
}
|
|
58541
|
-
if (!
|
|
58541
|
+
if (!literal2) {
|
|
58542
58542
|
const foldedValue = value2.replace(/\n+/g, "\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g, "$1$2").replace(/\n+/g, `$&${indent2}`);
|
|
58543
58543
|
let literalFallback = false;
|
|
58544
58544
|
const foldOptions = getFoldOptions(ctx, true);
|
|
@@ -90823,9 +90823,9 @@ ${lanes.join("\n")}
|
|
|
90823
90823
|
tokenValue = "" + parseInt(tokenValue, 8);
|
|
90824
90824
|
tokenFlags |= 32;
|
|
90825
90825
|
const withMinus = token === 41;
|
|
90826
|
-
const
|
|
90826
|
+
const literal2 = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8);
|
|
90827
90827
|
if (withMinus) start2--;
|
|
90828
|
-
error22(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2,
|
|
90828
|
+
error22(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal2);
|
|
90829
90829
|
return 9;
|
|
90830
90830
|
}
|
|
90831
90831
|
} else {
|
|
@@ -105332,18 +105332,18 @@ ${lanes.join("\n")}
|
|
|
105332
105332
|
function updateIndexSignature(node, modifiers, parameters, type2) {
|
|
105333
105333
|
return node.parameters !== parameters || node.type !== type2 || node.modifiers !== modifiers ? finishUpdateBaseSignatureDeclaration(createIndexSignature(modifiers, parameters, type2), node) : node;
|
|
105334
105334
|
}
|
|
105335
|
-
function createTemplateLiteralTypeSpan(type2,
|
|
105335
|
+
function createTemplateLiteralTypeSpan(type2, literal2) {
|
|
105336
105336
|
const node = createBaseNode(
|
|
105337
105337
|
204
|
|
105338
105338
|
/* TemplateLiteralTypeSpan */
|
|
105339
105339
|
);
|
|
105340
105340
|
node.type = type2;
|
|
105341
|
-
node.literal =
|
|
105341
|
+
node.literal = literal2;
|
|
105342
105342
|
node.transformFlags = 1;
|
|
105343
105343
|
return node;
|
|
105344
105344
|
}
|
|
105345
|
-
function updateTemplateLiteralTypeSpan(node, type2,
|
|
105346
|
-
return node.type !== type2 || node.literal !==
|
|
105345
|
+
function updateTemplateLiteralTypeSpan(node, type2, literal2) {
|
|
105346
|
+
return node.type !== type2 || node.literal !== literal2 ? update(createTemplateLiteralTypeSpan(type2, literal2), node) : node;
|
|
105347
105347
|
}
|
|
105348
105348
|
function createKeywordTypeNode(kind) {
|
|
105349
105349
|
return createToken(kind);
|
|
@@ -105673,17 +105673,17 @@ ${lanes.join("\n")}
|
|
|
105673
105673
|
function updateMappedTypeNode(node, readonlyToken, typeParameter, nameType, questionToken, type2, members) {
|
|
105674
105674
|
return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type2 || node.members !== members ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type2, members), node) : node;
|
|
105675
105675
|
}
|
|
105676
|
-
function createLiteralTypeNode(
|
|
105676
|
+
function createLiteralTypeNode(literal2) {
|
|
105677
105677
|
const node = createBaseNode(
|
|
105678
105678
|
201
|
|
105679
105679
|
/* LiteralType */
|
|
105680
105680
|
);
|
|
105681
|
-
node.literal =
|
|
105681
|
+
node.literal = literal2;
|
|
105682
105682
|
node.transformFlags = 1;
|
|
105683
105683
|
return node;
|
|
105684
105684
|
}
|
|
105685
|
-
function updateLiteralTypeNode(node,
|
|
105686
|
-
return node.literal !==
|
|
105685
|
+
function updateLiteralTypeNode(node, literal2) {
|
|
105686
|
+
return node.literal !== literal2 ? update(createLiteralTypeNode(literal2), node) : node;
|
|
105687
105687
|
}
|
|
105688
105688
|
function createObjectBindingPattern(elements) {
|
|
105689
105689
|
const node = createBaseNode(
|
|
@@ -106416,18 +106416,18 @@ ${lanes.join("\n")}
|
|
|
106416
106416
|
function updateMetaProperty(node, name2) {
|
|
106417
106417
|
return node.name !== name2 ? update(createMetaProperty(node.keywordToken, name2), node) : node;
|
|
106418
106418
|
}
|
|
106419
|
-
function createTemplateSpan(expression,
|
|
106419
|
+
function createTemplateSpan(expression, literal2) {
|
|
106420
106420
|
const node = createBaseNode(
|
|
106421
106421
|
239
|
|
106422
106422
|
/* TemplateSpan */
|
|
106423
106423
|
);
|
|
106424
106424
|
node.expression = expression;
|
|
106425
|
-
node.literal =
|
|
106425
|
+
node.literal = literal2;
|
|
106426
106426
|
node.transformFlags |= propagateChildFlags(node.expression) | propagateChildFlags(node.literal) | 1024;
|
|
106427
106427
|
return node;
|
|
106428
106428
|
}
|
|
106429
|
-
function updateTemplateSpan(node, expression,
|
|
106430
|
-
return node.expression !== expression || node.literal !==
|
|
106429
|
+
function updateTemplateSpan(node, expression, literal2) {
|
|
106430
|
+
return node.expression !== expression || node.literal !== literal2 ? update(createTemplateSpan(expression, literal2), node) : node;
|
|
106431
106431
|
}
|
|
106432
106432
|
function createSemicolonClassElement() {
|
|
106433
106433
|
const node = createBaseNode(
|
|
@@ -120656,12 +120656,12 @@ ${lanes.join("\n")}
|
|
|
120656
120656
|
}
|
|
120657
120657
|
}
|
|
120658
120658
|
if (children) {
|
|
120659
|
-
const
|
|
120659
|
+
const literal2 = finishNode(factory2.createJSDocTypeLiteral(
|
|
120660
120660
|
children,
|
|
120661
120661
|
typeExpression.type.kind === 188
|
|
120662
120662
|
/* ArrayType */
|
|
120663
120663
|
), pos);
|
|
120664
|
-
return finishNode(factory2.createJSDocTypeExpression(
|
|
120664
|
+
return finishNode(factory2.createJSDocTypeExpression(literal2), pos);
|
|
120665
120665
|
}
|
|
120666
120666
|
}
|
|
120667
120667
|
}
|
|
@@ -142139,10 +142139,10 @@ ${lanes.join("\n")}
|
|
|
142139
142139
|
if (parentAccess && canHaveFlowNode(parentAccess) && parentAccess.flowNode) {
|
|
142140
142140
|
const propName = getDestructuringPropertyName(node);
|
|
142141
142141
|
if (propName) {
|
|
142142
|
-
const
|
|
142142
|
+
const literal2 = setTextRange(parseNodeFactory.createStringLiteral(propName), node);
|
|
142143
142143
|
const lhsExpr = isLeftHandSideExpression(parentAccess) ? parentAccess : parseNodeFactory.createParenthesizedExpression(parentAccess);
|
|
142144
|
-
const result = setTextRange(parseNodeFactory.createElementAccessExpression(lhsExpr,
|
|
142145
|
-
setParent(
|
|
142144
|
+
const result = setTextRange(parseNodeFactory.createElementAccessExpression(lhsExpr, literal2), node);
|
|
142145
|
+
setParent(literal2, result);
|
|
142146
142146
|
setParent(result, node);
|
|
142147
142147
|
if (lhsExpr !== parentAccess) {
|
|
142148
142148
|
setParent(lhsExpr, result);
|
|
@@ -158129,13 +158129,13 @@ ${lanes.join("\n")}
|
|
|
158129
158129
|
}
|
|
158130
158130
|
return type2;
|
|
158131
158131
|
}
|
|
158132
|
-
function narrowTypeByTypeof(type2, typeOfExpr, operator,
|
|
158132
|
+
function narrowTypeByTypeof(type2, typeOfExpr, operator, literal2, assumeTrue) {
|
|
158133
158133
|
if (operator === 36 || operator === 38) {
|
|
158134
158134
|
assumeTrue = !assumeTrue;
|
|
158135
158135
|
}
|
|
158136
158136
|
const target = getReferenceCandidate(typeOfExpr.expression);
|
|
158137
158137
|
if (!isMatchingReference(reference, target)) {
|
|
158138
|
-
if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (
|
|
158138
|
+
if (strictNullChecks && optionalChainContainsReference(target, reference) && assumeTrue === (literal2.text !== "undefined")) {
|
|
158139
158139
|
type2 = getAdjustedTypeWithFacts(
|
|
158140
158140
|
type2,
|
|
158141
158141
|
2097152
|
|
@@ -158144,16 +158144,16 @@ ${lanes.join("\n")}
|
|
|
158144
158144
|
}
|
|
158145
158145
|
const propertyAccess = getDiscriminantPropertyAccess(target, type2);
|
|
158146
158146
|
if (propertyAccess) {
|
|
158147
|
-
return narrowTypeByDiscriminant(type2, propertyAccess, (t) => narrowTypeByLiteralExpression(t,
|
|
158147
|
+
return narrowTypeByDiscriminant(type2, propertyAccess, (t) => narrowTypeByLiteralExpression(t, literal2, assumeTrue));
|
|
158148
158148
|
}
|
|
158149
158149
|
return type2;
|
|
158150
158150
|
}
|
|
158151
|
-
return narrowTypeByLiteralExpression(type2,
|
|
158151
|
+
return narrowTypeByLiteralExpression(type2, literal2, assumeTrue);
|
|
158152
158152
|
}
|
|
158153
|
-
function narrowTypeByLiteralExpression(type2,
|
|
158154
|
-
return assumeTrue ? narrowTypeByTypeName(type2,
|
|
158153
|
+
function narrowTypeByLiteralExpression(type2, literal2, assumeTrue) {
|
|
158154
|
+
return assumeTrue ? narrowTypeByTypeName(type2, literal2.text) : getAdjustedTypeWithFacts(
|
|
158155
158155
|
type2,
|
|
158156
|
-
typeofNEFacts.get(
|
|
158156
|
+
typeofNEFacts.get(literal2.text) || 32768
|
|
158157
158157
|
/* TypeofNEHostObject */
|
|
158158
158158
|
);
|
|
158159
158159
|
}
|
|
@@ -159839,19 +159839,19 @@ ${lanes.join("\n")}
|
|
|
159839
159839
|
});
|
|
159840
159840
|
}
|
|
159841
159841
|
function getThisTypeOfObjectLiteralFromContextualType(containingLiteral, contextualType) {
|
|
159842
|
-
let
|
|
159842
|
+
let literal2 = containingLiteral;
|
|
159843
159843
|
let type2 = contextualType;
|
|
159844
159844
|
while (type2) {
|
|
159845
159845
|
const thisType = getThisTypeFromContextualType(type2);
|
|
159846
159846
|
if (thisType) {
|
|
159847
159847
|
return thisType;
|
|
159848
159848
|
}
|
|
159849
|
-
if (
|
|
159849
|
+
if (literal2.parent.kind !== 303) {
|
|
159850
159850
|
break;
|
|
159851
159851
|
}
|
|
159852
|
-
|
|
159852
|
+
literal2 = literal2.parent.parent;
|
|
159853
159853
|
type2 = getApparentTypeOfContextualType(
|
|
159854
|
-
|
|
159854
|
+
literal2,
|
|
159855
159855
|
/*contextFlags*/
|
|
159856
159856
|
void 0
|
|
159857
159857
|
);
|
|
@@ -193673,8 +193673,8 @@ ${lanes.join("\n")}
|
|
|
193673
193673
|
}
|
|
193674
193674
|
if (node.kind === 11) {
|
|
193675
193675
|
const singleQuote = node.singleQuote !== void 0 ? node.singleQuote : !isStringDoubleQuoted(node, currentSourceFile);
|
|
193676
|
-
const
|
|
193677
|
-
return setTextRange(
|
|
193676
|
+
const literal2 = factory2.createStringLiteral(tryDecodeEntities(node.text) || node.text, singleQuote);
|
|
193677
|
+
return setTextRange(literal2, node);
|
|
193678
193678
|
}
|
|
193679
193679
|
if (node.kind === 294) {
|
|
193680
193680
|
if (node.expression === void 0) {
|
|
@@ -199397,9 +199397,9 @@ ${lanes.join("\n")}
|
|
|
199397
199397
|
return factory2.createOmittedExpression();
|
|
199398
199398
|
}
|
|
199399
199399
|
function createInstruction(instruction) {
|
|
199400
|
-
const
|
|
199401
|
-
addSyntheticTrailingComment(
|
|
199402
|
-
return
|
|
199400
|
+
const literal2 = factory2.createNumericLiteral(instruction);
|
|
199401
|
+
addSyntheticTrailingComment(literal2, 3, getInstructionName(instruction));
|
|
199402
|
+
return literal2;
|
|
199403
199403
|
}
|
|
199404
199404
|
function createInlineBreak(label, location2) {
|
|
199405
199405
|
Debug.assertLessThan(0, label, "Invalid label");
|
|
@@ -212901,8 +212901,8 @@ ${lanes.join("\n")}
|
|
|
212901
212901
|
resolvedModule: void 0,
|
|
212902
212902
|
resolvedTypeReferenceDirective: void 0
|
|
212903
212903
|
};
|
|
212904
|
-
function getModuleResolutionName(
|
|
212905
|
-
return
|
|
212904
|
+
function getModuleResolutionName(literal2) {
|
|
212905
|
+
return literal2.text;
|
|
212906
212906
|
}
|
|
212907
212907
|
var moduleResolutionNameAndModeGetter = {
|
|
212908
212908
|
getName: getModuleResolutionName,
|
|
@@ -224440,10 +224440,10 @@ ${lanes.join("\n")}
|
|
|
224440
224440
|
return resolver.serializeExistingTypeNode(context, node);
|
|
224441
224441
|
}
|
|
224442
224442
|
const specifier = rewriteModuleSpecifier2(node, node.argument.literal);
|
|
224443
|
-
const
|
|
224443
|
+
const literal2 = specifier === node.argument.literal ? reuseNode(context, node.argument.literal) : specifier;
|
|
224444
224444
|
return factory.updateImportTypeNode(
|
|
224445
224445
|
node,
|
|
224446
|
-
|
|
224446
|
+
literal2 === node.argument.literal ? reuseNode(context, node.argument) : factory.createLiteralTypeNode(literal2),
|
|
224447
224447
|
visitNode(node.attributes, visitExistingNodeTreeSymbols, isImportAttributes),
|
|
224448
224448
|
visitNode(node.qualifier, visitExistingNodeTreeSymbols, isEntityName),
|
|
224449
224449
|
visitNodes2(node.typeArguments, visitExistingNodeTreeSymbols, isTypeNode),
|
|
@@ -224486,9 +224486,9 @@ ${lanes.join("\n")}
|
|
|
224486
224486
|
return factory.updateComputedPropertyName(node, result);
|
|
224487
224487
|
} else {
|
|
224488
224488
|
const computedPropertyNameType = resolver.serializeTypeOfExpression(context, node.expression);
|
|
224489
|
-
let
|
|
224489
|
+
let literal2;
|
|
224490
224490
|
if (isLiteralTypeNode(computedPropertyNameType)) {
|
|
224491
|
-
|
|
224491
|
+
literal2 = computedPropertyNameType.literal;
|
|
224492
224492
|
} else {
|
|
224493
224493
|
const evaluated = resolver.evaluateEntityNameExpression(node.expression);
|
|
224494
224494
|
const literalNode = typeof evaluated.value === "string" ? factory.createStringLiteral(
|
|
@@ -224506,15 +224506,15 @@ ${lanes.join("\n")}
|
|
|
224506
224506
|
}
|
|
224507
224507
|
return node;
|
|
224508
224508
|
}
|
|
224509
|
-
|
|
224509
|
+
literal2 = literalNode;
|
|
224510
224510
|
}
|
|
224511
|
-
if (
|
|
224512
|
-
return factory.createIdentifier(
|
|
224511
|
+
if (literal2.kind === 11 && isIdentifierText(literal2.text, getEmitScriptTarget(options))) {
|
|
224512
|
+
return factory.createIdentifier(literal2.text);
|
|
224513
224513
|
}
|
|
224514
|
-
if (
|
|
224515
|
-
return
|
|
224514
|
+
if (literal2.kind === 9 && !literal2.text.startsWith("-")) {
|
|
224515
|
+
return literal2;
|
|
224516
224516
|
}
|
|
224517
|
-
return factory.updateComputedPropertyName(node,
|
|
224517
|
+
return factory.updateComputedPropertyName(node, literal2);
|
|
224518
224518
|
}
|
|
224519
224519
|
}
|
|
224520
224520
|
if (isTypePredicateNode(node)) {
|
|
@@ -255076,7 +255076,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
255076
255076
|
const caseClause = findAncestor(contextToken, isCaseClause);
|
|
255077
255077
|
if (caseClause && (isCaseKeyword(contextToken) || isNodeDescendantOf(contextToken, caseClause.expression))) {
|
|
255078
255078
|
const tracker = newCaseClauseTracker(checker, caseClause.parent.clauses);
|
|
255079
|
-
literals = literals.filter((
|
|
255079
|
+
literals = literals.filter((literal2) => !tracker.hasValue(literal2));
|
|
255080
255080
|
symbols.forEach((symbol, i) => {
|
|
255081
255081
|
if (symbol.valueDeclaration && isEnumMember(symbol.valueDeclaration)) {
|
|
255082
255082
|
const value2 = checker.getConstantValue(symbol.valueDeclaration);
|
|
@@ -255153,8 +255153,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
255153
255153
|
);
|
|
255154
255154
|
}
|
|
255155
255155
|
}
|
|
255156
|
-
for (const
|
|
255157
|
-
const literalEntry = createCompletionEntryForLiteral(sourceFile, preferences,
|
|
255156
|
+
for (const literal2 of literals) {
|
|
255157
|
+
const literalEntry = createCompletionEntryForLiteral(sourceFile, preferences, literal2);
|
|
255158
255158
|
uniqueNames.add(literalEntry.name);
|
|
255159
255159
|
insertSorted(
|
|
255160
255160
|
entries,
|
|
@@ -255283,16 +255283,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
255283
255283
|
const indexExpression = typeNodeToExpression(typeNode.indexType, languageVersion, quotePreference);
|
|
255284
255284
|
return objectExpression && indexExpression && factory.createElementAccessExpression(objectExpression, indexExpression);
|
|
255285
255285
|
case 201:
|
|
255286
|
-
const
|
|
255287
|
-
switch (
|
|
255286
|
+
const literal2 = typeNode.literal;
|
|
255287
|
+
switch (literal2.kind) {
|
|
255288
255288
|
case 11:
|
|
255289
255289
|
return factory.createStringLiteral(
|
|
255290
|
-
|
|
255290
|
+
literal2.text,
|
|
255291
255291
|
quotePreference === 0
|
|
255292
255292
|
/* Single */
|
|
255293
255293
|
);
|
|
255294
255294
|
case 9:
|
|
255295
|
-
return factory.createNumericLiteral(
|
|
255295
|
+
return factory.createNumericLiteral(literal2.text, literal2.numericLiteralFlags);
|
|
255296
255296
|
}
|
|
255297
255297
|
return void 0;
|
|
255298
255298
|
case 196:
|
|
@@ -255395,12 +255395,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
255395
255395
|
}
|
|
255396
255396
|
});
|
|
255397
255397
|
}
|
|
255398
|
-
function completionNameForLiteral(sourceFile, preferences,
|
|
255399
|
-
return typeof
|
|
255398
|
+
function completionNameForLiteral(sourceFile, preferences, literal2) {
|
|
255399
|
+
return typeof literal2 === "object" ? pseudoBigIntToString(literal2) + "n" : isString2(literal2) ? quote(sourceFile, preferences, literal2) : JSON.stringify(literal2);
|
|
255400
255400
|
}
|
|
255401
|
-
function createCompletionEntryForLiteral(sourceFile, preferences,
|
|
255401
|
+
function createCompletionEntryForLiteral(sourceFile, preferences, literal2) {
|
|
255402
255402
|
return {
|
|
255403
|
-
name: completionNameForLiteral(sourceFile, preferences,
|
|
255403
|
+
name: completionNameForLiteral(sourceFile, preferences, literal2),
|
|
255404
255404
|
kind: "string",
|
|
255405
255405
|
kindModifiers: "",
|
|
255406
255406
|
sortText: SortText.LocationPriority,
|
|
@@ -256311,8 +256311,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
256311
256311
|
return { type: "request", request: completionData };
|
|
256312
256312
|
}
|
|
256313
256313
|
const { symbols, literals, location: location2, completionKind, symbolToOriginInfoMap, contextToken, previousToken, isJsxInitializer, isTypeOnlyLocation } = completionData;
|
|
256314
|
-
const
|
|
256315
|
-
if (
|
|
256314
|
+
const literal2 = find2(literals, (l) => completionNameForLiteral(sourceFile, preferences, l) === entryId.name);
|
|
256315
|
+
if (literal2 !== void 0) return { type: "literal", literal: literal2 };
|
|
256316
256316
|
return firstDefined(symbols, (symbol, index2) => {
|
|
256317
256317
|
const origin = symbolToOriginInfoMap[index2];
|
|
256318
256318
|
const info = getCompletionEntryDisplayNameForSymbol(symbol, getEmitScriptTarget(compilerOptions), origin, completionKind, completionData.isJsxIdentifierExpected);
|
|
@@ -256356,11 +256356,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
256356
256356
|
return createCompletionDetailsForSymbol(symbol, symbolName2, typeChecker, sourceFile, location2, cancellationToken, codeActions, sourceDisplay);
|
|
256357
256357
|
}
|
|
256358
256358
|
case "literal": {
|
|
256359
|
-
const { literal } = symbolCompletion;
|
|
256359
|
+
const { literal: literal2 } = symbolCompletion;
|
|
256360
256360
|
return createSimpleDetails(
|
|
256361
|
-
completionNameForLiteral(sourceFile, preferences,
|
|
256361
|
+
completionNameForLiteral(sourceFile, preferences, literal2),
|
|
256362
256362
|
"string",
|
|
256363
|
-
typeof
|
|
256363
|
+
typeof literal2 === "string" ? 8 : 7
|
|
256364
256364
|
/* numericLiteral */
|
|
256365
256365
|
);
|
|
256366
256366
|
}
|
|
@@ -258899,7 +258899,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
258899
258899
|
if (!contextualTypes) {
|
|
258900
258900
|
return;
|
|
258901
258901
|
}
|
|
258902
|
-
const literals = contextualTypes.types.filter((
|
|
258902
|
+
const literals = contextualTypes.types.filter((literal2) => !tracker.hasValue(literal2.value));
|
|
258903
258903
|
return { kind: 2, types: literals, isNewIdentifier: false };
|
|
258904
258904
|
case 276:
|
|
258905
258905
|
case 281:
|
|
@@ -315481,6 +315481,24 @@ var $ZodEnum = /* @__PURE__ */ $constructor("$ZodEnum", (inst, def) => {
|
|
|
315481
315481
|
return payload;
|
|
315482
315482
|
};
|
|
315483
315483
|
});
|
|
315484
|
+
var $ZodLiteral = /* @__PURE__ */ $constructor("$ZodLiteral", (inst, def) => {
|
|
315485
|
+
$ZodType.init(inst, def);
|
|
315486
|
+
inst._zod.values = new Set(def.values);
|
|
315487
|
+
inst._zod.pattern = new RegExp(`^(${def.values.map((o) => typeof o === "string" ? escapeRegex(o) : o ? o.toString() : String(o)).join("|")})$`);
|
|
315488
|
+
inst._zod.parse = (payload, _ctx) => {
|
|
315489
|
+
const input = payload.value;
|
|
315490
|
+
if (inst._zod.values.has(input)) {
|
|
315491
|
+
return payload;
|
|
315492
|
+
}
|
|
315493
|
+
payload.issues.push({
|
|
315494
|
+
code: "invalid_value",
|
|
315495
|
+
values: def.values,
|
|
315496
|
+
input,
|
|
315497
|
+
inst
|
|
315498
|
+
});
|
|
315499
|
+
return payload;
|
|
315500
|
+
};
|
|
315501
|
+
});
|
|
315484
315502
|
var $ZodTransform = /* @__PURE__ */ $constructor("$ZodTransform", (inst, def) => {
|
|
315485
315503
|
$ZodType.init(inst, def);
|
|
315486
315504
|
inst._zod.parse = (payload, _ctx) => {
|
|
@@ -316793,6 +316811,26 @@ function _enum(values, params) {
|
|
|
316793
316811
|
...util_exports.normalizeParams(params)
|
|
316794
316812
|
});
|
|
316795
316813
|
}
|
|
316814
|
+
var ZodLiteral = /* @__PURE__ */ $constructor("ZodLiteral", (inst, def) => {
|
|
316815
|
+
$ZodLiteral.init(inst, def);
|
|
316816
|
+
ZodType.init(inst, def);
|
|
316817
|
+
inst.values = new Set(def.values);
|
|
316818
|
+
Object.defineProperty(inst, "value", {
|
|
316819
|
+
get() {
|
|
316820
|
+
if (def.values.length > 1) {
|
|
316821
|
+
throw new Error("This schema contains multiple valid literal values. Use `.values` instead.");
|
|
316822
|
+
}
|
|
316823
|
+
return def.values[0];
|
|
316824
|
+
}
|
|
316825
|
+
});
|
|
316826
|
+
});
|
|
316827
|
+
function literal(value2, params) {
|
|
316828
|
+
return new ZodLiteral({
|
|
316829
|
+
type: "literal",
|
|
316830
|
+
values: Array.isArray(value2) ? value2 : [value2],
|
|
316831
|
+
...util_exports.normalizeParams(params)
|
|
316832
|
+
});
|
|
316833
|
+
}
|
|
316796
316834
|
var ZodTransform = /* @__PURE__ */ $constructor("ZodTransform", (inst, def) => {
|
|
316797
316835
|
$ZodTransform.init(inst, def);
|
|
316798
316836
|
ZodType.init(inst, def);
|
|
@@ -317054,10 +317092,10 @@ var RegistryConfigSchema = object({
|
|
|
317054
317092
|
var ColorConfigSchema = SingleThemeColorConfigSchema.or(
|
|
317055
317093
|
MultiThemeColorConfigSchema
|
|
317056
317094
|
).describe("Colors used for various workspace elements");
|
|
317057
|
-
var ColorConfigMapSchema =
|
|
317058
|
-
|
|
317059
|
-
|
|
317060
|
-
|
|
317095
|
+
var ColorConfigMapSchema = record(
|
|
317096
|
+
union([literal("base"), string2()]),
|
|
317097
|
+
ColorConfigSchema
|
|
317098
|
+
);
|
|
317061
317099
|
var ExtendsItemSchema = string2().trim().describe(
|
|
317062
317100
|
"The path to a base config file to use as a configuration preset file. Documentation can be found at https://github.com/unjs/c12#extending-configuration."
|
|
317063
317101
|
);
|
|
@@ -373703,7 +373741,7 @@ function expand4(template2, context) {
|
|
|
373703
373741
|
var operators2 = ["+", "#", ".", "/", ";", "?", "&"];
|
|
373704
373742
|
template2 = template2.replace(
|
|
373705
373743
|
/\{([^\{\}]+)\}|([^\{\}]+)/g,
|
|
373706
|
-
function(_, expression,
|
|
373744
|
+
function(_, expression, literal2) {
|
|
373707
373745
|
if (expression) {
|
|
373708
373746
|
let operator = "";
|
|
373709
373747
|
const values = [];
|
|
@@ -373727,7 +373765,7 @@ function expand4(template2, context) {
|
|
|
373727
373765
|
return values.join(",");
|
|
373728
373766
|
}
|
|
373729
373767
|
} else {
|
|
373730
|
-
return encodeReserved(
|
|
373768
|
+
return encodeReserved(literal2);
|
|
373731
373769
|
}
|
|
373732
373770
|
}
|
|
373733
373771
|
);
|