feat: complete SSR CRM and refine auth UI
This commit is contained in:
@@ -1,11 +1,12 @@
|
||||
#!/usr/bin/env node
|
||||
// WRN editor language server source hash: f75d793688bdb42225d2314660c87852a108b76311974be9307d11e42ecfbb41
|
||||
// WRN editor language server source hash: 70d2454817cc3aa546304c880e0a82313bb73b50051556bf7febd12e6a46c78c
|
||||
// WRN editor language server generator hash: f593a44aaf05495b789ce7a3086bee1eebb951b884d41c0e017bbcfe5f547e72
|
||||
// @bun @bun-cjs
|
||||
(function(exports, require, module, __filename, __dirname) {var __create = Object.create;
|
||||
var __getProtoOf = Object.getPrototypeOf;
|
||||
var __defProp = Object.defineProperty;
|
||||
var __getOwnPropNames = Object.getOwnPropertyNames;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
||||
function __accessProp(key) {
|
||||
return this[key];
|
||||
@@ -32,7 +33,37 @@ var __toESM = (mod, isNodeMode, target) => {
|
||||
cache.set(mod, to);
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (from) => {
|
||||
var entry = (__moduleCache ??= new WeakMap).get(from), desc;
|
||||
if (entry)
|
||||
return entry;
|
||||
entry = __defProp({}, "__esModule", { value: true });
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (var key of __getOwnPropNames(from))
|
||||
if (!__hasOwnProp.call(entry, key))
|
||||
__defProp(entry, key, {
|
||||
get: __accessProp.bind(from, key),
|
||||
enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable
|
||||
});
|
||||
}
|
||||
__moduleCache.set(from, entry);
|
||||
return entry;
|
||||
};
|
||||
var __moduleCache;
|
||||
var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
||||
var __returnValue = (v) => v;
|
||||
function __exportSetter(name, newValue) {
|
||||
this[name] = __returnValue.bind(null, newValue);
|
||||
}
|
||||
var __export = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp(target, name, {
|
||||
get: all[name],
|
||||
enumerable: true,
|
||||
configurable: true,
|
||||
set: __exportSetter.bind(all, name)
|
||||
});
|
||||
};
|
||||
|
||||
// node_modules/.bun/typescript@6.0.3/node_modules/typescript/lib/typescript.js
|
||||
var require_typescript = __commonJS((exports2, module2) => {
|
||||
@@ -54,10 +85,10 @@ var require_typescript = __commonJS((exports2, module2) => {
|
||||
var ts = {};
|
||||
((module3) => {
|
||||
var __defProp2 = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
var __export2 = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp2(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
@@ -65,13 +96,13 @@ var require_typescript = __commonJS((exports2, module2) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames2(from))
|
||||
if (!__hasOwnProp2.call(to, key) && key !== except)
|
||||
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => (__copyProps, mod);
|
||||
var __toCommonJS2 = (mod) => (__copyProps, mod);
|
||||
var typescript_exports = {};
|
||||
__export(typescript_exports, {
|
||||
__export2(typescript_exports, {
|
||||
ANONYMOUS: () => ANONYMOUS,
|
||||
AccessFlags: () => AccessFlags,
|
||||
AssertionLevel: () => AssertionLevel,
|
||||
@@ -2321,7 +2352,7 @@ var require_typescript = __commonJS((exports2, module2) => {
|
||||
writeFileEnsuringDirectories: () => writeFileEnsuringDirectories,
|
||||
zipWith: () => zipWith
|
||||
});
|
||||
module3.exports = __toCommonJS(typescript_exports);
|
||||
module3.exports = __toCommonJS2(typescript_exports);
|
||||
var versionMajorMinor = "6.0";
|
||||
var version = "6.0.3";
|
||||
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
||||
@@ -4851,8 +4882,8 @@ ${lanes.join(`
|
||||
return compareValues(left.length, right.length);
|
||||
}
|
||||
var VersionRange = class _VersionRange {
|
||||
constructor(spec2) {
|
||||
this._alternatives = spec2 ? Debug.checkDefined(parseRange(spec2), "Invalid range spec.") : emptyArray;
|
||||
constructor(spec3) {
|
||||
this._alternatives = spec3 ? Debug.checkDefined(parseRange(spec3), "Invalid range spec.") : emptyArray;
|
||||
}
|
||||
static tryParse(text) {
|
||||
const sets = parseRange(text);
|
||||
@@ -5055,7 +5086,7 @@ ${lanes.join(`
|
||||
}
|
||||
var timestamp = nativePerformanceTime ? () => nativePerformanceTime.now() : Date.now;
|
||||
var ts_performance_exports = {};
|
||||
__export(ts_performance_exports, {
|
||||
__export2(ts_performance_exports, {
|
||||
clearMarks: () => clearMarks,
|
||||
clearMeasures: () => clearMeasures,
|
||||
createTimer: () => createTimer,
|
||||
@@ -21581,19 +21612,19 @@ ${lanes.join(`
|
||||
if (specs === undefined || specs.length === 0) {
|
||||
return;
|
||||
}
|
||||
return flatMap(specs, (spec2) => spec2 && getSubPatternFromSpec(spec2, basePath, usage, wildcardMatchers[usage]));
|
||||
return flatMap(specs, (spec3) => spec3 && getSubPatternFromSpec(spec3, basePath, usage, wildcardMatchers[usage]));
|
||||
}
|
||||
function isImplicitGlob(lastPathComponent) {
|
||||
return !/[.*?]/.test(lastPathComponent);
|
||||
}
|
||||
function getPatternFromSpec(spec2, basePath, usage) {
|
||||
const pattern = spec2 && getSubPatternFromSpec(spec2, basePath, usage, wildcardMatchers[usage]);
|
||||
function getPatternFromSpec(spec3, basePath, usage) {
|
||||
const pattern = spec3 && getSubPatternFromSpec(spec3, basePath, usage, wildcardMatchers[usage]);
|
||||
return pattern && `^(?:${pattern})${usage === "exclude" ? "(?:$|/)" : "$"}`;
|
||||
}
|
||||
function getSubPatternFromSpec(spec2, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage]) {
|
||||
function getSubPatternFromSpec(spec3, basePath, usage, { singleAsteriskRegexFragment, doubleAsteriskRegexFragment, replaceWildcardCharacter: replaceWildcardCharacter2 } = wildcardMatchers[usage]) {
|
||||
let subpattern = "";
|
||||
let hasWrittenComponent = false;
|
||||
const components = getNormalizedPathComponents(spec2, basePath);
|
||||
const components = getNormalizedPathComponents(spec3, basePath);
|
||||
const lastComponent = last(components);
|
||||
if (usage !== "exclude" && lastComponent === "**") {
|
||||
return;
|
||||
@@ -40722,8 +40753,8 @@ ${lanes.join(`
|
||||
const wildcardFiles = arrayFrom(wildcardFileMap.values());
|
||||
return literalFiles.concat(wildcardFiles, arrayFrom(wildCardJsonFileMap.values()));
|
||||
}
|
||||
function isExcludedFile(pathToCheck, spec2, basePath, useCaseSensitiveFileNames2, currentDirectory) {
|
||||
const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec2;
|
||||
function isExcludedFile(pathToCheck, spec3, basePath, useCaseSensitiveFileNames2, currentDirectory) {
|
||||
const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec3;
|
||||
if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs))
|
||||
return false;
|
||||
basePath = normalizePath(basePath);
|
||||
@@ -40745,7 +40776,7 @@ ${lanes.join(`
|
||||
return lastDotIndex > wildcardIndex;
|
||||
}
|
||||
function matchesExclude(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory) {
|
||||
return matchesExcludeWorker(pathToCheck, filter(excludeSpecs, (spec2) => !invalidDotDotAfterRecursiveWildcard(spec2)), useCaseSensitiveFileNames2, currentDirectory);
|
||||
return matchesExcludeWorker(pathToCheck, filter(excludeSpecs, (spec3) => !invalidDotDotAfterRecursiveWildcard(spec3)), useCaseSensitiveFileNames2, currentDirectory);
|
||||
}
|
||||
function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
|
||||
const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath(currentDirectory), basePath), "exclude");
|
||||
@@ -40757,26 +40788,26 @@ ${lanes.join(`
|
||||
return !hasExtension(pathToCheck) && excludeRegex.test(ensureTrailingDirectorySeparator(pathToCheck));
|
||||
}
|
||||
function validateSpecs(specs, errors, disallowTrailingRecursion, jsonSourceFile, specKey) {
|
||||
return specs.filter((spec2) => {
|
||||
if (!isString(spec2))
|
||||
return specs.filter((spec3) => {
|
||||
if (!isString(spec3))
|
||||
return false;
|
||||
const diag2 = specToDiagnostic(spec2, disallowTrailingRecursion);
|
||||
const diag2 = specToDiagnostic(spec3, disallowTrailingRecursion);
|
||||
if (diag2 !== undefined) {
|
||||
errors.push(createDiagnostic(...diag2));
|
||||
}
|
||||
return diag2 === undefined;
|
||||
});
|
||||
function createDiagnostic(message, spec2) {
|
||||
const element = getTsConfigPropArrayElementValue(jsonSourceFile, specKey, spec2);
|
||||
return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(jsonSourceFile, element, message, spec2);
|
||||
function createDiagnostic(message, spec3) {
|
||||
const element = getTsConfigPropArrayElementValue(jsonSourceFile, specKey, spec3);
|
||||
return createDiagnosticForNodeInSourceFileOrCompilerDiagnostic(jsonSourceFile, element, message, spec3);
|
||||
}
|
||||
}
|
||||
function specToDiagnostic(spec2, disallowTrailingRecursion) {
|
||||
Debug.assert(typeof spec2 === "string");
|
||||
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec2)) {
|
||||
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec2];
|
||||
} else if (invalidDotDotAfterRecursiveWildcard(spec2)) {
|
||||
return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec2];
|
||||
function specToDiagnostic(spec3, disallowTrailingRecursion) {
|
||||
Debug.assert(typeof spec3 === "string");
|
||||
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec3)) {
|
||||
return [Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec3];
|
||||
} else if (invalidDotDotAfterRecursiveWildcard(spec3)) {
|
||||
return [Diagnostics.File_specification_cannot_contain_a_parent_directory_that_appears_after_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec3];
|
||||
}
|
||||
}
|
||||
function getWildcardDirectories({ validatedIncludeSpecs: include, validatedExcludeSpecs: exclude }, basePath, useCaseSensitiveFileNames2) {
|
||||
@@ -40787,11 +40818,11 @@ ${lanes.join(`
|
||||
if (include !== undefined) {
|
||||
const recursiveKeys = [];
|
||||
for (const file of include) {
|
||||
const spec2 = normalizePath(combinePaths(basePath, file));
|
||||
if (excludeRegex && excludeRegex.test(spec2)) {
|
||||
const spec3 = normalizePath(combinePaths(basePath, file));
|
||||
if (excludeRegex && excludeRegex.test(spec3)) {
|
||||
continue;
|
||||
}
|
||||
const match = getWildcardDirectoryFromSpec(spec2, useCaseSensitiveFileNames2);
|
||||
const match = getWildcardDirectoryFromSpec(spec3, useCaseSensitiveFileNames2);
|
||||
if (match) {
|
||||
const { key, path, flags } = match;
|
||||
const existingPath = wildCardKeyToPath.get(key);
|
||||
@@ -40822,20 +40853,20 @@ ${lanes.join(`
|
||||
function toCanonicalKey(path, useCaseSensitiveFileNames2) {
|
||||
return useCaseSensitiveFileNames2 ? path : toFileNameLowerCase(path);
|
||||
}
|
||||
function getWildcardDirectoryFromSpec(spec2, useCaseSensitiveFileNames2) {
|
||||
const match = wildcardDirectoryPattern.exec(spec2);
|
||||
function getWildcardDirectoryFromSpec(spec3, useCaseSensitiveFileNames2) {
|
||||
const match = wildcardDirectoryPattern.exec(spec3);
|
||||
if (match) {
|
||||
const questionWildcardIndex = spec2.indexOf("?");
|
||||
const starWildcardIndex = spec2.indexOf("*");
|
||||
const lastDirectorySeperatorIndex = spec2.lastIndexOf(directorySeparator);
|
||||
const questionWildcardIndex = spec3.indexOf("?");
|
||||
const starWildcardIndex = spec3.indexOf("*");
|
||||
const lastDirectorySeperatorIndex = spec3.lastIndexOf(directorySeparator);
|
||||
return {
|
||||
key: toCanonicalKey(match[0], useCaseSensitiveFileNames2),
|
||||
path: match[0],
|
||||
flags: questionWildcardIndex !== -1 && questionWildcardIndex < lastDirectorySeperatorIndex || starWildcardIndex !== -1 && starWildcardIndex < lastDirectorySeperatorIndex ? 1 : 0
|
||||
};
|
||||
}
|
||||
if (isImplicitGlob(spec2.substring(spec2.lastIndexOf(directorySeparator) + 1))) {
|
||||
const path = removeTrailingDirectorySeparator(spec2);
|
||||
if (isImplicitGlob(spec3.substring(spec3.lastIndexOf(directorySeparator) + 1))) {
|
||||
const path = removeTrailingDirectorySeparator(spec3);
|
||||
return {
|
||||
key: toCanonicalKey(path, useCaseSensitiveFileNames2),
|
||||
path,
|
||||
@@ -45962,7 +45993,7 @@ ${lanes.join(`
|
||||
}
|
||||
}
|
||||
var ts_moduleSpecifiers_exports = {};
|
||||
__export(ts_moduleSpecifiers_exports, {
|
||||
__export2(ts_moduleSpecifiers_exports, {
|
||||
RelativePreference: () => RelativePreference,
|
||||
countPathComponents: () => countPathComponents,
|
||||
forEachFileNameOfModule: () => forEachFileNameOfModule,
|
||||
@@ -118075,7 +118106,7 @@ ${lanes.join(`
|
||||
}
|
||||
}
|
||||
var ts_JsTyping_exports = {};
|
||||
__export(ts_JsTyping_exports, {
|
||||
__export2(ts_JsTyping_exports, {
|
||||
NameValidationResult: () => NameValidationResult,
|
||||
discoverTypings: () => discoverTypings,
|
||||
isTypingUpToDate: () => isTypingUpToDate,
|
||||
@@ -121532,8 +121563,8 @@ ${lanes.join(`
|
||||
}
|
||||
}
|
||||
function getIsExcludedPatterns(preferences, useCaseSensitiveFileNames2) {
|
||||
return mapDefined(preferences.autoImportFileExcludePatterns, (spec2) => {
|
||||
const pattern = getSubPatternFromSpec(spec2, "", "exclude");
|
||||
return mapDefined(preferences.autoImportFileExcludePatterns, (spec3) => {
|
||||
const pattern = getSubPatternFromSpec(spec3, "", "exclude");
|
||||
return pattern ? getRegexFromPattern(pattern, useCaseSensitiveFileNames2) : undefined;
|
||||
});
|
||||
}
|
||||
@@ -124366,7 +124397,7 @@ interface Symbol {
|
||||
return options;
|
||||
}
|
||||
var ts_NavigateTo_exports = {};
|
||||
__export(ts_NavigateTo_exports, {
|
||||
__export2(ts_NavigateTo_exports, {
|
||||
getNavigateToItems: () => getNavigateToItems
|
||||
});
|
||||
function getNavigateToItems(sourceFiles, checker, cancellationToken, searchValue, maxResultCount, excludeDtsFiles, excludeLibFiles, program) {
|
||||
@@ -124471,7 +124502,7 @@ interface Symbol {
|
||||
};
|
||||
}
|
||||
var ts_NavigationBar_exports = {};
|
||||
__export(ts_NavigationBar_exports, {
|
||||
__export2(ts_NavigationBar_exports, {
|
||||
getNavigationBarItems: () => getNavigationBarItems,
|
||||
getNavigationTree: () => getNavigationTree
|
||||
});
|
||||
@@ -125200,7 +125231,7 @@ interface Symbol {
|
||||
return text.replace(/\\?(?:\r?\n|[\r\u2028\u2029])/g, "");
|
||||
}
|
||||
var ts_refactor_exports = {};
|
||||
__export(ts_refactor_exports, {
|
||||
__export2(ts_refactor_exports, {
|
||||
addExportsInOldFile: () => addExportsInOldFile,
|
||||
addImportsForMovedSymbols: () => addImportsForMovedSymbols,
|
||||
addNewFileToTsconfig: () => addNewFileToTsconfig,
|
||||
@@ -125345,8 +125376,8 @@ interface Symbol {
|
||||
if (wasDefault) {
|
||||
if (isExportAssignment(exportNode) && !exportNode.isExportEquals) {
|
||||
const exp = exportNode.expression;
|
||||
const spec2 = makeExportSpecifier(exp.text, exp.text);
|
||||
changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDeclaration(undefined, false, factory.createNamedExports([spec2])));
|
||||
const spec3 = makeExportSpecifier(exp.text, exp.text);
|
||||
changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDeclaration(undefined, false, factory.createNamedExports([spec3])));
|
||||
} else {
|
||||
changes.delete(exportingSourceFile, Debug.checkDefined(findModifier(exportNode, 90), "Should find a default keyword in modifier list"));
|
||||
}
|
||||
@@ -125397,17 +125428,17 @@ interface Symbol {
|
||||
break;
|
||||
case 277:
|
||||
case 282: {
|
||||
const spec2 = parent2;
|
||||
changes.replaceNode(importingSourceFile, spec2, makeImportSpecifier(exportName, spec2.name.text));
|
||||
const spec3 = parent2;
|
||||
changes.replaceNode(importingSourceFile, spec3, makeImportSpecifier(exportName, spec3.name.text));
|
||||
break;
|
||||
}
|
||||
case 274: {
|
||||
const clause = parent2;
|
||||
Debug.assert(clause.name === ref, "Import clause name should match provided ref");
|
||||
const spec2 = makeImportSpecifier(exportName, ref.text);
|
||||
const spec3 = makeImportSpecifier(exportName, ref.text);
|
||||
const { namedBindings } = clause;
|
||||
if (!namedBindings) {
|
||||
changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec2]));
|
||||
changes.replaceNode(importingSourceFile, ref, factory.createNamedImports([spec3]));
|
||||
} else if (namedBindings.kind === 275) {
|
||||
changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) });
|
||||
const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1;
|
||||
@@ -125415,7 +125446,7 @@ interface Symbol {
|
||||
changes.insertNodeAfter(importingSourceFile, clause.parent, newImport);
|
||||
} else {
|
||||
changes.delete(importingSourceFile, ref);
|
||||
changes.insertNodeAtEndOfList(importingSourceFile, namedBindings.elements, spec2);
|
||||
changes.insertNodeAtEndOfList(importingSourceFile, namedBindings.elements, spec3);
|
||||
}
|
||||
break;
|
||||
}
|
||||
@@ -128196,7 +128227,7 @@ ${newComment.split(`
|
||||
}
|
||||
}
|
||||
var ts_refactor_extractSymbol_exports = {};
|
||||
__export(ts_refactor_extractSymbol_exports, {
|
||||
__export2(ts_refactor_extractSymbol_exports, {
|
||||
Messages: () => Messages,
|
||||
RangeFacts: () => RangeFacts,
|
||||
getRangeToExtract: () => getRangeToExtract2,
|
||||
@@ -132122,7 +132153,7 @@ ${newComment.split(`
|
||||
return result;
|
||||
}
|
||||
var ts_BreakpointResolver_exports = {};
|
||||
__export(ts_BreakpointResolver_exports, {
|
||||
__export2(ts_BreakpointResolver_exports, {
|
||||
spanInSourceFileAtLocation: () => spanInSourceFileAtLocation
|
||||
});
|
||||
function spanInSourceFileAtLocation(sourceFile, position) {
|
||||
@@ -132600,7 +132631,7 @@ ${newComment.split(`
|
||||
}
|
||||
}
|
||||
var ts_CallHierarchy_exports = {};
|
||||
__export(ts_CallHierarchy_exports, {
|
||||
__export2(ts_CallHierarchy_exports, {
|
||||
createCallHierarchyItem: () => createCallHierarchyItem,
|
||||
getIncomingCalls: () => getIncomingCalls,
|
||||
getOutgoingCalls: () => getOutgoingCalls,
|
||||
@@ -133009,11 +133040,11 @@ ${newComment.split(`
|
||||
return group(collectCallSites(program, declaration), getCallSiteGroupKey, (entries) => convertCallSiteGroupToOutgoingCall(program, entries));
|
||||
}
|
||||
var ts_classifier_exports = {};
|
||||
__export(ts_classifier_exports, {
|
||||
__export2(ts_classifier_exports, {
|
||||
v2020: () => ts_classifier_v2020_exports
|
||||
});
|
||||
var ts_classifier_v2020_exports = {};
|
||||
__export(ts_classifier_v2020_exports, {
|
||||
__export2(ts_classifier_v2020_exports, {
|
||||
TokenEncodingConsts: () => TokenEncodingConsts,
|
||||
TokenModifier: () => TokenModifier,
|
||||
TokenType: () => TokenType,
|
||||
@@ -133021,7 +133052,7 @@ ${newComment.split(`
|
||||
getSemanticClassifications: () => getSemanticClassifications2
|
||||
});
|
||||
var ts_codefix_exports = {};
|
||||
__export(ts_codefix_exports, {
|
||||
__export2(ts_codefix_exports, {
|
||||
PreserveOptionalFlags: () => PreserveOptionalFlags,
|
||||
addNewNodeForMemberSymbol: () => addNewNodeForMemberSymbol,
|
||||
codeFixAll: () => codeFixAll,
|
||||
@@ -136454,13 +136485,13 @@ ${newComment.split(`
|
||||
changes.replaceNode(sourceFile, clause.namedBindings, factory.updateNamedImports(clause.namedBindings, toSorted([...existingSpecifiers.filter((s) => !removeExistingImportSpecifiers.has(s)), ...newSpecifiers], specifierComparer)));
|
||||
} else if ((existingSpecifiers == null ? undefined : existingSpecifiers.length) && isSorted !== false) {
|
||||
const transformedExistingSpecifiers = promoteFromTypeOnly2 && existingSpecifiers ? factory.updateNamedImports(clause.namedBindings, sameMap(existingSpecifiers, (e) => factory.updateImportSpecifier(e, true, e.propertyName, e.name))).elements : existingSpecifiers;
|
||||
for (const spec2 of newSpecifiers) {
|
||||
const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(transformedExistingSpecifiers, spec2, specifierComparer);
|
||||
changes.insertImportSpecifierAtIndex(sourceFile, spec2, clause.namedBindings, insertionIndex);
|
||||
for (const spec3 of newSpecifiers) {
|
||||
const insertionIndex = ts_OrganizeImports_exports.getImportSpecifierInsertionIndex(transformedExistingSpecifiers, spec3, specifierComparer);
|
||||
changes.insertImportSpecifierAtIndex(sourceFile, spec3, clause.namedBindings, insertionIndex);
|
||||
}
|
||||
} else if (existingSpecifiers == null ? undefined : existingSpecifiers.length) {
|
||||
for (const spec2 of newSpecifiers) {
|
||||
changes.insertNodeInListAfter(sourceFile, last(existingSpecifiers), spec2, existingSpecifiers);
|
||||
for (const spec3 of newSpecifiers) {
|
||||
changes.insertNodeInListAfter(sourceFile, last(existingSpecifiers), spec3, existingSpecifiers);
|
||||
}
|
||||
} else {
|
||||
if (newSpecifiers.length) {
|
||||
@@ -142220,7 +142251,7 @@ ${newComment.split(`
|
||||
}
|
||||
}
|
||||
var ts_Completions_exports = {};
|
||||
__export(ts_Completions_exports, {
|
||||
__export2(ts_Completions_exports, {
|
||||
CompletionKind: () => CompletionKind,
|
||||
CompletionSource: () => CompletionSource,
|
||||
SortText: () => SortText,
|
||||
@@ -145770,7 +145801,7 @@ ${newComment.split(`
|
||||
return keyword === "abstract" || keyword === "async" || keyword === "await" || keyword === "declare" || keyword === "module" || keyword === "namespace" || keyword === "type" || keyword === "satisfies" || keyword === "as";
|
||||
}
|
||||
var ts_Completions_StringCompletions_exports = {};
|
||||
__export(ts_Completions_StringCompletions_exports, {
|
||||
__export2(ts_Completions_StringCompletions_exports, {
|
||||
getStringLiteralCompletionDetails: () => getStringLiteralCompletionDetails,
|
||||
getStringLiteralCompletions: () => getStringLiteralCompletions
|
||||
});
|
||||
@@ -146603,7 +146634,7 @@ ${newComment.split(`
|
||||
return isCallExpression(node.parent) && firstOrUndefined(node.parent.arguments) === node && isIdentifier(node.parent.expression) && node.parent.expression.escapedText === "require";
|
||||
}
|
||||
var ts_FindAllReferences_exports = {};
|
||||
__export(ts_FindAllReferences_exports, {
|
||||
__export2(ts_FindAllReferences_exports, {
|
||||
Core: () => Core,
|
||||
DefinitionKind: () => DefinitionKind,
|
||||
EntryKind: () => EntryKind,
|
||||
@@ -148818,7 +148849,7 @@ ${newComment.split(`
|
||||
}
|
||||
})(Core || (Core = {}));
|
||||
var ts_GoToDefinition_exports = {};
|
||||
__export(ts_GoToDefinition_exports, {
|
||||
__export2(ts_GoToDefinition_exports, {
|
||||
createDefinitionInfo: () => createDefinitionInfo,
|
||||
getDefinitionAndBoundSpan: () => getDefinitionAndBoundSpan,
|
||||
getDefinitionAtPosition: () => getDefinitionAtPosition,
|
||||
@@ -149314,7 +149345,7 @@ ${newComment.split(`
|
||||
}
|
||||
}
|
||||
var ts_InlayHints_exports = {};
|
||||
__export(ts_InlayHints_exports, {
|
||||
__export2(ts_InlayHints_exports, {
|
||||
provideInlayHints: () => provideInlayHints
|
||||
});
|
||||
var leadingParameterNameCommentRegexFactory = (name) => {
|
||||
@@ -150076,7 +150107,7 @@ ${newComment.split(`
|
||||
}
|
||||
}
|
||||
var ts_JsDoc_exports = {};
|
||||
__export(ts_JsDoc_exports, {
|
||||
__export2(ts_JsDoc_exports, {
|
||||
getDocCommentTemplateAtPosition: () => getDocCommentTemplateAtPosition,
|
||||
getJSDocParameterNameCompletionDetails: () => getJSDocParameterNameCompletionDetails,
|
||||
getJSDocParameterNameCompletions: () => getJSDocParameterNameCompletions,
|
||||
@@ -150496,7 +150527,7 @@ ${newComment.split(`
|
||||
}
|
||||
}
|
||||
var ts_MapCode_exports = {};
|
||||
__export(ts_MapCode_exports, {
|
||||
__export2(ts_MapCode_exports, {
|
||||
mapCode: () => mapCode
|
||||
});
|
||||
function mapCode(sourceFile, contents, focusLocations, host, formatContext, preferences) {
|
||||
@@ -150631,7 +150662,7 @@ ${content}
|
||||
node.forEachChild(resetNodePositions);
|
||||
}
|
||||
var ts_OrganizeImports_exports = {};
|
||||
__export(ts_OrganizeImports_exports, {
|
||||
__export2(ts_OrganizeImports_exports, {
|
||||
compareImportsOrRequireStatements: () => compareImportsOrRequireStatements,
|
||||
compareModuleSpecifiers: () => compareModuleSpecifiers2,
|
||||
getImportDeclarationInsertionIndex: () => getImportDeclarationInsertionIndex,
|
||||
@@ -151214,7 +151245,7 @@ ${content}
|
||||
return compareModuleSpecifiersWorker(m1, m2, comparer);
|
||||
}
|
||||
var ts_OutliningElementsCollector_exports = {};
|
||||
__export(ts_OutliningElementsCollector_exports, {
|
||||
__export2(ts_OutliningElementsCollector_exports, {
|
||||
collectElements: () => collectElements
|
||||
});
|
||||
function collectElements(sourceFile, cancellationToken) {
|
||||
@@ -151532,7 +151563,7 @@ ${content}
|
||||
return findChildOfKind(body, 19, sourceFile);
|
||||
}
|
||||
var ts_Rename_exports = {};
|
||||
__export(ts_Rename_exports, {
|
||||
__export2(ts_Rename_exports, {
|
||||
getRenameInfo: () => getRenameInfo,
|
||||
nodeIsEligibleForRename: () => nodeIsEligibleForRename
|
||||
});
|
||||
@@ -151686,7 +151717,7 @@ ${content}
|
||||
}
|
||||
}
|
||||
var ts_SignatureHelp_exports = {};
|
||||
__export(ts_SignatureHelp_exports, {
|
||||
__export2(ts_SignatureHelp_exports, {
|
||||
getArgumentInfoForCompletions: () => getArgumentInfoForCompletions,
|
||||
getSignatureHelpItems: () => getSignatureHelpItems
|
||||
});
|
||||
@@ -152160,7 +152191,7 @@ ${content}
|
||||
return { name: typeParameter.symbol.name, documentation: typeParameter.symbol.getDocumentationComment(checker), displayParts, isOptional: false, isRest: false };
|
||||
}
|
||||
var ts_SmartSelectionRange_exports = {};
|
||||
__export(ts_SmartSelectionRange_exports, {
|
||||
__export2(ts_SmartSelectionRange_exports, {
|
||||
getSmartSelectionRange: () => getSmartSelectionRange
|
||||
});
|
||||
function getSmartSelectionRange(pos, sourceFile) {
|
||||
@@ -152352,7 +152383,7 @@ ${content}
|
||||
}
|
||||
}
|
||||
var ts_SymbolDisplay_exports = {};
|
||||
__export(ts_SymbolDisplay_exports, {
|
||||
__export2(ts_SymbolDisplay_exports, {
|
||||
getSymbolDisplayPartsDocumentationAndSymbolKind: () => getSymbolDisplayPartsDocumentationAndSymbolKind,
|
||||
getSymbolKind: () => getSymbolKind,
|
||||
getSymbolModifiers: () => getSymbolModifiers
|
||||
@@ -153058,7 +153089,7 @@ ${content}
|
||||
});
|
||||
}
|
||||
var ts_textChanges_exports = {};
|
||||
__export(ts_textChanges_exports, {
|
||||
__export2(ts_textChanges_exports, {
|
||||
ChangeTracker: () => ChangeTracker,
|
||||
LeadingTriviaOption: () => LeadingTriviaOption,
|
||||
TrailingTriviaOption: () => TrailingTriviaOption,
|
||||
@@ -154255,7 +154286,7 @@ ${options.prefix}` : `
|
||||
});
|
||||
}
|
||||
var ts_formatting_exports = {};
|
||||
__export(ts_formatting_exports, {
|
||||
__export2(ts_formatting_exports, {
|
||||
FormattingContext: () => FormattingContext,
|
||||
FormattingRequestKind: () => FormattingRequestKind,
|
||||
RuleAction: () => RuleAction,
|
||||
@@ -156640,7 +156671,7 @@ ${options.prefix}` : `
|
||||
}
|
||||
})(SmartIndenter || (SmartIndenter = {}));
|
||||
var ts_preparePasteEdits_exports = {};
|
||||
__export(ts_preparePasteEdits_exports, {
|
||||
__export2(ts_preparePasteEdits_exports, {
|
||||
preparePasteEdits: () => preparePasteEdits
|
||||
});
|
||||
function preparePasteEdits(sourceFile, copiedFromRange, checker) {
|
||||
@@ -156672,7 +156703,7 @@ ${options.prefix}` : `
|
||||
return shouldProvidePasteEdits;
|
||||
}
|
||||
var ts_PasteEdits_exports = {};
|
||||
__export(ts_PasteEdits_exports, {
|
||||
__export2(ts_PasteEdits_exports, {
|
||||
pasteEditsProvider: () => pasteEditsProvider
|
||||
});
|
||||
var fixId55 = "providePostPasteEdits";
|
||||
@@ -156763,7 +156794,7 @@ ${options.prefix}` : `
|
||||
};
|
||||
}
|
||||
var ts_exports2 = {};
|
||||
__export(ts_exports2, {
|
||||
__export2(ts_exports2, {
|
||||
ANONYMOUS: () => ANONYMOUS,
|
||||
AccessFlags: () => AccessFlags,
|
||||
AssertionLevel: () => AssertionLevel,
|
||||
@@ -159104,7 +159135,7 @@ ${options.prefix}` : `
|
||||
};
|
||||
}
|
||||
var ts_server_exports3 = {};
|
||||
__export(ts_server_exports3, {
|
||||
__export2(ts_server_exports3, {
|
||||
ActionInvalidate: () => ActionInvalidate,
|
||||
ActionPackageInstalled: () => ActionPackageInstalled,
|
||||
ActionSet: () => ActionSet,
|
||||
@@ -159202,7 +159233,7 @@ ${options.prefix}` : `
|
||||
updateProjectIfDirty: () => updateProjectIfDirty
|
||||
});
|
||||
var ts_server_typingsInstaller_exports = {};
|
||||
__export(ts_server_typingsInstaller_exports, {
|
||||
__export2(ts_server_typingsInstaller_exports, {
|
||||
TypingsInstaller: () => TypingsInstaller,
|
||||
getNpmCommandForInstallation: () => getNpmCommandForInstallation,
|
||||
installNpmPackages: () => installNpmPackages,
|
||||
@@ -159757,7 +159788,7 @@ ${options.prefix}` : `
|
||||
return base === "tsconfig.json" || base === "jsconfig.json" ? base : undefined;
|
||||
}
|
||||
var ts_server_protocol_exports = {};
|
||||
__export(ts_server_protocol_exports, {
|
||||
__export2(ts_server_protocol_exports, {
|
||||
ClassificationType: () => ClassificationType,
|
||||
CommandTypes: () => CommandTypes,
|
||||
CompletionTriggerKind: () => CompletionTriggerKind,
|
||||
@@ -169359,7 +169390,7 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
||||
_TypingsInstallerAdapter.requestDelayMillis = 100;
|
||||
var TypingsInstallerAdapter = _TypingsInstallerAdapter;
|
||||
var ts_server_exports4 = {};
|
||||
__export(ts_server_exports4, {
|
||||
__export2(ts_server_exports4, {
|
||||
ActionInvalidate: () => ActionInvalidate,
|
||||
ActionPackageInstalled: () => ActionPackageInstalled,
|
||||
ActionSet: () => ActionSet,
|
||||
@@ -169485,10 +169516,10 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
||||
// node_modules/.bun/@vscode+l10n@0.0.18/node_modules/@vscode/l10n/dist/main.js
|
||||
var require_main = __commonJS((exports2, module2) => {
|
||||
var __defProp2 = Object.defineProperty;
|
||||
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
||||
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
||||
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
||||
var __export = (target, all) => {
|
||||
var __export2 = (target, all) => {
|
||||
for (var name in all)
|
||||
__defProp2(target, name, { get: all[name], enumerable: true });
|
||||
};
|
||||
@@ -169496,17 +169527,17 @@ var require_main = __commonJS((exports2, module2) => {
|
||||
if (from && typeof from === "object" || typeof from === "function") {
|
||||
for (let key of __getOwnPropNames2(from))
|
||||
if (!__hasOwnProp2.call(to, key) && key !== except)
|
||||
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
||||
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
||||
}
|
||||
return to;
|
||||
};
|
||||
var __toCommonJS = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
|
||||
var __toCommonJS2 = (mod) => __copyProps(__defProp2({}, "__esModule", { value: true }), mod);
|
||||
var main_exports = {};
|
||||
__export(main_exports, {
|
||||
__export2(main_exports, {
|
||||
config: () => config,
|
||||
t: () => t
|
||||
});
|
||||
module2.exports = __toCommonJS(main_exports);
|
||||
module2.exports = __toCommonJS2(main_exports);
|
||||
var import_fs = require("fs");
|
||||
var import_promises = require("fs/promises");
|
||||
async function readFileFromUri(uri) {
|
||||
@@ -169624,6 +169655,14 @@ var require_main = __commonJS((exports2, module2) => {
|
||||
}
|
||||
});
|
||||
|
||||
// packages/language-server/src/server.ts
|
||||
var exports_server = {};
|
||||
__export(exports_server, {
|
||||
apiCallHover: () => apiCallHover,
|
||||
apiCallCompletions: () => apiCallCompletions
|
||||
});
|
||||
module.exports = __toCommonJS(exports_server);
|
||||
|
||||
// packages/syntax/src/tokenizer.ts
|
||||
class LexError extends Error {
|
||||
}
|
||||
@@ -196164,6 +196203,46 @@ function clearHtmlRegionCache(uri) {
|
||||
}
|
||||
|
||||
// packages/language-server/src/server.ts
|
||||
function dataApisOf(source) {
|
||||
try {
|
||||
return parse(source).dataApis;
|
||||
} catch {
|
||||
return [];
|
||||
}
|
||||
}
|
||||
function apiDetail(block) {
|
||||
return `${block.method} ${block.path}`;
|
||||
}
|
||||
function apiCallCompletions(source) {
|
||||
return dataApisOf(source).map((block) => ({
|
||||
label: block.name,
|
||||
kind: 2,
|
||||
detail: apiDetail(block),
|
||||
documentation: block.sections ? [
|
||||
block.sections.body.length ? `body: ${block.sections.body.map((field) => `${field.name}${field.optional ? "?" : ""}: ${field.type}`).join(", ")}` : undefined
|
||||
].filter(Boolean).join(`
|
||||
`) : undefined
|
||||
}));
|
||||
}
|
||||
function apiCallHover(source, name) {
|
||||
const block = dataApisOf(source).find((entry) => entry.name === name);
|
||||
if (!block)
|
||||
return;
|
||||
const lines = [`**${block.name}** \`${block.method} ${block.path}\``];
|
||||
if (block.sections?.body.length) {
|
||||
lines.push(`request body: ${block.sections.body.map((field) => `${field.name}${field.optional ? "?" : ""}: ${field.type}`).join(", ")}`);
|
||||
}
|
||||
if (block.sections?.parameters.length) {
|
||||
lines.push(`parameters: ${block.sections.parameters.map((field) => `${field.name}${field.optional ? "?" : ""}: ${field.type}`).join(", ")}`);
|
||||
}
|
||||
return lines.join(`
|
||||
|
||||
`);
|
||||
}
|
||||
function isApiCallPosition(text, offset) {
|
||||
const before = text.slice(0, offset);
|
||||
return /\bapi\.\w*$/.test(before);
|
||||
}
|
||||
var documents = new Map;
|
||||
var diagnosticTimers = new Map;
|
||||
var MAX_OPEN_DOCUMENTS = 256;
|
||||
@@ -196336,6 +196415,10 @@ async function handle(message) {
|
||||
}
|
||||
case "textDocument/completion": {
|
||||
const document = documents.get(params.textDocument.uri);
|
||||
if (document && isApiCallPosition(document.text, offsetAt(document.text, params.position))) {
|
||||
result(message.id, apiCallCompletions(document.text));
|
||||
break;
|
||||
}
|
||||
const wrnexus = [...completionItems(), ...workspaceCompletionItems(workspaceRoot)];
|
||||
const html = document ? htmlCompletions(document, params.position) : [];
|
||||
result(message.id, html.length ? mergeCompletions(wrnexus, html) : wrnexus);
|
||||
@@ -196353,6 +196436,12 @@ async function handle(message) {
|
||||
}
|
||||
case "textDocument/hover": {
|
||||
const document = documents.get(params.textDocument.uri);
|
||||
const word = document ? wordAt(document.text, params.position)?.word : undefined;
|
||||
const apiHover = word ? apiCallHover(document.text, word) : undefined;
|
||||
if (apiHover) {
|
||||
result(message.id, { contents: apiHover });
|
||||
break;
|
||||
}
|
||||
const html = document ? htmlHover(document, params.position) : null;
|
||||
result(message.id, html ?? (document ? hover(document, params.position) : null));
|
||||
break;
|
||||
|
||||
@@ -106,9 +106,6 @@ test('REGRESSION: runtime = "client" still highlights via execution-decl', () =>
|
||||
|
||||
test("REGRESSION: the client function modifier still highlights via functions-block", () => {
|
||||
const rule = ruleByTopLevelBlockName("functions-block");
|
||||
const modifierPattern = rule.patterns.find(
|
||||
(p) => (p.match && /storage\.modifier\.async/.test("")) || p.match,
|
||||
);
|
||||
const matchRe = new RegExp(
|
||||
rule.patterns.find(
|
||||
(p) => p.captures && p.captures["1"]?.name === "storage.modifier.runtime.wrn",
|
||||
|
||||
Reference in New Issue
Block a user