@@ -74779,6 +74779,11 @@ var ts;
7477974779 return;
7478074780 }
7478174781 var searchPaths = [ts.combinePaths(host.getExecutingFilePath(), "../../..")].concat(this.projectService.pluginProbeLocations);
74782+ if (this.projectService.allowLocalPluginLoads) {
74783+ var local = ts.getDirectoryPath(this.canonicalConfigFilePath);
74784+ this.projectService.logger.info("Local plugin loading enabled; adding " + local + " to search paths");
74785+ searchPaths.unshift(local);
74786+ }
7478274787 if (options.plugins) {
7478374788 for (var _i = 0, _a = options.plugins; _i < _a.length; _i++) {
7478474789 var pluginConfigEntry = _a[_i];
@@ -75163,6 +75168,7 @@ var ts;
7516375168 this.eventHandler = opts.eventHandler;
7516475169 this.globalPlugins = opts.globalPlugins || server.emptyArray;
7516575170 this.pluginProbeLocations = opts.pluginProbeLocations || server.emptyArray;
75171+ this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads;
7516675172 ts.Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService");
7516775173 this.toCanonicalFileName = ts.createGetCanonicalFileName(this.host.useCaseSensitiveFileNames);
7516875174 this.directoryWatchers = new DirectoryWatchers(this);
@@ -76743,7 +76749,8 @@ var ts;
7674376749 throttleWaitMilliseconds: throttleWaitMilliseconds,
7674476750 eventHandler: this.eventHandler,
7674576751 globalPlugins: opts.globalPlugins,
76746- pluginProbeLocations: opts.pluginProbeLocations
76752+ pluginProbeLocations: opts.pluginProbeLocations,
76753+ allowLocalPluginLoads: opts.allowLocalPluginLoads
7674776754 };
7674876755 this.projectService = new server.ProjectService(settings);
7674976756 this.gcTimer = new server.GcTimer(this.host, 7000, this.logger);
@@ -78995,7 +79002,8 @@ var ts;
7899579002 logger: logger,
7899679003 canUseEvents: canUseEvents,
7899779004 globalPlugins: options.globalPlugins,
78998- pluginProbeLocations: options.pluginProbeLocations
79005+ pluginProbeLocations: options.pluginProbeLocations,
79006+ allowLocalPluginLoads: options.allowLocalPluginLoads
7899979007 }) || this;
7900079008 if (telemetryEnabled && typingsInstaller) {
7900179009 typingsInstaller.setTelemetrySender(_this);
@@ -79269,6 +79277,7 @@ var ts;
7926979277 var typingSafeListLocation = server.findArgument("--typingSafeListLocation");
7927079278 var globalPlugins = (server.findArgument("--globalPlugins") || "").split(",");
7927179279 var pluginProbeLocations = (server.findArgument("--pluginProbeLocations") || "").split(",");
79280+ var allowLocalPluginLoads = server.hasArgument("--allowLocalPluginLoads");
7927279281 var useSingleInferredProject = server.hasArgument("--useSingleInferredProject");
7927379282 var disableAutomaticTypingAcquisition = server.hasArgument("--disableAutomaticTypingAcquisition");
7927479283 var telemetryEnabled = server.hasArgument(server.Arguments.EnableTelemetry);
@@ -79284,7 +79293,8 @@ var ts;
7928479293 telemetryEnabled: telemetryEnabled,
7928579294 logger: logger,
7928679295 globalPlugins: globalPlugins,
79287- pluginProbeLocations: pluginProbeLocations
79296+ pluginProbeLocations: pluginProbeLocations,
79297+ allowLocalPluginLoads: allowLocalPluginLoads
7928879298 };
7928979299 var ioSession = new IOSession(options);
7929079300 process.on("uncaughtException", function (err) {
0 commit comments