UNPKG

universal-build-plugin-version-check-test

Version:

一个支持多种前端构建工具的通用插件框架,包括 Vite、Webpack、Rollup 等,提供版本检查、构建优化等功能

1,259 lines (1,256 loc) 6.18 MB
import * as I5e from "fs"; import Xft, { promises as bR } from "fs"; import * as mb from "path"; import Qft from "path"; import { exec as Yft } from "child_process"; import { promisify as Zft } from "util"; import Kft from "os"; class XX { constructor($n = "UniversalPlugin", si = !1) { this.prefix = $n, this.debugMode = si; } /** * 信息日志 */ info($n, ...si) { console.log(`[${this.prefix}] ${$n}`, ...si); } /** * 警告日志 */ warn($n, ...si) { console.warn(`[${this.prefix}] ${$n}`, ...si); } /** * 错误日志 */ error($n, ...si) { console.error(`[${this.prefix}] ${$n}`, ...si); } /** * 调试日志 - 只在调试模式下输出 */ debug($n, ...si) { this.debugMode && console.log(`[${this.prefix}:DEBUG] ${$n}`, ...si); } /** * 成功日志 */ success($n, ...si) { console.log(`[${this.prefix}] ✅ ${$n}`, ...si); } /** * 设置调试模式 */ setDebugMode($n) { this.debugMode = $n; } } class ept { constructor($n = process.cwd()) { this.rootDir = $n, this.versionFilePath = mb.join($n, "version.json"); } /** * 生成版本信息 */ async generateVersionInfo($n) { let si, ps = "", qi = ""; switch ($n.versionType) { case "git-hash": { const HT = await this.generateGitHashVersionInfo(); si = HT.version, ps = HT.gitCommit, qi = HT.gitBranch; break; } case "package": { si = await this.generatePackageInfo(); break; } case "custom": { si = await this.generateCustomVersionInfo($n); break; } default: { console.log( "❌ 未知的版本类型,已切换至 package.json 版本 | Unknown version type, fallback to package.json version" ), si = await this.generatePackageInfo(); break; } } return { version: si, gitCommit: ps, gitBranch: qi, buildTime: (/* @__PURE__ */ new Date()).toISOString(), meta: ($n == null ? void 0 : $n.meta) ?? {} }; } /** * git 生成版本号 */ async generateGitHashVersionInfo() { const $n = { version: "", gitCommit: "", gitBranch: "" }; try { const si = await this.getGitInfo(); $n.version = si.commit, $n.gitCommit = si.commit, $n.gitBranch = si.branch; } catch (si) { console.warn(si), $n.version = this.generateTimestampVersion(); } return $n; } /** * 自定义配置版本生成信息 */ async generateCustomVersionInfo($n) { if ($n.versionType !== "custom") throw new Error('Invalid versionType: expected "custom"'); const { customVersion: si } = $n; if (!si) throw new Error("Custom version must be provided"); return typeof si == "function" ? this.isAsyncFunction(si) ? await si() : si() : si; } /** * 读取package.json生成信息, 兜底方案,如果所有都生成错误,会使用当前时间戳生成 */ async generatePackageInfo() { let $n = ""; try { const si = mb.join(this.rootDir, "package.json"); $n = JSON.parse(await bR.readFile(si, "utf-8")).version || this.generateTimestampVersion(); } catch (si) { console.error( "📦 读取或解析 package.json 失败 | Failed to read or parse package.json:", si ), $n = this.generateTimestampVersion(); } return $n; } /** * 时间戳生成版本号,降级处理 */ generateTimestampVersion() { return console.warn( "🔧 版本生成失败,已自动切换至时间戳模式 | Version generation failed, fallback to timestamp mode" ), Date.now().toString(); } /** * 写入版本文件 * @param versionInfo 版本信息 * @param outputDir 可选的输出目录,如果不提供则使用默认的项目根目录 */ async writeVersionFile($n, si) { try { const ps = si || this.rootDir, qi = mb.join(ps, "version.json"); await bR.mkdir(ps, { recursive: !0 }); const Tg = JSON.stringify($n, null, 2); await bR.writeFile(qi, Tg, "utf-8"), console.log(`✅ Version file generated: ${qi}`); } catch (ps) { throw console.error("Failed to write version file:", ps), ps; } } /** * 读取现有版本文件 */ async readVersionFile() { try { const $n = await bR.readFile(this.versionFilePath, "utf-8"); return JSON.parse($n); } catch ($n) { return console.error("Failed to read version file:", $n), null; } } /** * 获取 Git 信息 */ async getGitInfo() { const $n = Zft(Yft); try { const [si, ps] = await Promise.all([ $n("git rev-parse HEAD", { cwd: this.rootDir }), $n("git rev-parse --abbrev-ref HEAD", { cwd: this.rootDir }) ]); return { commit: si.stdout.trim(), branch: ps.stdout.trim() }; } catch (si) { throw new Error(`❌ Not a git repository or git not available ` + si); } } /** * 清理版本文件 */ async cleanVersionFile() { try { await bR.unlink(this.versionFilePath), console.log("Version file cleaned"); } catch { } } isAsyncFunction($n) { return typeof $n == "function" && $n.constructor.name === "AsyncFunction"; } } var F5e = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}; function tpt(zu) { if (Object.prototype.hasOwnProperty.call(zu, "__esModule")) return zu; var $n = zu.default; if (typeof $n == "function") { var si = function ps() { var qi = !1; try { qi = this instanceof ps; } catch { } return qi ? Reflect.construct($n, arguments, this.constructor) : $n.apply(this, arguments); }; si.prototype = $n.prototype; } else si = {}; return Object.defineProperty(si, "__esModule", { value: !0 }), Object.keys(zu).forEach(function(ps) { var qi = Object.getOwnPropertyDescriptor(zu, ps); Object.defineProperty(si, ps, qi.get ? qi : { enumerable: !0, get: function() { return zu[ps]; } }); }), si; } function O5e(zu) { throw new Error('Could not dynamically require "' + zu + '". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.'); } var age = { exports: {} }; const rpt = {}, npt = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({ __proto__: null, default: rpt }, Symbol.toStringTag, { value: "Module" })), oge = /* @__PURE__ */ tpt(npt); /*! ***************************************************************************** Copyright (c) Microsoft Corporation. All rights reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABLITY OR NON-INFRINGEMENT. See the Apache Version 2.0 License for specific language governing permissions and limitations under the License. ***************************************************************************** */ var L5e; function ipt() { return L5e || (L5e = 1, function(zu) { var $n = {}; ((si) => { var ps = Object.defineProperty, qi = (e, t) => { for (var n in t) ps(e, n, { get: t[n], enumerable: !0 }); }, Tg = (e) => e, HT = {}; qi(HT, { ANONYMOUS: () => aq, AccessFlags: () => KQ, AssertionLevel: () => lQ, AssignmentDeclarationKind: () => cY, AssignmentKind: () => OK, Associativity: () => WK, BreakpointResolver: () => iH, BuilderFileEmit: () => Rie, BuilderProgramKind: () => qie, BuilderState: () => Md, CallHierarchy: () => hk, CharacterCodes: () => vY, CheckFlags: () => XQ, CheckMode: () => PW, ClassificationType: () => hU, ClassificationTypeNames: () => Gse, CommentDirectiveType: () => OQ, Comparison: () => QX, CompletionInfoFlags: () => Jse, CompletionTriggerKind: () => mU, Completions: () => Tk, ContainerFlags: () => hne, ContextFlags: () => zQ, Debug: () => E, DiagnosticCategory: () => r7, Diagnostics: () => p, DocumentHighlights: () => Z9, ElementFlags: () => ZQ, EmitFlags: () => fj, EmitHint: () => xY, EmitOnly: () => MQ, EndOfLineState: () => Vse, ExitStatus: () => RQ, ExportKind: () => Rae, Extension: () => bY, ExternalEmitHelpers: () => TY, FileIncludeKind: () => rj, FilePreprocessingDiagnosticsKind: () => LQ, FileSystemEntryKind: () => IY, FileWatcherEventKind: () => PY, FindAllReferences: () => Co, FlattenLevel: () => Bne, FlowFlags: () => t7, ForegroundColorEscapeSequences: () => Die, FunctionFlags: () => JK, GeneratedIdentifierFlags: () => tj, GetLiteralTextFlags: () => YZ, GoToDefinition: () => aE, HighlightSpanKind: () => jse, IdentifierNameMap: () => M6, ImportKind: () => Mae, ImportsNotUsedAsValues: () => dY, IndentStyle: () => Bse, IndexFlags: () => eY, IndexKind: () => nY, InferenceFlags: () => aY, InferencePriority: () => sY, InlayHintKind: () => Rse, InlayHints: () => XH, InternalEmitFlags: () => SY, InternalNodeBuilderFlags: () => VQ, InternalSymbolName: () => QQ, IntersectionFlags: () => JQ, InvalidatedProjectKind: () => dse, JSDocParsingMode: () => wY, JsDoc: () => Ev, JsTyping: () => t1, JsxEmit: () => pY, JsxFlags: () => NQ, JsxReferenceKind: () => tY, LanguageFeatureMinimumTarget: () => Cl, LanguageServiceMode: () => Lse, LanguageVariant: () => hY, LexicalEnvironmentFlags: () => CY, ListFormat: () => EY, LogLevel: () => vQ, MapCode: () => QH, MemberOverrideStatus: () => jQ, ModifierFlags: () => KR, ModuleDetectionKind: () => lY, ModuleInstanceState: () => mne, ModuleKind: () => xC, ModuleResolutionKind: () => TC, ModuleSpecifierEnding: () => jee, NavigateTo: () => ooe, NavigationBar: () => loe, NewLineKind: () => mY, NodeBuilderFlags: () => WQ, NodeCheckFlags: () => sj, NodeFactoryFlags: () => mte, NodeFlags: () => ZR, NodeResolutionFeatures: () => sne, ObjectFlags: () => oj, OperationCanceledException: () => lD, OperatorPrecedence: () => VK, OrganizeImports: () => Dv, OrganizeImportsMode: () => dU, OuterExpressionKinds: () => kY, OutliningElementsCollector: () => ZH, OutliningSpanKind: () => zse, OutputFileType: () => Wse, PackageJsonAutoImportPreference: () => Ose, PackageJsonDependencyGroup: () => Fse, PatternMatchKind: () => Cq, PollingInterval: () => pj, PollingWatchKind: () => fY, PragmaKindFlags: () => DY, PredicateSemantics: () => AQ, PreparePasteEdits: () => pG, PrivateIdentifierKind: () => Cte, ProcessLevel: () => Vne, ProgramUpdateLevel: () => Tie, QuotePreference: () => mae, RegularExpressionFlags: () => IQ, RelationComparisonResult: () => ej, Rename: () => LL, ScriptElementKind: () => qse, ScriptElementKindModifier: () => Hse, ScriptKind: () => lj, ScriptSnapshot: () => u9, ScriptTarget: () => gY, SemanticClassificationFormat: () => Mse, SemanticMeaning: () => $se, SemicolonPreference: () => gU, SignatureCheckMode: () => NW, SignatureFlags: () => cj, SignatureHelp: () => E8, SignatureInfo: () => Mie, SignatureKind: () => rY, SmartSelectionRange: () => tG, SnippetKind: () => _j, StatisticType: () => xse, StructureIsReused: () => nj, SymbolAccessibility: () => HQ, SymbolDisplay: () => O0, SymbolDisplayPartKind: () => f9, SymbolFlags: () => ij, SymbolFormatFlags: () => qQ, SyntaxKind: () => YR, Ternary: () => oY, ThrottledCancellationToken: () => hce, TokenClass: () => Use, TokenFlags: () => FQ, TransformFlags: () => uj, TypeFacts: () => wW, TypeFlags: () => aj, TypeFormatFlags: () => UQ, TypeMapKind: () => iY, TypePredicateKind: () => GQ, TypeReferenceSerializationKind: () => $Q, UnionReduction: () => BQ, UpToDateStatusType: () => ose, VarianceFlags: () => YQ, Version: () => xd, VersionRange: () => e7, WatchDirectoryFlags: () => yY, WatchDirectoryKind: () => _Y, WatchFileKind: () => uY, WatchLogLevel: () => kie, WatchType: () => Fl, accessPrivateIdentifier: () => jne, addEmitFlags: () => gm, addEmitHelper: () => jx, addEmitHelpers: () => Wg, addInternalEmitFlags: () => vS, addNodeFactoryPatcher: () => a0e, addObjectAllocatorPatcher: () => Uhe, addRange: () => In, addRelatedInfo: () => Us, addSyntheticLeadingComment: () => Vy, addSyntheticTrailingComment: () => C4, addToSeen: () => Jp, advancedAsyncSuperHelper: () => bF, affectsDeclarationPathOptionDeclarations: () => Nre, affectsEmitOptionDeclarations: () => Pre, allKeysStartWithDot: () => dO, altDirectorySeparator: () => a7, and: () => YI, append: () => Er, appendIfUnique: () => dh, arrayFrom: () => as, arrayIsEqualTo: () => Tf, arrayIsHomogeneous: () => Hee, arrayOf: () => sQ, arrayReverseIterator: () => NR, arrayToMap: () => yC, arrayToMultiMap: () => BP, arrayToNumericMap: () => oQ, assertType: () => bge, assign: () => q2, asyncSuperHelper: () => vF, attachFileToDiagnostics: () => Px, base64decode: () => uee, base64encode: () => lee, binarySearch: () => py, binarySearchKey: () => $T, bindSourceFile: () => yne, breakIntoCharacterSpans: () => Kae, breakIntoWordSpans: () => eoe, buildLinkParts: () => xae, buildOpts: () => eA, buildOverload: () => Hwe, bundlerModuleNameResolver: () => ane, canBeConvertedToAsync: () => Aq, canHaveDecorators: () => e2, canHaveExportModifier: () => kN, canHaveFlowNode: () => GC, canHaveIllegalDecorators: () => jz, canHaveIllegalModifiers: () => ure, canHaveIllegalType: () => I0e, canHaveIllegalTypeParameters: () => lre, canHaveJSDoc: () => H3, canHaveLocals: () => qm, canHaveModifiers: () => Up, canHaveModuleSpecifier: () => AK, canHaveSymbol: () => Ed, canIncludeBindAndCheckDiagnostics: () => m4, canJsonReportNoInputFiles: () => aA, canProduceDiagnostics: () => mA, canUsePropertyAccess: () => WJ, canWatchAffectingLocation: () => Kie, canWatchAtTypes: () => Zie, canWatchDirectoryOrFile: () => AV, canWatchDirectoryOrFilePath: () => NA, cartesianProduct: () => hQ, cast: () => Hs, chainBundle: () => Ld, chainDiagnosticMessages: () => Cs, changeAnyExtension: () => HP, changeCompilerHostLikeToUseCache: () => ow, changeExtension: () => S0, changeFullExtension: () => l7, changesAffectModuleResolution: () => M7, changesAffectingProgramStructure: () => VZ, characterCodeToRegularExpressionFlag: () => kj, childIsDecorated: () => RD, classElementOrClassElementParameterIsDecorated: () => xB, classHasClassThisAssignment: () => qW, classHasDeclaredOrExplicitlyAssignedName: () => HW, classHasExplicitlyAssignedName: () => wO, classOrConstructorParameterIsDecorated: () => g0, classicNameResolver: () => pne, classifier: () => Sce, cleanExtendedConfigCache: () => OO, clear: () => Ap, clearMap: () => B_, clearSharedExtendedConfigFileWatcher: () => aV, climbPastPropertyAccess: () => m9, clone: () => cQ, cloneCompilerOptions: () => MU, closeFileWatcher: () => od, closeFileWatcherOf: () => gp, codefix: () => Fu, collapseTextChangeRangesAcrossMultipleVersions: () => tZ, collectExternalModuleInfo: () => zW, combine: () => GT, combinePaths: () => On, commandLineOptionOfCustomType: () => Fre, commentPragmas: () => n7, commonOptionsWithBuild: () => GF, compact: () => RP, compareBooleans: () => j1, compareDataObjects: () => gJ, compareDiagnostics: () => c4, compareEmitHelpers: () => Dte, compareNumberOfDirectorySeparators: () => SN, comparePaths: () => gh, comparePathsCaseInsensitive: () => Uge, comparePathsCaseSensitive: () => Vge, comparePatternKeys: () => SW, compareProperties: () => pQ, compareStringsCaseInsensitive: () => zP, compareStringsCaseInsensitiveEslintCompatible: () => uQ, compareStringsCaseSensitive: () => uu, compareStringsCaseSensitiveUI: () => WP, compareTextSpans: () => XI, compareValues: () => yo, compilerOptionsAffectDeclarationPath: () => Iee, compilerOptionsAffectEmit: () => Aee, compilerOptionsAffectSemanticDiagnostics: () => Nee, compilerOptionsDidYouMeanDiagnostics: () => YF, compilerOptionsIndicateEsModules: () => WU, computeCommonSourceDirectoryOfFilenames: () => Cie, computeLineAndCharacterOfPosition: () => EC, computeLineOfPosition: () => dD, computeLineStarts: () => nx, computePositionOfLineAndCharacter: () => p7, computeSignatureWithDiagnostics: () => CV, computeSuggestionDiagnostics: () => wq, computedOptions: () => l4, concatenate: () => zi, concatenateDiagnosticMessageChains: () => xee, consumesNodeCoreModules: () => V9, contains: () => ys, containsIgnoredPath: () => y4, containsObjectRestOrSpread: () => QN, containsParseError: () => fx, containsPath: () => np, convertCompilerOptionsForTelemetry: () => $re, convertCompilerOptionsFromJson: () => zye, convertJsonOption: () => OS, convertToBase64: () => cee, convertToJson: () => nA, convertToObject: () => Wre, convertToOptionsWithAbsolutePaths: () => tO, convertToRelativePath: () => fD, convertToTSConfig: () => iW, convertTypeAcquisitionFromJson: () => Wye, copyComments: () => VS, copyEntries: () => R7, copyLeadingComments: () => Z6, copyProperties: () => RR, copyTrailingAsLeadingComments: () => YA, copyTrailingComments: () => xw, couldStartTrivia: () => zY, countWhere: () => l0, createAbstractBuilder: () => $ve, createAccessorPropertyBackingField: () => zz, createAccessorPropertyGetRedirector: () => yre, createAccessorPropertySetRedirector: () => vre, createBaseNodeFactory: () => ute, createBinaryExpressionTrampoline: () => WF, createBuilderProgram: () => EV, createBuilderProgramUsingIncrementalBuildInfo: () => Xie, createBuilderStatusReporter: () => r9, createCacheableExportInfoMap: () => hq, createCachedDirectoryStructureHost: () => IO, createClassifier: () => k2e, createCommentDirectivesMap: () => XZ, createCompilerDiagnostic: () => Zo, createCompilerDiagnosticForInvalidCustomType: () => Ore, createCompilerDiagnosticFromMessageChain: () => J5, createCompilerHost: () => Eie, createCompilerHostFromProgramHost: () => HV, createCompilerHostWorker: () => LO, createDetachedDiagnostic: () => wx, createDiagnosticCollection: () => ZD, createDiagnosticForFileFromMessageChain: () => yB, createDiagnosticForNode: () => sn, createDiagnosticForNodeArray: () => BC, createDiagnosticForNodeArrayFromMessageChain: () => k3, createDiagnosticForNodeFromMessageChain: () => Fg, createDiagnosticForNodeInSourceFile: () => sp, createDiagnosticForRange: () => lK, createDiagnosticMessageChainFromDiagnostic: () => cK, createDiagnosticReporter: () => lk, createDocumentPositionMapper: () => Fne, createDocumentRegistry: () => Wae, createDocumentRegistryInternal: () => Tq, createEmitAndSemanticDiagnosticsBuilderProgram: () => NV, createEmitHelperFactory: () => Ete, createEmptyExports: () => WN, createEvaluator: () => rte, createExpressionForJsxElement: () => nre, createExpressionForJsxFragment: () => ire, createExpressionForObjectLiteralElementLike: () => sre, createExpressionForPropertyName: () => Iz, createExpressionFromEntityName: () => VN, createExternalHelpersImportDeclarationIfNeeded: () => Lz, createFileDiagnostic: () => ll, createFileDiagnosticFromMessageChain: () => G7, createFlowNode: () => tg, createForOfBindingStatement: () => Az, createFutureSourceFile: () => X9, createGetCanonicalFileName: () => Yl, createGetIsolatedDeclarationErrors: () => fie, createGetSourceFile: () => _V, createGetSymbolAccessibilityDiagnosticForNode: () => gv, createGetSymbolAccessibilityDiagnosticForNodeName: () => _ie, createGetSymbolWalker: () => vne, createIncrementalCompilerHost: () => t9, createIncrementalProgram: () => ase, createJsxFactoryExpression: () => Nz, createLanguageService: () => yce, createLanguageServiceSourceFile: () => dL, createMemberAccessForPropertyName: () => IS, createModeAwareCache: () => A6, createModeAwareCacheKey: () => H4, createModeMismatchDetails: () => rB, createModuleNotFoundChain: () => B7, createModuleResolutionCache: () => I6, createModuleResolutionLoader: () => hV, createModuleResolutionLoaderUsingGlobalCache: () => nse, createModuleSpecifierResolutionHost: () => bv, createMultiMap: () => Fp, createNameResolver: () => GJ, createNodeConverters: () => pte, createNodeFactory: () => PN, createOptionNameMap: () => XF, createOverload: () => mG, createPackageJsonImportFilter: () => K6, createPackageJsonInfo: () => lq, createParenthesizerRules: () => _te, createPatternMatcher: () => Gae, createPrinter: () => Ky, createPrinterWithDefaults: () => bie, createPrinterWithRemoveComments: () => i2, createPrinterWithRemoveCommentsNeverAsciiEscape: () => Sie, createPrinterWithRemoveCommentsOmitTrailingSemicolon: () => sV, createProgram: () => DA, createProgramDiagnostics: () => Oie, createProgramHost: () => GV, createPropertyNameNodeForIdentifierOrLiteral: () => aF, createQueue: () => JP, createRange: () => cp, createRedirectedBuilderProgram: () => PV, createResolutionCache: () => FV, createRuntimeTypeSerializer: () => $ne, createScanner: () => Dg, createSemanticDiagnosticsBuilderProgram: () => Gve, createSet: () => jR, createSolutionBuilder: () => _se, createSolutionBuilderHost: () => lse, createSolutionBuilderWithWatch: () => fse, createSolutionBuilderWithWatchHost: () => use, createSortedArray: () => PR, createSourceFile: () => ek, createSourceMapGenerator: () => wne, createSourceMapSource: () => u0e, createSuperAccessVariableStatement: () => NO, createSymbolTable: () => Ws, createSymlinkCache: () => EJ, createSyntacticTypeNodeBuilder: () => Nse, createSystemWatchFunctions: () => FY, createTextChange: () => UA, createTextChangeFromStartLength: () => w9, createTextChangeRange: () => r3, createTextRangeFromNode: () => BU, createTextRangeFromSpan: () => D9, createTextSpan: () => Zl, createTextSpanFromBounds: () => Nc, createTextSpanFromNode: () => u_, createTextSpanFromRange: () => A0, createTextSpanFromStringLiteralLikeContent: () => jU, createTextWriter: () => nN, createTokenRange: () => _J, createTypeChecker: () => Ene, createTypeReferenceDirectiveResolutionCache: () => _O, createTypeReferenceResolutionLoader: () => jO, createWatchCompilerHost: () => ibe, createWatchCompilerHostOfConfigFile: () => $V, createWatchCompilerHostOfFilesAndCompilerOptions: () => XV, createWatchFactory: () => qV, createWatchHost: () => UV, createWatchProgram: () => QV, createWatchStatusReporter: () => OV, createWriteFileMeasuringIO: () => fV, declarationNameToString: () => lo, decodeMappings: () => jW, decodedTextSpanIntersectsWith: () => t3, deduplicate: () => hb, defaultHoverMaximumTruncationLength: () => zZ, defaultInitCompilerOptions: () => oye, defaultMaximumTruncationLength: () => ND, diagnosticCategoryName: () => G2, diagnosticToString: () => l2, diagnosticsEqualityComparer: () => z5, directoryProbablyExists: () => Pd, directorySeparator: () => To, displayPart: () => W_, displayPartsToString: () => u8, disposeEmitNodes: () => iz, documentSpansEqual: () => XU, dumpTracingLegend: () => PQ, elementAt: () => fy, elideNodes: () => hre, emitDetachedComments: () => ZK, emitFiles: () => nV, emitFilesAndReportErrors: () => YO, emitFilesAndReportErrorsAndGetExitStatus: () => VV, emitModuleKindIsNonNodeESM: () => hN, emitNewLineBeforeLeadingCommentOfPosition: () => YK, emitResolverSkipsTypeChecking: () => rV, emitSkippedWithNoDiagnostics: () => bV, emptyArray: () => He, emptyFileSystemEntries: () => OJ, emptyMap: () => SR, emptyOptions: () => qp, endsWith: () => Po, ensurePathIsNonModuleName: () => $2, ensureScriptKind: () => Y5, ensureTrailingDirectorySeparator: () => gl, entityNameToString: () => ef, enumerateInsertsAndDeletes: () => KI, equalOwnProperties: () => aQ, equateStringsCaseInsensitive: () => hy, equateStringsCaseSensitive: () => bb, equateValues: () => gy, escapeJsxAttributeString: () => GB, escapeLeadingUnderscores: () => rc, escapeNonAsciiString: () => b5, escapeSnippetText: () => Ub, escapeString: () => Ym, escapeTemplateSubstitution: () => qB, evaluatorResult: () => yl, every: () => Ii, exclusivelyPrefixedNodeCoreModules: () => pF, executeCommandLine: () => Rbe, expandPreOrPostfixIncrementOrDecrementExpression: () => RF, explainFiles: () => jV, explainIfFileIsRedirectAndImpliedFormat: () => BV, exportAssignmentIsAlias: () => Q3, expressionResultIsUnused: () => $ee, extend: () => MR, extensionFromPath: () => p4, extensionIsTS: () => rF, extensionsNotSupportingExtensionlessResolution: () => tF, externalHelpersModuleNameText: () => Py, factory: () => N, fileExtensionIs: () => Qo, fileExtensionIsOneOf: () => kc, fileIncludeReasonToDiagnostics: () => WV, fileShouldUseJavaScriptRequire: () => gq, filter: () => kn, filterMutate: () => kR, filterSemanticDiagnostics: () => WO, find: () => Nn, findAncestor: () => dr, findBestPatternMatch: () => UR, findChildOfKind: () => Za, findComputedPropertyNameCacheAssignment: () => VF, findConfigFile: () => lV, findConstructorDeclaration: () => DN, findContainingList: () => b9, findDiagnosticForNode: () => Fae, findFirstNonJsxWhitespaceToken: () => rae, findIndex: () => cc, findLast: () => gb, findLastIndex: () => HI, findListItemInfo: () => tae, findModifier: () => X6, findNextToken: () => c2, findPackageJson: () => Iae, findPackageJsons: () => cq, findPrecedingMatchingToken: () => C9, findPrecedingToken: () => pl, findSuperStatementIndexPath: () => kO, findTokenOnLeftOfPosition: () => gw, findUseStrictPrologue: () => Oz, first: () => wa, firstDefined: () => Lc, firstDefinedIterator: () => MP, firstIterator: () => IR, firstOrOnly: () => fq, firstOrUndefined: () => Yc, firstOrUndefinedIterator: () => $I, fixupCompilerOptions: () => Iq, flatMap: () => Da, flatMapIterator: () => CR, flatMapToMutable: () => KE, flatten: () => Ip, flattenCommaList: () => bre, flattenDestructuringAssignment: () => jS, flattenDestructuringBinding: () => n2, flattenDiagnosticMessageText: () => km, forEach: () => lr, forEachAncestor: () => UZ, forEachAncestorDirectory: () => pD, forEachAncestorDirectoryStoppingAtGlobalCache: () => eg, forEachChild: () => Es, forEachChildRecursively: () => Kx, forEachDynamicImportOrRequireCall: () => dF, forEachEmittedFile: () => ZW, forEachEnclosingBlockScopeContainer: () => sK, forEachEntry: () => hl, forEachExternalModuleToImportFrom: () => vq, forEachImportClauseDeclaration: () => IK, forEachKey: () => Ag, forEachLeadingCommentRange: () => XP, forEachNameInAccessChainWalkingLeft: () => yee, forEachNameOfDefaultExport: () => Y9, forEachOptionsSyntaxByName: () => KJ, forEachProjectReference: () => x4, forEachPropertyAssignment: () => WC, forEachResolvedProjectReference: () => YJ, forEachReturnStatement: () => Fy, forEachRight: () => YX, forEachTrailingCommentRange: () => QP, forEachTsConfigPropArray: () => P3, forEachUnique: () => YU, forEachYieldExpression: () => pK, formatColorAndReset: () => s2, formatDiagnostic: () => pV, formatDiagnostics: () => Sve, formatDiagnosticsWithColorAndContext: () => Nie, formatGeneratedName: () => _v, formatGeneratedNamePart: () => D6, formatLocation: () => dV, formatMessage: () => Nx, formatStringFromArgs: () => jg, formatting: () => nl, generateDjb2Hash: () => uD, generateTSConfig: () => Vre, getAdjustedReferenceLocation: () => NU, getAdjustedRenameLocation: () => T9, getAliasDeclarationFromName: () => LB, getAllAccessorDeclarations: () => Bb, getAllDecoratorsOfClass: () => VW, getAllDecoratorsOfClassElement: () => EO, getAllJSDocTags: () => b7, getAllJSDocTagsOfKind: () => phe, getAllKeys: () => gge, getAllProjectOutputs: () => AO, getAllSuperTypeNodes: () => HD, getAllowImportingTsExtensions: () => Cee, getAllowJSCompilerOption: () => Jy, getAllowSyntheticDefaultImports: () => Ax, getAncestor: () => Q1, getAnyExtensionFromPath: () => ex, getAreDeclarationMapsEnabled: () => W5, getAssignedExpandoInitializer: () => mx, getAssignedName: () => h7, getAssignmentDeclarationKind: () => Ac, getAssignmentDeclarationPropertyAccessKind: () => z3, getAssignmentTargetKind: () => Oy, getAutomaticTypeDirectiveNames: () => lO, getBaseFileName: () => Zc, getBinaryOperatorPrecedence: () => eN, getBuildInfo: () => iV, getBuildInfoFileVersionMap: () => wV, getBuildInfoText: () => yie, getBuildOrderFromAnyBuildOrder: () => IA, getBuilderCreationParameters: () => HO, getBuilderFileEmit: () => e1, getCanonicalDiagnostic: () => uK, getCheckFlags: () => _c, getClassExtendsHeritageElement: () => Lb, getClassLikeDeclarationOfSymbol: () => Eh, getCombinedLocalAndExportSymbolFlags: () => r6, getCombinedModifierFlags: () => J1, getCombinedNodeFlags: () => yh, getCombinedNodeFlagsAlwaysIncludeJSDoc: () => Nj, getCommentRange: () => hm, getCommonSourceDirectory: () => aw, getCommonSourceDirectoryOfConfig: () => BS, getCompilerOptionValue: () => q5, getConditions: () => Qy, getConfigFileParsingDiagnostics: () => a2, getConstantValue: () => yte, getContainerFlags: () => xW, getContainerNode: () => WS, getContainingClass: () => Wl, getContainingClassExcludingClassDecorators: () => t5, getContainingClassStaticBlock: () => SK, getContainingFunction: () => Af, getContainingFunctionDeclaration: () => bK, getContainingFunctionOrClassStaticBlock: () => e5, getContainingNodeArray: () => Xee, getContainingObjectLiteralElement: () => _8, getContextualTypeFromParent: () => R9, getContextualTypeFromParentOrAncestorTypeNode: () => S9, getDeclarationDiagnostics: () => pie, getDeclarationEmitExtensionForPath: () => x5, getDeclarationEmitOutputFilePath: () => GK, getDeclarationEmitOutputFilePathWorker: () => T5, getDeclarationFileExtension: () => qF, getDeclarationFromName: () => qD, getDeclarationModifierFlagsFromSymbol: () => up, getDeclarationOfKind: () => Lo, getDeclarationsOfKind: () => WZ, getDeclaredExpandoInitializer: () => zD, getDecorators: () => Ty, getDefaultCompilerOptions: () => pL, getDefaultFormatCodeSettings: () => _9, getDefaultLibFileName: () => ZP, getDefaultLibFilePath: () => vce, getDefaultLikeExportInfo: () => Q9, getDefaultLikeExportNameFromDeclaration: () => pq, getDefaultResolutionModeForFileWorker: () => zO, getDiagnosticText: () => D_, getDiagnosticsWithinSpan: () => Oae, getDirectoryPath: () => Hn, getDirectoryToWatchFailedLookupLocation: () => IV, getDirectoryToWatchFailedLookupLocationFromTypeRoot: () => tse, getDocumentPositionMapper: () => Dq, getDocumentSpansEqualityComparer: () => QU, getESModuleInterop: () => mm, getEditsForFileRename: () => Uae, getEffectiveBaseTypeNode: () => wd, getEffectiveConstraintOfTypeParameter: () => NC, getEffectiveContainerForJSDocTemplateTag: () => p5, getEffectiveImplementsTypeNodes: () => XC, getEffectiveInitializer: () => j3, getEffectiveJSDocHost: () => X1, getEffectiveModifierFlags: () => fu, getEffectiveModifierFlagsAlwaysIncludeJSDoc: () => ree, getEffectiveModifierFlagsNoCache: () => nee, getEffectiveReturnTypeNode: () => nf, getEffectiveSetAccessorTypeAnnotationNode: () => tJ, getEffectiveTypeAnnotationNode: () => Kc, getEffectiveTypeParameterDeclarations: () => xy, getEffectiveTypeRoots: () => q4, getElementOrPropertyAccessArgumentExpressionOrName: () => f5, getElementOrPropertyAccessName: () => Sh, getElementsOfBindingOrAssignmentPattern: () => E6, getEmitDeclarations: () => J_, getEmitFlags: () => Pa, getEmitHelpers: () => sz, getEmitModuleDetectionKind: () => Eee, getEmitModuleFormatOfFileWorker: () => uw, getEmitModuleKind: () => Hu, getEmitModuleResolutionKind: () => wu, getEmitScriptTarget: () => va, getEmitStandardClassFields: () => kJ, getEnclosingBlockScopeContainer: () => Dd, getEnclosingContainer: () => H7, getEncodedSemanticClassifications: () => bq, getEncodedSyntacticClassifications: () => Sq, getEndLinePosition: () => v3, getEntityNameFromTypeNode: () => I3, getEntrypointsFromPackageJsonInfo: () => yW, getErrorCountForSummary: () => XO, getErrorSpanForNode: () => sS, getErrorSummaryText: () => MV, getEscapedTextOfIdentifierOrLiteral: () => XD, getEscapedTextOfJsxAttributeName: () => S4, getEscapedTextOfJsxNamespacedName: () => Lx, getExpandoInitializer: () => G1, getExportAssignmentExpression: () => MB, getExportInfoMap: () => n8, getExportNeedsImportStarHelper: () => One, getExpressionAssociativity: () => VB, getExpressionPrecedence: () => YD, getExternalHelpersModuleName: () => qN, getExternalModuleImportEqualsDeclarationExpression: () => jD, getExternalModuleName: () => hx, getExternalModuleNameFromDeclaration: () => qK, getExternalModuleNameFromPath: () => QB, getExternalModuleNameLiteral: () => Zx, getExternalModuleRequireArgument: () => CB, getFallbackOptions: () => kA, getFileEmitOutput: () => Lie, getFileMatcherPatterns: () => Q5, getFileNamesFromConfigSpecs: () => V4, getFileWatcherEventKind: () => gj, getFilesInErrorForSummary: () => QO, getFirstConstructorWithBody: () => Mg, getFirstIdentifier: () => i_, getFirstNonSpaceCharacterPosition: () => Eae, getFirstProjectOutput: () => tV, getFixableErrorSpanExpression: () => uq, getFormatCodeSettingsForWriting: () => G9, getFullWidth: () => h3, getFunctionFlags: () => Mc, getHeritageClause: () => Y3, getHostSignatureFromJSDoc: () => $1, getIdentifierAutoGenerate: () => p0e, getIdentifierGeneratedImportReference: () => kte, getIdentifierTypeArguments: () => bS, getImmediatelyInvokedFunctionExpression: () => q1, getImpliedNodeFormatForEmitWorker: () => JS, getImpliedNodeFormatForFile: () => EA, getImpliedNodeFormatForFileWorker: () => JO, getImportNeedsImportDefaultHelper: () => JW, getImportNeedsImportStarHelper: () => TO, getIndentString: () => S5, getInferredLibraryNameResolveFrom: () => BO, getInitializedVariables: () => s4, getInitializerOfBinaryExpression: () => PB, getInitializerOfBindingOrAssignmentElement: () => GN, getInterfaceBaseTypeNodes: () => GD, getInternalEmitFlags: () => sd, getInvokedExpression: () => i5, getIsFileExcluded: () => Bae, getIsolatedModules: () => zp, getJSDocAugmentsTag: () => _Z, getJSDocClassTag: () => Fj, getJSDocCommentRanges: () => bB, getJSDocCommentsAndTags: () => NB, getJSDocDeprecatedTag: () => Oj, getJSDocDeprecatedTagNoCache: () => yZ, getJSDocEnumTag: () => Lj, getJSDocHost: () => Fb, getJSDocImplementsTags: () => fZ, getJSDocOverloadTags: () => IB, getJSDocOverrideTagNoCache: () => hZ, getJSDocParameterTags: () => PC, getJSDocParameterTagsNoCache: () => oZ, getJSDocPrivateTag: () => lhe, getJSDocPrivateTagNoCache: () => dZ, getJSDocProtectedTag: () => uhe, getJSDocProtectedTagNoCache: () => mZ, getJSDocPublicTag: () => che, getJSDocPublicTagNoCache: () => pZ, getJSDocReadonlyTag: () => _he, getJSDocReadonlyTagNoCache: () => gZ, getJSDocReturnTag: () => vZ, getJSDocReturnType: () => i3, getJSDocRoot: () => $C, getJSDocSatisfiesExpressionType: () => UJ, getJSDocSatisfiesTag: () => Mj, getJSDocTags: () => W1, getJSDocTemplateTag: () => fhe, getJSDocThisTag: () => y7, getJSDocType: () => f0, getJSDocTypeAliasName: () => Rz, getJSDocTypeAssertionType: () => k6, getJSDocTypeParameterDeclarations: () => w5, getJSDocTypeParameterTags: () => cZ, getJSDocTypeParameterTagsNoCache: () => lZ, getJSDocTypeTag: () => z1, getJSXImplicitImportBase: () => yN, getJSXRuntimeImport: () => G5, getJSXTransformEnabled: () => H5, getKeyForCompilerOptions: () => pW, getLanguageVariant: () => fN, getLastChild: () => hJ, getLeadingCommentRanges: () => Eg, getLeadingCommentRangesOfNode: () => vB, getLeftmostAccessExpression: () => n6, getLeftmostExpression: () => i6, getLibFileNameFromLibReference: () => QJ, getLibNameFromLibReference: () => XJ, getLibraryNameFromLibFileName: () => yV, getLineAndCharacterOfPosition: () => zs, getLineInfo: () => RW, getLineOfLocalPosition: () => KD, getLineStartPositionForPosition: () => Hp, getLineStarts: () => kg, getLinesBetweenPositionAndNextNonWhitespaceCharacter: () => mee, getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter: () => dee, getLinesBetweenPositions: () => mD, getLinesBetweenRangeEndAndRangeStart: () => fJ, getLinesBetweenRangeEndPositions: () => Whe, getLiteralText: () => ZZ, getLocalNameForExternalImport: () => C6, getLocalSymbolForExportDefault: () => n4, getLocaleSpecificMessage: () => ks, getLocaleTimeString: () => AA, getMappedContextSpan: () => ZU, getMappedDocumentSpan: () => O9, getMappedLocation: () => bw, getMatchedFileSpec: () => JV, getMatchedIncludeSpec: () => zV, getMeaningFromDeclaration: () => p9, getMeaningFromLocation: () => zS, getMembersOfDeclaration: () => dK, getModeForFileReference: () => Aie, getModeForResolutionAtIndex: () => Dve, getModeForUsageLocation: () => gV, getModifiedTime: () => KT, getModifiers: () => Tb, getModuleInstanceState: () => Ah, getModuleNameStringLiteralAt: () => wA, getModuleSpecifierEndingPreference: () => Bee, getModuleSpecifierResolverHost: () => VU, getNameForExportedSymbol: () => U9, getNameFromImportAttribute: () => uF, getNameFromIndexInfo: () => aK, getNameFromPropertyName: () => HA, getNameOfAccessExpression: () => vJ, getNameOfCompilerOptionValue: () => eO, getNameOfDeclaration: () => ds, getNameOfExpando: () => EB, getNameOfJSDocTypedef: () => aZ, getNameOfScriptTarget: () => U5, getNameOrArgument: () => J3, getNameTable: () => nH, getNamespaceDeclarationNode: () => HC, getNewLineCharacter: () => v0, getNewLineKind: () => r8, getNewLineOrDefaultFromHost: () => Fh, getNewTargetContainer: () => xK, getNextJSDocCommentLocation: () => AB, getNodeChildren: () => wz, getNodeForGeneratedName: () => XN, getNodeId: () => ja, getNodeKind: () => o2, getNodeModifiers: () => hw, getNodeModulePathParts: () => oF, getNonAssignedNameOfDeclaration: () => g7, getNonAssignmentOperatorForCompoundAssignment: () => K4, getNonAugmentationDeclaration: () => fB, getNonDecoratorTokenPosOfNode: () => aB, getNonIncrementalBuildInfoRoots: () => Qie, getNonModifierTokenPosOfNode: () => QZ, getNormalizedAbsolutePath: () => Ki, getNormalizedAbsolutePathWithoutRoot: () => bj, getNormalizedPathComponents: () => c7, getObjectFlags: () => Dn, getOperatorAssociativity: () => UB, getOperatorPrecedence: () => K3, getOptionFromName: () => Kz, getOptionsForLibraryResolution: () => dW, getOptionsNameMap: () => P6, getOptionsSyntaxByArrayElementValue: () => ZJ, getOptionsSyntaxByValue: () => ote, getOrCreateEmitNode: () => du, getOrUpdate: () => eD, getOriginalNode: () => qo, getOriginalNodeId: () => l_, getOutputDeclarationFileName: () => sw, getOutputDeclarationFileNameWorker: () => KW, getOutputExtension: () => SA, getOutputFileNames: () => vve, getOutputJSFileNameWorker: () => eV, getOutputPathsFor: () => iw, getOwnEmitOutputFilePath: () => HK, getOwnKeys: () => rm, getOwnValues: () => XT, getPackageJsonTypesVersionsPaths: () => cO, getPackageNameFromTypesPackageName: () => X4, getPackageScopeForPath: () => $4, getParameterSymbolFromJSDoc: () => G3, getParentNodeInSpan: () => $A, getParseTreeNode: () => Ts, getParsedCommandLineOfConfigFile: () => tA, getPathComponents: () => _u, getPathFromPathComponents: () => B1, getPathUpdater: () => kq, getPathsBasePath: () => k5, getPatternFromSpec: () => PJ, getPendingEmitKindWithSeen: () => qO, getPositionOfLineAndCharacter: () => GP, getPossibleGenericSignatures: () => IU, getPossibleOriginalInputExtensionForExtension: () => YB, getPossibleOriginalInputPathWithoutChangingExt: () => ZB, getPossibleTypeArgumentsInfo: () => FU, getPreEmitDiagnostics: () => bve, getPrecedingNonSpaceCharacterPosition: () => L9, getPrivateIdentifier: () => UW, getProperties: () => WW, getProperty: () => jP, getPropertyAssignmentAliasLikeExpression: () => BK, getPropertyNameForPropertyNameNode: () => pS, getPropertyNameFromType: () => fp, getPropertyNameOfBindingOrAssignmentElement: () => Mz, getPropertySymbolFromBindingElement: () => F9, getPropertySymbolsFromContextualType: () => mL, getQuoteFromPreference: () => qU, getQuotePreference: () => _f, getRangesWhere: () => wR, getRefactorContextSpan: () => pk, getReferencedFileLocation: () => lw, getRegexFromPattern: () => b0, getRegularExpressionForWildcard: () => u4, getRegularExpressionsForWildcards: () => $5, getRelativePathFromDirectory: () => Nf, getRelativePathFromFile: () => CC, getRelativePathToDirectoryOrUrl: () => rx, getRenameLocation: () => QA, getReplacementSpanForContextToken: () => RU, getResolutionDiagnostic: () => TV, getResolutionModeOverride: () => j6, getResolveJsonModule: () => zb, getResolvePackageJsonExports: () => dN, getResolvePackageJsonImports: () => mN, getResolvedExternalModuleName: () => XB, getResolvedModuleFromResolution: () => _x, getResolvedTypeReferenceDirectiveFromResolution: () => j7, getRestIndicatorOfBindingOrAssignmentElement: () => JF, getRestParameterElementType: () => SB, getRightMostAssignedExpression: () => B3, getRootDeclaration: () => _m, getRootDirectoryOfResolutionCache: () => rse, getRootLength: () => kd, getScriptKind: () => rq, getScriptKindFromFileName: () => Z5, getScriptTargetFeatures: () => oB, getSelectedEffectiveModifierFlags: () => xx, getSelectedSyntacticModifierFlags: () => eee, getSemanticClassifications: () => Jae, getSemanticJsxChildren: () => YC, getSetAccessorTypeAnnotationNode: () => XK, getSetAccessorValueParameter: () => e4, getSetExternalModuleIndicator: () => pN, getShebang: () => d7, getSingleVariableOfVariableStatement: () => bx, getSnapshotText: () => fk, getSnippetElement: () => az, getSourceFileOfModule: () => y3, getSourceFileOfNode: () => xr, getSourceFilePathInNewDir: () => E5, getSourceFileVersionAsHashFromText: () => ZO, getSourceFilesToEmit: () => C5, getSourceMapRange: () => x0, getSourceMapper: () => roe, getSourceTextOfNodeFromSourceFile: () => Db, getSpanOfTokenAtPosition: () => om, getSpellingSuggestion: () => Sb, getStartPositionOfLine: () => Ny, getStartPositionOfRange: () => i4, getStartsOnNewLine: () => k4, getStaticPropertiesAndClassStaticBlock: () => CO, getStrictOptionValue: () => pu, getStringComparer: () => bC, getSubPatternFromSpec: () => X5, getSuperCallFromStatement: () => xO, getSuperContainer: () => N3, getSupportedCodeFixes: () => tH, getSupportedExtensions: () => _4, getSupportedExtensionsWithJsonIfResolveJsonModule: () => bN, getSwitchedType: () => sq, getSymbolId: () => Zs, getSymbolNameForPrivateIdentifier: () => Z3, getSymbolTarget: () => nq, getSyntacticClassifications: () => zae, getSyntacticModifierFlags: () => h0, getSyntacticModifierFlagsNoCache: () => iJ, getSynthesizedDeepClone: () => Ha, getSynthesizedDeepCloneWithReplacements: () => wN, getSynthesizedDeepClones: () => qb, getSynthesizedDeepClonesWithReplacements: () => ez, getSyntheticLeadingComments: () => u6, getSyntheticTrailingComments: () => FN,