fork-ts-checker-webpack-plugin 7.0.0-alpha.10 → 7.0.0-alpha.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +11 -9
- package/lib/files-change.d.ts +17 -0
- package/lib/{reporter/FilesChange.js → files-change.js} +20 -13
- package/lib/{reporter/FilesMatch.d.ts → files-match.d.ts} +0 -0
- package/lib/{ForkTsCheckerWebpackPluginOptions.js → files-match.js} +0 -0
- package/lib/formatter/{BasicFormatter.d.ts → basic-formatter.d.ts} +1 -1
- package/lib/formatter/{BasicFormatter.js → basic-formatter.js} +0 -0
- package/lib/formatter/{CodeFrameFormatter.d.ts → code-frame-formatter.d.ts} +1 -1
- package/lib/formatter/{CodeFrameFormatter.js → code-frame-formatter.js} +2 -2
- package/lib/formatter/formatter-config.d.ts +5 -0
- package/lib/formatter/{FormatterConfiguration.js → formatter-config.js} +8 -8
- package/lib/formatter/{FormatterOptions.d.ts → formatter-options.d.ts} +1 -1
- package/lib/formatter/{Formatter.js → formatter-options.js} +0 -0
- package/lib/formatter/{Formatter.d.ts → formatter.d.ts} +0 -0
- package/lib/formatter/{FormatterOptions.js → formatter.js} +0 -0
- package/lib/formatter/index.d.ts +6 -6
- package/lib/formatter/index.js +6 -6
- package/lib/formatter/{WebpackFormatter.d.ts → webpack-formatter.d.ts} +1 -1
- package/lib/formatter/{WebpackFormatter.js → webpack-formatter.js} +2 -2
- package/lib/hooks/intercept-done-to-get-dev-server-tap.d.ts +5 -0
- package/lib/hooks/intercept-done-to-get-dev-server-tap.js +18 -0
- package/lib/hooks/tap-after-compile-to-add-dependencies.d.ts +5 -0
- package/lib/hooks/{tapAfterCompileToAddDependencies.js → tap-after-compile-to-add-dependencies.js} +4 -1
- package/lib/hooks/tap-after-compile-to-get-issues.d.ts +5 -0
- package/lib/hooks/{tapAfterCompileToGetIssues.js → tap-after-compile-to-get-issues.js} +9 -6
- package/lib/hooks/{tapAfterEnvironmentToPatchWatching.d.ts → tap-after-environment-to-patch-watching.d.ts} +1 -1
- package/lib/hooks/{tapAfterEnvironmentToPatchWatching.js → tap-after-environment-to-patch-watching.js} +8 -2
- package/lib/hooks/tap-done-to-async-get-issues.d.ts +5 -0
- package/lib/hooks/{tapDoneToAsyncGetIssues.js → tap-done-to-async-get-issues.js} +20 -21
- package/lib/hooks/tap-error-to-log-message.d.ts +4 -0
- package/lib/hooks/{tapErrorToLogMessage.js → tap-error-to-log-message.js} +8 -8
- package/lib/hooks/tap-start-to-run-workers.d.ts +8 -0
- package/lib/hooks/tap-start-to-run-workers.js +95 -0
- package/lib/hooks/tap-stop-to-terminate-workers.d.ts +5 -0
- package/lib/hooks/tap-stop-to-terminate-workers.js +26 -0
- package/lib/index.d.ts +1 -1
- package/lib/index.js +2 -2
- package/lib/infrastructure-logger.d.ts +9 -0
- package/lib/infrastructure-logger.js +15 -0
- package/lib/issue/index.d.ts +3 -3
- package/lib/issue/index.js +3 -3
- package/lib/issue/issue-config.d.ts +8 -0
- package/lib/issue/issue-config.js +29 -0
- package/lib/issue/{IssueLocation.d.ts → issue-location.d.ts} +1 -1
- package/lib/issue/{IssueLocation.js → issue-location.js} +3 -3
- package/lib/issue/{IssueMatch.d.ts → issue-match.d.ts} +1 -1
- package/lib/issue/{IssueMatch.js → issue-match.js} +2 -2
- package/lib/issue/{IssueOptions.d.ts → issue-options.d.ts} +2 -2
- package/lib/issue/{IssueOptions.js → issue-options.js} +0 -0
- package/lib/issue/{IssuePosition.d.ts → issue-position.d.ts} +0 -0
- package/lib/issue/{IssuePosition.js → issue-position.js} +0 -0
- package/lib/issue/{IssuePredicate.d.ts → issue-predicate.d.ts} +0 -0
- package/lib/issue/{IssuePredicate.js → issue-predicate.js} +0 -0
- package/lib/issue/{IssueSeverity.d.ts → issue-severity.d.ts} +0 -0
- package/lib/issue/{IssueSeverity.js → issue-severity.js} +0 -0
- package/lib/issue/{IssueWebpackError.d.ts → issue-webpack-error.d.ts} +1 -1
- package/lib/issue/{IssueWebpackError.js → issue-webpack-error.js} +4 -4
- package/lib/issue/{Issue.d.ts → issue.d.ts} +2 -2
- package/lib/issue/{Issue.js → issue.js} +5 -5
- package/lib/{logger/Logger.d.ts → logger.d.ts} +1 -2
- package/lib/{logger/Logger.js → logger.js} +0 -0
- package/lib/plugin-config.d.ts +16 -0
- package/lib/plugin-config.js +17 -0
- package/lib/{hooks/pluginHooks.d.ts → plugin-hooks.d.ts} +6 -6
- package/lib/{hooks/pluginHooks.js → plugin-hooks.js} +8 -8
- package/lib/plugin-options.d.ts +13 -0
- package/lib/{logger/LoggerOptions.js → plugin-options.js} +0 -0
- package/lib/{ForkTsCheckerWebpackPluginOptions.json → plugin-options.json} +7 -43
- package/lib/{hooks/pluginPools.d.ts → plugin-pools.d.ts} +1 -1
- package/lib/{hooks/pluginPools.js → plugin-pools.js} +1 -1
- package/lib/{ForkTsCheckerWebpackPluginState.d.ts → plugin-state.d.ts} +4 -5
- package/lib/{ForkTsCheckerWebpackPluginState.js → plugin-state.js} +4 -5
- package/lib/{ForkTsCheckerWebpackPlugin.d.ts → plugin.d.ts} +3 -3
- package/lib/plugin.js +82 -0
- package/lib/rpc/expose-rpc.d.ts +1 -0
- package/lib/rpc/expose-rpc.js +78 -0
- package/lib/rpc/index.d.ts +5 -7
- package/lib/rpc/index.js +10 -17
- package/lib/rpc/{rpc-ipc/error/RpcIpcMessagePortClosedError.d.ts → rpc-error.d.ts} +2 -3
- package/lib/rpc/rpc-error.js +12 -0
- package/lib/rpc/rpc-worker.d.ts +13 -0
- package/lib/rpc/rpc-worker.js +79 -0
- package/lib/rpc/types.d.ts +19 -0
- package/lib/{reporter/FilesMatch.js → rpc/types.js} +0 -0
- package/lib/rpc/wrap-rpc.d.ts +4 -0
- package/lib/rpc/wrap-rpc.js +96 -0
- package/lib/{typescript-reporter/extension/TypeScriptEmbeddedExtension.d.ts → typescript/extension/type-script-embedded-extension.d.ts} +1 -1
- package/lib/{typescript-reporter/extension/TypeScriptEmbeddedExtension.js → typescript/extension/type-script-embedded-extension.js} +0 -0
- package/lib/{typescript-reporter/extension/TypeScriptExtension.d.ts → typescript/extension/type-script-extension.d.ts} +1 -1
- package/lib/{reporter/Report.js → typescript/extension/type-script-extension.js} +0 -0
- package/lib/typescript/extension/vue/type-script-vue-extension-config.d.ts +7 -0
- package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionConfiguration.js → typescript/extension/vue/type-script-vue-extension-config.js} +3 -3
- package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionOptions.d.ts → typescript/extension/vue/type-script-vue-extension-options.d.ts} +0 -0
- package/lib/{reporter/Reporter.js → typescript/extension/vue/type-script-vue-extension-options.js} +0 -0
- package/lib/typescript/extension/vue/type-script-vue-extension-support.d.ts +3 -0
- package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtensionSupport.js → typescript/extension/vue/type-script-vue-extension-support.js} +2 -2
- package/lib/typescript/extension/vue/type-script-vue-extension.d.ts +4 -0
- package/lib/{typescript-reporter/extension/vue/TypeScriptVueExtension.js → typescript/extension/vue/type-script-vue-extension.js} +4 -4
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue-template-compiler.js +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue__compiler-sfc.d.ts +0 -0
- package/lib/{typescript-reporter → typescript}/extension/vue/types/vue__compiler-sfc.js +0 -0
- package/lib/{typescript-reporter/TypeScriptConfigurationOverwrite.d.ts → typescript/type-script-config-overwrite.d.ts} +2 -2
- package/lib/{rpc/RpcHost.js → typescript/type-script-config-overwrite.js} +0 -0
- package/lib/{typescript-reporter/TypeScriptDiagnosticsOptions.d.ts → typescript/type-script-diagnostics-options.d.ts} +0 -0
- package/lib/{rpc/RpcMessagePort.js → typescript/type-script-diagnostics-options.js} +0 -0
- package/lib/typescript/type-script-support.d.ts +3 -0
- package/lib/{typescript-reporter/TypeScriptSupport.js → typescript/type-script-support.js} +8 -8
- package/lib/typescript/type-script-worker-config.d.ts +22 -0
- package/lib/{typescript-reporter/TypeScriptReporterConfiguration.js → typescript/type-script-worker-config.js} +5 -5
- package/lib/{typescript-reporter/TypeScriptReporterOptions.d.ts → typescript/type-script-worker-options.d.ts} +6 -6
- package/lib/{rpc/RpcProcedure.js → typescript/type-script-worker-options.js} +0 -0
- package/lib/typescript/worker/get-dependencies-worker.d.ts +5 -0
- package/lib/typescript/worker/get-dependencies-worker.js +18 -0
- package/lib/typescript/worker/get-issues-worker.d.ts +5 -0
- package/lib/typescript/worker/get-issues-worker.js +76 -0
- package/lib/typescript/worker/lib/artifacts.d.ts +4 -0
- package/lib/typescript/worker/lib/artifacts.js +90 -0
- package/lib/typescript/worker/lib/config.d.ts +14 -0
- package/lib/typescript/worker/lib/config.js +111 -0
- package/lib/typescript/worker/lib/dependencies.d.ts +3 -0
- package/lib/typescript/worker/lib/dependencies.js +87 -0
- package/lib/typescript/worker/lib/diagnostics.d.ts +7 -0
- package/lib/typescript/worker/lib/diagnostics.js +100 -0
- package/lib/typescript/worker/lib/extensions.d.ts +3 -0
- package/lib/typescript/worker/lib/extensions.js +11 -0
- package/lib/{typescript-reporter/file-system/FileSystem.d.ts → typescript/worker/lib/file-system/file-system.d.ts} +1 -2
- package/lib/{typescript-reporter/TypeScriptConfigurationOverwrite.js → typescript/worker/lib/file-system/file-system.js} +0 -0
- package/lib/typescript/worker/lib/file-system/mem-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/mem-file-system.js +78 -0
- package/lib/typescript/worker/lib/file-system/passive-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/passive-file-system.js +65 -0
- package/lib/typescript/worker/lib/file-system/real-file-system.d.ts +5 -0
- package/lib/typescript/worker/lib/file-system/real-file-system.js +187 -0
- package/lib/typescript/worker/lib/host/compiler-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/compiler-host.js +17 -0
- package/lib/typescript/worker/lib/host/watch-compiler-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/watch-compiler-host.js +32 -0
- package/lib/typescript/worker/lib/host/watch-solution-builder-host.d.ts +2 -0
- package/lib/typescript/worker/lib/host/watch-solution-builder-host.js +54 -0
- package/lib/typescript/worker/lib/performance.d.ts +3 -0
- package/lib/typescript/worker/lib/performance.js +32 -0
- package/lib/typescript/worker/lib/program/program.d.ts +2 -0
- package/lib/typescript/worker/lib/program/program.js +32 -0
- package/lib/typescript/worker/lib/program/solution-builder.d.ts +2 -0
- package/lib/typescript/worker/lib/program/solution-builder.js +39 -0
- package/lib/typescript/worker/lib/program/watch-program.d.ts +3 -0
- package/lib/typescript/worker/lib/program/watch-program.js +49 -0
- package/lib/{typescript-reporter/reporter/ControlledTypeScriptSystem.d.ts → typescript/worker/lib/system.d.ts} +4 -6
- package/lib/typescript/worker/lib/system.js +206 -0
- package/lib/typescript/worker/lib/tracing.d.ts +4 -0
- package/lib/typescript/worker/lib/tracing.js +28 -0
- package/lib/typescript/worker/lib/tsbuildinfo.d.ts +4 -0
- package/lib/typescript/worker/lib/tsbuildinfo.js +92 -0
- package/lib/typescript/worker/lib/typescript.d.ts +2 -0
- package/lib/typescript/worker/lib/typescript.js +6 -0
- package/lib/typescript/worker/lib/worker-config.d.ts +2 -0
- package/lib/typescript/worker/lib/worker-config.js +5 -0
- package/lib/utils/async/{isPending.d.ts → is-pending.d.ts} +1 -1
- package/lib/utils/async/{isPending.js → is-pending.js} +2 -1
- package/lib/utils/async/pool.d.ts +1 -1
- package/lib/utils/async/pool.js +3 -14
- package/lib/utils/async/wait.d.ts +1 -1
- package/lib/utils/async/wait.js +2 -1
- package/lib/utils/path/{forwardSlash.d.ts → forward-slash.d.ts} +1 -1
- package/lib/utils/path/{forwardSlash.js → forward-slash.js} +2 -1
- package/lib/utils/path/{relativeToContext.d.ts → relative-to-context.d.ts} +0 -0
- package/lib/utils/path/{relativeToContext.js → relative-to-context.js} +2 -2
- package/lib/watch/{InclusiveNodeWatchFileSystem.d.ts → inclusive-node-watch-file-system.d.ts} +6 -6
- package/lib/watch/{InclusiveNodeWatchFileSystem.js → inclusive-node-watch-file-system.js} +43 -11
- package/lib/watch/{WatchFileSystem.d.ts → watch-file-system.d.ts} +1 -1
- package/lib/{typescript-reporter/TypeScriptDiagnosticsOptions.js → watch/watch-file-system.js} +0 -0
- package/package.json +1 -1
- package/lib/ForkTsCheckerWebpackPlugin.js +0 -64
- package/lib/ForkTsCheckerWebpackPluginConfiguration.d.ts +0 -15
- package/lib/ForkTsCheckerWebpackPluginConfiguration.js +0 -17
- package/lib/ForkTsCheckerWebpackPluginOptions.d.ts +0 -12
- package/lib/error/OperationCanceledError.d.ts +0 -4
- package/lib/error/OperationCanceledError.js +0 -10
- package/lib/formatter/FormatterConfiguration.d.ts +0 -5
- package/lib/hooks/interceptDoneToGetWebpackDevServerTap.d.ts +0 -5
- package/lib/hooks/interceptDoneToGetWebpackDevServerTap.js +0 -17
- package/lib/hooks/tapAfterCompileToAddDependencies.d.ts +0 -5
- package/lib/hooks/tapAfterCompileToGetIssues.d.ts +0 -5
- package/lib/hooks/tapDoneToAsyncGetIssues.d.ts +0 -5
- package/lib/hooks/tapErrorToLogMessage.d.ts +0 -4
- package/lib/hooks/tapStartToConnectAndRunReporter.d.ts +0 -6
- package/lib/hooks/tapStartToConnectAndRunReporter.js +0 -130
- package/lib/hooks/tapStopToDisconnectReporter.d.ts +0 -5
- package/lib/hooks/tapStopToDisconnectReporter.js +0 -30
- package/lib/issue/IssueConfiguration.d.ts +0 -8
- package/lib/issue/IssueConfiguration.js +0 -29
- package/lib/logger/LoggerConfiguration.d.ts +0 -10
- package/lib/logger/LoggerConfiguration.js +0 -12
- package/lib/logger/LoggerFactory.d.ts +0 -5
- package/lib/logger/LoggerFactory.js +0 -21
- package/lib/logger/LoggerOptions.d.ts +0 -8
- package/lib/logger/PartialLogger.d.ts +0 -4
- package/lib/logger/PartialLogger.js +0 -11
- package/lib/logger/WebpackInfrastructureLogger.d.ts +0 -4
- package/lib/logger/WebpackInfrastructureLogger.js +0 -13
- package/lib/profile/Performance.d.ts +0 -11
- package/lib/profile/Performance.js +0 -63
- package/lib/reporter/AggregatedReporter.d.ts +0 -6
- package/lib/reporter/AggregatedReporter.js +0 -61
- package/lib/reporter/FilesChange.d.ts +0 -16
- package/lib/reporter/Report.d.ts +0 -8
- package/lib/reporter/Reporter.d.ts +0 -6
- package/lib/reporter/index.d.ts +0 -7
- package/lib/reporter/index.js +0 -19
- package/lib/reporter/reporter-rpc/ReporterRpcClient.d.ts +0 -10
- package/lib/reporter/reporter-rpc/ReporterRpcClient.js +0 -85
- package/lib/reporter/reporter-rpc/ReporterRpcProcedure.d.ts +0 -13
- package/lib/reporter/reporter-rpc/ReporterRpcProcedure.js +0 -15
- package/lib/reporter/reporter-rpc/ReporterRpcService.d.ts +0 -9
- package/lib/reporter/reporter-rpc/ReporterRpcService.js +0 -77
- package/lib/rpc/RpcClient.d.ts +0 -10
- package/lib/rpc/RpcClient.js +0 -79
- package/lib/rpc/RpcHost.d.ts +0 -6
- package/lib/rpc/RpcMessage.d.ts +0 -26
- package/lib/rpc/RpcMessage.js +0 -48
- package/lib/rpc/RpcMessageChannel.d.ts +0 -10
- package/lib/rpc/RpcMessageChannel.js +0 -50
- package/lib/rpc/RpcMessagePort.d.ts +0 -14
- package/lib/rpc/RpcProcedure.d.ts +0 -5
- package/lib/rpc/RpcService.d.ts +0 -12
- package/lib/rpc/RpcService.js +0 -64
- package/lib/rpc/error/RpcMessagePortClosedError.d.ts +0 -3
- package/lib/rpc/error/RpcMessagePortClosedError.js +0 -6
- package/lib/rpc/error/RpcRemoteError.d.ts +0 -6
- package/lib/rpc/error/RpcRemoteError.js +0 -18
- package/lib/rpc/rpc-ipc/ProcessLike.d.ts +0 -12
- package/lib/rpc/rpc-ipc/ProcessLike.js +0 -3
- package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.d.ts +0 -3
- package/lib/rpc/rpc-ipc/RpcIpcMessageChannel.js +0 -11
- package/lib/rpc/rpc-ipc/RpcIpcMessagePort.d.ts +0 -5
- package/lib/rpc/rpc-ipc/RpcIpcMessagePort.js +0 -151
- package/lib/rpc/rpc-ipc/error/RpcIpcMessagePortClosedError.js +0 -13
- package/lib/rpc/rpc-ipc/index.d.ts +0 -2
- package/lib/rpc/rpc-ipc/index.js +0 -14
- package/lib/typescript-reporter/TypeScriptReporterConfiguration.d.ts +0 -22
- package/lib/typescript-reporter/TypeScriptReporterOptions.js +0 -2
- package/lib/typescript-reporter/TypeScriptSupport.d.ts +0 -3
- package/lib/typescript-reporter/extension/TypeScriptExtension.js +0 -2
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtension.d.ts +0 -4
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionConfiguration.d.ts +0 -7
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionOptions.js +0 -2
- package/lib/typescript-reporter/extension/vue/TypeScriptVueExtensionSupport.d.ts +0 -3
- package/lib/typescript-reporter/file-system/FileSystem.js +0 -2
- package/lib/typescript-reporter/file-system/MemFileSystem.d.ts +0 -8
- package/lib/typescript-reporter/file-system/MemFileSystem.js +0 -83
- package/lib/typescript-reporter/file-system/PassiveFileSystem.d.ts +0 -9
- package/lib/typescript-reporter/file-system/PassiveFileSystem.js +0 -69
- package/lib/typescript-reporter/file-system/RealFileSystem.d.ts +0 -8
- package/lib/typescript-reporter/file-system/RealFileSystem.js +0 -181
- package/lib/typescript-reporter/issue/TypeScriptIssueFactory.d.ts +0 -4
- package/lib/typescript-reporter/issue/TypeScriptIssueFactory.js +0 -57
- package/lib/typescript-reporter/profile/TypeScriptPerformance.d.ts +0 -10
- package/lib/typescript-reporter/profile/TypeScriptPerformance.js +0 -34
- package/lib/typescript-reporter/reporter/ControlledCompilerHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledCompilerHost.js +0 -14
- package/lib/typescript-reporter/reporter/ControlledTypeScriptSystem.js +0 -218
- package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledWatchCompilerHost.js +0 -29
- package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.d.ts +0 -5
- package/lib/typescript-reporter/reporter/ControlledWatchSolutionBuilderHost.js +0 -51
- package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.d.ts +0 -8
- package/lib/typescript-reporter/reporter/TypeScriptConfigurationParser.js +0 -142
- package/lib/typescript-reporter/reporter/TypeScriptReporter.d.ts +0 -4
- package/lib/typescript-reporter/reporter/TypeScriptReporter.js +0 -376
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.d.ts +0 -4
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcClient.js +0 -14
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.d.ts +0 -1
- package/lib/typescript-reporter/reporter/TypeScriptReporterRpcService.js +0 -11
- package/lib/utils/array/flatten.d.ts +0 -2
- package/lib/utils/array/flatten.js +0 -6
- package/lib/utils/array/intersect.d.ts +0 -2
- package/lib/utils/array/intersect.js +0 -6
- package/lib/utils/array/substract.d.ts +0 -2
- package/lib/utils/array/substract.js +0 -6
- package/lib/utils/array/unique.d.ts +0 -2
- package/lib/utils/array/unique.js +0 -6
- package/lib/watch/WatchFileSystem.js +0 -2
|
@@ -1,50 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createRpcMessageChannel = void 0;
|
|
13
|
-
function createRpcMessageChannel(servicePort, clientPort, linkPorts, unlinkPorts) {
|
|
14
|
-
// if there is not link and unlink function provided, we assume that channel is automatically linked
|
|
15
|
-
let arePortsLinked = !linkPorts && !unlinkPorts;
|
|
16
|
-
return {
|
|
17
|
-
servicePort,
|
|
18
|
-
clientPort,
|
|
19
|
-
isOpen: () => servicePort.isOpen() && clientPort.isOpen() && arePortsLinked,
|
|
20
|
-
open: () => __awaiter(this, void 0, void 0, function* () {
|
|
21
|
-
if (!servicePort.isOpen()) {
|
|
22
|
-
yield servicePort.open();
|
|
23
|
-
}
|
|
24
|
-
if (!clientPort.isOpen()) {
|
|
25
|
-
yield clientPort.open();
|
|
26
|
-
}
|
|
27
|
-
if (!arePortsLinked) {
|
|
28
|
-
if (linkPorts) {
|
|
29
|
-
yield linkPorts();
|
|
30
|
-
}
|
|
31
|
-
arePortsLinked = true;
|
|
32
|
-
}
|
|
33
|
-
}),
|
|
34
|
-
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
35
|
-
if (arePortsLinked) {
|
|
36
|
-
if (unlinkPorts) {
|
|
37
|
-
yield unlinkPorts();
|
|
38
|
-
}
|
|
39
|
-
arePortsLinked = false;
|
|
40
|
-
}
|
|
41
|
-
if (servicePort.isOpen()) {
|
|
42
|
-
yield servicePort.close();
|
|
43
|
-
}
|
|
44
|
-
if (clientPort.isOpen()) {
|
|
45
|
-
yield clientPort.close();
|
|
46
|
-
}
|
|
47
|
-
}),
|
|
48
|
-
};
|
|
49
|
-
}
|
|
50
|
-
exports.createRpcMessageChannel = createRpcMessageChannel;
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
declare type RpcMessageDispatch = <TMessage>(message: TMessage) => Promise<void>;
|
|
2
|
-
declare type RpcMessageListener = RpcMessageDispatch;
|
|
3
|
-
declare type RpcErrorListener = (error: Error) => void;
|
|
4
|
-
interface RpcMessagePort {
|
|
5
|
-
readonly dispatchMessage: RpcMessageDispatch;
|
|
6
|
-
readonly addMessageListener: (listener: RpcMessageListener) => void;
|
|
7
|
-
readonly removeMessageListener: (listener: RpcMessageListener) => void;
|
|
8
|
-
readonly addErrorListener: (listener: RpcErrorListener) => void;
|
|
9
|
-
readonly removeErrorListener: (listener: RpcErrorListener) => void;
|
|
10
|
-
readonly isOpen: () => boolean;
|
|
11
|
-
readonly open: () => Promise<void>;
|
|
12
|
-
readonly close: () => Promise<void>;
|
|
13
|
-
}
|
|
14
|
-
export { RpcMessagePort, RpcMessageDispatch, RpcMessageListener, RpcErrorListener };
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
interface RpcProcedure<TPayload = unknown, TResult = unknown> extends String {
|
|
2
|
-
}
|
|
3
|
-
declare type RpcProcedurePayload<TProcedure> = TProcedure extends RpcProcedure<infer TPayload, infer TResult> ? TPayload : never;
|
|
4
|
-
declare type RpcProcedureResult<TProcedure> = TProcedure extends RpcProcedure<infer TPayload, infer TResult> ? TResult : never;
|
|
5
|
-
export { RpcProcedure, RpcProcedurePayload, RpcProcedureResult };
|
package/lib/rpc/RpcService.d.ts
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import type { RpcMessagePort } from './RpcMessagePort';
|
|
2
|
-
import type { RpcProcedure } from './RpcProcedure';
|
|
3
|
-
declare type RpcCallHandler<TPayload = any, TResult = any> = (payload: TPayload) => Promise<TResult>;
|
|
4
|
-
interface RpcService {
|
|
5
|
-
readonly isOpen: () => boolean;
|
|
6
|
-
readonly open: () => Promise<void>;
|
|
7
|
-
readonly close: () => Promise<void>;
|
|
8
|
-
readonly addCallHandler: <TPayload, TResult>(procedure: RpcProcedure<TPayload, TResult>, handler: RpcCallHandler<TPayload, TResult>) => void;
|
|
9
|
-
readonly removeCallHandler: <TPayload, TResult>(procedure: RpcProcedure<TPayload, TResult>) => void;
|
|
10
|
-
}
|
|
11
|
-
declare function createRpcService(port: RpcMessagePort): RpcService;
|
|
12
|
-
export { RpcService, createRpcService };
|
package/lib/rpc/RpcService.js
DELETED
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createRpcService = void 0;
|
|
13
|
-
const RpcMessage_1 = require("./RpcMessage");
|
|
14
|
-
function createRpcService(port) {
|
|
15
|
-
const handlers = new Map();
|
|
16
|
-
let isListenerRegistered = false;
|
|
17
|
-
const callListener = (message) => __awaiter(this, void 0, void 0, function* () {
|
|
18
|
-
if (RpcMessage_1.isRpcCallMessage(message)) {
|
|
19
|
-
const handler = handlers.get(message.procedure);
|
|
20
|
-
try {
|
|
21
|
-
if (!handler) {
|
|
22
|
-
throw new Error(`No handler found for procedure ${message.procedure}.`);
|
|
23
|
-
}
|
|
24
|
-
const result = yield handler(message.payload);
|
|
25
|
-
yield port.dispatchMessage(RpcMessage_1.createRpcReturn(message.procedure, message.id, result));
|
|
26
|
-
}
|
|
27
|
-
catch (error) {
|
|
28
|
-
yield port.dispatchMessage(RpcMessage_1.createRpcThrow(message.procedure, message.id, {
|
|
29
|
-
message: error.toString(),
|
|
30
|
-
stack: error.stack,
|
|
31
|
-
}));
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
});
|
|
35
|
-
return {
|
|
36
|
-
isOpen: () => port.isOpen() && isListenerRegistered,
|
|
37
|
-
open: () => __awaiter(this, void 0, void 0, function* () {
|
|
38
|
-
if (!port.isOpen()) {
|
|
39
|
-
yield port.open();
|
|
40
|
-
}
|
|
41
|
-
if (!isListenerRegistered) {
|
|
42
|
-
port.addMessageListener(callListener);
|
|
43
|
-
isListenerRegistered = true;
|
|
44
|
-
}
|
|
45
|
-
}),
|
|
46
|
-
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
47
|
-
if (isListenerRegistered) {
|
|
48
|
-
port.removeMessageListener(callListener);
|
|
49
|
-
isListenerRegistered = false;
|
|
50
|
-
}
|
|
51
|
-
if (port.isOpen()) {
|
|
52
|
-
yield port.close();
|
|
53
|
-
}
|
|
54
|
-
}),
|
|
55
|
-
addCallHandler: (procedure, handler) => {
|
|
56
|
-
if (handlers.has(procedure)) {
|
|
57
|
-
throw new Error(`Handler for '${procedure}' procedure has been already registered`);
|
|
58
|
-
}
|
|
59
|
-
handlers.set(procedure, handler);
|
|
60
|
-
},
|
|
61
|
-
removeCallHandler: (procedure) => handlers.delete(procedure),
|
|
62
|
-
};
|
|
63
|
-
}
|
|
64
|
-
exports.createRpcService = createRpcService;
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RpcRemoteError = void 0;
|
|
4
|
-
class RpcRemoteError extends Error {
|
|
5
|
-
constructor(message, stack) {
|
|
6
|
-
super(message);
|
|
7
|
-
this.stack = stack;
|
|
8
|
-
}
|
|
9
|
-
toString() {
|
|
10
|
-
if (this.stack) {
|
|
11
|
-
return [this.message, this.stack].join('\n');
|
|
12
|
-
}
|
|
13
|
-
else {
|
|
14
|
-
return this.message;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
exports.RpcRemoteError = RpcRemoteError;
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* This interface describes Node.js process that is potentially able to communicate over IPC channel
|
|
3
|
-
*/
|
|
4
|
-
interface ProcessLike {
|
|
5
|
-
pid?: string | number;
|
|
6
|
-
send?: (message: any, sendHandle?: any, options?: any, callback?: (error: any) => void) => boolean;
|
|
7
|
-
on: (event: any, listener: any) => any;
|
|
8
|
-
off: (event: any, listener?: any) => any;
|
|
9
|
-
connected?: boolean;
|
|
10
|
-
disconnect?: () => void;
|
|
11
|
-
}
|
|
12
|
-
export { ProcessLike };
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createRpcIpcMessageChannel = void 0;
|
|
4
|
-
const index_1 = require("../index");
|
|
5
|
-
const RpcIpcMessagePort_1 = require("./RpcIpcMessagePort");
|
|
6
|
-
function createRpcIpcMessageChannel(servicePath, memoryLimit = 2048) {
|
|
7
|
-
const port = RpcIpcMessagePort_1.createRpcIpcForkedProcessMessagePort(servicePath, memoryLimit);
|
|
8
|
-
// linked by the child_process IPC implementation - no manual linking needed
|
|
9
|
-
return index_1.createRpcMessageChannel(port, port);
|
|
10
|
-
}
|
|
11
|
-
exports.createRpcIpcMessageChannel = createRpcIpcMessageChannel;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import type { RpcMessagePort } from '../index';
|
|
2
|
-
import type { ProcessLike } from './ProcessLike';
|
|
3
|
-
declare function createRpcIpcMessagePort(process: ProcessLike): RpcMessagePort;
|
|
4
|
-
declare function createRpcIpcForkedProcessMessagePort(filePath: string, memoryLimit?: number, autoRecreate?: boolean): RpcMessagePort;
|
|
5
|
-
export { createRpcIpcMessagePort, createRpcIpcForkedProcessMessagePort };
|
|
@@ -1,151 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
-
exports.createRpcIpcForkedProcessMessagePort = exports.createRpcIpcMessagePort = void 0;
|
|
13
|
-
const child_process_1 = require("child_process");
|
|
14
|
-
const RpcIpcMessagePortClosedError_1 = require("./error/RpcIpcMessagePortClosedError");
|
|
15
|
-
function createRpcIpcMessagePort(process) {
|
|
16
|
-
const messageListeners = new Set();
|
|
17
|
-
const errorListeners = new Set();
|
|
18
|
-
let closedError;
|
|
19
|
-
const handleExit = (code, signal) => __awaiter(this, void 0, void 0, function* () {
|
|
20
|
-
closedError = new RpcIpcMessagePortClosedError_1.RpcIpcMessagePortClosedError(code
|
|
21
|
-
? `Process ${process.pid} exited with code "${code}" [${signal}]`
|
|
22
|
-
: `Process ${process.pid} exited [${signal}].`, code, signal);
|
|
23
|
-
errorListeners.forEach((listener) => {
|
|
24
|
-
if (closedError) {
|
|
25
|
-
listener(closedError);
|
|
26
|
-
}
|
|
27
|
-
});
|
|
28
|
-
yield port.close();
|
|
29
|
-
});
|
|
30
|
-
const handleMessage = (message) => {
|
|
31
|
-
messageListeners.forEach((listener) => {
|
|
32
|
-
listener(message);
|
|
33
|
-
});
|
|
34
|
-
};
|
|
35
|
-
process.on('message', handleMessage);
|
|
36
|
-
process.on('exit', handleExit);
|
|
37
|
-
const port = {
|
|
38
|
-
dispatchMessage: (message) => __awaiter(this, void 0, void 0, function* () {
|
|
39
|
-
return new Promise((resolve, reject) => {
|
|
40
|
-
if (!process.connected) {
|
|
41
|
-
reject(closedError ||
|
|
42
|
-
new RpcIpcMessagePortClosedError_1.RpcIpcMessagePortClosedError(`Process ${process.pid} doesn't have open IPC channels`));
|
|
43
|
-
}
|
|
44
|
-
if (process.send) {
|
|
45
|
-
process.send(Object.assign(Object.assign({}, message), { source: process.pid }), undefined, undefined, (sendError) => {
|
|
46
|
-
if (sendError) {
|
|
47
|
-
if (!closedError) {
|
|
48
|
-
closedError = new RpcIpcMessagePortClosedError_1.RpcIpcMessagePortClosedError(`Cannot send the message - the message port has been closed for the process ${process.pid}.`);
|
|
49
|
-
}
|
|
50
|
-
reject(closedError);
|
|
51
|
-
}
|
|
52
|
-
else {
|
|
53
|
-
resolve();
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
}
|
|
57
|
-
else {
|
|
58
|
-
reject(new RpcIpcMessagePortClosedError_1.RpcIpcMessagePortClosedError(`Process ${process.pid} doesn't have IPC channels`));
|
|
59
|
-
}
|
|
60
|
-
});
|
|
61
|
-
}),
|
|
62
|
-
addMessageListener: (listener) => {
|
|
63
|
-
messageListeners.add(listener);
|
|
64
|
-
},
|
|
65
|
-
removeMessageListener: (listener) => {
|
|
66
|
-
messageListeners.delete(listener);
|
|
67
|
-
},
|
|
68
|
-
addErrorListener: (listener) => {
|
|
69
|
-
errorListeners.add(listener);
|
|
70
|
-
},
|
|
71
|
-
removeErrorListener: (listener) => {
|
|
72
|
-
errorListeners.delete(listener);
|
|
73
|
-
},
|
|
74
|
-
isOpen: () => !!process.connected,
|
|
75
|
-
open: () => __awaiter(this, void 0, void 0, function* () {
|
|
76
|
-
if (!process.connected || closedError) {
|
|
77
|
-
throw (closedError ||
|
|
78
|
-
new RpcIpcMessagePortClosedError_1.RpcIpcMessagePortClosedError(`Cannot open closed IPC channel for process ${process.pid}.`));
|
|
79
|
-
}
|
|
80
|
-
}),
|
|
81
|
-
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
82
|
-
process.off('message', handleMessage);
|
|
83
|
-
process.off('exit', handleExit);
|
|
84
|
-
messageListeners.clear();
|
|
85
|
-
errorListeners.clear();
|
|
86
|
-
if (process.disconnect && process.connected) {
|
|
87
|
-
process.disconnect();
|
|
88
|
-
}
|
|
89
|
-
}),
|
|
90
|
-
};
|
|
91
|
-
return port;
|
|
92
|
-
}
|
|
93
|
-
exports.createRpcIpcMessagePort = createRpcIpcMessagePort;
|
|
94
|
-
function createRpcIpcForkedProcessMessagePort(filePath, memoryLimit = 2048, autoRecreate = true) {
|
|
95
|
-
function createChildProcess() {
|
|
96
|
-
return child_process_1.fork(filePath, [], {
|
|
97
|
-
execArgv: [`--max-old-space-size=${memoryLimit}`],
|
|
98
|
-
stdio: ['inherit', 'inherit', 'inherit', 'ipc'],
|
|
99
|
-
});
|
|
100
|
-
}
|
|
101
|
-
const messageListeners = new Set();
|
|
102
|
-
const errorListeners = new Set();
|
|
103
|
-
let childProcess = createChildProcess();
|
|
104
|
-
let port = createRpcIpcMessagePort(childProcess);
|
|
105
|
-
return {
|
|
106
|
-
dispatchMessage: (message) => port.dispatchMessage(message),
|
|
107
|
-
addMessageListener: (listener) => {
|
|
108
|
-
messageListeners.add(listener);
|
|
109
|
-
return port.addMessageListener(listener);
|
|
110
|
-
},
|
|
111
|
-
removeMessageListener: (listener) => {
|
|
112
|
-
messageListeners.delete(listener);
|
|
113
|
-
return port.removeMessageListener(listener);
|
|
114
|
-
},
|
|
115
|
-
addErrorListener: (listener) => {
|
|
116
|
-
errorListeners.add(listener);
|
|
117
|
-
return port.addErrorListener(listener);
|
|
118
|
-
},
|
|
119
|
-
removeErrorListener: (listener) => {
|
|
120
|
-
errorListeners.delete(listener);
|
|
121
|
-
return port.removeErrorListener(listener);
|
|
122
|
-
},
|
|
123
|
-
isOpen: () => port.isOpen(),
|
|
124
|
-
open: () => __awaiter(this, void 0, void 0, function* () {
|
|
125
|
-
if (!port.isOpen() && autoRecreate) {
|
|
126
|
-
// recreate the process and add existing message listeners
|
|
127
|
-
childProcess = createChildProcess();
|
|
128
|
-
port = createRpcIpcMessagePort(childProcess);
|
|
129
|
-
messageListeners.forEach((listener) => {
|
|
130
|
-
port.addMessageListener(listener);
|
|
131
|
-
});
|
|
132
|
-
errorListeners.forEach((listener) => {
|
|
133
|
-
port.addErrorListener(listener);
|
|
134
|
-
});
|
|
135
|
-
}
|
|
136
|
-
else {
|
|
137
|
-
return port.open();
|
|
138
|
-
}
|
|
139
|
-
}),
|
|
140
|
-
close: () => __awaiter(this, void 0, void 0, function* () {
|
|
141
|
-
yield port.close();
|
|
142
|
-
messageListeners.clear();
|
|
143
|
-
errorListeners.clear();
|
|
144
|
-
if (childProcess) {
|
|
145
|
-
childProcess.kill('SIGTERM');
|
|
146
|
-
childProcess = undefined;
|
|
147
|
-
}
|
|
148
|
-
}),
|
|
149
|
-
};
|
|
150
|
-
}
|
|
151
|
-
exports.createRpcIpcForkedProcessMessagePort = createRpcIpcForkedProcessMessagePort;
|
|
@@ -1,13 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.RpcIpcMessagePortClosedError = void 0;
|
|
4
|
-
const RpcMessagePortClosedError_1 = require("../../error/RpcMessagePortClosedError");
|
|
5
|
-
class RpcIpcMessagePortClosedError extends RpcMessagePortClosedError_1.RpcMessagePortClosedError {
|
|
6
|
-
constructor(message, code, signal) {
|
|
7
|
-
super(message);
|
|
8
|
-
this.code = code;
|
|
9
|
-
this.signal = signal;
|
|
10
|
-
this.name = 'RpcIpcMessagePortClosedError';
|
|
11
|
-
}
|
|
12
|
-
}
|
|
13
|
-
exports.RpcIpcMessagePortClosedError = RpcIpcMessagePortClosedError;
|
package/lib/rpc/rpc-ipc/index.js
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
3
|
-
if (k2 === undefined) k2 = k;
|
|
4
|
-
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });
|
|
5
|
-
}) : (function(o, m, k, k2) {
|
|
6
|
-
if (k2 === undefined) k2 = k;
|
|
7
|
-
o[k2] = m[k];
|
|
8
|
-
}));
|
|
9
|
-
var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
10
|
-
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
|
|
11
|
-
};
|
|
12
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
13
|
-
__exportStar(require("./RpcIpcMessagePort"), exports);
|
|
14
|
-
__exportStar(require("./RpcIpcMessageChannel"), exports);
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
import type webpack from 'webpack';
|
|
2
|
-
import type { TypeScriptVueExtensionConfiguration } from './extension/vue/TypeScriptVueExtensionConfiguration';
|
|
3
|
-
import type { TypeScriptConfigurationOverwrite } from './TypeScriptConfigurationOverwrite';
|
|
4
|
-
import type { TypeScriptDiagnosticsOptions } from './TypeScriptDiagnosticsOptions';
|
|
5
|
-
import type { TypeScriptReporterOptions } from './TypeScriptReporterOptions';
|
|
6
|
-
interface TypeScriptReporterConfiguration {
|
|
7
|
-
enabled: boolean;
|
|
8
|
-
memoryLimit: number;
|
|
9
|
-
configFile: string;
|
|
10
|
-
configOverwrite: TypeScriptConfigurationOverwrite;
|
|
11
|
-
build: boolean;
|
|
12
|
-
context: string;
|
|
13
|
-
mode: 'readonly' | 'write-tsbuildinfo' | 'write-references';
|
|
14
|
-
diagnosticOptions: TypeScriptDiagnosticsOptions;
|
|
15
|
-
extensions: {
|
|
16
|
-
vue: TypeScriptVueExtensionConfiguration;
|
|
17
|
-
};
|
|
18
|
-
profile: boolean;
|
|
19
|
-
typescriptPath: string;
|
|
20
|
-
}
|
|
21
|
-
declare function createTypeScriptReporterConfiguration(compiler: webpack.Compiler, options: TypeScriptReporterOptions | undefined): TypeScriptReporterConfiguration;
|
|
22
|
-
export { createTypeScriptReporterConfiguration, TypeScriptReporterConfiguration };
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import type { TypeScriptExtension } from '../TypeScriptExtension';
|
|
2
|
-
import type { TypeScriptVueExtensionConfiguration } from './TypeScriptVueExtensionConfiguration';
|
|
3
|
-
declare function createTypeScriptVueExtension(configuration: TypeScriptVueExtensionConfiguration): TypeScriptExtension;
|
|
4
|
-
export { createTypeScriptVueExtension };
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import type { TypeScriptVueExtensionOptions } from './TypeScriptVueExtensionOptions';
|
|
2
|
-
interface TypeScriptVueExtensionConfiguration {
|
|
3
|
-
enabled: boolean;
|
|
4
|
-
compiler: string;
|
|
5
|
-
}
|
|
6
|
-
declare function createTypeScriptVueExtensionConfiguration(options: TypeScriptVueExtensionOptions | undefined): TypeScriptVueExtensionConfiguration;
|
|
7
|
-
export { TypeScriptVueExtensionConfiguration, createTypeScriptVueExtensionConfiguration };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { FileSystem } from './FileSystem';
|
|
2
|
-
/**
|
|
3
|
-
* It's an implementation of FileSystem interface which reads and writes to the in-memory file system.
|
|
4
|
-
*
|
|
5
|
-
* @param realFileSystem
|
|
6
|
-
*/
|
|
7
|
-
declare function createMemFileSystem(realFileSystem: FileSystem): FileSystem;
|
|
8
|
-
export { createMemFileSystem };
|
|
@@ -1,83 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createMemFileSystem = void 0;
|
|
4
|
-
const path_1 = require("path");
|
|
5
|
-
const memfs_1 = require("memfs");
|
|
6
|
-
// eslint-disable-next-line node/no-unsupported-features/node-builtins
|
|
7
|
-
/**
|
|
8
|
-
* It's an implementation of FileSystem interface which reads and writes to the in-memory file system.
|
|
9
|
-
*
|
|
10
|
-
* @param realFileSystem
|
|
11
|
-
*/
|
|
12
|
-
function createMemFileSystem(realFileSystem) {
|
|
13
|
-
function exists(path) {
|
|
14
|
-
return memfs_1.fs.existsSync(realFileSystem.normalizePath(path));
|
|
15
|
-
}
|
|
16
|
-
function readStats(path) {
|
|
17
|
-
return exists(path) ? memfs_1.fs.statSync(realFileSystem.normalizePath(path)) : undefined;
|
|
18
|
-
}
|
|
19
|
-
function readFile(path, encoding) {
|
|
20
|
-
const stats = readStats(path);
|
|
21
|
-
if (stats && stats.isFile()) {
|
|
22
|
-
return memfs_1.fs
|
|
23
|
-
.readFileSync(realFileSystem.normalizePath(path), { encoding: encoding })
|
|
24
|
-
.toString();
|
|
25
|
-
}
|
|
26
|
-
}
|
|
27
|
-
function readDir(path) {
|
|
28
|
-
const stats = readStats(path);
|
|
29
|
-
if (stats && stats.isDirectory()) {
|
|
30
|
-
return memfs_1.fs.readdirSync(realFileSystem.normalizePath(path), {
|
|
31
|
-
withFileTypes: true,
|
|
32
|
-
});
|
|
33
|
-
}
|
|
34
|
-
return [];
|
|
35
|
-
}
|
|
36
|
-
function createDir(path) {
|
|
37
|
-
memfs_1.fs.mkdirSync(realFileSystem.normalizePath(path), { recursive: true });
|
|
38
|
-
}
|
|
39
|
-
function writeFile(path, data) {
|
|
40
|
-
if (!exists(path_1.dirname(path))) {
|
|
41
|
-
createDir(path_1.dirname(path));
|
|
42
|
-
}
|
|
43
|
-
memfs_1.fs.writeFileSync(realFileSystem.normalizePath(path), data);
|
|
44
|
-
}
|
|
45
|
-
function deleteFile(path) {
|
|
46
|
-
if (exists(path)) {
|
|
47
|
-
memfs_1.fs.unlinkSync(realFileSystem.normalizePath(path));
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
function updateTimes(path, atime, mtime) {
|
|
51
|
-
if (exists(path)) {
|
|
52
|
-
memfs_1.fs.utimesSync(realFileSystem.normalizePath(path), atime, mtime);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return Object.assign(Object.assign({}, realFileSystem), { exists(path) {
|
|
56
|
-
return exists(realFileSystem.realPath(path));
|
|
57
|
-
},
|
|
58
|
-
readFile(path, encoding) {
|
|
59
|
-
return readFile(realFileSystem.realPath(path), encoding);
|
|
60
|
-
},
|
|
61
|
-
readDir(path) {
|
|
62
|
-
return readDir(realFileSystem.realPath(path));
|
|
63
|
-
},
|
|
64
|
-
readStats(path) {
|
|
65
|
-
return readStats(realFileSystem.realPath(path));
|
|
66
|
-
},
|
|
67
|
-
writeFile(path, data) {
|
|
68
|
-
writeFile(realFileSystem.realPath(path), data);
|
|
69
|
-
},
|
|
70
|
-
deleteFile(path) {
|
|
71
|
-
deleteFile(realFileSystem.realPath(path));
|
|
72
|
-
},
|
|
73
|
-
createDir(path) {
|
|
74
|
-
createDir(realFileSystem.realPath(path));
|
|
75
|
-
},
|
|
76
|
-
updateTimes(path, atime, mtime) {
|
|
77
|
-
updateTimes(realFileSystem.realPath(path), atime, mtime);
|
|
78
|
-
},
|
|
79
|
-
clearCache() {
|
|
80
|
-
realFileSystem.clearCache();
|
|
81
|
-
} });
|
|
82
|
-
}
|
|
83
|
-
exports.createMemFileSystem = createMemFileSystem;
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import type { FileSystem } from './FileSystem';
|
|
2
|
-
/**
|
|
3
|
-
* It's an implementation of FileSystem interface which reads from the real file system, but write to the in-memory file system.
|
|
4
|
-
*
|
|
5
|
-
* @param memFileSystem
|
|
6
|
-
* @param realFileSystem
|
|
7
|
-
*/
|
|
8
|
-
declare function createPassiveFileSystem(memFileSystem: FileSystem, realFileSystem: FileSystem): FileSystem;
|
|
9
|
-
export { createPassiveFileSystem };
|