@typespec/html-program-viewer 0.61.0-dev.4 → 0.61.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/emitter/index.js +275 -218
- package/dist/manifest-1IDK9ZR4.js +6 -0
- package/dist/react/index.js +384 -365
- package/package.json +3 -3
- package/dist/manifest-onl5D1yL.js +0 -6
package/dist/react/index.js
CHANGED
|
@@ -17544,6 +17544,289 @@ l.renderToNodeStream;
|
|
|
17544
17544
|
l.renderToStaticNodeStream;
|
|
17545
17545
|
s.renderToReadableStream;
|
|
17546
17546
|
|
|
17547
|
+
// Forked from https://github.com/microsoft/TypeScript/blob/663b19fe4a7c4d4ddaa61aedadd28da06acd27b6/src/compiler/path.ts
|
|
17548
|
+
/**
|
|
17549
|
+
* Internally, we represent paths as strings with '/' as the directory separator.
|
|
17550
|
+
* When we make system calls (eg: LanguageServiceHost.getDirectory()),
|
|
17551
|
+
* we expect the host to correctly handle paths in our specified format.
|
|
17552
|
+
*/
|
|
17553
|
+
const directorySeparator = "/";
|
|
17554
|
+
const altDirectorySeparator = "\\";
|
|
17555
|
+
const urlSchemeSeparator = "://";
|
|
17556
|
+
/*
|
|
17557
|
+
* Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.).
|
|
17558
|
+
*
|
|
17559
|
+
* ```ts
|
|
17560
|
+
* // POSIX
|
|
17561
|
+
* isPathAbsolute("/path/to/file.ext") === true
|
|
17562
|
+
* // DOS
|
|
17563
|
+
* isPathAbsolute("c:/path/to/file.ext") === true
|
|
17564
|
+
* // URL
|
|
17565
|
+
* isPathAbsolute("file:///path/to/file.ext") === true
|
|
17566
|
+
* // Non-absolute
|
|
17567
|
+
* isPathAbsolute("path/to/file.ext") === false
|
|
17568
|
+
* isPathAbsolute("./path/to/file.ext") === false
|
|
17569
|
+
* ```
|
|
17570
|
+
*/
|
|
17571
|
+
function isPathAbsolute(path) {
|
|
17572
|
+
return getEncodedRootLength(path) !== 0;
|
|
17573
|
+
}
|
|
17574
|
+
//#endregion
|
|
17575
|
+
//#region Path Parsing
|
|
17576
|
+
function isVolumeCharacter(charCode) {
|
|
17577
|
+
return ((charCode >= 97 /* CharacterCodes.a */ && charCode <= 122 /* CharacterCodes.z */) ||
|
|
17578
|
+
(charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */));
|
|
17579
|
+
}
|
|
17580
|
+
function getFileUrlVolumeSeparatorEnd(url, start) {
|
|
17581
|
+
const ch0 = url.charCodeAt(start);
|
|
17582
|
+
if (ch0 === 58 /* CharacterCodes.colon */)
|
|
17583
|
+
return start + 1;
|
|
17584
|
+
if (ch0 === 37 /* CharacterCodes.percent */ && url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) {
|
|
17585
|
+
const ch2 = url.charCodeAt(start + 2);
|
|
17586
|
+
if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */)
|
|
17587
|
+
return start + 3;
|
|
17588
|
+
}
|
|
17589
|
+
return -1;
|
|
17590
|
+
}
|
|
17591
|
+
/**
|
|
17592
|
+
* Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files").
|
|
17593
|
+
* If the root is part of a URL, the twos-complement of the root length is returned.
|
|
17594
|
+
*/
|
|
17595
|
+
function getEncodedRootLength(path) {
|
|
17596
|
+
if (!path)
|
|
17597
|
+
return 0;
|
|
17598
|
+
const ch0 = path.charCodeAt(0);
|
|
17599
|
+
// POSIX or UNC
|
|
17600
|
+
if (ch0 === 47 /* CharacterCodes.slash */ || ch0 === 92 /* CharacterCodes.backslash */) {
|
|
17601
|
+
if (path.charCodeAt(1) !== ch0)
|
|
17602
|
+
return 1; // POSIX: "/" (or non-normalized "\")
|
|
17603
|
+
const p1 = path.indexOf(ch0 === 47 /* CharacterCodes.slash */ ? directorySeparator : altDirectorySeparator, 2);
|
|
17604
|
+
if (p1 < 0)
|
|
17605
|
+
return path.length; // UNC: "//server" or "\\server"
|
|
17606
|
+
return p1 + 1; // UNC: "//server/" or "\\server\"
|
|
17607
|
+
}
|
|
17608
|
+
// DOS
|
|
17609
|
+
if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* CharacterCodes.colon */) {
|
|
17610
|
+
const ch2 = path.charCodeAt(2);
|
|
17611
|
+
if (ch2 === 47 /* CharacterCodes.slash */ || ch2 === 92 /* CharacterCodes.backslash */)
|
|
17612
|
+
return 3; // DOS: "c:/" or "c:\"
|
|
17613
|
+
if (path.length === 2)
|
|
17614
|
+
return 2; // DOS: "c:" (but not "c:d")
|
|
17615
|
+
}
|
|
17616
|
+
// URL
|
|
17617
|
+
const schemeEnd = path.indexOf(urlSchemeSeparator);
|
|
17618
|
+
if (schemeEnd !== -1) {
|
|
17619
|
+
const authorityStart = schemeEnd + urlSchemeSeparator.length;
|
|
17620
|
+
const authorityEnd = path.indexOf(directorySeparator, authorityStart);
|
|
17621
|
+
if (authorityEnd !== -1) {
|
|
17622
|
+
// URL: "file:///", "file://server/", "file://server/path"
|
|
17623
|
+
// For local "file" URLs, include the leading DOS volume (if present).
|
|
17624
|
+
// Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a
|
|
17625
|
+
// special case interpreted as "the machine from which the URL is being interpreted".
|
|
17626
|
+
const scheme = path.slice(0, schemeEnd);
|
|
17627
|
+
const authority = path.slice(authorityStart, authorityEnd);
|
|
17628
|
+
if (scheme === "file" &&
|
|
17629
|
+
(authority === "" || authority === "localhost") &&
|
|
17630
|
+
isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
|
|
17631
|
+
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
|
|
17632
|
+
if (volumeSeparatorEnd !== -1) {
|
|
17633
|
+
if (path.charCodeAt(volumeSeparatorEnd) === 47 /* CharacterCodes.slash */) {
|
|
17634
|
+
// URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
|
|
17635
|
+
return ~(volumeSeparatorEnd + 1);
|
|
17636
|
+
}
|
|
17637
|
+
if (volumeSeparatorEnd === path.length) {
|
|
17638
|
+
// URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a"
|
|
17639
|
+
// but not "file:///c:d" or "file:///c%3ad"
|
|
17640
|
+
return ~volumeSeparatorEnd;
|
|
17641
|
+
}
|
|
17642
|
+
}
|
|
17643
|
+
}
|
|
17644
|
+
return ~(authorityEnd + 1); // URL: "file://server/", "http://server/"
|
|
17645
|
+
}
|
|
17646
|
+
return ~path.length; // URL: "file://server", "http://server"
|
|
17647
|
+
}
|
|
17648
|
+
// relative
|
|
17649
|
+
return 0;
|
|
17650
|
+
}
|
|
17651
|
+
|
|
17652
|
+
/**
|
|
17653
|
+
* AST types
|
|
17654
|
+
*/
|
|
17655
|
+
var SyntaxKind;
|
|
17656
|
+
(function (SyntaxKind) {
|
|
17657
|
+
SyntaxKind[SyntaxKind["TypeSpecScript"] = 0] = "TypeSpecScript";
|
|
17658
|
+
/** @deprecated Use TypeSpecScript */
|
|
17659
|
+
SyntaxKind[SyntaxKind["CadlScript"] = 0] = "CadlScript";
|
|
17660
|
+
SyntaxKind[SyntaxKind["JsSourceFile"] = 1] = "JsSourceFile";
|
|
17661
|
+
SyntaxKind[SyntaxKind["ImportStatement"] = 2] = "ImportStatement";
|
|
17662
|
+
SyntaxKind[SyntaxKind["Identifier"] = 3] = "Identifier";
|
|
17663
|
+
SyntaxKind[SyntaxKind["AugmentDecoratorStatement"] = 4] = "AugmentDecoratorStatement";
|
|
17664
|
+
SyntaxKind[SyntaxKind["DecoratorExpression"] = 5] = "DecoratorExpression";
|
|
17665
|
+
SyntaxKind[SyntaxKind["DirectiveExpression"] = 6] = "DirectiveExpression";
|
|
17666
|
+
SyntaxKind[SyntaxKind["MemberExpression"] = 7] = "MemberExpression";
|
|
17667
|
+
SyntaxKind[SyntaxKind["NamespaceStatement"] = 8] = "NamespaceStatement";
|
|
17668
|
+
SyntaxKind[SyntaxKind["UsingStatement"] = 9] = "UsingStatement";
|
|
17669
|
+
SyntaxKind[SyntaxKind["OperationStatement"] = 10] = "OperationStatement";
|
|
17670
|
+
SyntaxKind[SyntaxKind["OperationSignatureDeclaration"] = 11] = "OperationSignatureDeclaration";
|
|
17671
|
+
SyntaxKind[SyntaxKind["OperationSignatureReference"] = 12] = "OperationSignatureReference";
|
|
17672
|
+
SyntaxKind[SyntaxKind["ModelStatement"] = 13] = "ModelStatement";
|
|
17673
|
+
SyntaxKind[SyntaxKind["ModelExpression"] = 14] = "ModelExpression";
|
|
17674
|
+
SyntaxKind[SyntaxKind["ModelProperty"] = 15] = "ModelProperty";
|
|
17675
|
+
SyntaxKind[SyntaxKind["ModelSpreadProperty"] = 16] = "ModelSpreadProperty";
|
|
17676
|
+
SyntaxKind[SyntaxKind["ScalarStatement"] = 17] = "ScalarStatement";
|
|
17677
|
+
SyntaxKind[SyntaxKind["InterfaceStatement"] = 18] = "InterfaceStatement";
|
|
17678
|
+
SyntaxKind[SyntaxKind["UnionStatement"] = 19] = "UnionStatement";
|
|
17679
|
+
SyntaxKind[SyntaxKind["UnionVariant"] = 20] = "UnionVariant";
|
|
17680
|
+
SyntaxKind[SyntaxKind["EnumStatement"] = 21] = "EnumStatement";
|
|
17681
|
+
SyntaxKind[SyntaxKind["EnumMember"] = 22] = "EnumMember";
|
|
17682
|
+
SyntaxKind[SyntaxKind["EnumSpreadMember"] = 23] = "EnumSpreadMember";
|
|
17683
|
+
SyntaxKind[SyntaxKind["AliasStatement"] = 24] = "AliasStatement";
|
|
17684
|
+
SyntaxKind[SyntaxKind["DecoratorDeclarationStatement"] = 25] = "DecoratorDeclarationStatement";
|
|
17685
|
+
SyntaxKind[SyntaxKind["FunctionDeclarationStatement"] = 26] = "FunctionDeclarationStatement";
|
|
17686
|
+
SyntaxKind[SyntaxKind["FunctionParameter"] = 27] = "FunctionParameter";
|
|
17687
|
+
SyntaxKind[SyntaxKind["UnionExpression"] = 28] = "UnionExpression";
|
|
17688
|
+
SyntaxKind[SyntaxKind["IntersectionExpression"] = 29] = "IntersectionExpression";
|
|
17689
|
+
SyntaxKind[SyntaxKind["TupleExpression"] = 30] = "TupleExpression";
|
|
17690
|
+
SyntaxKind[SyntaxKind["ArrayExpression"] = 31] = "ArrayExpression";
|
|
17691
|
+
SyntaxKind[SyntaxKind["StringLiteral"] = 32] = "StringLiteral";
|
|
17692
|
+
SyntaxKind[SyntaxKind["NumericLiteral"] = 33] = "NumericLiteral";
|
|
17693
|
+
SyntaxKind[SyntaxKind["BooleanLiteral"] = 34] = "BooleanLiteral";
|
|
17694
|
+
SyntaxKind[SyntaxKind["StringTemplateExpression"] = 35] = "StringTemplateExpression";
|
|
17695
|
+
SyntaxKind[SyntaxKind["StringTemplateHead"] = 36] = "StringTemplateHead";
|
|
17696
|
+
SyntaxKind[SyntaxKind["StringTemplateMiddle"] = 37] = "StringTemplateMiddle";
|
|
17697
|
+
SyntaxKind[SyntaxKind["StringTemplateTail"] = 38] = "StringTemplateTail";
|
|
17698
|
+
SyntaxKind[SyntaxKind["StringTemplateSpan"] = 39] = "StringTemplateSpan";
|
|
17699
|
+
SyntaxKind[SyntaxKind["ExternKeyword"] = 40] = "ExternKeyword";
|
|
17700
|
+
SyntaxKind[SyntaxKind["VoidKeyword"] = 41] = "VoidKeyword";
|
|
17701
|
+
SyntaxKind[SyntaxKind["NeverKeyword"] = 42] = "NeverKeyword";
|
|
17702
|
+
SyntaxKind[SyntaxKind["UnknownKeyword"] = 43] = "UnknownKeyword";
|
|
17703
|
+
SyntaxKind[SyntaxKind["ValueOfExpression"] = 44] = "ValueOfExpression";
|
|
17704
|
+
SyntaxKind[SyntaxKind["TypeReference"] = 45] = "TypeReference";
|
|
17705
|
+
SyntaxKind[SyntaxKind["ProjectionReference"] = 46] = "ProjectionReference";
|
|
17706
|
+
SyntaxKind[SyntaxKind["TemplateParameterDeclaration"] = 47] = "TemplateParameterDeclaration";
|
|
17707
|
+
SyntaxKind[SyntaxKind["EmptyStatement"] = 48] = "EmptyStatement";
|
|
17708
|
+
SyntaxKind[SyntaxKind["InvalidStatement"] = 49] = "InvalidStatement";
|
|
17709
|
+
SyntaxKind[SyntaxKind["LineComment"] = 50] = "LineComment";
|
|
17710
|
+
SyntaxKind[SyntaxKind["BlockComment"] = 51] = "BlockComment";
|
|
17711
|
+
SyntaxKind[SyntaxKind["Doc"] = 52] = "Doc";
|
|
17712
|
+
SyntaxKind[SyntaxKind["DocText"] = 53] = "DocText";
|
|
17713
|
+
SyntaxKind[SyntaxKind["DocParamTag"] = 54] = "DocParamTag";
|
|
17714
|
+
SyntaxKind[SyntaxKind["DocPropTag"] = 55] = "DocPropTag";
|
|
17715
|
+
SyntaxKind[SyntaxKind["DocReturnsTag"] = 56] = "DocReturnsTag";
|
|
17716
|
+
SyntaxKind[SyntaxKind["DocErrorsTag"] = 57] = "DocErrorsTag";
|
|
17717
|
+
SyntaxKind[SyntaxKind["DocTemplateTag"] = 58] = "DocTemplateTag";
|
|
17718
|
+
SyntaxKind[SyntaxKind["DocUnknownTag"] = 59] = "DocUnknownTag";
|
|
17719
|
+
SyntaxKind[SyntaxKind["Projection"] = 60] = "Projection";
|
|
17720
|
+
SyntaxKind[SyntaxKind["ProjectionParameterDeclaration"] = 61] = "ProjectionParameterDeclaration";
|
|
17721
|
+
SyntaxKind[SyntaxKind["ProjectionModelSelector"] = 62] = "ProjectionModelSelector";
|
|
17722
|
+
SyntaxKind[SyntaxKind["ProjectionModelPropertySelector"] = 63] = "ProjectionModelPropertySelector";
|
|
17723
|
+
SyntaxKind[SyntaxKind["ProjectionScalarSelector"] = 64] = "ProjectionScalarSelector";
|
|
17724
|
+
SyntaxKind[SyntaxKind["ProjectionOperationSelector"] = 65] = "ProjectionOperationSelector";
|
|
17725
|
+
SyntaxKind[SyntaxKind["ProjectionUnionSelector"] = 66] = "ProjectionUnionSelector";
|
|
17726
|
+
SyntaxKind[SyntaxKind["ProjectionUnionVariantSelector"] = 67] = "ProjectionUnionVariantSelector";
|
|
17727
|
+
SyntaxKind[SyntaxKind["ProjectionInterfaceSelector"] = 68] = "ProjectionInterfaceSelector";
|
|
17728
|
+
SyntaxKind[SyntaxKind["ProjectionEnumSelector"] = 69] = "ProjectionEnumSelector";
|
|
17729
|
+
SyntaxKind[SyntaxKind["ProjectionEnumMemberSelector"] = 70] = "ProjectionEnumMemberSelector";
|
|
17730
|
+
SyntaxKind[SyntaxKind["ProjectionExpressionStatement"] = 71] = "ProjectionExpressionStatement";
|
|
17731
|
+
SyntaxKind[SyntaxKind["ProjectionIfExpression"] = 72] = "ProjectionIfExpression";
|
|
17732
|
+
SyntaxKind[SyntaxKind["ProjectionBlockExpression"] = 73] = "ProjectionBlockExpression";
|
|
17733
|
+
SyntaxKind[SyntaxKind["ProjectionMemberExpression"] = 74] = "ProjectionMemberExpression";
|
|
17734
|
+
SyntaxKind[SyntaxKind["ProjectionLogicalExpression"] = 75] = "ProjectionLogicalExpression";
|
|
17735
|
+
SyntaxKind[SyntaxKind["ProjectionEqualityExpression"] = 76] = "ProjectionEqualityExpression";
|
|
17736
|
+
SyntaxKind[SyntaxKind["ProjectionUnaryExpression"] = 77] = "ProjectionUnaryExpression";
|
|
17737
|
+
SyntaxKind[SyntaxKind["ProjectionRelationalExpression"] = 78] = "ProjectionRelationalExpression";
|
|
17738
|
+
SyntaxKind[SyntaxKind["ProjectionArithmeticExpression"] = 79] = "ProjectionArithmeticExpression";
|
|
17739
|
+
SyntaxKind[SyntaxKind["ProjectionCallExpression"] = 80] = "ProjectionCallExpression";
|
|
17740
|
+
SyntaxKind[SyntaxKind["ProjectionLambdaExpression"] = 81] = "ProjectionLambdaExpression";
|
|
17741
|
+
SyntaxKind[SyntaxKind["ProjectionLambdaParameterDeclaration"] = 82] = "ProjectionLambdaParameterDeclaration";
|
|
17742
|
+
SyntaxKind[SyntaxKind["ProjectionModelExpression"] = 83] = "ProjectionModelExpression";
|
|
17743
|
+
SyntaxKind[SyntaxKind["ProjectionModelProperty"] = 84] = "ProjectionModelProperty";
|
|
17744
|
+
SyntaxKind[SyntaxKind["ProjectionModelSpreadProperty"] = 85] = "ProjectionModelSpreadProperty";
|
|
17745
|
+
SyntaxKind[SyntaxKind["ProjectionSpreadProperty"] = 86] = "ProjectionSpreadProperty";
|
|
17746
|
+
SyntaxKind[SyntaxKind["ProjectionTupleExpression"] = 87] = "ProjectionTupleExpression";
|
|
17747
|
+
SyntaxKind[SyntaxKind["ProjectionStatement"] = 88] = "ProjectionStatement";
|
|
17748
|
+
SyntaxKind[SyntaxKind["ProjectionDecoratorReferenceExpression"] = 89] = "ProjectionDecoratorReferenceExpression";
|
|
17749
|
+
SyntaxKind[SyntaxKind["Return"] = 90] = "Return";
|
|
17750
|
+
SyntaxKind[SyntaxKind["JsNamespaceDeclaration"] = 91] = "JsNamespaceDeclaration";
|
|
17751
|
+
SyntaxKind[SyntaxKind["TemplateArgument"] = 92] = "TemplateArgument";
|
|
17752
|
+
SyntaxKind[SyntaxKind["TypeOfExpression"] = 93] = "TypeOfExpression";
|
|
17753
|
+
SyntaxKind[SyntaxKind["ObjectLiteral"] = 94] = "ObjectLiteral";
|
|
17754
|
+
SyntaxKind[SyntaxKind["ObjectLiteralProperty"] = 95] = "ObjectLiteralProperty";
|
|
17755
|
+
SyntaxKind[SyntaxKind["ObjectLiteralSpreadProperty"] = 96] = "ObjectLiteralSpreadProperty";
|
|
17756
|
+
SyntaxKind[SyntaxKind["ArrayLiteral"] = 97] = "ArrayLiteral";
|
|
17757
|
+
SyntaxKind[SyntaxKind["ConstStatement"] = 98] = "ConstStatement";
|
|
17758
|
+
SyntaxKind[SyntaxKind["CallExpression"] = 99] = "CallExpression";
|
|
17759
|
+
SyntaxKind[SyntaxKind["ScalarConstructor"] = 100] = "ScalarConstructor";
|
|
17760
|
+
})(SyntaxKind || (SyntaxKind = {}));
|
|
17761
|
+
var IdentifierKind;
|
|
17762
|
+
(function (IdentifierKind) {
|
|
17763
|
+
IdentifierKind[IdentifierKind["TypeReference"] = 0] = "TypeReference";
|
|
17764
|
+
IdentifierKind[IdentifierKind["TemplateArgument"] = 1] = "TemplateArgument";
|
|
17765
|
+
IdentifierKind[IdentifierKind["Decorator"] = 2] = "Decorator";
|
|
17766
|
+
IdentifierKind[IdentifierKind["Function"] = 3] = "Function";
|
|
17767
|
+
IdentifierKind[IdentifierKind["Using"] = 4] = "Using";
|
|
17768
|
+
IdentifierKind[IdentifierKind["Declaration"] = 5] = "Declaration";
|
|
17769
|
+
IdentifierKind[IdentifierKind["ModelExpressionProperty"] = 6] = "ModelExpressionProperty";
|
|
17770
|
+
IdentifierKind[IdentifierKind["ModelStatementProperty"] = 7] = "ModelStatementProperty";
|
|
17771
|
+
IdentifierKind[IdentifierKind["ObjectLiteralProperty"] = 8] = "ObjectLiteralProperty";
|
|
17772
|
+
IdentifierKind[IdentifierKind["Other"] = 9] = "Other";
|
|
17773
|
+
})(IdentifierKind || (IdentifierKind = {}));
|
|
17774
|
+
/** Used to explicitly specify that a diagnostic has no target. */
|
|
17775
|
+
const NoTarget = Symbol.for("NoTarget");
|
|
17776
|
+
var ListenerFlow;
|
|
17777
|
+
(function (ListenerFlow) {
|
|
17778
|
+
/**
|
|
17779
|
+
* Do not navigate any containing or referenced type.
|
|
17780
|
+
*/
|
|
17781
|
+
ListenerFlow[ListenerFlow["NoRecursion"] = 1] = "NoRecursion";
|
|
17782
|
+
})(ListenerFlow || (ListenerFlow = {}));
|
|
17783
|
+
|
|
17784
|
+
let manifest;
|
|
17785
|
+
try {
|
|
17786
|
+
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
17787
|
+
// @ts-ignore
|
|
17788
|
+
manifest = (await import('../manifest-1IDK9ZR4.js')).default;
|
|
17789
|
+
}
|
|
17790
|
+
catch {
|
|
17791
|
+
const name = "../dist/manifest.js";
|
|
17792
|
+
manifest = (await import(/* @vite-ignore */ /* webpackIgnore: true */ name)).default;
|
|
17793
|
+
}
|
|
17794
|
+
manifest.version;
|
|
17795
|
+
|
|
17796
|
+
/**
|
|
17797
|
+
* Recursively calls Object.freeze such that all objects and arrays
|
|
17798
|
+
* referenced are frozen.
|
|
17799
|
+
*
|
|
17800
|
+
* Does not support cycles. Intended to be used only on plain data that can
|
|
17801
|
+
* be directly represented in JSON.
|
|
17802
|
+
*/
|
|
17803
|
+
function deepFreeze(value) {
|
|
17804
|
+
if (Array.isArray(value)) {
|
|
17805
|
+
value.forEach(deepFreeze);
|
|
17806
|
+
}
|
|
17807
|
+
else if (typeof value === "object") {
|
|
17808
|
+
for (const prop in value) {
|
|
17809
|
+
deepFreeze(value[prop]);
|
|
17810
|
+
}
|
|
17811
|
+
}
|
|
17812
|
+
return Object.freeze(value);
|
|
17813
|
+
}
|
|
17814
|
+
/**
|
|
17815
|
+
* Check if argument is not undefined.
|
|
17816
|
+
*/
|
|
17817
|
+
function isDefined(arg) {
|
|
17818
|
+
return arg !== undefined;
|
|
17819
|
+
}
|
|
17820
|
+
/**
|
|
17821
|
+
* Casts away readonly typing.
|
|
17822
|
+
*
|
|
17823
|
+
* Use it like this when it is safe to override readonly typing:
|
|
17824
|
+
* mutate(item).prop = value;
|
|
17825
|
+
*/
|
|
17826
|
+
function mutate(value) {
|
|
17827
|
+
return value;
|
|
17828
|
+
}
|
|
17829
|
+
|
|
17547
17830
|
/**
|
|
17548
17831
|
* Create a new diagnostics creator.
|
|
17549
17832
|
* @param diagnostics Map of the potential diagnostics.
|
|
@@ -17577,8 +17860,11 @@ function createDiagnosticCreator(diagnostics, libraryName) {
|
|
|
17577
17860
|
message: messageStr,
|
|
17578
17861
|
target: diagnostic.target,
|
|
17579
17862
|
};
|
|
17863
|
+
if (diagnosticDef.url) {
|
|
17864
|
+
mutate(result).url = diagnosticDef.url;
|
|
17865
|
+
}
|
|
17580
17866
|
if (diagnostic.codefixes) {
|
|
17581
|
-
result.codefixes = diagnostic.codefixes;
|
|
17867
|
+
mutate(result).codefixes = diagnostic.codefixes;
|
|
17582
17868
|
}
|
|
17583
17869
|
return result;
|
|
17584
17870
|
}
|
|
@@ -17664,6 +17950,8 @@ const diagnostics = {
|
|
|
17664
17950
|
},
|
|
17665
17951
|
"triple-quote-indent": {
|
|
17666
17952
|
severity: "error",
|
|
17953
|
+
description: "Report when a triple-quoted string has lines with less indentation as the closing triple quotes.",
|
|
17954
|
+
url: "https://typespec.io/docs/standard-library/diags/triple-quote-indent",
|
|
17667
17955
|
messages: {
|
|
17668
17956
|
default: "All lines in triple-quoted string lines must have the same indentation as closing triple quotes.",
|
|
17669
17957
|
},
|
|
@@ -18201,6 +18489,12 @@ const diagnostics = {
|
|
|
18201
18489
|
default: paramMessage `Path "${"path"}" cannot be relative. Use {cwd} or {project-root} to specify what the path should be relative to.`,
|
|
18202
18490
|
},
|
|
18203
18491
|
},
|
|
18492
|
+
"config-invalid-name": {
|
|
18493
|
+
severity: "error",
|
|
18494
|
+
messages: {
|
|
18495
|
+
default: paramMessage `The configuration name "${"name"}" is invalid because it contains a dot ("."). Using a dot will conflict with using nested configuration values.`,
|
|
18496
|
+
},
|
|
18497
|
+
},
|
|
18204
18498
|
"path-unix-style": {
|
|
18205
18499
|
severity: "warning",
|
|
18206
18500
|
messages: {
|
|
@@ -18243,8 +18537,7 @@ const diagnostics = {
|
|
|
18243
18537
|
"library-invalid": {
|
|
18244
18538
|
severity: "error",
|
|
18245
18539
|
messages: {
|
|
18246
|
-
|
|
18247
|
-
default: paramMessage `Library "${"path"}" has an invalid main file.`,
|
|
18540
|
+
default: paramMessage `Library "${"path"}" is invalid: ${"message"}`,
|
|
18248
18541
|
},
|
|
18249
18542
|
},
|
|
18250
18543
|
"incompatible-library": {
|
|
@@ -18499,199 +18792,94 @@ const diagnostics = {
|
|
|
18499
18792
|
},
|
|
18500
18793
|
},
|
|
18501
18794
|
"add-parameter": {
|
|
18502
|
-
severity: "error",
|
|
18503
|
-
messages: {
|
|
18504
|
-
default: "Cannot add a parameter to anything except an operation statement.",
|
|
18505
|
-
},
|
|
18506
|
-
},
|
|
18507
|
-
"add-model-property": {
|
|
18508
|
-
severity: "error",
|
|
18509
|
-
messages: {
|
|
18510
|
-
default: "Cannot add a model property to anything except a model statement.",
|
|
18511
|
-
},
|
|
18512
|
-
},
|
|
18513
|
-
"add-model-property-fail": {
|
|
18514
|
-
severity: "error",
|
|
18515
|
-
messages: {
|
|
18516
|
-
default: paramMessage `Could not add property/parameter "${"propertyName"}" of type "${"propertyTypeName"}"`,
|
|
18517
|
-
},
|
|
18518
|
-
},
|
|
18519
|
-
"add-response-type": {
|
|
18520
|
-
severity: "error",
|
|
18521
|
-
messages: {
|
|
18522
|
-
default: paramMessage `Could not add response type "${"responseTypeName"}" to operation ${"operationName"}"`,
|
|
18523
|
-
},
|
|
18524
|
-
},
|
|
18525
|
-
"circular-base-type": {
|
|
18526
|
-
severity: "error",
|
|
18527
|
-
messages: {
|
|
18528
|
-
default: paramMessage `Type '${"typeName"}' recursively references itself as a base type.`,
|
|
18529
|
-
},
|
|
18530
|
-
},
|
|
18531
|
-
"circular-constraint": {
|
|
18532
|
-
severity: "error",
|
|
18533
|
-
messages: {
|
|
18534
|
-
default: paramMessage `Type parameter '${"typeName"}' has a circular constraint.`,
|
|
18535
|
-
},
|
|
18536
|
-
},
|
|
18537
|
-
"circular-op-signature": {
|
|
18538
|
-
severity: "error",
|
|
18539
|
-
messages: {
|
|
18540
|
-
default: paramMessage `Operation '${"typeName"}' recursively references itself.`,
|
|
18541
|
-
},
|
|
18542
|
-
},
|
|
18543
|
-
"circular-alias-type": {
|
|
18544
|
-
severity: "error",
|
|
18545
|
-
messages: {
|
|
18546
|
-
default: paramMessage `Alias type '${"typeName"}' recursively references itself.`,
|
|
18547
|
-
},
|
|
18548
|
-
},
|
|
18549
|
-
"circular-const": {
|
|
18550
|
-
severity: "error",
|
|
18551
|
-
messages: {
|
|
18552
|
-
default: paramMessage `const '${"name"}' recursively references itself.`,
|
|
18553
|
-
},
|
|
18554
|
-
},
|
|
18555
|
-
"circular-prop": {
|
|
18556
|
-
severity: "error",
|
|
18557
|
-
messages: {
|
|
18558
|
-
default: paramMessage `Property '${"propName"}' recursively references itself.`,
|
|
18559
|
-
},
|
|
18560
|
-
},
|
|
18561
|
-
"conflict-marker": {
|
|
18562
|
-
severity: "error",
|
|
18563
|
-
messages: {
|
|
18564
|
-
default: "Conflict marker encountered.",
|
|
18565
|
-
},
|
|
18566
|
-
},
|
|
18567
|
-
// #region CLI
|
|
18568
|
-
"no-compatible-vs-installed": {
|
|
18569
|
-
severity: "error",
|
|
18570
|
-
messages: {
|
|
18571
|
-
default: "No compatible version of Visual Studio found.",
|
|
18572
|
-
},
|
|
18573
|
-
},
|
|
18574
|
-
"vs-extension-windows-only": {
|
|
18575
|
-
severity: "error",
|
|
18576
|
-
messages: {
|
|
18577
|
-
default: "Visual Studio extension is not supported on non-Windows.",
|
|
18578
|
-
},
|
|
18579
|
-
},
|
|
18580
|
-
"vscode-in-path": {
|
|
18581
|
-
severity: "error",
|
|
18582
|
-
messages: {
|
|
18583
|
-
default: "Couldn't find VS Code 'code' command in PATH. Make sure you have the VS Code executable added to the system PATH.",
|
|
18584
|
-
osx: "Couldn't find VS Code 'code' command in PATH. Make sure you have the VS Code executable added to the system PATH.\nSee instruction for Mac OS here https://code.visualstudio.com/docs/setup/mac",
|
|
18585
|
-
},
|
|
18586
|
-
},
|
|
18587
|
-
// #endregion CLI
|
|
18588
|
-
};
|
|
18589
|
-
const { createDiagnostic, reportDiagnostic } = createDiagnosticCreator(diagnostics);
|
|
18590
|
-
|
|
18591
|
-
// Forked from https://github.com/microsoft/TypeScript/blob/663b19fe4a7c4d4ddaa61aedadd28da06acd27b6/src/compiler/path.ts
|
|
18592
|
-
/**
|
|
18593
|
-
* Internally, we represent paths as strings with '/' as the directory separator.
|
|
18594
|
-
* When we make system calls (eg: LanguageServiceHost.getDirectory()),
|
|
18595
|
-
* we expect the host to correctly handle paths in our specified format.
|
|
18596
|
-
*/
|
|
18597
|
-
const directorySeparator = "/";
|
|
18598
|
-
const altDirectorySeparator = "\\";
|
|
18599
|
-
const urlSchemeSeparator = "://";
|
|
18600
|
-
/*
|
|
18601
|
-
* Determines whether a path starts with an absolute path component (i.e. `/`, `c:/`, `file://`, etc.).
|
|
18602
|
-
*
|
|
18603
|
-
* ```ts
|
|
18604
|
-
* // POSIX
|
|
18605
|
-
* isPathAbsolute("/path/to/file.ext") === true
|
|
18606
|
-
* // DOS
|
|
18607
|
-
* isPathAbsolute("c:/path/to/file.ext") === true
|
|
18608
|
-
* // URL
|
|
18609
|
-
* isPathAbsolute("file:///path/to/file.ext") === true
|
|
18610
|
-
* // Non-absolute
|
|
18611
|
-
* isPathAbsolute("path/to/file.ext") === false
|
|
18612
|
-
* isPathAbsolute("./path/to/file.ext") === false
|
|
18613
|
-
* ```
|
|
18614
|
-
*/
|
|
18615
|
-
function isPathAbsolute(path) {
|
|
18616
|
-
return getEncodedRootLength(path) !== 0;
|
|
18617
|
-
}
|
|
18618
|
-
//#endregion
|
|
18619
|
-
//#region Path Parsing
|
|
18620
|
-
function isVolumeCharacter(charCode) {
|
|
18621
|
-
return ((charCode >= 97 /* CharacterCodes.a */ && charCode <= 122 /* CharacterCodes.z */) ||
|
|
18622
|
-
(charCode >= 65 /* CharacterCodes.A */ && charCode <= 90 /* CharacterCodes.Z */));
|
|
18623
|
-
}
|
|
18624
|
-
function getFileUrlVolumeSeparatorEnd(url, start) {
|
|
18625
|
-
const ch0 = url.charCodeAt(start);
|
|
18626
|
-
if (ch0 === 58 /* CharacterCodes.colon */)
|
|
18627
|
-
return start + 1;
|
|
18628
|
-
if (ch0 === 37 /* CharacterCodes.percent */ && url.charCodeAt(start + 1) === 51 /* CharacterCodes._3 */) {
|
|
18629
|
-
const ch2 = url.charCodeAt(start + 2);
|
|
18630
|
-
if (ch2 === 97 /* CharacterCodes.a */ || ch2 === 65 /* CharacterCodes.A */)
|
|
18631
|
-
return start + 3;
|
|
18632
|
-
}
|
|
18633
|
-
return -1;
|
|
18634
|
-
}
|
|
18635
|
-
/**
|
|
18636
|
-
* Returns length of the root part of a path or URL (i.e. length of "/", "x:/", "//server/share/, file:///user/files").
|
|
18637
|
-
* If the root is part of a URL, the twos-complement of the root length is returned.
|
|
18638
|
-
*/
|
|
18639
|
-
function getEncodedRootLength(path) {
|
|
18640
|
-
if (!path)
|
|
18641
|
-
return 0;
|
|
18642
|
-
const ch0 = path.charCodeAt(0);
|
|
18643
|
-
// POSIX or UNC
|
|
18644
|
-
if (ch0 === 47 /* CharacterCodes.slash */ || ch0 === 92 /* CharacterCodes.backslash */) {
|
|
18645
|
-
if (path.charCodeAt(1) !== ch0)
|
|
18646
|
-
return 1; // POSIX: "/" (or non-normalized "\")
|
|
18647
|
-
const p1 = path.indexOf(ch0 === 47 /* CharacterCodes.slash */ ? directorySeparator : altDirectorySeparator, 2);
|
|
18648
|
-
if (p1 < 0)
|
|
18649
|
-
return path.length; // UNC: "//server" or "\\server"
|
|
18650
|
-
return p1 + 1; // UNC: "//server/" or "\\server\"
|
|
18651
|
-
}
|
|
18652
|
-
// DOS
|
|
18653
|
-
if (isVolumeCharacter(ch0) && path.charCodeAt(1) === 58 /* CharacterCodes.colon */) {
|
|
18654
|
-
const ch2 = path.charCodeAt(2);
|
|
18655
|
-
if (ch2 === 47 /* CharacterCodes.slash */ || ch2 === 92 /* CharacterCodes.backslash */)
|
|
18656
|
-
return 3; // DOS: "c:/" or "c:\"
|
|
18657
|
-
if (path.length === 2)
|
|
18658
|
-
return 2; // DOS: "c:" (but not "c:d")
|
|
18659
|
-
}
|
|
18660
|
-
// URL
|
|
18661
|
-
const schemeEnd = path.indexOf(urlSchemeSeparator);
|
|
18662
|
-
if (schemeEnd !== -1) {
|
|
18663
|
-
const authorityStart = schemeEnd + urlSchemeSeparator.length;
|
|
18664
|
-
const authorityEnd = path.indexOf(directorySeparator, authorityStart);
|
|
18665
|
-
if (authorityEnd !== -1) {
|
|
18666
|
-
// URL: "file:///", "file://server/", "file://server/path"
|
|
18667
|
-
// For local "file" URLs, include the leading DOS volume (if present).
|
|
18668
|
-
// Per https://www.ietf.org/rfc/rfc1738.txt, a host of "" or "localhost" is a
|
|
18669
|
-
// special case interpreted as "the machine from which the URL is being interpreted".
|
|
18670
|
-
const scheme = path.slice(0, schemeEnd);
|
|
18671
|
-
const authority = path.slice(authorityStart, authorityEnd);
|
|
18672
|
-
if (scheme === "file" &&
|
|
18673
|
-
(authority === "" || authority === "localhost") &&
|
|
18674
|
-
isVolumeCharacter(path.charCodeAt(authorityEnd + 1))) {
|
|
18675
|
-
const volumeSeparatorEnd = getFileUrlVolumeSeparatorEnd(path, authorityEnd + 2);
|
|
18676
|
-
if (volumeSeparatorEnd !== -1) {
|
|
18677
|
-
if (path.charCodeAt(volumeSeparatorEnd) === 47 /* CharacterCodes.slash */) {
|
|
18678
|
-
// URL: "file:///c:/", "file://localhost/c:/", "file:///c%3a/", "file://localhost/c%3a/"
|
|
18679
|
-
return ~(volumeSeparatorEnd + 1);
|
|
18680
|
-
}
|
|
18681
|
-
if (volumeSeparatorEnd === path.length) {
|
|
18682
|
-
// URL: "file:///c:", "file://localhost/c:", "file:///c$3a", "file://localhost/c%3a"
|
|
18683
|
-
// but not "file:///c:d" or "file:///c%3ad"
|
|
18684
|
-
return ~volumeSeparatorEnd;
|
|
18685
|
-
}
|
|
18686
|
-
}
|
|
18687
|
-
}
|
|
18688
|
-
return ~(authorityEnd + 1); // URL: "file://server/", "http://server/"
|
|
18689
|
-
}
|
|
18690
|
-
return ~path.length; // URL: "file://server", "http://server"
|
|
18691
|
-
}
|
|
18692
|
-
// relative
|
|
18693
|
-
return 0;
|
|
18694
|
-
}
|
|
18795
|
+
severity: "error",
|
|
18796
|
+
messages: {
|
|
18797
|
+
default: "Cannot add a parameter to anything except an operation statement.",
|
|
18798
|
+
},
|
|
18799
|
+
},
|
|
18800
|
+
"add-model-property": {
|
|
18801
|
+
severity: "error",
|
|
18802
|
+
messages: {
|
|
18803
|
+
default: "Cannot add a model property to anything except a model statement.",
|
|
18804
|
+
},
|
|
18805
|
+
},
|
|
18806
|
+
"add-model-property-fail": {
|
|
18807
|
+
severity: "error",
|
|
18808
|
+
messages: {
|
|
18809
|
+
default: paramMessage `Could not add property/parameter "${"propertyName"}" of type "${"propertyTypeName"}"`,
|
|
18810
|
+
},
|
|
18811
|
+
},
|
|
18812
|
+
"add-response-type": {
|
|
18813
|
+
severity: "error",
|
|
18814
|
+
messages: {
|
|
18815
|
+
default: paramMessage `Could not add response type "${"responseTypeName"}" to operation ${"operationName"}"`,
|
|
18816
|
+
},
|
|
18817
|
+
},
|
|
18818
|
+
"circular-base-type": {
|
|
18819
|
+
severity: "error",
|
|
18820
|
+
messages: {
|
|
18821
|
+
default: paramMessage `Type '${"typeName"}' recursively references itself as a base type.`,
|
|
18822
|
+
},
|
|
18823
|
+
},
|
|
18824
|
+
"circular-constraint": {
|
|
18825
|
+
severity: "error",
|
|
18826
|
+
messages: {
|
|
18827
|
+
default: paramMessage `Type parameter '${"typeName"}' has a circular constraint.`,
|
|
18828
|
+
},
|
|
18829
|
+
},
|
|
18830
|
+
"circular-op-signature": {
|
|
18831
|
+
severity: "error",
|
|
18832
|
+
messages: {
|
|
18833
|
+
default: paramMessage `Operation '${"typeName"}' recursively references itself.`,
|
|
18834
|
+
},
|
|
18835
|
+
},
|
|
18836
|
+
"circular-alias-type": {
|
|
18837
|
+
severity: "error",
|
|
18838
|
+
messages: {
|
|
18839
|
+
default: paramMessage `Alias type '${"typeName"}' recursively references itself.`,
|
|
18840
|
+
},
|
|
18841
|
+
},
|
|
18842
|
+
"circular-const": {
|
|
18843
|
+
severity: "error",
|
|
18844
|
+
messages: {
|
|
18845
|
+
default: paramMessage `const '${"name"}' recursively references itself.`,
|
|
18846
|
+
},
|
|
18847
|
+
},
|
|
18848
|
+
"circular-prop": {
|
|
18849
|
+
severity: "error",
|
|
18850
|
+
messages: {
|
|
18851
|
+
default: paramMessage `Property '${"propName"}' recursively references itself.`,
|
|
18852
|
+
},
|
|
18853
|
+
},
|
|
18854
|
+
"conflict-marker": {
|
|
18855
|
+
severity: "error",
|
|
18856
|
+
messages: {
|
|
18857
|
+
default: "Conflict marker encountered.",
|
|
18858
|
+
},
|
|
18859
|
+
},
|
|
18860
|
+
// #region CLI
|
|
18861
|
+
"no-compatible-vs-installed": {
|
|
18862
|
+
severity: "error",
|
|
18863
|
+
messages: {
|
|
18864
|
+
default: "No compatible version of Visual Studio found.",
|
|
18865
|
+
},
|
|
18866
|
+
},
|
|
18867
|
+
"vs-extension-windows-only": {
|
|
18868
|
+
severity: "error",
|
|
18869
|
+
messages: {
|
|
18870
|
+
default: "Visual Studio extension is not supported on non-Windows.",
|
|
18871
|
+
},
|
|
18872
|
+
},
|
|
18873
|
+
"vscode-in-path": {
|
|
18874
|
+
severity: "error",
|
|
18875
|
+
messages: {
|
|
18876
|
+
default: "Couldn't find VS Code 'code' command in PATH. Make sure you have the VS Code executable added to the system PATH.",
|
|
18877
|
+
osx: "Couldn't find VS Code 'code' command in PATH. Make sure you have the VS Code executable added to the system PATH.\nSee instruction for Mac OS here https://code.visualstudio.com/docs/setup/mac",
|
|
18878
|
+
},
|
|
18879
|
+
},
|
|
18880
|
+
// #endregion CLI
|
|
18881
|
+
};
|
|
18882
|
+
const { createDiagnostic, reportDiagnostic } = createDiagnosticCreator(diagnostics);
|
|
18695
18883
|
|
|
18696
18884
|
var ajv = {exports: {}};
|
|
18697
18885
|
|
|
@@ -27341,138 +27529,6 @@ function findYamlNode(file, path, kind = "value") {
|
|
|
27341
27529
|
return current ?? undefined;
|
|
27342
27530
|
}
|
|
27343
27531
|
|
|
27344
|
-
/**
|
|
27345
|
-
* AST types
|
|
27346
|
-
*/
|
|
27347
|
-
var SyntaxKind;
|
|
27348
|
-
(function (SyntaxKind) {
|
|
27349
|
-
SyntaxKind[SyntaxKind["TypeSpecScript"] = 0] = "TypeSpecScript";
|
|
27350
|
-
/** @deprecated Use TypeSpecScript */
|
|
27351
|
-
SyntaxKind[SyntaxKind["CadlScript"] = 0] = "CadlScript";
|
|
27352
|
-
SyntaxKind[SyntaxKind["JsSourceFile"] = 1] = "JsSourceFile";
|
|
27353
|
-
SyntaxKind[SyntaxKind["ImportStatement"] = 2] = "ImportStatement";
|
|
27354
|
-
SyntaxKind[SyntaxKind["Identifier"] = 3] = "Identifier";
|
|
27355
|
-
SyntaxKind[SyntaxKind["AugmentDecoratorStatement"] = 4] = "AugmentDecoratorStatement";
|
|
27356
|
-
SyntaxKind[SyntaxKind["DecoratorExpression"] = 5] = "DecoratorExpression";
|
|
27357
|
-
SyntaxKind[SyntaxKind["DirectiveExpression"] = 6] = "DirectiveExpression";
|
|
27358
|
-
SyntaxKind[SyntaxKind["MemberExpression"] = 7] = "MemberExpression";
|
|
27359
|
-
SyntaxKind[SyntaxKind["NamespaceStatement"] = 8] = "NamespaceStatement";
|
|
27360
|
-
SyntaxKind[SyntaxKind["UsingStatement"] = 9] = "UsingStatement";
|
|
27361
|
-
SyntaxKind[SyntaxKind["OperationStatement"] = 10] = "OperationStatement";
|
|
27362
|
-
SyntaxKind[SyntaxKind["OperationSignatureDeclaration"] = 11] = "OperationSignatureDeclaration";
|
|
27363
|
-
SyntaxKind[SyntaxKind["OperationSignatureReference"] = 12] = "OperationSignatureReference";
|
|
27364
|
-
SyntaxKind[SyntaxKind["ModelStatement"] = 13] = "ModelStatement";
|
|
27365
|
-
SyntaxKind[SyntaxKind["ModelExpression"] = 14] = "ModelExpression";
|
|
27366
|
-
SyntaxKind[SyntaxKind["ModelProperty"] = 15] = "ModelProperty";
|
|
27367
|
-
SyntaxKind[SyntaxKind["ModelSpreadProperty"] = 16] = "ModelSpreadProperty";
|
|
27368
|
-
SyntaxKind[SyntaxKind["ScalarStatement"] = 17] = "ScalarStatement";
|
|
27369
|
-
SyntaxKind[SyntaxKind["InterfaceStatement"] = 18] = "InterfaceStatement";
|
|
27370
|
-
SyntaxKind[SyntaxKind["UnionStatement"] = 19] = "UnionStatement";
|
|
27371
|
-
SyntaxKind[SyntaxKind["UnionVariant"] = 20] = "UnionVariant";
|
|
27372
|
-
SyntaxKind[SyntaxKind["EnumStatement"] = 21] = "EnumStatement";
|
|
27373
|
-
SyntaxKind[SyntaxKind["EnumMember"] = 22] = "EnumMember";
|
|
27374
|
-
SyntaxKind[SyntaxKind["EnumSpreadMember"] = 23] = "EnumSpreadMember";
|
|
27375
|
-
SyntaxKind[SyntaxKind["AliasStatement"] = 24] = "AliasStatement";
|
|
27376
|
-
SyntaxKind[SyntaxKind["DecoratorDeclarationStatement"] = 25] = "DecoratorDeclarationStatement";
|
|
27377
|
-
SyntaxKind[SyntaxKind["FunctionDeclarationStatement"] = 26] = "FunctionDeclarationStatement";
|
|
27378
|
-
SyntaxKind[SyntaxKind["FunctionParameter"] = 27] = "FunctionParameter";
|
|
27379
|
-
SyntaxKind[SyntaxKind["UnionExpression"] = 28] = "UnionExpression";
|
|
27380
|
-
SyntaxKind[SyntaxKind["IntersectionExpression"] = 29] = "IntersectionExpression";
|
|
27381
|
-
SyntaxKind[SyntaxKind["TupleExpression"] = 30] = "TupleExpression";
|
|
27382
|
-
SyntaxKind[SyntaxKind["ArrayExpression"] = 31] = "ArrayExpression";
|
|
27383
|
-
SyntaxKind[SyntaxKind["StringLiteral"] = 32] = "StringLiteral";
|
|
27384
|
-
SyntaxKind[SyntaxKind["NumericLiteral"] = 33] = "NumericLiteral";
|
|
27385
|
-
SyntaxKind[SyntaxKind["BooleanLiteral"] = 34] = "BooleanLiteral";
|
|
27386
|
-
SyntaxKind[SyntaxKind["StringTemplateExpression"] = 35] = "StringTemplateExpression";
|
|
27387
|
-
SyntaxKind[SyntaxKind["StringTemplateHead"] = 36] = "StringTemplateHead";
|
|
27388
|
-
SyntaxKind[SyntaxKind["StringTemplateMiddle"] = 37] = "StringTemplateMiddle";
|
|
27389
|
-
SyntaxKind[SyntaxKind["StringTemplateTail"] = 38] = "StringTemplateTail";
|
|
27390
|
-
SyntaxKind[SyntaxKind["StringTemplateSpan"] = 39] = "StringTemplateSpan";
|
|
27391
|
-
SyntaxKind[SyntaxKind["ExternKeyword"] = 40] = "ExternKeyword";
|
|
27392
|
-
SyntaxKind[SyntaxKind["VoidKeyword"] = 41] = "VoidKeyword";
|
|
27393
|
-
SyntaxKind[SyntaxKind["NeverKeyword"] = 42] = "NeverKeyword";
|
|
27394
|
-
SyntaxKind[SyntaxKind["UnknownKeyword"] = 43] = "UnknownKeyword";
|
|
27395
|
-
SyntaxKind[SyntaxKind["ValueOfExpression"] = 44] = "ValueOfExpression";
|
|
27396
|
-
SyntaxKind[SyntaxKind["TypeReference"] = 45] = "TypeReference";
|
|
27397
|
-
SyntaxKind[SyntaxKind["ProjectionReference"] = 46] = "ProjectionReference";
|
|
27398
|
-
SyntaxKind[SyntaxKind["TemplateParameterDeclaration"] = 47] = "TemplateParameterDeclaration";
|
|
27399
|
-
SyntaxKind[SyntaxKind["EmptyStatement"] = 48] = "EmptyStatement";
|
|
27400
|
-
SyntaxKind[SyntaxKind["InvalidStatement"] = 49] = "InvalidStatement";
|
|
27401
|
-
SyntaxKind[SyntaxKind["LineComment"] = 50] = "LineComment";
|
|
27402
|
-
SyntaxKind[SyntaxKind["BlockComment"] = 51] = "BlockComment";
|
|
27403
|
-
SyntaxKind[SyntaxKind["Doc"] = 52] = "Doc";
|
|
27404
|
-
SyntaxKind[SyntaxKind["DocText"] = 53] = "DocText";
|
|
27405
|
-
SyntaxKind[SyntaxKind["DocParamTag"] = 54] = "DocParamTag";
|
|
27406
|
-
SyntaxKind[SyntaxKind["DocPropTag"] = 55] = "DocPropTag";
|
|
27407
|
-
SyntaxKind[SyntaxKind["DocReturnsTag"] = 56] = "DocReturnsTag";
|
|
27408
|
-
SyntaxKind[SyntaxKind["DocErrorsTag"] = 57] = "DocErrorsTag";
|
|
27409
|
-
SyntaxKind[SyntaxKind["DocTemplateTag"] = 58] = "DocTemplateTag";
|
|
27410
|
-
SyntaxKind[SyntaxKind["DocUnknownTag"] = 59] = "DocUnknownTag";
|
|
27411
|
-
SyntaxKind[SyntaxKind["Projection"] = 60] = "Projection";
|
|
27412
|
-
SyntaxKind[SyntaxKind["ProjectionParameterDeclaration"] = 61] = "ProjectionParameterDeclaration";
|
|
27413
|
-
SyntaxKind[SyntaxKind["ProjectionModelSelector"] = 62] = "ProjectionModelSelector";
|
|
27414
|
-
SyntaxKind[SyntaxKind["ProjectionModelPropertySelector"] = 63] = "ProjectionModelPropertySelector";
|
|
27415
|
-
SyntaxKind[SyntaxKind["ProjectionScalarSelector"] = 64] = "ProjectionScalarSelector";
|
|
27416
|
-
SyntaxKind[SyntaxKind["ProjectionOperationSelector"] = 65] = "ProjectionOperationSelector";
|
|
27417
|
-
SyntaxKind[SyntaxKind["ProjectionUnionSelector"] = 66] = "ProjectionUnionSelector";
|
|
27418
|
-
SyntaxKind[SyntaxKind["ProjectionUnionVariantSelector"] = 67] = "ProjectionUnionVariantSelector";
|
|
27419
|
-
SyntaxKind[SyntaxKind["ProjectionInterfaceSelector"] = 68] = "ProjectionInterfaceSelector";
|
|
27420
|
-
SyntaxKind[SyntaxKind["ProjectionEnumSelector"] = 69] = "ProjectionEnumSelector";
|
|
27421
|
-
SyntaxKind[SyntaxKind["ProjectionEnumMemberSelector"] = 70] = "ProjectionEnumMemberSelector";
|
|
27422
|
-
SyntaxKind[SyntaxKind["ProjectionExpressionStatement"] = 71] = "ProjectionExpressionStatement";
|
|
27423
|
-
SyntaxKind[SyntaxKind["ProjectionIfExpression"] = 72] = "ProjectionIfExpression";
|
|
27424
|
-
SyntaxKind[SyntaxKind["ProjectionBlockExpression"] = 73] = "ProjectionBlockExpression";
|
|
27425
|
-
SyntaxKind[SyntaxKind["ProjectionMemberExpression"] = 74] = "ProjectionMemberExpression";
|
|
27426
|
-
SyntaxKind[SyntaxKind["ProjectionLogicalExpression"] = 75] = "ProjectionLogicalExpression";
|
|
27427
|
-
SyntaxKind[SyntaxKind["ProjectionEqualityExpression"] = 76] = "ProjectionEqualityExpression";
|
|
27428
|
-
SyntaxKind[SyntaxKind["ProjectionUnaryExpression"] = 77] = "ProjectionUnaryExpression";
|
|
27429
|
-
SyntaxKind[SyntaxKind["ProjectionRelationalExpression"] = 78] = "ProjectionRelationalExpression";
|
|
27430
|
-
SyntaxKind[SyntaxKind["ProjectionArithmeticExpression"] = 79] = "ProjectionArithmeticExpression";
|
|
27431
|
-
SyntaxKind[SyntaxKind["ProjectionCallExpression"] = 80] = "ProjectionCallExpression";
|
|
27432
|
-
SyntaxKind[SyntaxKind["ProjectionLambdaExpression"] = 81] = "ProjectionLambdaExpression";
|
|
27433
|
-
SyntaxKind[SyntaxKind["ProjectionLambdaParameterDeclaration"] = 82] = "ProjectionLambdaParameterDeclaration";
|
|
27434
|
-
SyntaxKind[SyntaxKind["ProjectionModelExpression"] = 83] = "ProjectionModelExpression";
|
|
27435
|
-
SyntaxKind[SyntaxKind["ProjectionModelProperty"] = 84] = "ProjectionModelProperty";
|
|
27436
|
-
SyntaxKind[SyntaxKind["ProjectionModelSpreadProperty"] = 85] = "ProjectionModelSpreadProperty";
|
|
27437
|
-
SyntaxKind[SyntaxKind["ProjectionSpreadProperty"] = 86] = "ProjectionSpreadProperty";
|
|
27438
|
-
SyntaxKind[SyntaxKind["ProjectionTupleExpression"] = 87] = "ProjectionTupleExpression";
|
|
27439
|
-
SyntaxKind[SyntaxKind["ProjectionStatement"] = 88] = "ProjectionStatement";
|
|
27440
|
-
SyntaxKind[SyntaxKind["ProjectionDecoratorReferenceExpression"] = 89] = "ProjectionDecoratorReferenceExpression";
|
|
27441
|
-
SyntaxKind[SyntaxKind["Return"] = 90] = "Return";
|
|
27442
|
-
SyntaxKind[SyntaxKind["JsNamespaceDeclaration"] = 91] = "JsNamespaceDeclaration";
|
|
27443
|
-
SyntaxKind[SyntaxKind["TemplateArgument"] = 92] = "TemplateArgument";
|
|
27444
|
-
SyntaxKind[SyntaxKind["TypeOfExpression"] = 93] = "TypeOfExpression";
|
|
27445
|
-
SyntaxKind[SyntaxKind["ObjectLiteral"] = 94] = "ObjectLiteral";
|
|
27446
|
-
SyntaxKind[SyntaxKind["ObjectLiteralProperty"] = 95] = "ObjectLiteralProperty";
|
|
27447
|
-
SyntaxKind[SyntaxKind["ObjectLiteralSpreadProperty"] = 96] = "ObjectLiteralSpreadProperty";
|
|
27448
|
-
SyntaxKind[SyntaxKind["ArrayLiteral"] = 97] = "ArrayLiteral";
|
|
27449
|
-
SyntaxKind[SyntaxKind["ConstStatement"] = 98] = "ConstStatement";
|
|
27450
|
-
SyntaxKind[SyntaxKind["CallExpression"] = 99] = "CallExpression";
|
|
27451
|
-
SyntaxKind[SyntaxKind["ScalarConstructor"] = 100] = "ScalarConstructor";
|
|
27452
|
-
})(SyntaxKind || (SyntaxKind = {}));
|
|
27453
|
-
var IdentifierKind;
|
|
27454
|
-
(function (IdentifierKind) {
|
|
27455
|
-
IdentifierKind[IdentifierKind["TypeReference"] = 0] = "TypeReference";
|
|
27456
|
-
IdentifierKind[IdentifierKind["TemplateArgument"] = 1] = "TemplateArgument";
|
|
27457
|
-
IdentifierKind[IdentifierKind["Decorator"] = 2] = "Decorator";
|
|
27458
|
-
IdentifierKind[IdentifierKind["Function"] = 3] = "Function";
|
|
27459
|
-
IdentifierKind[IdentifierKind["Using"] = 4] = "Using";
|
|
27460
|
-
IdentifierKind[IdentifierKind["Declaration"] = 5] = "Declaration";
|
|
27461
|
-
IdentifierKind[IdentifierKind["ModelExpressionProperty"] = 6] = "ModelExpressionProperty";
|
|
27462
|
-
IdentifierKind[IdentifierKind["ModelStatementProperty"] = 7] = "ModelStatementProperty";
|
|
27463
|
-
IdentifierKind[IdentifierKind["ObjectLiteralProperty"] = 8] = "ObjectLiteralProperty";
|
|
27464
|
-
IdentifierKind[IdentifierKind["Other"] = 9] = "Other";
|
|
27465
|
-
})(IdentifierKind || (IdentifierKind = {}));
|
|
27466
|
-
/** Used to explicitly specify that a diagnostic has no target. */
|
|
27467
|
-
const NoTarget = Symbol.for("NoTarget");
|
|
27468
|
-
var ListenerFlow;
|
|
27469
|
-
(function (ListenerFlow) {
|
|
27470
|
-
/**
|
|
27471
|
-
* Do not navigate any containing or referenced type.
|
|
27472
|
-
*/
|
|
27473
|
-
ListenerFlow[ListenerFlow["NoRecursion"] = 1] = "NoRecursion";
|
|
27474
|
-
})(ListenerFlow || (ListenerFlow = {}));
|
|
27475
|
-
|
|
27476
27532
|
/**
|
|
27477
27533
|
* Use this to report bugs in the compiler, and not errors in the source code
|
|
27478
27534
|
* being compiled.
|
|
@@ -27600,43 +27656,6 @@ function unescape$1(str) {
|
|
|
27600
27656
|
return str.replace(/~1/g, "/").replace(/~0/g, "~");
|
|
27601
27657
|
}
|
|
27602
27658
|
|
|
27603
|
-
let manifest;
|
|
27604
|
-
try {
|
|
27605
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
27606
|
-
// @ts-ignore
|
|
27607
|
-
manifest = (await import('../manifest-onl5D1yL.js')).default;
|
|
27608
|
-
}
|
|
27609
|
-
catch {
|
|
27610
|
-
const name = "../dist/manifest.js";
|
|
27611
|
-
manifest = (await import(/* @vite-ignore */ /* webpackIgnore: true */ name)).default;
|
|
27612
|
-
}
|
|
27613
|
-
manifest.version;
|
|
27614
|
-
|
|
27615
|
-
/**
|
|
27616
|
-
* Recursively calls Object.freeze such that all objects and arrays
|
|
27617
|
-
* referenced are frozen.
|
|
27618
|
-
*
|
|
27619
|
-
* Does not support cycles. Intended to be used only on plain data that can
|
|
27620
|
-
* be directly represented in JSON.
|
|
27621
|
-
*/
|
|
27622
|
-
function deepFreeze(value) {
|
|
27623
|
-
if (Array.isArray(value)) {
|
|
27624
|
-
value.forEach(deepFreeze);
|
|
27625
|
-
}
|
|
27626
|
-
else if (typeof value === "object") {
|
|
27627
|
-
for (const prop in value) {
|
|
27628
|
-
deepFreeze(value[prop]);
|
|
27629
|
-
}
|
|
27630
|
-
}
|
|
27631
|
-
return Object.freeze(value);
|
|
27632
|
-
}
|
|
27633
|
-
/**
|
|
27634
|
-
* Check if argument is not undefined.
|
|
27635
|
-
*/
|
|
27636
|
-
function isDefined(arg) {
|
|
27637
|
-
return arg !== undefined;
|
|
27638
|
-
}
|
|
27639
|
-
|
|
27640
27659
|
const emitterOptionsSchema = {
|
|
27641
27660
|
type: "object",
|
|
27642
27661
|
additionalProperties: true,
|