@zzzen/pyright-internal 1.1.254
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/analyzer/aliasDeclarationUtils.d.ts +9 -0
- package/dist/analyzer/aliasDeclarationUtils.js +128 -0
- package/dist/analyzer/aliasDeclarationUtils.js.map +1 -0
- package/dist/analyzer/analysis.d.ts +18 -0
- package/dist/analyzer/analysis.js +81 -0
- package/dist/analyzer/analysis.js.map +1 -0
- package/dist/analyzer/analyzerFileInfo.d.ts +39 -0
- package/dist/analyzer/analyzerFileInfo.js +17 -0
- package/dist/analyzer/analyzerFileInfo.js.map +1 -0
- package/dist/analyzer/analyzerNodeInfo.d.ts +32 -0
- package/dist/analyzer/analyzerNodeInfo.js +138 -0
- package/dist/analyzer/analyzerNodeInfo.js.map +1 -0
- package/dist/analyzer/backgroundAnalysisProgram.d.ts +54 -0
- package/dist/analyzer/backgroundAnalysisProgram.js +222 -0
- package/dist/analyzer/backgroundAnalysisProgram.js.map +1 -0
- package/dist/analyzer/binder.d.ts +149 -0
- package/dist/analyzer/binder.js +3195 -0
- package/dist/analyzer/binder.js.map +1 -0
- package/dist/analyzer/checker.d.ts +116 -0
- package/dist/analyzer/checker.js +3828 -0
- package/dist/analyzer/checker.js.map +1 -0
- package/dist/analyzer/circularDependency.d.ts +7 -0
- package/dist/analyzer/circularDependency.js +51 -0
- package/dist/analyzer/circularDependency.js.map +1 -0
- package/dist/analyzer/codeFlowEngine.d.ts +21 -0
- package/dist/analyzer/codeFlowEngine.js +1132 -0
- package/dist/analyzer/codeFlowEngine.js.map +1 -0
- package/dist/analyzer/codeFlowTypes.d.ts +82 -0
- package/dist/analyzer/codeFlowTypes.js +134 -0
- package/dist/analyzer/codeFlowTypes.js.map +1 -0
- package/dist/analyzer/codeFlowUtils.d.ts +2 -0
- package/dist/analyzer/codeFlowUtils.js +348 -0
- package/dist/analyzer/codeFlowUtils.js.map +1 -0
- package/dist/analyzer/commentUtils.d.ts +4 -0
- package/dist/analyzer/commentUtils.js +131 -0
- package/dist/analyzer/commentUtils.js.map +1 -0
- package/dist/analyzer/constraintSolver.d.ts +7 -0
- package/dist/analyzer/constraintSolver.js +605 -0
- package/dist/analyzer/constraintSolver.js.map +1 -0
- package/dist/analyzer/constructorTransform.d.ts +4 -0
- package/dist/analyzer/constructorTransform.js +219 -0
- package/dist/analyzer/constructorTransform.js.map +1 -0
- package/dist/analyzer/dataClasses.d.ts +9 -0
- package/dist/analyzer/dataClasses.js +762 -0
- package/dist/analyzer/dataClasses.js.map +1 -0
- package/dist/analyzer/declaration.d.ts +90 -0
- package/dist/analyzer/declaration.js +42 -0
- package/dist/analyzer/declaration.js.map +1 -0
- package/dist/analyzer/declarationUtils.d.ts +12 -0
- package/dist/analyzer/declarationUtils.js +212 -0
- package/dist/analyzer/declarationUtils.js.map +1 -0
- package/dist/analyzer/docStringConversion.d.ts +2 -0
- package/dist/analyzer/docStringConversion.js +699 -0
- package/dist/analyzer/docStringConversion.js.map +1 -0
- package/dist/analyzer/docStringUtils.d.ts +3 -0
- package/dist/analyzer/docStringUtils.js +103 -0
- package/dist/analyzer/docStringUtils.js.map +1 -0
- package/dist/analyzer/functionTransform.d.ts +4 -0
- package/dist/analyzer/functionTransform.js +96 -0
- package/dist/analyzer/functionTransform.js.map +1 -0
- package/dist/analyzer/importResolver.d.ts +97 -0
- package/dist/analyzer/importResolver.js +1617 -0
- package/dist/analyzer/importResolver.js.map +1 -0
- package/dist/analyzer/importResult.d.ts +33 -0
- package/dist/analyzer/importResult.js +11 -0
- package/dist/analyzer/importResult.js.map +1 -0
- package/dist/analyzer/importStatementUtils.d.ts +46 -0
- package/dist/analyzer/importStatementUtils.js +618 -0
- package/dist/analyzer/importStatementUtils.js.map +1 -0
- package/dist/analyzer/namedTuples.d.ts +5 -0
- package/dist/analyzer/namedTuples.js +342 -0
- package/dist/analyzer/namedTuples.js.map +1 -0
- package/dist/analyzer/packageTypeReport.d.ts +52 -0
- package/dist/analyzer/packageTypeReport.js +45 -0
- package/dist/analyzer/packageTypeReport.js.map +1 -0
- package/dist/analyzer/packageTypeVerifier.d.ts +37 -0
- package/dist/analyzer/packageTypeVerifier.js +908 -0
- package/dist/analyzer/packageTypeVerifier.js.map +1 -0
- package/dist/analyzer/parentDirectoryCache.d.ts +23 -0
- package/dist/analyzer/parentDirectoryCache.js +71 -0
- package/dist/analyzer/parentDirectoryCache.js.map +1 -0
- package/dist/analyzer/parseTreeCleaner.d.ts +8 -0
- package/dist/analyzer/parseTreeCleaner.js +51 -0
- package/dist/analyzer/parseTreeCleaner.js.map +1 -0
- package/dist/analyzer/parseTreeUtils.d.ts +98 -0
- package/dist/analyzer/parseTreeUtils.js +1753 -0
- package/dist/analyzer/parseTreeUtils.js.map +1 -0
- package/dist/analyzer/parseTreeWalker.d.ts +81 -0
- package/dist/analyzer/parseTreeWalker.js +437 -0
- package/dist/analyzer/parseTreeWalker.js.map +1 -0
- package/dist/analyzer/patternMatching.d.ts +6 -0
- package/dist/analyzer/patternMatching.js +866 -0
- package/dist/analyzer/patternMatching.js.map +1 -0
- package/dist/analyzer/program.d.ts +158 -0
- package/dist/analyzer/program.js +1902 -0
- package/dist/analyzer/program.js.map +1 -0
- package/dist/analyzer/properties.d.ts +10 -0
- package/dist/analyzer/properties.js +368 -0
- package/dist/analyzer/properties.js.map +1 -0
- package/dist/analyzer/protocols.d.ts +8 -0
- package/dist/analyzer/protocols.js +409 -0
- package/dist/analyzer/protocols.js.map +1 -0
- package/dist/analyzer/pyTypedUtils.d.ts +6 -0
- package/dist/analyzer/pyTypedUtils.js +42 -0
- package/dist/analyzer/pyTypedUtils.js.map +1 -0
- package/dist/analyzer/pythonPathUtils.d.ts +14 -0
- package/dist/analyzer/pythonPathUtils.js +173 -0
- package/dist/analyzer/pythonPathUtils.js.map +1 -0
- package/dist/analyzer/scope.d.ts +39 -0
- package/dist/analyzer/scope.js +110 -0
- package/dist/analyzer/scope.js.map +1 -0
- package/dist/analyzer/scopeUtils.d.ts +6 -0
- package/dist/analyzer/scopeUtils.js +72 -0
- package/dist/analyzer/scopeUtils.js.map +1 -0
- package/dist/analyzer/service.d.ts +144 -0
- package/dist/analyzer/service.js +1197 -0
- package/dist/analyzer/service.js.map +1 -0
- package/dist/analyzer/sourceFile.d.ts +123 -0
- package/dist/analyzer/sourceFile.js +908 -0
- package/dist/analyzer/sourceFile.js.map +1 -0
- package/dist/analyzer/sourceMapper.d.ts +47 -0
- package/dist/analyzer/sourceMapper.js +543 -0
- package/dist/analyzer/sourceMapper.js.map +1 -0
- package/dist/analyzer/staticExpressions.d.ts +4 -0
- package/dist/analyzer/staticExpressions.js +242 -0
- package/dist/analyzer/staticExpressions.js.map +1 -0
- package/dist/analyzer/symbol.d.ts +50 -0
- package/dist/analyzer/symbol.js +160 -0
- package/dist/analyzer/symbol.js.map +1 -0
- package/dist/analyzer/symbolNameUtils.d.ts +8 -0
- package/dist/analyzer/symbolNameUtils.js +53 -0
- package/dist/analyzer/symbolNameUtils.js.map +1 -0
- package/dist/analyzer/symbolUtils.d.ts +7 -0
- package/dist/analyzer/symbolUtils.js +46 -0
- package/dist/analyzer/symbolUtils.js.map +1 -0
- package/dist/analyzer/testWalker.d.ts +14 -0
- package/dist/analyzer/testWalker.js +92 -0
- package/dist/analyzer/testWalker.js.map +1 -0
- package/dist/analyzer/tracePrinter.d.ts +11 -0
- package/dist/analyzer/tracePrinter.js +222 -0
- package/dist/analyzer/tracePrinter.js.map +1 -0
- package/dist/analyzer/typeCache.d.ts +40 -0
- package/dist/analyzer/typeCache.js +134 -0
- package/dist/analyzer/typeCache.js.map +1 -0
- package/dist/analyzer/typeDocStringUtils.d.ts +12 -0
- package/dist/analyzer/typeDocStringUtils.js +293 -0
- package/dist/analyzer/typeDocStringUtils.js.map +1 -0
- package/dist/analyzer/typeEvaluator.d.ts +18 -0
- package/dist/analyzer/typeEvaluator.js +16598 -0
- package/dist/analyzer/typeEvaluator.js.map +1 -0
- package/dist/analyzer/typeEvaluatorTypes.d.ts +220 -0
- package/dist/analyzer/typeEvaluatorTypes.js +16 -0
- package/dist/analyzer/typeEvaluatorTypes.js.map +1 -0
- package/dist/analyzer/typeEvaluatorWithTracker.d.ts +6 -0
- package/dist/analyzer/typeEvaluatorWithTracker.js +121 -0
- package/dist/analyzer/typeEvaluatorWithTracker.js.map +1 -0
- package/dist/analyzer/typeGuards.d.ts +6 -0
- package/dist/analyzer/typeGuards.js +1293 -0
- package/dist/analyzer/typeGuards.js.map +1 -0
- package/dist/analyzer/typePrinter.d.ts +17 -0
- package/dist/analyzer/typePrinter.js +603 -0
- package/dist/analyzer/typePrinter.js.map +1 -0
- package/dist/analyzer/typeStubWriter.d.ts +48 -0
- package/dist/analyzer/typeStubWriter.js +605 -0
- package/dist/analyzer/typeStubWriter.js.map +1 -0
- package/dist/analyzer/typeUtils.d.ts +134 -0
- package/dist/analyzer/typeUtils.js +2380 -0
- package/dist/analyzer/typeUtils.js.map +1 -0
- package/dist/analyzer/typeVarContext.d.ts +50 -0
- package/dist/analyzer/typeVarContext.js +250 -0
- package/dist/analyzer/typeVarContext.js.map +1 -0
- package/dist/analyzer/typedDicts.d.ts +12 -0
- package/dist/analyzer/typedDicts.js +695 -0
- package/dist/analyzer/typedDicts.js.map +1 -0
- package/dist/analyzer/types.d.ts +484 -0
- package/dist/analyzer/types.js +1844 -0
- package/dist/analyzer/types.js.map +1 -0
- package/dist/backgroundAnalysis.d.ts +14 -0
- package/dist/backgroundAnalysis.js +42 -0
- package/dist/backgroundAnalysis.js.map +1 -0
- package/dist/backgroundAnalysisBase.d.ts +83 -0
- package/dist/backgroundAnalysisBase.js +429 -0
- package/dist/backgroundAnalysisBase.js.map +1 -0
- package/dist/backgroundThreadBase.d.ts +34 -0
- package/dist/backgroundThreadBase.js +134 -0
- package/dist/backgroundThreadBase.js.map +1 -0
- package/dist/commands/commandController.d.ts +13 -0
- package/dist/commands/commandController.js +48 -0
- package/dist/commands/commandController.js.map +1 -0
- package/dist/commands/commandResult.d.ts +9 -0
- package/dist/commands/commandResult.js +19 -0
- package/dist/commands/commandResult.js.map +1 -0
- package/dist/commands/commands.d.ts +7 -0
- package/dist/commands/commands.js +11 -0
- package/dist/commands/commands.js.map +1 -0
- package/dist/commands/createTypeStub.d.ts +8 -0
- package/dist/commands/createTypeStub.js +50 -0
- package/dist/commands/createTypeStub.js.map +1 -0
- package/dist/commands/quickActionCommand.d.ts +8 -0
- package/dist/commands/quickActionCommand.js +31 -0
- package/dist/commands/quickActionCommand.js.map +1 -0
- package/dist/commands/restartServer.d.ts +8 -0
- package/dist/commands/restartServer.js +20 -0
- package/dist/commands/restartServer.js.map +1 -0
- package/dist/common/cancellationUtils.d.ts +16 -0
- package/dist/common/cancellationUtils.js +60 -0
- package/dist/common/cancellationUtils.js.map +1 -0
- package/dist/common/chokidarFileWatcherProvider.d.ts +9 -0
- package/dist/common/chokidarFileWatcherProvider.js +88 -0
- package/dist/common/chokidarFileWatcherProvider.js.map +1 -0
- package/dist/common/collectionUtils.d.ts +114 -0
- package/dist/common/collectionUtils.js +292 -0
- package/dist/common/collectionUtils.js.map +1 -0
- package/dist/common/commandLineOptions.d.ts +41 -0
- package/dist/common/commandLineOptions.js +46 -0
- package/dist/common/commandLineOptions.js.map +1 -0
- package/dist/common/configOptions.d.ts +144 -0
- package/dist/common/configOptions.js +908 -0
- package/dist/common/configOptions.js.map +1 -0
- package/dist/common/console.d.ts +61 -0
- package/dist/common/console.js +191 -0
- package/dist/common/console.js.map +1 -0
- package/dist/common/core.d.ts +67 -0
- package/dist/common/core.js +118 -0
- package/dist/common/core.js.map +1 -0
- package/dist/common/crypto.d.ts +1 -0
- package/dist/common/crypto.js +37 -0
- package/dist/common/crypto.js.map +1 -0
- package/dist/common/debug.d.ts +13 -0
- package/dist/common/debug.js +131 -0
- package/dist/common/debug.js.map +1 -0
- package/dist/common/deferred.d.ts +11 -0
- package/dist/common/deferred.js +62 -0
- package/dist/common/deferred.js.map +1 -0
- package/dist/common/diagnostic.d.ts +59 -0
- package/dist/common/diagnostic.js +134 -0
- package/dist/common/diagnostic.js.map +1 -0
- package/dist/common/diagnosticRules.d.ts +67 -0
- package/dist/common/diagnosticRules.js +83 -0
- package/dist/common/diagnosticRules.js.map +1 -0
- package/dist/common/diagnosticSink.d.ts +34 -0
- package/dist/common/diagnosticSink.js +110 -0
- package/dist/common/diagnosticSink.js.map +1 -0
- package/dist/common/editAction.d.ts +29 -0
- package/dist/common/editAction.js +11 -0
- package/dist/common/editAction.js.map +1 -0
- package/dist/common/extensibility.d.ts +11 -0
- package/dist/common/extensibility.js +10 -0
- package/dist/common/extensibility.js.map +1 -0
- package/dist/common/extensions.d.ts +3 -0
- package/dist/common/extensions.js +15 -0
- package/dist/common/extensions.js.map +1 -0
- package/dist/common/fileBasedCancellationUtils.d.ts +11 -0
- package/dist/common/fileBasedCancellationUtils.js +259 -0
- package/dist/common/fileBasedCancellationUtils.js.map +1 -0
- package/dist/common/fileSystem.d.ts +72 -0
- package/dist/common/fileSystem.js +69 -0
- package/dist/common/fileSystem.js.map +1 -0
- package/dist/common/fullAccessHost.d.ts +19 -0
- package/dist/common/fullAccessHost.js +193 -0
- package/dist/common/fullAccessHost.js.map +1 -0
- package/dist/common/host.d.ts +21 -0
- package/dist/common/host.js +30 -0
- package/dist/common/host.js.map +1 -0
- package/dist/common/logTracker.d.ts +15 -0
- package/dist/common/logTracker.js +129 -0
- package/dist/common/logTracker.js.map +1 -0
- package/dist/common/lspUtils.d.ts +3 -0
- package/dist/common/lspUtils.js +20 -0
- package/dist/common/lspUtils.js.map +1 -0
- package/dist/common/memUtils.d.ts +3 -0
- package/dist/common/memUtils.js +37 -0
- package/dist/common/memUtils.js.map +1 -0
- package/dist/common/pathConsts.d.ts +8 -0
- package/dist/common/pathConsts.js +19 -0
- package/dist/common/pathConsts.js.map +1 -0
- package/dist/common/pathUtils.d.ts +170 -0
- package/dist/common/pathUtils.js +762 -0
- package/dist/common/pathUtils.js.map +1 -0
- package/dist/common/positionUtils.d.ts +7 -0
- package/dist/common/positionUtils.js +71 -0
- package/dist/common/positionUtils.js.map +1 -0
- package/dist/common/progressReporter.d.ts +15 -0
- package/dist/common/progressReporter.js +44 -0
- package/dist/common/progressReporter.js.map +1 -0
- package/dist/common/pythonVersion.d.ts +20 -0
- package/dist/common/pythonVersion.js +71 -0
- package/dist/common/pythonVersion.js.map +1 -0
- package/dist/common/realFileSystem.d.ts +8 -0
- package/dist/common/realFileSystem.js +368 -0
- package/dist/common/realFileSystem.js.map +1 -0
- package/dist/common/stringUtils.d.ts +47 -0
- package/dist/common/stringUtils.js +160 -0
- package/dist/common/stringUtils.js.map +1 -0
- package/dist/common/textEditUtils.d.ts +3 -0
- package/dist/common/textEditUtils.js +29 -0
- package/dist/common/textEditUtils.js.map +1 -0
- package/dist/common/textRange.d.ts +47 -0
- package/dist/common/textRange.js +211 -0
- package/dist/common/textRange.js.map +1 -0
- package/dist/common/textRangeCollection.d.ts +13 -0
- package/dist/common/textRangeCollection.js +108 -0
- package/dist/common/textRangeCollection.js.map +1 -0
- package/dist/common/timing.d.ts +31 -0
- package/dist/common/timing.js +100 -0
- package/dist/common/timing.js.map +1 -0
- package/dist/common/uriParser.d.ts +12 -0
- package/dist/common/uriParser.js +25 -0
- package/dist/common/uriParser.js.map +1 -0
- package/dist/common/workspaceEditUtils.d.ts +7 -0
- package/dist/common/workspaceEditUtils.js +63 -0
- package/dist/common/workspaceEditUtils.js.map +1 -0
- package/dist/languageServerBase.d.ts +211 -0
- package/dist/languageServerBase.js +923 -0
- package/dist/languageServerBase.js.map +1 -0
- package/dist/languageService/analyzerServiceExecutor.d.ts +8 -0
- package/dist/languageService/analyzerServiceExecutor.js +97 -0
- package/dist/languageService/analyzerServiceExecutor.js.map +1 -0
- package/dist/languageService/autoImporter.d.ts +84 -0
- package/dist/languageService/autoImporter.js +635 -0
- package/dist/languageService/autoImporter.js.map +1 -0
- package/dist/languageService/callHierarchyProvider.d.ts +12 -0
- package/dist/languageService/callHierarchyProvider.js +368 -0
- package/dist/languageService/callHierarchyProvider.js.map +1 -0
- package/dist/languageService/codeActionProvider.d.ts +6 -0
- package/dist/languageService/codeActionProvider.js +53 -0
- package/dist/languageService/codeActionProvider.js.map +1 -0
- package/dist/languageService/completionProvider.d.ts +147 -0
- package/dist/languageService/completionProvider.js +2220 -0
- package/dist/languageService/completionProvider.js.map +1 -0
- package/dist/languageService/definitionProvider.d.ts +17 -0
- package/dist/languageService/definitionProvider.js +206 -0
- package/dist/languageService/definitionProvider.js.map +1 -0
- package/dist/languageService/documentHighlightProvider.d.ts +7 -0
- package/dist/languageService/documentHighlightProvider.js +63 -0
- package/dist/languageService/documentHighlightProvider.js.map +1 -0
- package/dist/languageService/documentSymbolCollector.d.ts +37 -0
- package/dist/languageService/documentSymbolCollector.js +344 -0
- package/dist/languageService/documentSymbolCollector.js.map +1 -0
- package/dist/languageService/documentSymbolProvider.d.ts +37 -0
- package/dist/languageService/documentSymbolProvider.js +308 -0
- package/dist/languageService/documentSymbolProvider.js.map +1 -0
- package/dist/languageService/hoverProvider.d.ts +25 -0
- package/dist/languageService/hoverProvider.js +366 -0
- package/dist/languageService/hoverProvider.js.map +1 -0
- package/dist/languageService/importAdder.d.ts +24 -0
- package/dist/languageService/importAdder.js +296 -0
- package/dist/languageService/importAdder.js.map +1 -0
- package/dist/languageService/importSorter.d.ts +15 -0
- package/dist/languageService/importSorter.js +152 -0
- package/dist/languageService/importSorter.js.map +1 -0
- package/dist/languageService/indentationUtils.d.ts +4 -0
- package/dist/languageService/indentationUtils.js +597 -0
- package/dist/languageService/indentationUtils.js.map +1 -0
- package/dist/languageService/quickActions.d.ts +4 -0
- package/dist/languageService/quickActions.js +97 -0
- package/dist/languageService/quickActions.js.map +1 -0
- package/dist/languageService/referencesProvider.d.ts +36 -0
- package/dist/languageService/referencesProvider.js +236 -0
- package/dist/languageService/referencesProvider.js.map +1 -0
- package/dist/languageService/renameModuleProvider.d.ts +58 -0
- package/dist/languageService/renameModuleProvider.js +884 -0
- package/dist/languageService/renameModuleProvider.js.map +1 -0
- package/dist/languageService/signatureHelpProvider.d.ts +26 -0
- package/dist/languageService/signatureHelpProvider.js +180 -0
- package/dist/languageService/signatureHelpProvider.js.map +1 -0
- package/dist/languageService/tooltipUtils.d.ts +9 -0
- package/dist/languageService/tooltipUtils.js +129 -0
- package/dist/languageService/tooltipUtils.js.map +1 -0
- package/dist/localization/localize.d.ts +1324 -0
- package/dist/localization/localize.js +788 -0
- package/dist/localization/localize.js.map +1 -0
- package/dist/localization/package.nls.de.json +1 -0
- package/dist/localization/package.nls.en-us.json +636 -0
- package/dist/localization/package.nls.es.json +1 -0
- package/dist/localization/package.nls.fr.json +1 -0
- package/dist/localization/package.nls.ja.json +1 -0
- package/dist/localization/package.nls.ru.json +1 -0
- package/dist/localization/package.nls.zh-cn.json +1 -0
- package/dist/localization/package.nls.zh-tw.json +1 -0
- package/dist/nodeMain.d.ts +1 -0
- package/dist/nodeMain.js +21 -0
- package/dist/nodeMain.js.map +1 -0
- package/dist/nodeServer.d.ts +3 -0
- package/dist/nodeServer.js +31 -0
- package/dist/nodeServer.js.map +1 -0
- package/dist/parser/characterStream.d.ts +27 -0
- package/dist/parser/characterStream.js +120 -0
- package/dist/parser/characterStream.js.map +1 -0
- package/dist/parser/characters.d.ts +17 -0
- package/dist/parser/characters.js +240 -0
- package/dist/parser/characters.js.map +1 -0
- package/dist/parser/parseNodes.d.ts +750 -0
- package/dist/parser/parseNodes.js +1406 -0
- package/dist/parser/parseNodes.js.map +1 -0
- package/dist/parser/parser.d.ts +191 -0
- package/dist/parser/parser.js +3806 -0
- package/dist/parser/parser.js.map +1 -0
- package/dist/parser/stringTokenUtils.d.ts +25 -0
- package/dist/parser/stringTokenUtils.js +455 -0
- package/dist/parser/stringTokenUtils.js.map +1 -0
- package/dist/parser/tokenizer.d.ts +71 -0
- package/dist/parser/tokenizer.js +1111 -0
- package/dist/parser/tokenizer.js.map +1 -0
- package/dist/parser/tokenizerTypes.d.ts +223 -0
- package/dist/parser/tokenizerTypes.js +164 -0
- package/dist/parser/tokenizerTypes.js.map +1 -0
- package/dist/parser/unicode.d.ts +23 -0
- package/dist/parser/unicode.js +2899 -0
- package/dist/parser/unicode.js.map +1 -0
- package/dist/pyright.d.ts +1 -0
- package/dist/pyright.js +645 -0
- package/dist/pyright.js.map +1 -0
- package/dist/pyrightFileSystem.d.ts +28 -0
- package/dist/pyrightFileSystem.js +196 -0
- package/dist/pyrightFileSystem.js.map +1 -0
- package/dist/readonlyAugmentedFileSystem.d.ts +40 -0
- package/dist/readonlyAugmentedFileSystem.js +155 -0
- package/dist/readonlyAugmentedFileSystem.js.map +1 -0
- package/dist/server.d.ts +21 -0
- package/dist/server.js +232 -0
- package/dist/server.js.map +1 -0
- package/dist/tests/chainedSourceFiles.test.d.ts +1 -0
- package/dist/tests/chainedSourceFiles.test.js +153 -0
- package/dist/tests/chainedSourceFiles.test.js.map +1 -0
- package/dist/tests/checker.test.d.ts +1 -0
- package/dist/tests/checker.test.js +346 -0
- package/dist/tests/checker.test.js.map +1 -0
- package/dist/tests/collectionUtils.test.d.ts +1 -0
- package/dist/tests/collectionUtils.test.js +153 -0
- package/dist/tests/collectionUtils.test.js.map +1 -0
- package/dist/tests/common.test.d.ts +1 -0
- package/dist/tests/common.test.js +125 -0
- package/dist/tests/common.test.js.map +1 -0
- package/dist/tests/config.test.d.ts +1 -0
- package/dist/tests/config.test.js +230 -0
- package/dist/tests/config.test.js.map +1 -0
- package/dist/tests/debug.test.d.ts +1 -0
- package/dist/tests/debug.test.js +102 -0
- package/dist/tests/debug.test.js.map +1 -0
- package/dist/tests/deferred.test.d.ts +1 -0
- package/dist/tests/deferred.test.js +65 -0
- package/dist/tests/deferred.test.js.map +1 -0
- package/dist/tests/diagnosticOverrides.test.d.ts +1 -0
- package/dist/tests/diagnosticOverrides.test.js +108 -0
- package/dist/tests/diagnosticOverrides.test.js.map +1 -0
- package/dist/tests/docStringConversion.test.d.ts +1 -0
- package/dist/tests/docStringConversion.test.js +695 -0
- package/dist/tests/docStringConversion.test.js.map +1 -0
- package/dist/tests/docStringUtils.test.d.ts +1 -0
- package/dist/tests/docStringUtils.test.js +70 -0
- package/dist/tests/docStringUtils.test.js.map +1 -0
- package/dist/tests/documentSymbolCollector.test.d.ts +1 -0
- package/dist/tests/documentSymbolCollector.test.js +635 -0
- package/dist/tests/documentSymbolCollector.test.js.map +1 -0
- package/dist/tests/filesystem.test.d.ts +1 -0
- package/dist/tests/filesystem.test.js +194 -0
- package/dist/tests/filesystem.test.js.map +1 -0
- package/dist/tests/fourSlashParser.test.d.ts +1 -0
- package/dist/tests/fourSlashParser.test.js +281 -0
- package/dist/tests/fourSlashParser.test.js.map +1 -0
- package/dist/tests/fourSlashRunner.test.d.ts +1 -0
- package/dist/tests/fourSlashRunner.test.js +52 -0
- package/dist/tests/fourSlashRunner.test.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.Type.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js +42 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.Found.duplication.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js +13 -0
- package/dist/tests/fourslash/completions.autoimport.Lib.NotFound.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js +23 -0
- package/dist/tests/fourslash/completions.autoimport.disabled.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js +35 -0
- package/dist/tests/fourslash/completions.autoimport.duplicates.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.autoimport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js +128 -0
- package/dist/tests/fourslash/completions.autoimport.fromImport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.autoimport.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js +43 -0
- package/dist/tests/fourslash/completions.autoimport.shadow.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.autoimport.submodule.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.autoimport.topLevel.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js +116 -0
- package/dist/tests/fourslash/completions.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.js +21 -0
- package/dist/tests/fourslash/completions.builtinOverride.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js +54 -0
- package/dist/tests/fourslash/completions.call.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js +245 -0
- package/dist/tests/fourslash/completions.call.typedDict.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js +162 -0
- package/dist/tests/fourslash/completions.call.typedDict.list.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js +132 -0
- package/dist/tests/fourslash/completions.call.typedDict.states.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.js +37 -0
- package/dist/tests/fourslash/completions.classVariable.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.comment.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.comment.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.comment.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.declNames.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.js +18 -0
- package/dist/tests/fourslash/completions.declNames.exception.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js +26 -0
- package/dist/tests/fourslash/completions.declNames.for.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js +15 -0
- package/dist/tests/fourslash/completions.declNames.importAlias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js +36 -0
- package/dist/tests/fourslash/completions.declNames.lambda.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.declNames.method.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js +147 -0
- package/dist/tests/fourslash/completions.declNames.overload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js +131 -0
- package/dist/tests/fourslash/completions.declNames.topLevelOverload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js +73 -0
- package/dist/tests/fourslash/completions.dictionary.keys.complex.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js +58 -0
- package/dist/tests/fourslash/completions.dictionary.keys.expression.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js +154 -0
- package/dist/tests/fourslash/completions.dictionary.keys.literalTypes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js +143 -0
- package/dist/tests/fourslash/completions.dictionary.keys.simple.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js +109 -0
- package/dist/tests/fourslash/completions.dictionary.keys.stringLiterals.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.dictionary.keys.symbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.js +44 -0
- package/dist/tests/fourslash/completions.enums.members.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.js +12 -0
- package/dist/tests/fourslash/completions.excluded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fourslash.js +51 -0
- package/dist/tests/fourslash/completions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.js +32 -0
- package/dist/tests/fourslash/completions.fstring.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js +96 -0
- package/dist/tests/fourslash/completions.fstring.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js +30 -0
- package/dist/tests/fourslash/completions.fuzzyMatching.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.importDunderNames.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.importSubmodule.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.d.ts +0 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.importsDuplicates.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inList.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inList.fourslash.js +32 -0
- package/dist/tests/fourslash/completions.inList.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.included.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.included.fourslash.js +12 -0
- package/dist/tests/fourslash/completions.included.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js +54 -0
- package/dist/tests/fourslash/completions.indexer.keys.getitem.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js +26 -0
- package/dist/tests/fourslash/completions.inherited.function.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js +49 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromScrWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js +50 -0
- package/dist/tests/fourslash/completions.inherited.overload.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js +101 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js +105 -0
- package/dist/tests/fourslash/completions.inherited.property.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js +67 -0
- package/dist/tests/fourslash/completions.keywords.pythonVersion.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js +75 -0
- package/dist/tests/fourslash/completions.libCodeAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.libStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.literals.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.literals.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.literals.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.js +71 -0
- package/dist/tests/fourslash/completions.localCode.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js +17 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownMemberOnInstance.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js +57 -0
- package/dist/tests/fourslash/completions.moduleContext.UnknownStaticFunctionOnClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js +27 -0
- package/dist/tests/fourslash/completions.moduleContext.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.js +37 -0
- package/dist/tests/fourslash/completions.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.default.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.importStub.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.importStub.js +49 -0
- package/dist/tests/fourslash/completions.override.default.importStub.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.js +60 -0
- package/dist/tests/fourslash/completions.override.default.imported.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.default.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.override.property.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.js +31 -0
- package/dist/tests/fourslash/completions.override.property.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js +63 -0
- package/dist/tests/fourslash/completions.override.staticAndClassmethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.js +47 -0
- package/dist/tests/fourslash/completions.override.stub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.override2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.override2.fourslash.js +66 -0
- package/dist/tests/fourslash/completions.override2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.js +22 -0
- package/dist/tests/fourslash/completions.parameters.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.params.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.params.fourslash.js +23 -0
- package/dist/tests/fourslash/completions.params.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.js +15 -0
- package/dist/tests/fourslash/completions.parentFolder.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.parentFolders.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.js +34 -0
- package/dist/tests/fourslash/completions.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.private.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.private.fourslash.js +61 -0
- package/dist/tests/fourslash/completions.private.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.property.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.property.fourslash.js +28 -0
- package/dist/tests/fourslash/completions.property.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js +64 -0
- package/dist/tests/fourslash/completions.propertyDocStrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.self.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.self.fourslash.js +43 -0
- package/dist/tests/fourslash/completions.self.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js +71 -0
- package/dist/tests/fourslash/completions.stringLiteral.escape.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js +78 -0
- package/dist/tests/fourslash/completions.stringLiteral.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.js +29 -0
- package/dist/tests/fourslash/completions.typeAlias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.js +9 -0
- package/dist/tests/fourslash/completions.typeshed.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.js +33 -0
- package/dist/tests/fourslash/completions.vardecls.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js +68 -0
- package/dist/tests/fourslash/completions.variableDocStrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js +109 -0
- package/dist/tests/fourslash/completions.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/completions.with.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/completions.with.fourslash.js +25 -0
- package/dist/tests/fourslash/completions.with.fourslash.js.map +1 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js +64 -0
- package/dist/tests/fourslash/diagnostics.missingModuleSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js +24 -0
- package/dist/tests/fourslash/findDefinitions.builtinClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js +93 -0
- package/dist/tests/fourslash/findDefinitions.classes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js +19 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferSource.onlyStubs.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.definitionFilter.preferStub.onlySource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js +123 -0
- package/dist/tests/fourslash/findDefinitions.fields.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js +79 -0
- package/dist/tests/fourslash/findDefinitions.functions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js +154 -0
- package/dist/tests/fourslash/findDefinitions.methods.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js +42 -0
- package/dist/tests/fourslash/findDefinitions.modules.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js +34 -0
- package/dist/tests/fourslash/findDefinitions.namespaceImport.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js +213 -0
- package/dist/tests/fourslash/findDefinitions.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js +154 -0
- package/dist/tests/fourslash/findDefinitions.parameters.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js +23 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.function.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js +29 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js +30 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.innerClassMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js +26 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js +28 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js +33 -0
- package/dist/tests/fourslash/findDefinitions.sourceAndStub.outerClassPropertyReadWrite.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js +26 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js +25 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.function2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js +20 -0
- package/dist/tests/fourslash/findDefinitions.sourceOnly.relativeImport2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js +59 -0
- package/dist/tests/fourslash/findDefinitions.stubOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js +59 -0
- package/dist/tests/fourslash/findDefinitions.stubPackages.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js +94 -0
- package/dist/tests/fourslash/findDefinitions.typedDict.keys.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js +79 -0
- package/dist/tests/fourslash/findDefinitions.variables.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js +106 -0
- package/dist/tests/fourslash/findDefinitions.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js +24 -0
- package/dist/tests/fourslash/findTypeDefinitions.builtinClass.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js +66 -0
- package/dist/tests/fourslash/findTypeDefinitions.classes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js +26 -0
- package/dist/tests/fourslash/findTypeDefinitions.unions.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js +36 -0
- package/dist/tests/fourslash/findallreferences.classPropertyReadWrite.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.fourslash.js +30 -0
- package/dist/tests/fourslash/findallreferences.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js +30 -0
- package/dist/tests/fourslash/findallreferences.importalias.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js +46 -0
- package/dist/tests/fourslash/findallreferences.invokedFromLibrary.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js +60 -0
- package/dist/tests/fourslash/findallreferences.module.nested.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js +54 -0
- package/dist/tests/fourslash/findallreferences.modules.duplicated.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js +41 -0
- package/dist/tests/fourslash/findallreferences.modules.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js +83 -0
- package/dist/tests/fourslash/findallreferences.modules.shadow.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js +32 -0
- package/dist/tests/fourslash/findallreferences.openFiles.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js +22 -0
- package/dist/tests/fourslash/findallreferences.parameter.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js +29 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.class.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js +33 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classMethod.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js +36 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadOnly.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js +44 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.classPropertyReadWrite.fourslash.skip.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js +31 -0
- package/dist/tests/fourslash/findallreferences.sourceAndStub.function.fourslash.js.map +1 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js +22 -0
- package/dist/tests/fourslash/findallreferences.variable.fourslash.js.map +1 -0
- package/dist/tests/fourslash/fourslash.d.ts +301 -0
- package/dist/tests/fourslash/fourslash.js +25 -0
- package/dist/tests/fourslash/fourslash.js.map +1 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js +30 -0
- package/dist/tests/fourslash/highlightreferences.attributes.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js +63 -0
- package/dist/tests/fourslash/hover.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.js +14 -0
- package/dist/tests/fourslash/hover.classNoInit.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js +47 -0
- package/dist/tests/fourslash/hover.docFromScr.stringFormat.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js +77 -0
- package/dist/tests/fourslash/hover.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js +22 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js +22 -0
- package/dist/tests/fourslash/hover.docFromSrc.pkg-vs-module2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js +21 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport1.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport2.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.docFromSrc.relativeImport3.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js +25 -0
- package/dist/tests/fourslash/hover.docFromSrc.stubs-package.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js +18 -0
- package/dist/tests/fourslash/hover.docFromSrc.typeshed.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js +12 -0
- package/dist/tests/fourslash/hover.docstring.links.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.docstring.overloads.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js +24 -0
- package/dist/tests/fourslash/hover.docstring.split.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js +23 -0
- package/dist/tests/fourslash/hover.import.django.view.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.import.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.import.fourslash.js +10 -0
- package/dist/tests/fourslash/hover.import.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js +61 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrc.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js +51 -0
- package/dist/tests/fourslash/hover.inherited.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js +40 -0
- package/dist/tests/fourslash/hover.inherited.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js +43 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js +44 -0
- package/dist/tests/fourslash/hover.inherited.overload.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js +84 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromSrcWithStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js +88 -0
- package/dist/tests/fourslash/hover.inherited.property.docFromStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.init.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.init.fourslash.js +38 -0
- package/dist/tests/fourslash/hover.init.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js +49 -0
- package/dist/tests/fourslash/hover.libCodeAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js +39 -0
- package/dist/tests/fourslash/hover.libCodeNoStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.js +39 -0
- package/dist/tests/fourslash/hover.libStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js +14 -0
- package/dist/tests/fourslash/hover.optionalAliasParameter.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.js +20 -0
- package/dist/tests/fourslash/hover.plainText.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.js +50 -0
- package/dist/tests/fourslash/hover.typedDict.key.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.js +35 -0
- package/dist/tests/fourslash/hover.variable.docString.fourslash.js.map +1 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js +73 -0
- package/dist/tests/fourslash/hover.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js +63 -0
- package/dist/tests/fourslash/import.publicSymbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js +72 -0
- package/dist/tests/fourslash/import.pytyped.dunderAll.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js +61 -0
- package/dist/tests/fourslash/import.pytyped.privateSymbols.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js +35 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingBasic.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js +35 -0
- package/dist/tests/fourslash/import.pytyped.typeCheckingOff.fourslash.js.map +1 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.js +24 -0
- package/dist/tests/fourslash/import.wildcard.fourslash.js.map +1 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.js +13 -0
- package/dist/tests/fourslash/importnotresolved.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js +18 -0
- package/dist/tests/fourslash/missingModuleSource.disablingInStrictMode.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.js +13 -0
- package/dist/tests/fourslash/missingModuleSource.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js +31 -0
- package/dist/tests/fourslash/missingTypeStub.codeAction.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js +44 -0
- package/dist/tests/fourslash/missingTypeStub.command.multipart.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js +35 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlefile.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.d.ts +7 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js +35 -0
- package/dist/tests/fourslash/missingTypeStub.command.singlepart.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.js +18 -0
- package/dist/tests/fourslash/missingTypeStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js +34 -0
- package/dist/tests/fourslash/missingTypeStub.invokeCodeAction.fourslash.js.map +1 -0
- package/dist/tests/fourslash/noerrors.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/noerrors.fourslash.js +9 -0
- package/dist/tests/fourslash/noerrors.fourslash.js.map +1 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.js +17 -0
- package/dist/tests/fourslash/orderImports1.command.fourslash.js.map +1 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.js +21 -0
- package/dist/tests/fourslash/orderImports2.command.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.js +23 -0
- package/dist/tests/fourslash/rename.externallyHidden.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js +23 -0
- package/dist/tests/fourslash/rename.externallyHidden.params.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.fourslash.js +26 -0
- package/dist/tests/fourslash/rename.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.library.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.library.fourslash.js +26 -0
- package/dist/tests/fourslash/rename.library.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js +29 -0
- package/dist/tests/fourslash/rename.library.sourceAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.d.ts +2 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.js +19 -0
- package/dist/tests/fourslash/rename.multipleDecl.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js +33 -0
- package/dist/tests/fourslash/rename.sourceAndStub.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js +39 -0
- package/dist/tests/fourslash/rename.string.excluded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/rename.string.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/rename.string.fourslash.js +25 -0
- package/dist/tests/fourslash/rename.string.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js +62 -0
- package/dist/tests/fourslash/signature.builtinDocstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.js +97 -0
- package/dist/tests/fourslash/signature.complicated.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.js +22 -0
- package/dist/tests/fourslash/signature.cornercases.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.js +42 -0
- package/dist/tests/fourslash/signature.docstrings.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js +49 -0
- package/dist/tests/fourslash/signature.docstrings.overloaded.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js +115 -0
- package/dist/tests/fourslash/signature.docstrings.wildcardimports.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.overload.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.overload.fourslash.js +63 -0
- package/dist/tests/fourslash/signature.overload.fourslash.js.map +1 -0
- package/dist/tests/fourslash/signature.simple.fourslash.d.ts +1 -0
- package/dist/tests/fourslash/signature.simple.fourslash.js +104 -0
- package/dist/tests/fourslash/signature.simple.fourslash.js.map +1 -0
- package/dist/tests/harness/fourslash/fourSlashParser.d.ts +10 -0
- package/dist/tests/harness/fourslash/fourSlashParser.js +347 -0
- package/dist/tests/harness/fourslash/fourSlashParser.js.map +1 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.d.ts +81 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.js +65 -0
- package/dist/tests/harness/fourslash/fourSlashTypes.js.map +1 -0
- package/dist/tests/harness/fourslash/runner.d.ts +20 -0
- package/dist/tests/harness/fourslash/runner.js +93 -0
- package/dist/tests/harness/fourslash/runner.js.map +1 -0
- package/dist/tests/harness/fourslash/testLanguageService.d.ts +40 -0
- package/dist/tests/harness/fourslash/testLanguageService.js +120 -0
- package/dist/tests/harness/fourslash/testLanguageService.js.map +1 -0
- package/dist/tests/harness/fourslash/testState.Consts.d.ts +11 -0
- package/dist/tests/harness/fourslash/testState.Consts.js +50 -0
- package/dist/tests/harness/fourslash/testState.Consts.js.map +1 -0
- package/dist/tests/harness/fourslash/testState.d.ts +232 -0
- package/dist/tests/harness/fourslash/testState.js +1381 -0
- package/dist/tests/harness/fourslash/testState.js.map +1 -0
- package/dist/tests/harness/testAccessHost.d.ts +8 -0
- package/dist/tests/harness/testAccessHost.js +26 -0
- package/dist/tests/harness/testAccessHost.js.map +1 -0
- package/dist/tests/harness/testHost.d.ts +16 -0
- package/dist/tests/harness/testHost.js +161 -0
- package/dist/tests/harness/testHost.js.map +1 -0
- package/dist/tests/harness/utils.d.ts +74 -0
- package/dist/tests/harness/utils.js +328 -0
- package/dist/tests/harness/utils.js.map +1 -0
- package/dist/tests/harness/vfs/factory.d.ts +32 -0
- package/dist/tests/harness/vfs/factory.js +173 -0
- package/dist/tests/harness/vfs/factory.js.map +1 -0
- package/dist/tests/harness/vfs/filesystem.d.ts +430 -0
- package/dist/tests/harness/vfs/filesystem.js +1455 -0
- package/dist/tests/harness/vfs/filesystem.js.map +1 -0
- package/dist/tests/harness/vfs/pathValidation.d.ts +24 -0
- package/dist/tests/harness/vfs/pathValidation.js +123 -0
- package/dist/tests/harness/vfs/pathValidation.js.map +1 -0
- package/dist/tests/importAdder.test.d.ts +1 -0
- package/dist/tests/importAdder.test.js +1192 -0
- package/dist/tests/importAdder.test.js.map +1 -0
- package/dist/tests/importResolver.test.d.ts +1 -0
- package/dist/tests/importResolver.test.js +450 -0
- package/dist/tests/importResolver.test.js.map +1 -0
- package/dist/tests/importStatementUtils.test.d.ts +1 -0
- package/dist/tests/importStatementUtils.test.js +371 -0
- package/dist/tests/importStatementUtils.test.js.map +1 -0
- package/dist/tests/indentationUtils.ptvs.test.d.ts +1 -0
- package/dist/tests/indentationUtils.ptvs.test.js +324 -0
- package/dist/tests/indentationUtils.ptvs.test.js.map +1 -0
- package/dist/tests/indentationUtils.reindent.test.d.ts +1 -0
- package/dist/tests/indentationUtils.reindent.test.js +332 -0
- package/dist/tests/indentationUtils.reindent.test.js.map +1 -0
- package/dist/tests/indentationUtils.test.d.ts +1 -0
- package/dist/tests/indentationUtils.test.js +375 -0
- package/dist/tests/indentationUtils.test.js.map +1 -0
- package/dist/tests/ipythonMode.test.d.ts +1 -0
- package/dist/tests/ipythonMode.test.js +303 -0
- package/dist/tests/ipythonMode.test.js.map +1 -0
- package/dist/tests/localizer.test.d.ts +1 -0
- package/dist/tests/localizer.test.js +64 -0
- package/dist/tests/localizer.test.js.map +1 -0
- package/dist/tests/parseTreeUtils.test.d.ts +1 -0
- package/dist/tests/parseTreeUtils.test.js +228 -0
- package/dist/tests/parseTreeUtils.test.js.map +1 -0
- package/dist/tests/parser.test.d.ts +1 -0
- package/dist/tests/parser.test.js +101 -0
- package/dist/tests/parser.test.js.map +1 -0
- package/dist/tests/pathUtils.test.d.ts +1 -0
- package/dist/tests/pathUtils.test.js +253 -0
- package/dist/tests/pathUtils.test.js.map +1 -0
- package/dist/tests/pyrightFileSystem.test.d.ts +1 -0
- package/dist/tests/pyrightFileSystem.test.js +152 -0
- package/dist/tests/pyrightFileSystem.test.js.map +1 -0
- package/dist/tests/renameModule.folder.test.d.ts +1 -0
- package/dist/tests/renameModule.folder.test.js +229 -0
- package/dist/tests/renameModule.folder.test.js.map +1 -0
- package/dist/tests/renameModule.fromImports.test.d.ts +1 -0
- package/dist/tests/renameModule.fromImports.test.js +790 -0
- package/dist/tests/renameModule.fromImports.test.js.map +1 -0
- package/dist/tests/renameModule.imports.test.d.ts +1 -0
- package/dist/tests/renameModule.imports.test.js +380 -0
- package/dist/tests/renameModule.imports.test.js.map +1 -0
- package/dist/tests/renameModule.misc.test.d.ts +1 -0
- package/dist/tests/renameModule.misc.test.js +615 -0
- package/dist/tests/renameModule.misc.test.js.map +1 -0
- package/dist/tests/renameModule.relativePath.test.d.ts +1 -0
- package/dist/tests/renameModule.relativePath.test.js +231 -0
- package/dist/tests/renameModule.relativePath.test.js.map +1 -0
- package/dist/tests/renameModuleTestUtils.d.ts +4 -0
- package/dist/tests/renameModuleTestUtils.js +148 -0
- package/dist/tests/renameModuleTestUtils.js.map +1 -0
- package/dist/tests/sourceFile.test.d.ts +1 -0
- package/dist/tests/sourceFile.test.js +25 -0
- package/dist/tests/sourceFile.test.js.map +1 -0
- package/dist/tests/stringUtils.test.d.ts +1 -0
- package/dist/tests/stringUtils.test.js +69 -0
- package/dist/tests/stringUtils.test.js.map +1 -0
- package/dist/tests/symbolNameUtils.test.d.ts +1 -0
- package/dist/tests/symbolNameUtils.test.js +83 -0
- package/dist/tests/symbolNameUtils.test.js.map +1 -0
- package/dist/tests/testState.test.d.ts +1 -0
- package/dist/tests/testState.test.js +521 -0
- package/dist/tests/testState.test.js.map +1 -0
- package/dist/tests/testUtils.d.ts +27 -0
- package/dist/tests/testUtils.js +213 -0
- package/dist/tests/testUtils.js.map +1 -0
- package/dist/tests/tokenizer.test.d.ts +1 -0
- package/dist/tests/tokenizer.test.js +1277 -0
- package/dist/tests/tokenizer.test.js.map +1 -0
- package/dist/tests/typeEvaluator1.test.d.ts +1 -0
- package/dist/tests/typeEvaluator1.test.js +1023 -0
- package/dist/tests/typeEvaluator1.test.js.map +1 -0
- package/dist/tests/typeEvaluator2.test.d.ts +1 -0
- package/dist/tests/typeEvaluator2.test.js +869 -0
- package/dist/tests/typeEvaluator2.test.js.map +1 -0
- package/dist/tests/typeEvaluator3.test.d.ts +1 -0
- package/dist/tests/typeEvaluator3.test.js +915 -0
- package/dist/tests/typeEvaluator3.test.js.map +1 -0
- package/dist/tests/typeEvaluator4.test.d.ts +1 -0
- package/dist/tests/typeEvaluator4.test.js +901 -0
- package/dist/tests/typeEvaluator4.test.js.map +1 -0
- package/dist/tests/updateSymbolReference.test.d.ts +1 -0
- package/dist/tests/updateSymbolReference.test.js +980 -0
- package/dist/tests/updateSymbolReference.test.js.map +1 -0
- package/dist/tests/zipfs.test.d.ts +1 -0
- package/dist/tests/zipfs.test.js +112 -0
- package/dist/tests/zipfs.test.js.map +1 -0
- package/dist/workspaceMap.d.ts +6 -0
- package/dist/workspaceMap.js +73 -0
- package/dist/workspaceMap.js.map +1 -0
- package/package.json +45 -0
@@ -0,0 +1,1455 @@
|
|
1
|
+
"use strict";
|
2
|
+
/*
|
3
|
+
* filesystem.ts
|
4
|
+
* Copyright (c) Microsoft Corporation.
|
5
|
+
* Licensed under the MIT license.
|
6
|
+
*
|
7
|
+
* virtual file system implementation
|
8
|
+
*/
|
9
|
+
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
10
|
+
if (k2 === undefined) k2 = k;
|
11
|
+
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
12
|
+
}) : (function(o, m, k, k2) {
|
13
|
+
if (k2 === undefined) k2 = k;
|
14
|
+
o[k2] = m[k];
|
15
|
+
}));
|
16
|
+
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
|
17
|
+
Object.defineProperty(o, "default", { enumerable: true, value: v });
|
18
|
+
}) : function(o, v) {
|
19
|
+
o["default"] = v;
|
20
|
+
});
|
21
|
+
var __importStar = (this && this.__importStar) || function (mod) {
|
22
|
+
if (mod && mod.__esModule) return mod;
|
23
|
+
var result = {};
|
24
|
+
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
|
25
|
+
__setModuleDefault(result, mod);
|
26
|
+
return result;
|
27
|
+
};
|
28
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
29
|
+
exports.formatPatch = exports.Mount = exports.S_IFIFO = exports.S_IFCHR = exports.S_IFDIR = exports.S_IFBLK = exports.S_IFREG = exports.S_IFLNK = exports.S_IFSOCK = exports.S_IFMT = exports.Symlink = exports.Unlink = exports.Rmdir = exports.Link = exports.SameFileContentFile = exports.File = exports.Directory = exports.TestFileSystem = exports.MODULE_PATH = void 0;
|
30
|
+
const vscode_uri_1 = require("vscode-uri");
|
31
|
+
const pathUtil = __importStar(require("../../../common/pathUtils"));
|
32
|
+
const utils_1 = require("../utils");
|
33
|
+
const utils_2 = require("./../utils");
|
34
|
+
const pathValidation_1 = require("./pathValidation");
|
35
|
+
exports.MODULE_PATH = pathUtil.normalizeSlashes('/');
|
36
|
+
let devCount = 0; // A monotonically increasing count of device ids
|
37
|
+
let inoCount = 0; // A monotonically increasing count of inodes
|
38
|
+
/**
|
39
|
+
* Represents a virtual POSIX-like file system.
|
40
|
+
*/
|
41
|
+
class TestFileSystem {
|
42
|
+
constructor(ignoreCase, options = {}) {
|
43
|
+
// lazy-initialized state that should be mutable even if the FileSystem is frozen.
|
44
|
+
this._lazy = {};
|
45
|
+
this._tmpfileCounter = 0;
|
46
|
+
const { time = -1, files, meta } = options;
|
47
|
+
this.ignoreCase = ignoreCase;
|
48
|
+
this.stringComparer = this.ignoreCase
|
49
|
+
? pathUtil.comparePathsCaseInsensitive
|
50
|
+
: pathUtil.comparePathsCaseSensitive;
|
51
|
+
this._time = time;
|
52
|
+
if (meta) {
|
53
|
+
for (const key of Object.keys(meta)) {
|
54
|
+
this.meta.set(key, meta[key]);
|
55
|
+
}
|
56
|
+
}
|
57
|
+
if (files) {
|
58
|
+
this._applyFiles(files, /*dirname*/ '');
|
59
|
+
}
|
60
|
+
let cwd = options.cwd;
|
61
|
+
if ((!cwd || !pathUtil.isDiskPathRoot(cwd)) && this._lazy.links) {
|
62
|
+
const iterator = (0, utils_2.getIterator)(this._lazy.links.keys());
|
63
|
+
try {
|
64
|
+
for (let i = (0, utils_2.nextResult)(iterator); i; i = (0, utils_2.nextResult)(iterator)) {
|
65
|
+
const name = i.value;
|
66
|
+
cwd = cwd ? pathUtil.resolvePaths(name, cwd) : name;
|
67
|
+
break;
|
68
|
+
}
|
69
|
+
}
|
70
|
+
finally {
|
71
|
+
(0, utils_2.closeIterator)(iterator);
|
72
|
+
}
|
73
|
+
}
|
74
|
+
if (cwd) {
|
75
|
+
(0, pathValidation_1.validate)(cwd, 2017 /* Absolute */);
|
76
|
+
this.mkdirpSync(cwd);
|
77
|
+
}
|
78
|
+
this._cwd = cwd || '';
|
79
|
+
}
|
80
|
+
/**
|
81
|
+
* Gets metadata for this `FileSystem`.
|
82
|
+
*/
|
83
|
+
get meta() {
|
84
|
+
if (!this._lazy.meta) {
|
85
|
+
this._lazy.meta = new utils_2.Metadata(this._shadowRoot ? this._shadowRoot.meta : undefined);
|
86
|
+
}
|
87
|
+
return this._lazy.meta;
|
88
|
+
}
|
89
|
+
/**
|
90
|
+
* Gets a value indicating whether the file system is read-only.
|
91
|
+
*/
|
92
|
+
get isReadonly() {
|
93
|
+
return Object.isFrozen(this);
|
94
|
+
}
|
95
|
+
/**
|
96
|
+
* Makes the file system read-only.
|
97
|
+
*/
|
98
|
+
makeReadonly() {
|
99
|
+
Object.freeze(this);
|
100
|
+
return this;
|
101
|
+
}
|
102
|
+
/**
|
103
|
+
* Gets the file system shadowed by this file system.
|
104
|
+
*/
|
105
|
+
get shadowRoot() {
|
106
|
+
return this._shadowRoot;
|
107
|
+
}
|
108
|
+
/**
|
109
|
+
* Snapshots the current file system, effectively shadowing itself. This is useful for
|
110
|
+
* generating file system patches using `.diff()` from one snapshot to the next. Performs
|
111
|
+
* no action if this file system is read-only.
|
112
|
+
*/
|
113
|
+
snapshot() {
|
114
|
+
if (this.isReadonly) {
|
115
|
+
return;
|
116
|
+
}
|
117
|
+
const fs = new TestFileSystem(this.ignoreCase, { time: this._time });
|
118
|
+
fs._lazy = this._lazy;
|
119
|
+
fs._cwd = this._cwd;
|
120
|
+
fs._time = this._time;
|
121
|
+
fs._shadowRoot = this._shadowRoot;
|
122
|
+
fs._dirStack = this._dirStack;
|
123
|
+
fs.makeReadonly();
|
124
|
+
this._lazy = {};
|
125
|
+
this._shadowRoot = fs;
|
126
|
+
}
|
127
|
+
/**
|
128
|
+
* Gets a shadow copy of this file system. Changes to the shadow copy do not affect the
|
129
|
+
* original, allowing multiple copies of the same core file system without multiple copies
|
130
|
+
* of the same data.
|
131
|
+
*/
|
132
|
+
shadow(ignoreCase = this.ignoreCase) {
|
133
|
+
if (!this.isReadonly) {
|
134
|
+
throw new Error('Cannot shadow a mutable file system.');
|
135
|
+
}
|
136
|
+
if (ignoreCase && !this.ignoreCase) {
|
137
|
+
throw new Error('Cannot create a case-insensitive file system from a case-sensitive one.');
|
138
|
+
}
|
139
|
+
const fs = new TestFileSystem(ignoreCase, { time: this._time });
|
140
|
+
fs._shadowRoot = this;
|
141
|
+
fs._cwd = this._cwd;
|
142
|
+
return fs;
|
143
|
+
}
|
144
|
+
/**
|
145
|
+
* Gets or sets the timestamp (in milliseconds) used for file status, returning the previous timestamp.
|
146
|
+
*
|
147
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/time.html
|
148
|
+
*/
|
149
|
+
time(value) {
|
150
|
+
if (value !== undefined && this.isReadonly) {
|
151
|
+
throw (0, utils_1.createIOError)('EPERM');
|
152
|
+
}
|
153
|
+
let result = this._time;
|
154
|
+
if (typeof result === 'function') {
|
155
|
+
result = result();
|
156
|
+
}
|
157
|
+
if (typeof result === 'object') {
|
158
|
+
result = result.getTime();
|
159
|
+
}
|
160
|
+
if (result === -1) {
|
161
|
+
result = Date.now();
|
162
|
+
}
|
163
|
+
if (value !== undefined) {
|
164
|
+
this._time = value;
|
165
|
+
}
|
166
|
+
return result;
|
167
|
+
}
|
168
|
+
/**
|
169
|
+
* Gets the metadata object for a path.
|
170
|
+
* @param path
|
171
|
+
*/
|
172
|
+
filemeta(path) {
|
173
|
+
const { node } = this._walk(this._resolve(path));
|
174
|
+
if (!node) {
|
175
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
176
|
+
}
|
177
|
+
return this._filemeta(node);
|
178
|
+
}
|
179
|
+
_filemeta(node) {
|
180
|
+
if (!node.meta) {
|
181
|
+
const parentMeta = node.shadowRoot && this._shadowRoot && this._shadowRoot._filemeta(node.shadowRoot);
|
182
|
+
node.meta = new utils_2.Metadata(parentMeta);
|
183
|
+
}
|
184
|
+
return node.meta;
|
185
|
+
}
|
186
|
+
/**
|
187
|
+
* Get the pathname of the current working directory.
|
188
|
+
*
|
189
|
+
* @link - http://pubs.opengroup.org/onlinepubs/9699919799/functions/getcwd.html
|
190
|
+
*/
|
191
|
+
cwd() {
|
192
|
+
if (!this._cwd) {
|
193
|
+
throw new Error('The current working directory has not been set.');
|
194
|
+
}
|
195
|
+
const { node } = this._walk(this._cwd);
|
196
|
+
if (!node) {
|
197
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
198
|
+
}
|
199
|
+
if (!isDirectory(node)) {
|
200
|
+
throw (0, utils_1.createIOError)('ENOTDIR');
|
201
|
+
}
|
202
|
+
return this._cwd;
|
203
|
+
}
|
204
|
+
/**
|
205
|
+
* Changes the current working directory.
|
206
|
+
*
|
207
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/chdir.html
|
208
|
+
*/
|
209
|
+
chdir(path) {
|
210
|
+
if (this.isReadonly) {
|
211
|
+
throw (0, utils_1.createIOError)('EPERM');
|
212
|
+
}
|
213
|
+
path = this._resolve(path);
|
214
|
+
const { node } = this._walk(path);
|
215
|
+
if (!node) {
|
216
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
217
|
+
}
|
218
|
+
if (!isDirectory(node)) {
|
219
|
+
throw (0, utils_1.createIOError)('ENOTDIR');
|
220
|
+
}
|
221
|
+
this._cwd = path;
|
222
|
+
}
|
223
|
+
/**
|
224
|
+
* Pushes the current directory onto the directory stack and changes the current working directory to the supplied path.
|
225
|
+
*/
|
226
|
+
pushd(path) {
|
227
|
+
if (this.isReadonly) {
|
228
|
+
throw (0, utils_1.createIOError)('EPERM');
|
229
|
+
}
|
230
|
+
if (path) {
|
231
|
+
path = this._resolve(path);
|
232
|
+
}
|
233
|
+
if (this._cwd) {
|
234
|
+
if (!this._dirStack) {
|
235
|
+
this._dirStack = [];
|
236
|
+
}
|
237
|
+
this._dirStack.push(this._cwd);
|
238
|
+
}
|
239
|
+
if (path && path !== this._cwd) {
|
240
|
+
this.chdir(path);
|
241
|
+
}
|
242
|
+
}
|
243
|
+
/**
|
244
|
+
* Pops the previous directory from the location stack and changes the current directory to that directory.
|
245
|
+
*/
|
246
|
+
popd() {
|
247
|
+
if (this.isReadonly) {
|
248
|
+
throw (0, utils_1.createIOError)('EPERM');
|
249
|
+
}
|
250
|
+
const path = this._dirStack && this._dirStack.pop();
|
251
|
+
if (path) {
|
252
|
+
this.chdir(path);
|
253
|
+
}
|
254
|
+
}
|
255
|
+
/**
|
256
|
+
* Update the file system with a set of files.
|
257
|
+
*/
|
258
|
+
apply(files) {
|
259
|
+
this._applyFiles(files, this._cwd);
|
260
|
+
}
|
261
|
+
/**
|
262
|
+
* Scan file system entries along a path. If `path` is a symbolic link, it is dereferenced.
|
263
|
+
* @param path The path at which to start the scan.
|
264
|
+
* @param axis The axis along which to traverse.
|
265
|
+
* @param traversal The traversal scheme to use.
|
266
|
+
*/
|
267
|
+
scanSync(path, axis, traversal) {
|
268
|
+
path = this._resolve(path);
|
269
|
+
const results = [];
|
270
|
+
this._scan(path, this._stat(this._walk(path)), axis, traversal, /*noFollow*/ false, results);
|
271
|
+
return results;
|
272
|
+
}
|
273
|
+
/**
|
274
|
+
* Scan file system entries along a path.
|
275
|
+
* @param path The path at which to start the scan.
|
276
|
+
* @param axis The axis along which to traverse.
|
277
|
+
* @param traversal The traversal scheme to use.
|
278
|
+
*/
|
279
|
+
lscanSync(path, axis, traversal) {
|
280
|
+
path = this._resolve(path);
|
281
|
+
const results = [];
|
282
|
+
this._scan(path, this._stat(this._walk(path, /*noFollow*/ true)), axis, traversal, /*noFollow*/ true, results);
|
283
|
+
return results;
|
284
|
+
}
|
285
|
+
createFileSystemWatcher(paths, listener) {
|
286
|
+
return {
|
287
|
+
close: () => {
|
288
|
+
/* left empty */
|
289
|
+
},
|
290
|
+
};
|
291
|
+
}
|
292
|
+
getModulePath() {
|
293
|
+
return exports.MODULE_PATH;
|
294
|
+
}
|
295
|
+
tmpdir() {
|
296
|
+
this.mkdirpSync('/tmp');
|
297
|
+
return pathUtil.normalizeSlashes('/tmp');
|
298
|
+
}
|
299
|
+
tmpfile(options) {
|
300
|
+
// Use an algorithm similar to tmp's.
|
301
|
+
const prefix = (options === null || options === void 0 ? void 0 : options.prefix) || 'tmp';
|
302
|
+
const postfix = (options === null || options === void 0 ? void 0 : options.prefix) ? '-' + options.prefix : '';
|
303
|
+
const name = `${prefix}-${this._tmpfileCounter++}${postfix}`;
|
304
|
+
const path = pathUtil.combinePaths(this.tmpdir(), name);
|
305
|
+
this.writeFileSync(path, '');
|
306
|
+
return path;
|
307
|
+
}
|
308
|
+
realCasePath(path) {
|
309
|
+
return path;
|
310
|
+
}
|
311
|
+
isMappedFilePath(filepath) {
|
312
|
+
return false;
|
313
|
+
}
|
314
|
+
// Get original filepath if the given filepath is mapped.
|
315
|
+
getOriginalFilePath(mappedFilePath) {
|
316
|
+
return mappedFilePath;
|
317
|
+
}
|
318
|
+
// Get mapped filepath if the given filepath is mapped.
|
319
|
+
getMappedFilePath(originalFilepath) {
|
320
|
+
return originalFilepath;
|
321
|
+
}
|
322
|
+
getUri(path) {
|
323
|
+
return vscode_uri_1.URI.file(path).toString();
|
324
|
+
}
|
325
|
+
_scan(path, stats, axis, traversal, noFollow, results) {
|
326
|
+
if (axis === 'ancestors-or-self' || axis === 'self' || axis === 'descendants-or-self') {
|
327
|
+
if (!traversal.accept || traversal.accept(path, stats)) {
|
328
|
+
results.push(path);
|
329
|
+
}
|
330
|
+
}
|
331
|
+
if (axis === 'ancestors-or-self' || axis === 'ancestors') {
|
332
|
+
const dirname = pathUtil.getDirectoryPath(path);
|
333
|
+
if (dirname !== path) {
|
334
|
+
try {
|
335
|
+
const stats = this._stat(this._walk(dirname, noFollow));
|
336
|
+
if (!traversal.traverse || traversal.traverse(dirname, stats)) {
|
337
|
+
this._scan(dirname, stats, 'ancestors-or-self', traversal, noFollow, results);
|
338
|
+
}
|
339
|
+
}
|
340
|
+
catch {
|
341
|
+
/*ignored*/
|
342
|
+
}
|
343
|
+
}
|
344
|
+
}
|
345
|
+
if (axis === 'descendants-or-self' || axis === 'descendants') {
|
346
|
+
if (stats.isDirectory() && (!traversal.traverse || traversal.traverse(path, stats))) {
|
347
|
+
for (const file of this.readdirSync(path)) {
|
348
|
+
try {
|
349
|
+
const childpath = pathUtil.combinePaths(path, file);
|
350
|
+
const stats = this._stat(this._walk(childpath, noFollow));
|
351
|
+
this._scan(childpath, stats, 'descendants-or-self', traversal, noFollow, results);
|
352
|
+
}
|
353
|
+
catch {
|
354
|
+
/*ignored*/
|
355
|
+
}
|
356
|
+
}
|
357
|
+
}
|
358
|
+
}
|
359
|
+
}
|
360
|
+
/**
|
361
|
+
* Mounts a physical or virtual file system at a location in this virtual file system.
|
362
|
+
*
|
363
|
+
* @param source The path in the physical (or other virtual) file system.
|
364
|
+
* @param target The path in this virtual file system.
|
365
|
+
* @param resolver An object used to resolve files in `source`.
|
366
|
+
*/
|
367
|
+
mountSync(source, target, resolver) {
|
368
|
+
if (this.isReadonly) {
|
369
|
+
throw (0, utils_1.createIOError)('EROFS');
|
370
|
+
}
|
371
|
+
source = (0, pathValidation_1.validate)(source, 2017 /* Absolute */);
|
372
|
+
const { parent, links, node: existingNode, basename } = this._walk(this._resolve(target), /*noFollow*/ true);
|
373
|
+
if (existingNode) {
|
374
|
+
throw (0, utils_1.createIOError)('EEXIST');
|
375
|
+
}
|
376
|
+
const time = this.time();
|
377
|
+
const node = this._mknod(parent ? parent.dev : ++devCount, exports.S_IFDIR, /*mode*/ 0o777, time);
|
378
|
+
node.source = source;
|
379
|
+
node.resolver = resolver;
|
380
|
+
this._addLink(parent, links, basename, node, time);
|
381
|
+
}
|
382
|
+
/**
|
383
|
+
* Recursively remove all files and directories underneath the provided path.
|
384
|
+
*/
|
385
|
+
rimrafSync(path) {
|
386
|
+
try {
|
387
|
+
const stats = this.lstatSync(path);
|
388
|
+
if (stats.isFile() || stats.isSymbolicLink()) {
|
389
|
+
this.unlinkSync(path);
|
390
|
+
}
|
391
|
+
else if (stats.isDirectory()) {
|
392
|
+
for (const file of this.readdirSync(path)) {
|
393
|
+
this.rimrafSync(pathUtil.combinePaths(path, file));
|
394
|
+
}
|
395
|
+
this.rmdirSync(path);
|
396
|
+
}
|
397
|
+
}
|
398
|
+
catch (e) {
|
399
|
+
if (e.code === 'ENOENT') {
|
400
|
+
return;
|
401
|
+
}
|
402
|
+
throw e;
|
403
|
+
}
|
404
|
+
}
|
405
|
+
/**
|
406
|
+
* Make a directory and all of its parent paths (if they don't exist).
|
407
|
+
*/
|
408
|
+
mkdirpSync(path) {
|
409
|
+
path = this._resolve(path);
|
410
|
+
const result = this._walk(path, /*noFollow*/ true, (error, result) => {
|
411
|
+
if (error.code === 'ENOENT') {
|
412
|
+
this._mkdir(result);
|
413
|
+
return 'retry';
|
414
|
+
}
|
415
|
+
return 'throw';
|
416
|
+
});
|
417
|
+
if (!result.node) {
|
418
|
+
this._mkdir(result);
|
419
|
+
}
|
420
|
+
}
|
421
|
+
getFileListing() {
|
422
|
+
let result = '';
|
423
|
+
const printLinks = (dirname, links) => {
|
424
|
+
const iterator = (0, utils_2.getIterator)(links);
|
425
|
+
try {
|
426
|
+
for (let i = (0, utils_2.nextResult)(iterator); i; i = (0, utils_2.nextResult)(iterator)) {
|
427
|
+
const [name, node] = i.value;
|
428
|
+
const path = dirname ? pathUtil.combinePaths(dirname, name) : name;
|
429
|
+
const marker = pathUtil.comparePaths(this._cwd, path, this.ignoreCase) === 0 ? '*' : ' ';
|
430
|
+
if (result) {
|
431
|
+
result += '\n';
|
432
|
+
}
|
433
|
+
result += marker;
|
434
|
+
if (isDirectory(node)) {
|
435
|
+
result += pathUtil.ensureTrailingDirectorySeparator(path);
|
436
|
+
printLinks(path, this._getLinks(node));
|
437
|
+
}
|
438
|
+
else if (isFile(node)) {
|
439
|
+
result += path;
|
440
|
+
}
|
441
|
+
else if (isSymlink(node)) {
|
442
|
+
result += `${path} -> ${node.symlink}`;
|
443
|
+
}
|
444
|
+
}
|
445
|
+
}
|
446
|
+
finally {
|
447
|
+
(0, utils_2.closeIterator)(iterator);
|
448
|
+
}
|
449
|
+
};
|
450
|
+
printLinks(/*dirname*/ undefined, this._getRootLinks());
|
451
|
+
return result;
|
452
|
+
}
|
453
|
+
/**
|
454
|
+
* Print diagnostic information about the structure of the file system to the console.
|
455
|
+
*/
|
456
|
+
debugPrint() {
|
457
|
+
console.log(this.getFileListing());
|
458
|
+
}
|
459
|
+
// POSIX API (aligns with NodeJS "fs" module API)
|
460
|
+
/**
|
461
|
+
* Determines whether a path exists.
|
462
|
+
*/
|
463
|
+
existsSync(path) {
|
464
|
+
const result = this._walk(this._resolve(path), /*noFollow*/ true, () => 'stop');
|
465
|
+
return result !== undefined && result.node !== undefined;
|
466
|
+
}
|
467
|
+
/**
|
468
|
+
* Get file status. If `path` is a symbolic link, it is dereferenced.
|
469
|
+
*
|
470
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/stat.html
|
471
|
+
*
|
472
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
473
|
+
*/
|
474
|
+
statSync(path) {
|
475
|
+
return this._stat(this._walk(this._resolve(path)));
|
476
|
+
}
|
477
|
+
/**
|
478
|
+
* Change file access times
|
479
|
+
*
|
480
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
481
|
+
*/
|
482
|
+
utimesSync(path, atime, mtime) {
|
483
|
+
if (this.isReadonly) {
|
484
|
+
throw (0, utils_1.createIOError)('EROFS');
|
485
|
+
}
|
486
|
+
if (!isFinite(+atime) || !isFinite(+mtime)) {
|
487
|
+
throw (0, utils_1.createIOError)('EINVAL');
|
488
|
+
}
|
489
|
+
const entry = this._walk(this._resolve(path));
|
490
|
+
if (!entry || !entry.node) {
|
491
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
492
|
+
}
|
493
|
+
entry.node.atimeMs = +atime;
|
494
|
+
entry.node.mtimeMs = +mtime;
|
495
|
+
entry.node.ctimeMs = this.time();
|
496
|
+
}
|
497
|
+
/**
|
498
|
+
* Get file status. If `path` is a symbolic link, it is dereferenced.
|
499
|
+
*
|
500
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/lstat.html
|
501
|
+
*
|
502
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
503
|
+
*/
|
504
|
+
lstatSync(path) {
|
505
|
+
return this._stat(this._walk(this._resolve(path), /*noFollow*/ true));
|
506
|
+
}
|
507
|
+
_stat(entry) {
|
508
|
+
const node = entry.node;
|
509
|
+
if (!node) {
|
510
|
+
throw (0, utils_1.createIOError)(`ENOENT`, entry.realpath);
|
511
|
+
}
|
512
|
+
return new Stats(node.dev, node.ino, node.mode, node.nlink,
|
513
|
+
/*rdev*/ 0,
|
514
|
+
/*size*/ isFile(node) ? this._getSize(node) : isSymlink(node) ? node.symlink.length : 0,
|
515
|
+
/*blksize*/ 4096,
|
516
|
+
/*blocks*/ 0, node.atimeMs, node.mtimeMs, node.ctimeMs, node.birthtimeMs);
|
517
|
+
}
|
518
|
+
/**
|
519
|
+
* Read a directory. If `path` is a symbolic link, it is dereferenced.
|
520
|
+
*
|
521
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html
|
522
|
+
*
|
523
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
524
|
+
*/
|
525
|
+
readdirSync(path) {
|
526
|
+
const { node } = this._walk(this._resolve(path));
|
527
|
+
if (!node) {
|
528
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
529
|
+
}
|
530
|
+
if (!isDirectory(node)) {
|
531
|
+
throw (0, utils_1.createIOError)('ENOTDIR');
|
532
|
+
}
|
533
|
+
return Array.from(this._getLinks(node).keys());
|
534
|
+
}
|
535
|
+
/**
|
536
|
+
* Read a directory. If `path` is a symbolic link, it is dereferenced.
|
537
|
+
*
|
538
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/readdir.html
|
539
|
+
*
|
540
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
541
|
+
*/
|
542
|
+
readdirEntriesSync(path) {
|
543
|
+
const { node } = this._walk(this._resolve(path));
|
544
|
+
if (!node) {
|
545
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
546
|
+
}
|
547
|
+
if (!isDirectory(node)) {
|
548
|
+
throw (0, utils_1.createIOError)('ENOTDIR');
|
549
|
+
}
|
550
|
+
const entries = Array.from(this._getLinks(node).entries());
|
551
|
+
return entries.map(([k, v]) => makeDirEnt(k, v));
|
552
|
+
}
|
553
|
+
/**
|
554
|
+
* Make a directory.
|
555
|
+
*
|
556
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/mkdir.html
|
557
|
+
*
|
558
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
559
|
+
*/
|
560
|
+
mkdirSync(path) {
|
561
|
+
if (this.isReadonly) {
|
562
|
+
throw (0, utils_1.createIOError)('EROFS');
|
563
|
+
}
|
564
|
+
this._mkdir(this._walk(this._resolve(path), /*noFollow*/ true));
|
565
|
+
}
|
566
|
+
_mkdir({ parent, links, node: existingNode, basename }) {
|
567
|
+
if (existingNode) {
|
568
|
+
throw (0, utils_1.createIOError)('EEXIST');
|
569
|
+
}
|
570
|
+
const time = this.time();
|
571
|
+
const node = this._mknod(parent ? parent.dev : ++devCount, exports.S_IFDIR, /*mode*/ 0o777, time);
|
572
|
+
this._addLink(parent, links, basename, node, time);
|
573
|
+
}
|
574
|
+
/**
|
575
|
+
* Remove a directory.
|
576
|
+
*
|
577
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rmdir.html
|
578
|
+
*
|
579
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
580
|
+
*/
|
581
|
+
rmdirSync(path) {
|
582
|
+
if (this.isReadonly) {
|
583
|
+
throw (0, utils_1.createIOError)('EROFS');
|
584
|
+
}
|
585
|
+
path = this._resolve(path);
|
586
|
+
const { parent, links, node, basename } = this._walk(path, /*noFollow*/ true);
|
587
|
+
if (!parent) {
|
588
|
+
throw (0, utils_1.createIOError)('EPERM');
|
589
|
+
}
|
590
|
+
if (!isDirectory(node)) {
|
591
|
+
throw (0, utils_1.createIOError)('ENOTDIR');
|
592
|
+
}
|
593
|
+
if (this._getLinks(node).size !== 0) {
|
594
|
+
throw (0, utils_1.createIOError)('ENOTEMPTY');
|
595
|
+
}
|
596
|
+
this._removeLink(parent, links, basename, node);
|
597
|
+
}
|
598
|
+
/**
|
599
|
+
* Link one file to another file (also known as a "hard link").
|
600
|
+
*
|
601
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/link.html
|
602
|
+
*
|
603
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
604
|
+
*/
|
605
|
+
linkSync(oldpath, newpath) {
|
606
|
+
if (this.isReadonly) {
|
607
|
+
throw (0, utils_1.createIOError)('EROFS');
|
608
|
+
}
|
609
|
+
const { node } = this._walk(this._resolve(oldpath));
|
610
|
+
if (!node) {
|
611
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
612
|
+
}
|
613
|
+
if (isDirectory(node)) {
|
614
|
+
throw (0, utils_1.createIOError)('EPERM');
|
615
|
+
}
|
616
|
+
const { parent, links, basename, node: existingNode } = this._walk(this._resolve(newpath), /*noFollow*/ true);
|
617
|
+
if (!parent) {
|
618
|
+
throw (0, utils_1.createIOError)('EPERM');
|
619
|
+
}
|
620
|
+
if (existingNode) {
|
621
|
+
throw (0, utils_1.createIOError)('EEXIST');
|
622
|
+
}
|
623
|
+
this._addLink(parent, links, basename, node);
|
624
|
+
}
|
625
|
+
/**
|
626
|
+
* Remove a directory entry.
|
627
|
+
*
|
628
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/unlink.html
|
629
|
+
*
|
630
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
631
|
+
*/
|
632
|
+
unlinkSync(path) {
|
633
|
+
if (this.isReadonly) {
|
634
|
+
throw (0, utils_1.createIOError)('EROFS');
|
635
|
+
}
|
636
|
+
const { parent, links, node, basename } = this._walk(this._resolve(path), /*noFollow*/ true);
|
637
|
+
if (!parent) {
|
638
|
+
throw (0, utils_1.createIOError)('EPERM');
|
639
|
+
}
|
640
|
+
if (!node) {
|
641
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
642
|
+
}
|
643
|
+
if (isDirectory(node)) {
|
644
|
+
throw (0, utils_1.createIOError)('EISDIR');
|
645
|
+
}
|
646
|
+
this._removeLink(parent, links, basename, node);
|
647
|
+
}
|
648
|
+
/**
|
649
|
+
* Rename a file.
|
650
|
+
*
|
651
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/rename.html
|
652
|
+
*
|
653
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
654
|
+
*/
|
655
|
+
renameSync(oldpath, newpath) {
|
656
|
+
if (this.isReadonly) {
|
657
|
+
throw (0, utils_1.createIOError)('EROFS');
|
658
|
+
}
|
659
|
+
const { parent: oldParent, links: oldParentLinks, node, basename: oldBasename, } = this._walk(this._resolve(oldpath), /*noFollow*/ true);
|
660
|
+
if (!oldParent) {
|
661
|
+
throw (0, utils_1.createIOError)('EPERM');
|
662
|
+
}
|
663
|
+
if (!node) {
|
664
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
665
|
+
}
|
666
|
+
const { parent: newParent, links: newParentLinks, node: existingNode, basename: newBasename, } = this._walk(this._resolve(newpath), /*noFollow*/ true);
|
667
|
+
if (!newParent) {
|
668
|
+
throw (0, utils_1.createIOError)('EPERM');
|
669
|
+
}
|
670
|
+
const time = this.time();
|
671
|
+
if (existingNode) {
|
672
|
+
if (isDirectory(node)) {
|
673
|
+
if (!isDirectory(existingNode)) {
|
674
|
+
throw (0, utils_1.createIOError)('ENOTDIR');
|
675
|
+
}
|
676
|
+
if (this._getLinks(existingNode).size > 0) {
|
677
|
+
throw (0, utils_1.createIOError)('ENOTEMPTY');
|
678
|
+
}
|
679
|
+
}
|
680
|
+
else {
|
681
|
+
if (isDirectory(existingNode)) {
|
682
|
+
throw (0, utils_1.createIOError)('EISDIR');
|
683
|
+
}
|
684
|
+
}
|
685
|
+
this._removeLink(newParent, newParentLinks, newBasename, existingNode, time);
|
686
|
+
}
|
687
|
+
this._replaceLink(oldParent, oldParentLinks, oldBasename, newParent, newParentLinks, newBasename, node, time);
|
688
|
+
}
|
689
|
+
/**
|
690
|
+
* Make a symbolic link.
|
691
|
+
*
|
692
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/symlink.html
|
693
|
+
*
|
694
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
695
|
+
*/
|
696
|
+
symlinkSync(target, linkpath) {
|
697
|
+
if (this.isReadonly) {
|
698
|
+
throw (0, utils_1.createIOError)('EROFS');
|
699
|
+
}
|
700
|
+
const { parent, links, node: existingNode, basename } = this._walk(this._resolve(linkpath), /*noFollow*/ true);
|
701
|
+
if (!parent) {
|
702
|
+
throw (0, utils_1.createIOError)('EPERM');
|
703
|
+
}
|
704
|
+
if (existingNode) {
|
705
|
+
throw (0, utils_1.createIOError)('EEXIST');
|
706
|
+
}
|
707
|
+
const time = this.time();
|
708
|
+
const node = this._mknod(parent.dev, exports.S_IFLNK, /*mode*/ 0o666, time);
|
709
|
+
node.symlink = (0, pathValidation_1.validate)(target, 2016 /* RelativeOrAbsolute */);
|
710
|
+
this._addLink(parent, links, basename, node, time);
|
711
|
+
}
|
712
|
+
/**
|
713
|
+
* Resolve a pathname.
|
714
|
+
*
|
715
|
+
* @link http://pubs.opengroup.org/onlinepubs/9699919799/functions/realpath.html
|
716
|
+
*
|
717
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
718
|
+
*/
|
719
|
+
realpathSync(path) {
|
720
|
+
const { realpath } = this._walk(this._resolve(path));
|
721
|
+
return realpath;
|
722
|
+
}
|
723
|
+
readFileSync(path, encoding = null) {
|
724
|
+
const { node } = this._walk(this._resolve(path));
|
725
|
+
if (!node) {
|
726
|
+
throw (0, utils_1.createIOError)('ENOENT');
|
727
|
+
}
|
728
|
+
if (isDirectory(node)) {
|
729
|
+
throw (0, utils_1.createIOError)('EISDIR');
|
730
|
+
}
|
731
|
+
if (!isFile(node)) {
|
732
|
+
throw (0, utils_1.createIOError)('EBADF');
|
733
|
+
}
|
734
|
+
const buffer = this._getBuffer(node).slice();
|
735
|
+
return encoding ? buffer.toString(encoding) : buffer;
|
736
|
+
}
|
737
|
+
/**
|
738
|
+
* Write to a file.
|
739
|
+
*
|
740
|
+
* NOTE: do not rename this method as it is intended to align with the same named export of the "fs" module.
|
741
|
+
*/
|
742
|
+
writeFileSync(path, data, encoding = null) {
|
743
|
+
if (this.isReadonly) {
|
744
|
+
throw (0, utils_1.createIOError)('EROFS');
|
745
|
+
}
|
746
|
+
const { parent, links, node: existingNode, basename } = this._walk(this._resolve(path), /*noFollow*/ false);
|
747
|
+
if (!parent) {
|
748
|
+
throw (0, utils_1.createIOError)('EPERM');
|
749
|
+
}
|
750
|
+
const time = this.time();
|
751
|
+
let node = existingNode;
|
752
|
+
if (!node) {
|
753
|
+
node = this._mknod(parent.dev, exports.S_IFREG, 0o666, time);
|
754
|
+
this._addLink(parent, links, basename, node, time);
|
755
|
+
}
|
756
|
+
if (isDirectory(node)) {
|
757
|
+
throw (0, utils_1.createIOError)('EISDIR');
|
758
|
+
}
|
759
|
+
if (!isFile(node)) {
|
760
|
+
throw (0, utils_1.createIOError)('EBADF');
|
761
|
+
}
|
762
|
+
node.buffer = Buffer.isBuffer(data)
|
763
|
+
? data.slice()
|
764
|
+
: (0, utils_1.bufferFrom)('' + data, encoding || 'utf8');
|
765
|
+
node.size = node.buffer.byteLength;
|
766
|
+
node.mtimeMs = time;
|
767
|
+
node.ctimeMs = time;
|
768
|
+
}
|
769
|
+
readFile(filePath) {
|
770
|
+
return Promise.resolve(this.readFileSync(filePath));
|
771
|
+
}
|
772
|
+
readFileText(filePath, encoding) {
|
773
|
+
return Promise.resolve(this.readFileSync(filePath, encoding || 'utf8'));
|
774
|
+
}
|
775
|
+
createReadStream(path) {
|
776
|
+
throw new Error('Not implemented in test file system.');
|
777
|
+
}
|
778
|
+
createWriteStream(path) {
|
779
|
+
throw new Error('Not implemented in test file system.');
|
780
|
+
}
|
781
|
+
copyFileSync(src, dst) {
|
782
|
+
throw new Error('Not implemented in test file system.');
|
783
|
+
}
|
784
|
+
/**
|
785
|
+
* Generates a `FileSet` patch containing all the entries in this `FileSystem` that are not in `base`.
|
786
|
+
* @param base The base file system. If not provided, this file system's `shadowRoot` is used (if present).
|
787
|
+
*/
|
788
|
+
diff(base = this.shadowRoot, options = {}) {
|
789
|
+
const differences = {};
|
790
|
+
const hasDifferences = base
|
791
|
+
? TestFileSystem._rootDiff(differences, this, base, options)
|
792
|
+
: TestFileSystem._trackCreatedInodes(differences, this, this._getRootLinks());
|
793
|
+
return hasDifferences ? differences : undefined;
|
794
|
+
}
|
795
|
+
/**
|
796
|
+
* Generates a `FileSet` patch containing all the entries in `changed` that are not in `base`.
|
797
|
+
*/
|
798
|
+
static diff(changed, base, options = {}) {
|
799
|
+
const differences = {};
|
800
|
+
return TestFileSystem._rootDiff(differences, changed, base, options) ? differences : undefined;
|
801
|
+
}
|
802
|
+
isInZipOrEgg(path) {
|
803
|
+
return false;
|
804
|
+
}
|
805
|
+
static _diffWorker(container, changed, changedLinks, base, baseLinks, options) {
|
806
|
+
if (changedLinks && !baseLinks) {
|
807
|
+
return TestFileSystem._trackCreatedInodes(container, changed, changedLinks);
|
808
|
+
}
|
809
|
+
if (baseLinks && !changedLinks) {
|
810
|
+
return TestFileSystem._trackDeletedInodes(container, baseLinks);
|
811
|
+
}
|
812
|
+
if (changedLinks && baseLinks) {
|
813
|
+
let hasChanges = false;
|
814
|
+
// track base items missing in changed
|
815
|
+
baseLinks.forEach((node, basename) => {
|
816
|
+
if (!changedLinks.has(basename)) {
|
817
|
+
container[basename] = isDirectory(node) ? new Rmdir() : new Unlink();
|
818
|
+
hasChanges = true;
|
819
|
+
}
|
820
|
+
});
|
821
|
+
// track changed items missing or differing in base
|
822
|
+
changedLinks.forEach((changedNode, basename) => {
|
823
|
+
const baseNode = baseLinks.get(basename);
|
824
|
+
if (baseNode) {
|
825
|
+
if (isDirectory(changedNode) && isDirectory(baseNode)) {
|
826
|
+
return (hasChanges =
|
827
|
+
TestFileSystem._directoryDiff(container, basename, changed, changedNode, base, baseNode, options) || hasChanges);
|
828
|
+
}
|
829
|
+
if (isFile(changedNode) && isFile(baseNode)) {
|
830
|
+
return (hasChanges =
|
831
|
+
TestFileSystem._fileDiff(container, basename, changed, changedNode, base, baseNode, options) || hasChanges);
|
832
|
+
}
|
833
|
+
if (isSymlink(changedNode) && isSymlink(baseNode)) {
|
834
|
+
return (hasChanges =
|
835
|
+
TestFileSystem._symlinkDiff(container, basename, changedNode, baseNode) || hasChanges);
|
836
|
+
}
|
837
|
+
}
|
838
|
+
return (hasChanges =
|
839
|
+
TestFileSystem._trackCreatedInode(container, basename, changed, changedNode) || hasChanges);
|
840
|
+
});
|
841
|
+
return hasChanges;
|
842
|
+
}
|
843
|
+
return false;
|
844
|
+
}
|
845
|
+
static _rootDiff(container, changed, base, options) {
|
846
|
+
while (!changed._lazy.links && changed._shadowRoot) {
|
847
|
+
changed = changed._shadowRoot;
|
848
|
+
}
|
849
|
+
while (!base._lazy.links && base._shadowRoot) {
|
850
|
+
base = base._shadowRoot;
|
851
|
+
}
|
852
|
+
// no difference if the file systems are the same reference
|
853
|
+
if (changed === base) {
|
854
|
+
return false;
|
855
|
+
}
|
856
|
+
// no difference if the root links are empty and unshadowed
|
857
|
+
if (!changed._lazy.links && !changed._shadowRoot && !base._lazy.links && !base._shadowRoot) {
|
858
|
+
return false;
|
859
|
+
}
|
860
|
+
return TestFileSystem._diffWorker(container, changed, changed._getRootLinks(), base, base._getRootLinks(), options);
|
861
|
+
}
|
862
|
+
static _directoryDiff(container, basename, changed, changedNode, base, baseNode, options) {
|
863
|
+
while (!changedNode.links && changedNode.shadowRoot) {
|
864
|
+
changedNode = changedNode.shadowRoot;
|
865
|
+
}
|
866
|
+
while (!baseNode.links && baseNode.shadowRoot) {
|
867
|
+
baseNode = baseNode.shadowRoot;
|
868
|
+
}
|
869
|
+
// no difference if the nodes are the same reference
|
870
|
+
if (changedNode === baseNode) {
|
871
|
+
return false;
|
872
|
+
}
|
873
|
+
// no difference if both nodes are non shadowed and have no entries
|
874
|
+
if (isEmptyNonShadowedDirectory(changedNode) && isEmptyNonShadowedDirectory(baseNode)) {
|
875
|
+
return false;
|
876
|
+
}
|
877
|
+
// no difference if both nodes are unpopulated and point to the same mounted file system
|
878
|
+
if (!changedNode.links &&
|
879
|
+
!baseNode.links &&
|
880
|
+
changedNode.resolver &&
|
881
|
+
changedNode.source !== undefined &&
|
882
|
+
baseNode.resolver === changedNode.resolver &&
|
883
|
+
baseNode.source === changedNode.source) {
|
884
|
+
return false;
|
885
|
+
}
|
886
|
+
// no difference if both nodes have identical children
|
887
|
+
const children = {};
|
888
|
+
if (!TestFileSystem._diffWorker(children, changed, changed._getLinks(changedNode), base, base._getLinks(baseNode), options)) {
|
889
|
+
return false;
|
890
|
+
}
|
891
|
+
container[basename] = new Directory(children);
|
892
|
+
return true;
|
893
|
+
}
|
894
|
+
static _fileDiff(container, basename, changed, changedNode, base, baseNode, options) {
|
895
|
+
while (!changedNode.buffer && changedNode.shadowRoot) {
|
896
|
+
changedNode = changedNode.shadowRoot;
|
897
|
+
}
|
898
|
+
while (!baseNode.buffer && baseNode.shadowRoot) {
|
899
|
+
baseNode = baseNode.shadowRoot;
|
900
|
+
}
|
901
|
+
// no difference if the nodes are the same reference
|
902
|
+
if (changedNode === baseNode) {
|
903
|
+
return false;
|
904
|
+
}
|
905
|
+
// no difference if both nodes are non shadowed and have no entries
|
906
|
+
if (isEmptyNonShadowedFile(changedNode) && isEmptyNonShadowedFile(baseNode)) {
|
907
|
+
return false;
|
908
|
+
}
|
909
|
+
// no difference if both nodes are unpopulated and point to the same mounted file system
|
910
|
+
if (!changedNode.buffer &&
|
911
|
+
!baseNode.buffer &&
|
912
|
+
changedNode.resolver &&
|
913
|
+
changedNode.source !== undefined &&
|
914
|
+
baseNode.resolver === changedNode.resolver &&
|
915
|
+
baseNode.source === changedNode.source) {
|
916
|
+
return false;
|
917
|
+
}
|
918
|
+
const changedBuffer = changed._getBuffer(changedNode);
|
919
|
+
const baseBuffer = base._getBuffer(baseNode);
|
920
|
+
// no difference if both buffers are the same reference
|
921
|
+
if (changedBuffer === baseBuffer) {
|
922
|
+
return false;
|
923
|
+
}
|
924
|
+
// no difference if both buffers are identical
|
925
|
+
if (Buffer.compare(changedBuffer, baseBuffer) === 0) {
|
926
|
+
if (!options.includeChangedFileWithSameContent) {
|
927
|
+
return false;
|
928
|
+
}
|
929
|
+
container[basename] = new SameFileContentFile(changedBuffer);
|
930
|
+
return true;
|
931
|
+
}
|
932
|
+
container[basename] = new File(changedBuffer);
|
933
|
+
return true;
|
934
|
+
}
|
935
|
+
static _symlinkDiff(container, basename, changedNode, baseNode) {
|
936
|
+
// no difference if the nodes are the same reference
|
937
|
+
if (changedNode.symlink === baseNode.symlink) {
|
938
|
+
return false;
|
939
|
+
}
|
940
|
+
container[basename] = new Symlink(changedNode.symlink);
|
941
|
+
return true;
|
942
|
+
}
|
943
|
+
static _trackCreatedInode(container, basename, changed, node) {
|
944
|
+
if (isDirectory(node)) {
|
945
|
+
const children = {};
|
946
|
+
TestFileSystem._trackCreatedInodes(children, changed, changed._getLinks(node));
|
947
|
+
container[basename] = new Directory(children);
|
948
|
+
}
|
949
|
+
else if (isSymlink(node)) {
|
950
|
+
container[basename] = new Symlink(node.symlink);
|
951
|
+
}
|
952
|
+
else {
|
953
|
+
container[basename] = new File(node.buffer || '');
|
954
|
+
}
|
955
|
+
return true;
|
956
|
+
}
|
957
|
+
static _trackCreatedInodes(container, changed, changedLinks) {
|
958
|
+
// no difference if links are empty
|
959
|
+
if (!changedLinks.size) {
|
960
|
+
return false;
|
961
|
+
}
|
962
|
+
changedLinks.forEach((node, basename) => {
|
963
|
+
TestFileSystem._trackCreatedInode(container, basename, changed, node);
|
964
|
+
});
|
965
|
+
return true;
|
966
|
+
}
|
967
|
+
static _trackDeletedInodes(container, baseLinks) {
|
968
|
+
// no difference if links are empty
|
969
|
+
if (!baseLinks.size) {
|
970
|
+
return false;
|
971
|
+
}
|
972
|
+
baseLinks.forEach((node, basename) => {
|
973
|
+
container[basename] = isDirectory(node) ? new Rmdir() : new Unlink();
|
974
|
+
});
|
975
|
+
return true;
|
976
|
+
}
|
977
|
+
_mknod(dev, type, mode, time = this.time()) {
|
978
|
+
return {
|
979
|
+
dev,
|
980
|
+
ino: ++inoCount,
|
981
|
+
mode: (mode & ~exports.S_IFMT & ~0o022 & 0o7777) | (type & exports.S_IFMT),
|
982
|
+
atimeMs: time,
|
983
|
+
mtimeMs: time,
|
984
|
+
ctimeMs: time,
|
985
|
+
birthtimeMs: time,
|
986
|
+
nlink: 0,
|
987
|
+
};
|
988
|
+
}
|
989
|
+
_addLink(parent, links, name, node, time = this.time()) {
|
990
|
+
links.set(name, node);
|
991
|
+
node.nlink++;
|
992
|
+
node.ctimeMs = time;
|
993
|
+
if (parent) {
|
994
|
+
parent.mtimeMs = time;
|
995
|
+
}
|
996
|
+
if (!parent && !this._cwd) {
|
997
|
+
this._cwd = name;
|
998
|
+
}
|
999
|
+
}
|
1000
|
+
_removeLink(parent, links, name, node, time = this.time()) {
|
1001
|
+
links.delete(name);
|
1002
|
+
node.nlink--;
|
1003
|
+
node.ctimeMs = time;
|
1004
|
+
if (parent) {
|
1005
|
+
parent.mtimeMs = time;
|
1006
|
+
}
|
1007
|
+
}
|
1008
|
+
_replaceLink(oldParent, oldLinks, oldName, newParent, newLinks, newName, node, time) {
|
1009
|
+
if (oldParent !== newParent) {
|
1010
|
+
this._removeLink(oldParent, oldLinks, oldName, node, time);
|
1011
|
+
this._addLink(newParent, newLinks, newName, node, time);
|
1012
|
+
}
|
1013
|
+
else {
|
1014
|
+
oldLinks.delete(oldName);
|
1015
|
+
oldLinks.set(newName, node);
|
1016
|
+
oldParent.mtimeMs = time;
|
1017
|
+
newParent.mtimeMs = time;
|
1018
|
+
}
|
1019
|
+
}
|
1020
|
+
_getRootLinks() {
|
1021
|
+
if (!this._lazy.links) {
|
1022
|
+
const links = new utils_2.SortedMap(this.stringComparer);
|
1023
|
+
if (this._shadowRoot) {
|
1024
|
+
this._copyShadowLinks(this._shadowRoot._getRootLinks(), links);
|
1025
|
+
}
|
1026
|
+
this._lazy.links = links;
|
1027
|
+
}
|
1028
|
+
return this._lazy.links;
|
1029
|
+
}
|
1030
|
+
_getLinks(node) {
|
1031
|
+
if (!node.links) {
|
1032
|
+
const links = new utils_2.SortedMap(this.stringComparer);
|
1033
|
+
const { source, resolver } = node;
|
1034
|
+
if (source && resolver) {
|
1035
|
+
node.source = undefined;
|
1036
|
+
node.resolver = undefined;
|
1037
|
+
for (const name of resolver.readdirSync(source)) {
|
1038
|
+
const path = pathUtil.combinePaths(source, name);
|
1039
|
+
const stats = resolver.statSync(path);
|
1040
|
+
switch (stats.mode & exports.S_IFMT) {
|
1041
|
+
case exports.S_IFDIR: {
|
1042
|
+
const dir = this._mknod(node.dev, exports.S_IFDIR, 0o777);
|
1043
|
+
dir.source = pathUtil.combinePaths(source, name);
|
1044
|
+
dir.resolver = resolver;
|
1045
|
+
this._addLink(node, links, name, dir);
|
1046
|
+
break;
|
1047
|
+
}
|
1048
|
+
case exports.S_IFREG: {
|
1049
|
+
const file = this._mknod(node.dev, exports.S_IFREG, 0o666);
|
1050
|
+
file.source = pathUtil.combinePaths(source, name);
|
1051
|
+
file.resolver = resolver;
|
1052
|
+
file.size = stats.size;
|
1053
|
+
this._addLink(node, links, name, file);
|
1054
|
+
break;
|
1055
|
+
}
|
1056
|
+
}
|
1057
|
+
}
|
1058
|
+
}
|
1059
|
+
else if (this._shadowRoot && node.shadowRoot) {
|
1060
|
+
this._copyShadowLinks(this._shadowRoot._getLinks(node.shadowRoot), links);
|
1061
|
+
}
|
1062
|
+
node.links = links;
|
1063
|
+
}
|
1064
|
+
return node.links;
|
1065
|
+
}
|
1066
|
+
_getShadow(root) {
|
1067
|
+
const shadows = this._lazy.shadows || (this._lazy.shadows = new Map());
|
1068
|
+
let shadow = shadows.get(root.ino);
|
1069
|
+
if (!shadow) {
|
1070
|
+
shadow = {
|
1071
|
+
dev: root.dev,
|
1072
|
+
ino: root.ino,
|
1073
|
+
mode: root.mode,
|
1074
|
+
atimeMs: root.atimeMs,
|
1075
|
+
mtimeMs: root.mtimeMs,
|
1076
|
+
ctimeMs: root.ctimeMs,
|
1077
|
+
birthtimeMs: root.birthtimeMs,
|
1078
|
+
nlink: root.nlink,
|
1079
|
+
shadowRoot: root,
|
1080
|
+
};
|
1081
|
+
if (isSymlink(root)) {
|
1082
|
+
shadow.symlink = root.symlink;
|
1083
|
+
}
|
1084
|
+
shadows.set(shadow.ino, shadow);
|
1085
|
+
}
|
1086
|
+
return shadow;
|
1087
|
+
}
|
1088
|
+
_copyShadowLinks(source, target) {
|
1089
|
+
const iterator = (0, utils_2.getIterator)(source);
|
1090
|
+
try {
|
1091
|
+
for (let i = (0, utils_2.nextResult)(iterator); i; i = (0, utils_2.nextResult)(iterator)) {
|
1092
|
+
const [name, root] = i.value;
|
1093
|
+
target.set(name, this._getShadow(root));
|
1094
|
+
}
|
1095
|
+
}
|
1096
|
+
finally {
|
1097
|
+
(0, utils_2.closeIterator)(iterator);
|
1098
|
+
}
|
1099
|
+
}
|
1100
|
+
_getSize(node) {
|
1101
|
+
if (node.buffer) {
|
1102
|
+
return node.buffer.byteLength;
|
1103
|
+
}
|
1104
|
+
if (node.size !== undefined) {
|
1105
|
+
return node.size;
|
1106
|
+
}
|
1107
|
+
if (node.source && node.resolver) {
|
1108
|
+
return (node.size = node.resolver.statSync(node.source).size);
|
1109
|
+
}
|
1110
|
+
if (this._shadowRoot && node.shadowRoot) {
|
1111
|
+
return (node.size = this._shadowRoot._getSize(node.shadowRoot));
|
1112
|
+
}
|
1113
|
+
return 0;
|
1114
|
+
}
|
1115
|
+
_getBuffer(node) {
|
1116
|
+
if (!node.buffer) {
|
1117
|
+
const { source, resolver } = node;
|
1118
|
+
if (source && resolver) {
|
1119
|
+
node.source = undefined;
|
1120
|
+
node.resolver = undefined;
|
1121
|
+
node.size = undefined;
|
1122
|
+
node.buffer = resolver.readFileSync(source);
|
1123
|
+
}
|
1124
|
+
else if (this._shadowRoot && node.shadowRoot) {
|
1125
|
+
node.buffer = this._shadowRoot._getBuffer(node.shadowRoot);
|
1126
|
+
}
|
1127
|
+
else {
|
1128
|
+
node.buffer = Buffer.allocUnsafe(0);
|
1129
|
+
}
|
1130
|
+
}
|
1131
|
+
return node.buffer;
|
1132
|
+
}
|
1133
|
+
_walk(path, noFollow, onError) {
|
1134
|
+
let links = this._getRootLinks();
|
1135
|
+
let parent;
|
1136
|
+
let components = pathUtil.getPathComponents(path);
|
1137
|
+
let step = 0;
|
1138
|
+
let depth = 0;
|
1139
|
+
let retry = false;
|
1140
|
+
while (true) {
|
1141
|
+
if (depth >= 40) {
|
1142
|
+
throw (0, utils_1.createIOError)('ELOOP');
|
1143
|
+
}
|
1144
|
+
const lastStep = step === components.length - 1;
|
1145
|
+
const basename = components[step];
|
1146
|
+
const node = links.get(basename);
|
1147
|
+
if (lastStep && (noFollow || !isSymlink(node))) {
|
1148
|
+
return { realpath: pathUtil.combinePathComponents(components), basename, parent, links, node };
|
1149
|
+
}
|
1150
|
+
if (node === undefined) {
|
1151
|
+
if (trapError((0, utils_1.createIOError)('ENOENT'), node)) {
|
1152
|
+
continue;
|
1153
|
+
}
|
1154
|
+
return undefined;
|
1155
|
+
}
|
1156
|
+
if (isSymlink(node)) {
|
1157
|
+
const dirname = pathUtil.combinePathComponents(components.slice(0, step));
|
1158
|
+
const symlink = pathUtil.resolvePaths(dirname, node.symlink);
|
1159
|
+
links = this._getRootLinks();
|
1160
|
+
parent = undefined;
|
1161
|
+
components = pathUtil.getPathComponents(symlink).concat(components.slice(step + 1));
|
1162
|
+
step = 0;
|
1163
|
+
depth++;
|
1164
|
+
retry = false;
|
1165
|
+
continue;
|
1166
|
+
}
|
1167
|
+
if (isDirectory(node)) {
|
1168
|
+
links = this._getLinks(node);
|
1169
|
+
parent = node;
|
1170
|
+
step++;
|
1171
|
+
retry = false;
|
1172
|
+
continue;
|
1173
|
+
}
|
1174
|
+
if (trapError((0, utils_1.createIOError)('ENOTDIR'), node)) {
|
1175
|
+
continue;
|
1176
|
+
}
|
1177
|
+
return undefined;
|
1178
|
+
}
|
1179
|
+
function trapError(error, node) {
|
1180
|
+
const realpath = pathUtil.combinePathComponents(components.slice(0, step + 1));
|
1181
|
+
const basename = components[step];
|
1182
|
+
const result = !retry && onError ? onError(error, { realpath, basename, parent, links, node }) : 'throw';
|
1183
|
+
if (result === 'stop') {
|
1184
|
+
return false;
|
1185
|
+
}
|
1186
|
+
if (result === 'retry') {
|
1187
|
+
retry = true;
|
1188
|
+
return true;
|
1189
|
+
}
|
1190
|
+
throw error;
|
1191
|
+
}
|
1192
|
+
}
|
1193
|
+
/**
|
1194
|
+
* Resolve a path relative to the current working directory.
|
1195
|
+
*/
|
1196
|
+
_resolve(path) {
|
1197
|
+
return this._cwd
|
1198
|
+
? pathUtil.resolvePaths(this._cwd, (0, pathValidation_1.validate)(path, 2016 /* RelativeOrAbsolute */ | 2048 /* AllowWildcard */))
|
1199
|
+
: (0, pathValidation_1.validate)(path, 2017 /* Absolute */ | 2048 /* AllowWildcard */);
|
1200
|
+
}
|
1201
|
+
_applyFiles(files, dirname) {
|
1202
|
+
const deferred = [];
|
1203
|
+
this._applyFilesWorker(files, dirname, deferred);
|
1204
|
+
for (const [entry, path] of deferred) {
|
1205
|
+
this.mkdirpSync(pathUtil.getDirectoryPath(path));
|
1206
|
+
this.pushd(pathUtil.getDirectoryPath(path));
|
1207
|
+
if (entry instanceof Symlink) {
|
1208
|
+
if (this.stringComparer(pathUtil.getDirectoryPath(path), path) === 0) {
|
1209
|
+
throw new TypeError('Roots cannot be symbolic links.');
|
1210
|
+
}
|
1211
|
+
this.symlinkSync(pathUtil.resolvePaths(dirname, entry.symlink), path);
|
1212
|
+
this._applyFileExtendedOptions(path, entry);
|
1213
|
+
}
|
1214
|
+
else if (entry instanceof Link) {
|
1215
|
+
if (this.stringComparer(pathUtil.getDirectoryPath(path), path) === 0) {
|
1216
|
+
throw new TypeError('Roots cannot be hard links.');
|
1217
|
+
}
|
1218
|
+
this.linkSync(entry.path, path);
|
1219
|
+
}
|
1220
|
+
else {
|
1221
|
+
this.mountSync(entry.source, path, entry.resolver);
|
1222
|
+
this._applyFileExtendedOptions(path, entry);
|
1223
|
+
}
|
1224
|
+
this.popd();
|
1225
|
+
}
|
1226
|
+
}
|
1227
|
+
_applyFileExtendedOptions(path, entry) {
|
1228
|
+
const { meta } = entry;
|
1229
|
+
if (meta !== undefined) {
|
1230
|
+
const filemeta = this.filemeta(path);
|
1231
|
+
for (const key of Object.keys(meta)) {
|
1232
|
+
filemeta.set(key, meta[key]);
|
1233
|
+
}
|
1234
|
+
}
|
1235
|
+
}
|
1236
|
+
_applyFilesWorker(files, dirname, deferred) {
|
1237
|
+
for (const key of Object.keys(files)) {
|
1238
|
+
const value = normalizeFileSetEntry(files[key]);
|
1239
|
+
const path = dirname ? pathUtil.resolvePaths(dirname, key) : key;
|
1240
|
+
(0, pathValidation_1.validate)(path, 2017 /* Absolute */);
|
1241
|
+
if (value === null || value === undefined || value instanceof Rmdir || value instanceof Unlink) {
|
1242
|
+
if (this.stringComparer(pathUtil.getDirectoryPath(path), path) === 0) {
|
1243
|
+
throw new TypeError('Roots cannot be deleted.');
|
1244
|
+
}
|
1245
|
+
this.rimrafSync(path);
|
1246
|
+
}
|
1247
|
+
else if (value instanceof File) {
|
1248
|
+
if (this.stringComparer(pathUtil.getDirectoryPath(path), path) === 0) {
|
1249
|
+
throw new TypeError('Roots cannot be files.');
|
1250
|
+
}
|
1251
|
+
this.mkdirpSync(pathUtil.getDirectoryPath(path));
|
1252
|
+
this.writeFileSync(path, value.data, value.encoding);
|
1253
|
+
this._applyFileExtendedOptions(path, value);
|
1254
|
+
}
|
1255
|
+
else if (value instanceof Directory) {
|
1256
|
+
this.mkdirpSync(path);
|
1257
|
+
this._applyFileExtendedOptions(path, value);
|
1258
|
+
this._applyFilesWorker(value.files, path, deferred);
|
1259
|
+
}
|
1260
|
+
else {
|
1261
|
+
deferred.push([value, path]);
|
1262
|
+
}
|
1263
|
+
}
|
1264
|
+
}
|
1265
|
+
}
|
1266
|
+
exports.TestFileSystem = TestFileSystem;
|
1267
|
+
/** Extended options for a directory in a `FileSet` */
|
1268
|
+
class Directory {
|
1269
|
+
constructor(files, { meta } = {}) {
|
1270
|
+
this.files = files;
|
1271
|
+
this.meta = meta;
|
1272
|
+
}
|
1273
|
+
}
|
1274
|
+
exports.Directory = Directory;
|
1275
|
+
/** Extended options for a file in a `FileSet` */
|
1276
|
+
class File {
|
1277
|
+
constructor(data, { meta, encoding } = {}) {
|
1278
|
+
this.data = data;
|
1279
|
+
this.encoding = encoding;
|
1280
|
+
this.meta = meta;
|
1281
|
+
}
|
1282
|
+
}
|
1283
|
+
exports.File = File;
|
1284
|
+
class SameFileContentFile extends File {
|
1285
|
+
constructor(data, metaAndEncoding) {
|
1286
|
+
super(data, metaAndEncoding);
|
1287
|
+
}
|
1288
|
+
}
|
1289
|
+
exports.SameFileContentFile = SameFileContentFile;
|
1290
|
+
/** Extended options for a hard link in a `FileSet` */
|
1291
|
+
class Link {
|
1292
|
+
constructor(path) {
|
1293
|
+
this.path = path;
|
1294
|
+
}
|
1295
|
+
}
|
1296
|
+
exports.Link = Link;
|
1297
|
+
/** Removes a directory in a `FileSet` */
|
1298
|
+
class Rmdir {
|
1299
|
+
}
|
1300
|
+
exports.Rmdir = Rmdir;
|
1301
|
+
/** Unlinks a file in a `FileSet` */
|
1302
|
+
class Unlink {
|
1303
|
+
}
|
1304
|
+
exports.Unlink = Unlink;
|
1305
|
+
/** Extended options for a symbolic link in a `FileSet` */
|
1306
|
+
class Symlink {
|
1307
|
+
constructor(symlink, { meta } = {}) {
|
1308
|
+
this.symlink = symlink;
|
1309
|
+
this.meta = meta;
|
1310
|
+
}
|
1311
|
+
}
|
1312
|
+
exports.Symlink = Symlink;
|
1313
|
+
// file type
|
1314
|
+
// these should be only used inside of test code. it is export just because mock file system is separated into
|
1315
|
+
// 2 files. this and factory.ts file. actual value doesn't matter
|
1316
|
+
exports.S_IFMT = 0o170000; // file type
|
1317
|
+
exports.S_IFSOCK = 0o140000; // socket
|
1318
|
+
exports.S_IFLNK = 0o120000; // symbolic link
|
1319
|
+
exports.S_IFREG = 0o100000; // regular file
|
1320
|
+
exports.S_IFBLK = 0o060000; // block device
|
1321
|
+
exports.S_IFDIR = 0o040000; // directory
|
1322
|
+
exports.S_IFCHR = 0o020000; // character device
|
1323
|
+
exports.S_IFIFO = 0o010000; // FIFO
|
1324
|
+
/** Extended options for mounting a virtual copy of an external file system via a `FileSet` */
|
1325
|
+
class Mount {
|
1326
|
+
constructor(source, resolver, { meta } = {}) {
|
1327
|
+
this.source = source;
|
1328
|
+
this.resolver = resolver;
|
1329
|
+
this.meta = meta;
|
1330
|
+
}
|
1331
|
+
}
|
1332
|
+
exports.Mount = Mount;
|
1333
|
+
function isEmptyNonShadowedDirectory(node) {
|
1334
|
+
return !node.links && !node.shadowRoot && !node.resolver && !node.source;
|
1335
|
+
}
|
1336
|
+
function isEmptyNonShadowedFile(node) {
|
1337
|
+
return !node.buffer && !node.shadowRoot && !node.resolver && !node.source;
|
1338
|
+
}
|
1339
|
+
function isFile(node) {
|
1340
|
+
return node !== undefined && (node.mode & exports.S_IFMT) === exports.S_IFREG;
|
1341
|
+
}
|
1342
|
+
function isDirectory(node) {
|
1343
|
+
return node !== undefined && (node.mode & exports.S_IFMT) === exports.S_IFDIR;
|
1344
|
+
}
|
1345
|
+
function isSymlink(node) {
|
1346
|
+
return node !== undefined && (node.mode & exports.S_IFMT) === exports.S_IFLNK;
|
1347
|
+
}
|
1348
|
+
function normalizeFileSetEntry(value) {
|
1349
|
+
if (value === undefined ||
|
1350
|
+
value === null ||
|
1351
|
+
value instanceof Directory ||
|
1352
|
+
value instanceof File ||
|
1353
|
+
value instanceof Link ||
|
1354
|
+
value instanceof Symlink ||
|
1355
|
+
value instanceof Mount ||
|
1356
|
+
value instanceof Rmdir ||
|
1357
|
+
value instanceof Unlink) {
|
1358
|
+
return value;
|
1359
|
+
}
|
1360
|
+
return typeof value === 'string' || Buffer.isBuffer(value) ? new File(value) : new Directory(value);
|
1361
|
+
}
|
1362
|
+
function formatPatch(patch) {
|
1363
|
+
return patch ? formatPatchWorker('', patch) : null;
|
1364
|
+
}
|
1365
|
+
exports.formatPatch = formatPatch;
|
1366
|
+
function formatPatchWorker(dirname, container) {
|
1367
|
+
let text = '';
|
1368
|
+
for (const name of Object.keys(container)) {
|
1369
|
+
const entry = normalizeFileSetEntry(container[name]);
|
1370
|
+
const file = dirname ? pathUtil.combinePaths(dirname, name) : name;
|
1371
|
+
if (entry === null || entry === undefined || entry instanceof Unlink) {
|
1372
|
+
text += `//// [${file}] unlink\r\n`;
|
1373
|
+
}
|
1374
|
+
else if (entry instanceof Rmdir) {
|
1375
|
+
text += `//// [${pathUtil.ensureTrailingDirectorySeparator(file)}] rmdir\r\n`;
|
1376
|
+
}
|
1377
|
+
else if (entry instanceof Directory) {
|
1378
|
+
text += formatPatchWorker(file, entry.files);
|
1379
|
+
}
|
1380
|
+
else if (entry instanceof SameFileContentFile) {
|
1381
|
+
text += `//// [${file}] file written with same contents\r\n`;
|
1382
|
+
}
|
1383
|
+
else if (entry instanceof File) {
|
1384
|
+
const content = typeof entry.data === 'string' ? entry.data : entry.data.toString('utf8');
|
1385
|
+
text += `//// [${file}]\r\n${content}\r\n\r\n`;
|
1386
|
+
}
|
1387
|
+
else if (entry instanceof Link) {
|
1388
|
+
text += `//// [${file}] link(${entry.path})\r\n`;
|
1389
|
+
}
|
1390
|
+
else if (entry instanceof Symlink) {
|
1391
|
+
text += `//// [${file}] symlink(${entry.symlink})\r\n`;
|
1392
|
+
}
|
1393
|
+
else if (entry instanceof Mount) {
|
1394
|
+
text += `//// [${file}] mount(${entry.source})\r\n`;
|
1395
|
+
}
|
1396
|
+
}
|
1397
|
+
return text;
|
1398
|
+
}
|
1399
|
+
function makeDirEnt(name, node) {
|
1400
|
+
const de = {
|
1401
|
+
isFile: () => isFile(node),
|
1402
|
+
isDirectory: () => isDirectory(node),
|
1403
|
+
isBlockDevice: () => false,
|
1404
|
+
isCharacterDevice: () => false,
|
1405
|
+
isFIFO: () => false,
|
1406
|
+
isSocket: () => false,
|
1407
|
+
isSymbolicLink: () => isSymlink(node),
|
1408
|
+
name,
|
1409
|
+
};
|
1410
|
+
return de;
|
1411
|
+
}
|
1412
|
+
class Stats {
|
1413
|
+
constructor(dev = 0, ino = 0, mode = 0, nlink = 0, rdev = 0, size = 0, blksize = 0, blocks = 0, atimeMs = 0, mtimeMs = 0, ctimeMs = 0, birthtimeMs = 0) {
|
1414
|
+
this.dev = dev;
|
1415
|
+
this.ino = ino;
|
1416
|
+
this.mode = mode;
|
1417
|
+
this.nlink = nlink;
|
1418
|
+
this.uid = 0;
|
1419
|
+
this.gid = 0;
|
1420
|
+
this.rdev = rdev;
|
1421
|
+
this.size = size;
|
1422
|
+
this.blksize = blksize;
|
1423
|
+
this.blocks = blocks;
|
1424
|
+
this.atimeMs = atimeMs;
|
1425
|
+
this.mtimeMs = mtimeMs;
|
1426
|
+
this.ctimeMs = ctimeMs;
|
1427
|
+
this.birthtimeMs = birthtimeMs;
|
1428
|
+
this.atime = new Date(this.atimeMs);
|
1429
|
+
this.mtime = new Date(this.mtimeMs);
|
1430
|
+
this.ctime = new Date(this.ctimeMs);
|
1431
|
+
this.birthtime = new Date(this.birthtimeMs);
|
1432
|
+
}
|
1433
|
+
isFile() {
|
1434
|
+
return (this.mode & exports.S_IFMT) === exports.S_IFREG;
|
1435
|
+
}
|
1436
|
+
isDirectory() {
|
1437
|
+
return (this.mode & exports.S_IFMT) === exports.S_IFDIR;
|
1438
|
+
}
|
1439
|
+
isSymbolicLink() {
|
1440
|
+
return (this.mode & exports.S_IFMT) === exports.S_IFLNK;
|
1441
|
+
}
|
1442
|
+
isBlockDevice() {
|
1443
|
+
return (this.mode & exports.S_IFMT) === exports.S_IFBLK;
|
1444
|
+
}
|
1445
|
+
isCharacterDevice() {
|
1446
|
+
return (this.mode & exports.S_IFMT) === exports.S_IFCHR;
|
1447
|
+
}
|
1448
|
+
isFIFO() {
|
1449
|
+
return (this.mode & exports.S_IFMT) === exports.S_IFIFO;
|
1450
|
+
}
|
1451
|
+
isSocket() {
|
1452
|
+
return (this.mode & exports.S_IFMT) === exports.S_IFSOCK;
|
1453
|
+
}
|
1454
|
+
}
|
1455
|
+
//# sourceMappingURL=filesystem.js.map
|