drizzle-kit 0.9.30 → 0.9.31
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/index.js +849 -849
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -13444,18 +13444,18 @@ var require_source_map_support = __commonJS({
|
|
|
13444
13444
|
return origin;
|
|
13445
13445
|
}
|
|
13446
13446
|
function CallSiteToString() {
|
|
13447
|
-
var
|
|
13447
|
+
var fileName2;
|
|
13448
13448
|
var fileLocation = "";
|
|
13449
13449
|
if (this.isNative()) {
|
|
13450
13450
|
fileLocation = "native";
|
|
13451
13451
|
} else {
|
|
13452
|
-
|
|
13453
|
-
if (!
|
|
13452
|
+
fileName2 = this.getScriptNameOrSourceURL();
|
|
13453
|
+
if (!fileName2 && this.isEval()) {
|
|
13454
13454
|
fileLocation = this.getEvalOrigin();
|
|
13455
13455
|
fileLocation += ", ";
|
|
13456
13456
|
}
|
|
13457
|
-
if (
|
|
13458
|
-
fileLocation +=
|
|
13457
|
+
if (fileName2) {
|
|
13458
|
+
fileLocation += fileName2;
|
|
13459
13459
|
} else {
|
|
13460
13460
|
fileLocation += "<anonymous>";
|
|
13461
13461
|
}
|
|
@@ -15633,9 +15633,9 @@ var require_typescript = __commonJS({
|
|
|
15633
15633
|
return str2.indexOf(substring) !== -1;
|
|
15634
15634
|
}
|
|
15635
15635
|
ts3.stringContains = stringContains;
|
|
15636
|
-
function removeMinAndVersionNumbers(
|
|
15636
|
+
function removeMinAndVersionNumbers(fileName2) {
|
|
15637
15637
|
var trailingMinOrVersion = /[.-]((min)|(\d+(\.\d+)*))$/;
|
|
15638
|
-
return
|
|
15638
|
+
return fileName2.replace(trailingMinOrVersion, "").replace(trailingMinOrVersion, "");
|
|
15639
15639
|
}
|
|
15640
15640
|
ts3.removeMinAndVersionNumbers = removeMinAndVersionNumbers;
|
|
15641
15641
|
function orderedRemoveItem(array, item) {
|
|
@@ -18780,8 +18780,8 @@ var require_typescript = __commonJS({
|
|
|
18780
18780
|
return !pathIsAbsolute(path2) && !pathIsRelative(path2);
|
|
18781
18781
|
}
|
|
18782
18782
|
ts3.pathIsBareSpecifier = pathIsBareSpecifier;
|
|
18783
|
-
function hasExtension(
|
|
18784
|
-
return ts3.stringContains(getBaseFileName(
|
|
18783
|
+
function hasExtension(fileName2) {
|
|
18784
|
+
return ts3.stringContains(getBaseFileName(fileName2), ".");
|
|
18785
18785
|
}
|
|
18786
18786
|
ts3.hasExtension = hasExtension;
|
|
18787
18787
|
function fileExtensionIs(path2, extension) {
|
|
@@ -19001,8 +19001,8 @@ var require_typescript = __commonJS({
|
|
|
19001
19001
|
return reducePathComponents(getPathComponents(path2, currentDirectory));
|
|
19002
19002
|
}
|
|
19003
19003
|
ts3.getNormalizedPathComponents = getNormalizedPathComponents;
|
|
19004
|
-
function getNormalizedAbsolutePath(
|
|
19005
|
-
return getPathFromPathComponents(getNormalizedPathComponents(
|
|
19004
|
+
function getNormalizedAbsolutePath(fileName2, currentDirectory) {
|
|
19005
|
+
return getPathFromPathComponents(getNormalizedPathComponents(fileName2, currentDirectory));
|
|
19006
19006
|
}
|
|
19007
19007
|
ts3.getNormalizedAbsolutePath = getNormalizedAbsolutePath;
|
|
19008
19008
|
function normalizePath(path2) {
|
|
@@ -19016,12 +19016,12 @@ var require_typescript = __commonJS({
|
|
|
19016
19016
|
return "";
|
|
19017
19017
|
return pathComponents2.slice(1).join(ts3.directorySeparator);
|
|
19018
19018
|
}
|
|
19019
|
-
function getNormalizedAbsolutePathWithoutRoot(
|
|
19020
|
-
return getPathWithoutRoot(getNormalizedPathComponents(
|
|
19019
|
+
function getNormalizedAbsolutePathWithoutRoot(fileName2, currentDirectory) {
|
|
19020
|
+
return getPathWithoutRoot(getNormalizedPathComponents(fileName2, currentDirectory));
|
|
19021
19021
|
}
|
|
19022
19022
|
ts3.getNormalizedAbsolutePathWithoutRoot = getNormalizedAbsolutePathWithoutRoot;
|
|
19023
|
-
function toPath(
|
|
19024
|
-
var nonCanonicalizedPath = isRootedDiskPath(
|
|
19023
|
+
function toPath(fileName2, basePath, getCanonicalFileName) {
|
|
19024
|
+
var nonCanonicalizedPath = isRootedDiskPath(fileName2) ? normalizePath(fileName2) : getNormalizedAbsolutePath(fileName2, basePath);
|
|
19025
19025
|
return getCanonicalFileName(nonCanonicalizedPath);
|
|
19026
19026
|
}
|
|
19027
19027
|
ts3.toPath = toPath;
|
|
@@ -19133,8 +19133,8 @@ var require_typescript = __commonJS({
|
|
|
19133
19133
|
return true;
|
|
19134
19134
|
}
|
|
19135
19135
|
ts3.containsPath = containsPath;
|
|
19136
|
-
function startsWithDirectory(
|
|
19137
|
-
var canonicalFileName = getCanonicalFileName(
|
|
19136
|
+
function startsWithDirectory(fileName2, directoryName, getCanonicalFileName) {
|
|
19137
|
+
var canonicalFileName = getCanonicalFileName(fileName2);
|
|
19138
19138
|
var canonicalDirectoryName = getCanonicalFileName(directoryName);
|
|
19139
19139
|
return ts3.startsWith(canonicalFileName, canonicalDirectoryName + "/") || ts3.startsWith(canonicalFileName, canonicalDirectoryName + "\\");
|
|
19140
19140
|
}
|
|
@@ -19235,8 +19235,8 @@ var require_typescript = __commonJS({
|
|
|
19235
19235
|
PollingInterval2[PollingInterval2["Low"] = 250] = "Low";
|
|
19236
19236
|
})(PollingInterval = ts3.PollingInterval || (ts3.PollingInterval = {}));
|
|
19237
19237
|
ts3.missingFileModifiedTime = new Date(0);
|
|
19238
|
-
function getModifiedTime(host,
|
|
19239
|
-
return host.getModifiedTime(
|
|
19238
|
+
function getModifiedTime(host, fileName2) {
|
|
19239
|
+
return host.getModifiedTime(fileName2) || ts3.missingFileModifiedTime;
|
|
19240
19240
|
}
|
|
19241
19241
|
ts3.getModifiedTime = getModifiedTime;
|
|
19242
19242
|
function createPollingIntervalBasedLevels(levels) {
|
|
@@ -19332,12 +19332,12 @@ var require_typescript = __commonJS({
|
|
|
19332
19332
|
var mediumPollingIntervalQueue = createPollingIntervalQueue(PollingInterval.Medium);
|
|
19333
19333
|
var highPollingIntervalQueue = createPollingIntervalQueue(PollingInterval.High);
|
|
19334
19334
|
return watchFile;
|
|
19335
|
-
function watchFile(
|
|
19335
|
+
function watchFile(fileName2, callback, defaultPollingInterval) {
|
|
19336
19336
|
var file = {
|
|
19337
|
-
fileName,
|
|
19337
|
+
fileName: fileName2,
|
|
19338
19338
|
callback,
|
|
19339
19339
|
unchangedPolls: 0,
|
|
19340
|
-
mtime: getModifiedTime(host,
|
|
19340
|
+
mtime: getModifiedTime(host, fileName2)
|
|
19341
19341
|
};
|
|
19342
19342
|
watchedFiles.push(file);
|
|
19343
19343
|
addToPollingIntervalQueue(file, defaultPollingInterval);
|
|
@@ -19426,11 +19426,11 @@ var require_typescript = __commonJS({
|
|
|
19426
19426
|
var dirWatchers = new ts3.Map();
|
|
19427
19427
|
var toCanonicalName = ts3.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
19428
19428
|
return nonPollingWatchFile;
|
|
19429
|
-
function nonPollingWatchFile(
|
|
19430
|
-
var filePath = toCanonicalName(
|
|
19429
|
+
function nonPollingWatchFile(fileName2, callback, _pollingInterval, fallbackOptions) {
|
|
19430
|
+
var filePath = toCanonicalName(fileName2);
|
|
19431
19431
|
fileWatcherCallbacks.add(filePath, callback);
|
|
19432
19432
|
var dirPath = ts3.getDirectoryPath(filePath) || ".";
|
|
19433
|
-
var watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(ts3.getDirectoryPath(
|
|
19433
|
+
var watcher = dirWatchers.get(dirPath) || createDirectoryWatcher(ts3.getDirectoryPath(fileName2) || ".", dirPath, fallbackOptions);
|
|
19434
19434
|
watcher.referenceCount++;
|
|
19435
19435
|
return {
|
|
19436
19436
|
close: function() {
|
|
@@ -19449,12 +19449,12 @@ var require_typescript = __commonJS({
|
|
|
19449
19449
|
if (!ts3.isString(relativeFileName)) {
|
|
19450
19450
|
return;
|
|
19451
19451
|
}
|
|
19452
|
-
var
|
|
19453
|
-
var callbacks =
|
|
19452
|
+
var fileName2 = ts3.getNormalizedAbsolutePath(relativeFileName, dirName);
|
|
19453
|
+
var callbacks = fileName2 && fileWatcherCallbacks.get(toCanonicalName(fileName2));
|
|
19454
19454
|
if (callbacks) {
|
|
19455
19455
|
for (var _i = 0, callbacks_1 = callbacks; _i < callbacks_1.length; _i++) {
|
|
19456
19456
|
var fileCallback = callbacks_1[_i];
|
|
19457
|
-
fileCallback(
|
|
19457
|
+
fileCallback(fileName2, FileWatcherEventKind.Changed);
|
|
19458
19458
|
}
|
|
19459
19459
|
}
|
|
19460
19460
|
}, false, PollingInterval.Medium, fallbackOptions);
|
|
@@ -19468,11 +19468,11 @@ var require_typescript = __commonJS({
|
|
|
19468
19468
|
var pollIndex = 0;
|
|
19469
19469
|
var pollScheduled;
|
|
19470
19470
|
return watchFile;
|
|
19471
|
-
function watchFile(
|
|
19471
|
+
function watchFile(fileName2, callback) {
|
|
19472
19472
|
var file = {
|
|
19473
|
-
fileName,
|
|
19473
|
+
fileName: fileName2,
|
|
19474
19474
|
callback,
|
|
19475
|
-
mtime: getModifiedTime(host,
|
|
19475
|
+
mtime: getModifiedTime(host, fileName2)
|
|
19476
19476
|
};
|
|
19477
19477
|
watchedFiles.push(file);
|
|
19478
19478
|
scheduleNextPoll();
|
|
@@ -19498,16 +19498,16 @@ var require_typescript = __commonJS({
|
|
|
19498
19498
|
var cache = new ts3.Map();
|
|
19499
19499
|
var callbacksCache = ts3.createMultiMap();
|
|
19500
19500
|
var toCanonicalFileName = ts3.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
19501
|
-
return function(
|
|
19502
|
-
var path2 = toCanonicalFileName(
|
|
19501
|
+
return function(fileName2, callback, pollingInterval, options) {
|
|
19502
|
+
var path2 = toCanonicalFileName(fileName2);
|
|
19503
19503
|
var existing = cache.get(path2);
|
|
19504
19504
|
if (existing) {
|
|
19505
19505
|
existing.refCount++;
|
|
19506
19506
|
} else {
|
|
19507
19507
|
cache.set(path2, {
|
|
19508
|
-
watcher: watchFile(
|
|
19508
|
+
watcher: watchFile(fileName2, function(fileName3, eventKind) {
|
|
19509
19509
|
return ts3.forEach(callbacksCache.get(path2), function(cb) {
|
|
19510
|
-
return cb(
|
|
19510
|
+
return cb(fileName3, eventKind);
|
|
19511
19511
|
});
|
|
19512
19512
|
}, pollingInterval, options),
|
|
19513
19513
|
refCount: 1
|
|
@@ -19567,14 +19567,14 @@ var require_typescript = __commonJS({
|
|
|
19567
19567
|
directoryWatcher.refCount++;
|
|
19568
19568
|
} else {
|
|
19569
19569
|
directoryWatcher = {
|
|
19570
|
-
watcher: watchDirectory(dirName, function(
|
|
19571
|
-
if (isIgnoredPath(
|
|
19570
|
+
watcher: watchDirectory(dirName, function(fileName2) {
|
|
19571
|
+
if (isIgnoredPath(fileName2, options))
|
|
19572
19572
|
return;
|
|
19573
19573
|
if (options === null || options === void 0 ? void 0 : options.synchronousWatchDirectory) {
|
|
19574
|
-
invokeCallbacks(dirPath,
|
|
19574
|
+
invokeCallbacks(dirPath, fileName2);
|
|
19575
19575
|
updateChildWatches(dirName, dirPath, options);
|
|
19576
19576
|
} else {
|
|
19577
|
-
nonSyncUpdateChildWatches(dirName, dirPath,
|
|
19577
|
+
nonSyncUpdateChildWatches(dirName, dirPath, fileName2, options);
|
|
19578
19578
|
}
|
|
19579
19579
|
}, false, options),
|
|
19580
19580
|
refCount: 1,
|
|
@@ -19603,10 +19603,10 @@ var require_typescript = __commonJS({
|
|
|
19603
19603
|
};
|
|
19604
19604
|
}
|
|
19605
19605
|
function invokeCallbacks(dirPath, fileNameOrInvokeMap, fileNames) {
|
|
19606
|
-
var
|
|
19606
|
+
var fileName2;
|
|
19607
19607
|
var invokeMap;
|
|
19608
19608
|
if (ts3.isString(fileNameOrInvokeMap)) {
|
|
19609
|
-
|
|
19609
|
+
fileName2 = fileNameOrInvokeMap;
|
|
19610
19610
|
} else {
|
|
19611
19611
|
invokeMap = fileNameOrInvokeMap;
|
|
19612
19612
|
}
|
|
@@ -19629,27 +19629,27 @@ var require_typescript = __commonJS({
|
|
|
19629
19629
|
} else {
|
|
19630
19630
|
callbacks.forEach(function(_a3) {
|
|
19631
19631
|
var callback = _a3.callback;
|
|
19632
|
-
return callback(
|
|
19632
|
+
return callback(fileName2);
|
|
19633
19633
|
});
|
|
19634
19634
|
}
|
|
19635
19635
|
}
|
|
19636
19636
|
});
|
|
19637
19637
|
}
|
|
19638
|
-
function nonSyncUpdateChildWatches(dirName, dirPath,
|
|
19638
|
+
function nonSyncUpdateChildWatches(dirName, dirPath, fileName2, options) {
|
|
19639
19639
|
var parentWatcher = cache.get(dirPath);
|
|
19640
19640
|
if (parentWatcher && directoryExists(dirName)) {
|
|
19641
|
-
scheduleUpdateChildWatches(dirName, dirPath,
|
|
19641
|
+
scheduleUpdateChildWatches(dirName, dirPath, fileName2, options);
|
|
19642
19642
|
return;
|
|
19643
19643
|
}
|
|
19644
|
-
invokeCallbacks(dirPath,
|
|
19644
|
+
invokeCallbacks(dirPath, fileName2);
|
|
19645
19645
|
removeChildWatches(parentWatcher);
|
|
19646
19646
|
}
|
|
19647
|
-
function scheduleUpdateChildWatches(dirName, dirPath,
|
|
19647
|
+
function scheduleUpdateChildWatches(dirName, dirPath, fileName2, options) {
|
|
19648
19648
|
var existing = cacheToUpdateChildWatches.get(dirPath);
|
|
19649
19649
|
if (existing) {
|
|
19650
|
-
existing.fileNames.push(
|
|
19650
|
+
existing.fileNames.push(fileName2);
|
|
19651
19651
|
} else {
|
|
19652
|
-
cacheToUpdateChildWatches.set(dirPath, { dirName, options, fileNames: [
|
|
19652
|
+
cacheToUpdateChildWatches.set(dirPath, { dirName, options, fileNames: [fileName2] });
|
|
19653
19653
|
}
|
|
19654
19654
|
if (timerToUpdateChildWatches) {
|
|
19655
19655
|
clearTimeout2(timerToUpdateChildWatches);
|
|
@@ -19744,12 +19744,12 @@ var require_typescript = __commonJS({
|
|
|
19744
19744
|
};
|
|
19745
19745
|
}
|
|
19746
19746
|
ts3.createFileWatcherCallback = createFileWatcherCallback;
|
|
19747
|
-
function createFsWatchCallbackForFileWatcherCallback(
|
|
19747
|
+
function createFsWatchCallbackForFileWatcherCallback(fileName2, callback, fileExists) {
|
|
19748
19748
|
return function(eventName) {
|
|
19749
19749
|
if (eventName === "rename") {
|
|
19750
|
-
callback(
|
|
19750
|
+
callback(fileName2, fileExists(fileName2) ? FileWatcherEventKind.Created : FileWatcherEventKind.Deleted);
|
|
19751
19751
|
} else {
|
|
19752
|
-
callback(
|
|
19752
|
+
callback(fileName2, FileWatcherEventKind.Changed);
|
|
19753
19753
|
}
|
|
19754
19754
|
};
|
|
19755
19755
|
}
|
|
@@ -19759,9 +19759,9 @@ var require_typescript = __commonJS({
|
|
|
19759
19759
|
function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames, getCurrentDirectory) {
|
|
19760
19760
|
return function(eventName, relativeFileName) {
|
|
19761
19761
|
if (eventName === "rename") {
|
|
19762
|
-
var
|
|
19763
|
-
if (!relativeFileName || !isIgnoredByWatchOptions(
|
|
19764
|
-
callback(
|
|
19762
|
+
var fileName2 = !relativeFileName ? directoryName : ts3.normalizePath(ts3.combinePaths(directoryName, relativeFileName));
|
|
19763
|
+
if (!relativeFileName || !isIgnoredByWatchOptions(fileName2, options, useCaseSensitiveFileNames, getCurrentDirectory)) {
|
|
19764
|
+
callback(fileName2);
|
|
19765
19765
|
}
|
|
19766
19766
|
}
|
|
19767
19767
|
};
|
|
@@ -19776,25 +19776,25 @@ var require_typescript = __commonJS({
|
|
|
19776
19776
|
watchFile,
|
|
19777
19777
|
watchDirectory
|
|
19778
19778
|
};
|
|
19779
|
-
function watchFile(
|
|
19779
|
+
function watchFile(fileName2, callback, pollingInterval, options) {
|
|
19780
19780
|
options = updateOptionsForWatchFile(options, useNonPollingWatchers);
|
|
19781
19781
|
var watchFileKind = ts3.Debug.checkDefined(options.watchFile);
|
|
19782
19782
|
switch (watchFileKind) {
|
|
19783
19783
|
case ts3.WatchFileKind.FixedPollingInterval:
|
|
19784
|
-
return pollingWatchFile(
|
|
19784
|
+
return pollingWatchFile(fileName2, callback, PollingInterval.Low, void 0);
|
|
19785
19785
|
case ts3.WatchFileKind.PriorityPollingInterval:
|
|
19786
|
-
return pollingWatchFile(
|
|
19786
|
+
return pollingWatchFile(fileName2, callback, pollingInterval, void 0);
|
|
19787
19787
|
case ts3.WatchFileKind.DynamicPriorityPolling:
|
|
19788
|
-
return ensureDynamicPollingWatchFile()(
|
|
19788
|
+
return ensureDynamicPollingWatchFile()(fileName2, callback, pollingInterval, void 0);
|
|
19789
19789
|
case ts3.WatchFileKind.FixedChunkSizePolling:
|
|
19790
|
-
return ensureFixedChunkSizePollingWatchFile()(
|
|
19790
|
+
return ensureFixedChunkSizePollingWatchFile()(fileName2, callback, void 0, void 0);
|
|
19791
19791
|
case ts3.WatchFileKind.UseFsEvents:
|
|
19792
|
-
return fsWatch(
|
|
19792
|
+
return fsWatch(fileName2, 0, createFsWatchCallbackForFileWatcherCallback(fileName2, callback, fileExists), false, pollingInterval, ts3.getFallbackOptions(options));
|
|
19793
19793
|
case ts3.WatchFileKind.UseFsEventsOnParentDirectory:
|
|
19794
19794
|
if (!nonPollingWatchFile) {
|
|
19795
19795
|
nonPollingWatchFile = createUseFsEventsOnParentDirectoryWatchFile(fsWatch, useCaseSensitiveFileNames);
|
|
19796
19796
|
}
|
|
19797
|
-
return nonPollingWatchFile(
|
|
19797
|
+
return nonPollingWatchFile(fileName2, callback, pollingInterval, ts3.getFallbackOptions(options));
|
|
19798
19798
|
default:
|
|
19799
19799
|
ts3.Debug.assertNever(watchFileKind);
|
|
19800
19800
|
}
|
|
@@ -20162,12 +20162,12 @@ var require_typescript = __commonJS({
|
|
|
20162
20162
|
return ch === up ? ch.toLowerCase() : up;
|
|
20163
20163
|
});
|
|
20164
20164
|
}
|
|
20165
|
-
function fsWatchFileWorker(
|
|
20166
|
-
_fs.watchFile(
|
|
20165
|
+
function fsWatchFileWorker(fileName2, callback, pollingInterval) {
|
|
20166
|
+
_fs.watchFile(fileName2, { persistent: true, interval: pollingInterval }, fileChanged);
|
|
20167
20167
|
var eventKind;
|
|
20168
20168
|
return {
|
|
20169
20169
|
close: function() {
|
|
20170
|
-
return _fs.unwatchFile(
|
|
20170
|
+
return _fs.unwatchFile(fileName2, fileChanged);
|
|
20171
20171
|
}
|
|
20172
20172
|
};
|
|
20173
20173
|
function fileChanged(curr, prev) {
|
|
@@ -20184,7 +20184,7 @@ var require_typescript = __commonJS({
|
|
|
20184
20184
|
} else {
|
|
20185
20185
|
eventKind = FileWatcherEventKind.Changed;
|
|
20186
20186
|
}
|
|
20187
|
-
callback(
|
|
20187
|
+
callback(fileName2, eventKind);
|
|
20188
20188
|
}
|
|
20189
20189
|
}
|
|
20190
20190
|
function fsWatch(fileOrDirectory, entryKind, callback, recursive, fallbackPollingInterval, fallbackOptions) {
|
|
@@ -20243,10 +20243,10 @@ var require_typescript = __commonJS({
|
|
|
20243
20243
|
}, fallbackPollingInterval, fallbackOptions);
|
|
20244
20244
|
}
|
|
20245
20245
|
}
|
|
20246
|
-
function readFileWorker(
|
|
20246
|
+
function readFileWorker(fileName2, _encoding) {
|
|
20247
20247
|
var buffer;
|
|
20248
20248
|
try {
|
|
20249
|
-
buffer = _fs.readFileSync(
|
|
20249
|
+
buffer = _fs.readFileSync(fileName2);
|
|
20250
20250
|
} catch (e) {
|
|
20251
20251
|
return void 0;
|
|
20252
20252
|
}
|
|
@@ -20268,20 +20268,20 @@ var require_typescript = __commonJS({
|
|
|
20268
20268
|
}
|
|
20269
20269
|
return buffer.toString("utf8");
|
|
20270
20270
|
}
|
|
20271
|
-
function readFile(
|
|
20272
|
-
ts3.perfLogger.logStartReadFile(
|
|
20273
|
-
var file = readFileWorker(
|
|
20271
|
+
function readFile(fileName2, _encoding) {
|
|
20272
|
+
ts3.perfLogger.logStartReadFile(fileName2);
|
|
20273
|
+
var file = readFileWorker(fileName2, _encoding);
|
|
20274
20274
|
ts3.perfLogger.logStopReadFile();
|
|
20275
20275
|
return file;
|
|
20276
20276
|
}
|
|
20277
|
-
function writeFile(
|
|
20278
|
-
ts3.perfLogger.logEvent("WriteFile: " +
|
|
20277
|
+
function writeFile(fileName2, data, writeByteOrderMark) {
|
|
20278
|
+
ts3.perfLogger.logEvent("WriteFile: " + fileName2);
|
|
20279
20279
|
if (writeByteOrderMark) {
|
|
20280
20280
|
data = byteOrderMarkIndicator + data;
|
|
20281
20281
|
}
|
|
20282
20282
|
var fd;
|
|
20283
20283
|
try {
|
|
20284
|
-
fd = _fs.openSync(
|
|
20284
|
+
fd = _fs.openSync(fileName2, "w");
|
|
20285
20285
|
_fs.writeSync(fd, data, void 0, "utf8");
|
|
20286
20286
|
} finally {
|
|
20287
20287
|
if (fd !== void 0) {
|
|
@@ -28355,9 +28355,9 @@ var require_typescript = __commonJS({
|
|
|
28355
28355
|
hasReadNonFileDiagnostics = true;
|
|
28356
28356
|
return nonFileDiagnostics;
|
|
28357
28357
|
}
|
|
28358
|
-
function getDiagnostics(
|
|
28359
|
-
if (
|
|
28360
|
-
return fileDiagnostics.get(
|
|
28358
|
+
function getDiagnostics(fileName2) {
|
|
28359
|
+
if (fileName2) {
|
|
28360
|
+
return fileDiagnostics.get(fileName2) || [];
|
|
28361
28361
|
}
|
|
28362
28362
|
var fileDiags = ts3.flatMapToMutable(filesWithDiagnostics, function(f) {
|
|
28363
28363
|
return fileDiagnostics.get(f);
|
|
@@ -28681,37 +28681,37 @@ var require_typescript = __commonJS({
|
|
|
28681
28681
|
return getResolvedExternalModuleName(host, file);
|
|
28682
28682
|
}
|
|
28683
28683
|
ts3.getExternalModuleNameFromDeclaration = getExternalModuleNameFromDeclaration;
|
|
28684
|
-
function getExternalModuleNameFromPath(host,
|
|
28684
|
+
function getExternalModuleNameFromPath(host, fileName2, referencePath) {
|
|
28685
28685
|
var getCanonicalFileName = function(f) {
|
|
28686
28686
|
return host.getCanonicalFileName(f);
|
|
28687
28687
|
};
|
|
28688
28688
|
var dir = ts3.toPath(referencePath ? ts3.getDirectoryPath(referencePath) : host.getCommonSourceDirectory(), host.getCurrentDirectory(), getCanonicalFileName);
|
|
28689
|
-
var filePath = ts3.getNormalizedAbsolutePath(
|
|
28689
|
+
var filePath = ts3.getNormalizedAbsolutePath(fileName2, host.getCurrentDirectory());
|
|
28690
28690
|
var relativePath = ts3.getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, false);
|
|
28691
28691
|
var extensionless = removeFileExtension(relativePath);
|
|
28692
28692
|
return referencePath ? ts3.ensurePathIsNonModuleName(extensionless) : extensionless;
|
|
28693
28693
|
}
|
|
28694
28694
|
ts3.getExternalModuleNameFromPath = getExternalModuleNameFromPath;
|
|
28695
|
-
function getOwnEmitOutputFilePath(
|
|
28695
|
+
function getOwnEmitOutputFilePath(fileName2, host, extension) {
|
|
28696
28696
|
var compilerOptions = host.getCompilerOptions();
|
|
28697
28697
|
var emitOutputFilePathWithoutExtension;
|
|
28698
28698
|
if (compilerOptions.outDir) {
|
|
28699
|
-
emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(
|
|
28699
|
+
emitOutputFilePathWithoutExtension = removeFileExtension(getSourceFilePathInNewDir(fileName2, host, compilerOptions.outDir));
|
|
28700
28700
|
} else {
|
|
28701
|
-
emitOutputFilePathWithoutExtension = removeFileExtension(
|
|
28701
|
+
emitOutputFilePathWithoutExtension = removeFileExtension(fileName2);
|
|
28702
28702
|
}
|
|
28703
28703
|
return emitOutputFilePathWithoutExtension + extension;
|
|
28704
28704
|
}
|
|
28705
28705
|
ts3.getOwnEmitOutputFilePath = getOwnEmitOutputFilePath;
|
|
28706
|
-
function getDeclarationEmitOutputFilePath(
|
|
28707
|
-
return getDeclarationEmitOutputFilePathWorker(
|
|
28706
|
+
function getDeclarationEmitOutputFilePath(fileName2, host) {
|
|
28707
|
+
return getDeclarationEmitOutputFilePathWorker(fileName2, host.getCompilerOptions(), host.getCurrentDirectory(), host.getCommonSourceDirectory(), function(f) {
|
|
28708
28708
|
return host.getCanonicalFileName(f);
|
|
28709
28709
|
});
|
|
28710
28710
|
}
|
|
28711
28711
|
ts3.getDeclarationEmitOutputFilePath = getDeclarationEmitOutputFilePath;
|
|
28712
|
-
function getDeclarationEmitOutputFilePathWorker(
|
|
28712
|
+
function getDeclarationEmitOutputFilePathWorker(fileName2, options, currentDirectory, commonSourceDirectory, getCanonicalFileName) {
|
|
28713
28713
|
var outputDir = options.declarationDir || options.outDir;
|
|
28714
|
-
var path2 = outputDir ? getSourceFilePathInNewDirWorker(
|
|
28714
|
+
var path2 = outputDir ? getSourceFilePathInNewDirWorker(fileName2, outputDir, currentDirectory, commonSourceDirectory, getCanonicalFileName) : fileName2;
|
|
28715
28715
|
return removeFileExtension(path2) + ".d.ts";
|
|
28716
28716
|
}
|
|
28717
28717
|
ts3.getDeclarationEmitOutputFilePathWorker = getDeclarationEmitOutputFilePathWorker;
|
|
@@ -28747,22 +28747,22 @@ var require_typescript = __commonJS({
|
|
|
28747
28747
|
return !(options.noEmitForJsFiles && isSourceFileJS(sourceFile)) && !sourceFile.isDeclarationFile && !host.isSourceFileFromExternalLibrary(sourceFile) && (forceDtsEmit || !(isJsonSourceFile(sourceFile) && host.getResolvedProjectReferenceToRedirect(sourceFile.fileName)) && !host.isSourceOfProjectReferenceRedirect(sourceFile.fileName));
|
|
28748
28748
|
}
|
|
28749
28749
|
ts3.sourceFileMayBeEmitted = sourceFileMayBeEmitted;
|
|
28750
|
-
function getSourceFilePathInNewDir(
|
|
28751
|
-
return getSourceFilePathInNewDirWorker(
|
|
28750
|
+
function getSourceFilePathInNewDir(fileName2, host, newDirPath) {
|
|
28751
|
+
return getSourceFilePathInNewDirWorker(fileName2, newDirPath, host.getCurrentDirectory(), host.getCommonSourceDirectory(), function(f) {
|
|
28752
28752
|
return host.getCanonicalFileName(f);
|
|
28753
28753
|
});
|
|
28754
28754
|
}
|
|
28755
28755
|
ts3.getSourceFilePathInNewDir = getSourceFilePathInNewDir;
|
|
28756
|
-
function getSourceFilePathInNewDirWorker(
|
|
28757
|
-
var sourceFilePath = ts3.getNormalizedAbsolutePath(
|
|
28756
|
+
function getSourceFilePathInNewDirWorker(fileName2, newDirPath, currentDirectory, commonSourceDirectory, getCanonicalFileName) {
|
|
28757
|
+
var sourceFilePath = ts3.getNormalizedAbsolutePath(fileName2, currentDirectory);
|
|
28758
28758
|
var isSourceFileInCommonSourceDirectory = getCanonicalFileName(sourceFilePath).indexOf(getCanonicalFileName(commonSourceDirectory)) === 0;
|
|
28759
28759
|
sourceFilePath = isSourceFileInCommonSourceDirectory ? sourceFilePath.substring(commonSourceDirectory.length) : sourceFilePath;
|
|
28760
28760
|
return ts3.combinePaths(newDirPath, sourceFilePath);
|
|
28761
28761
|
}
|
|
28762
28762
|
ts3.getSourceFilePathInNewDirWorker = getSourceFilePathInNewDirWorker;
|
|
28763
|
-
function writeFile(host, diagnostics,
|
|
28764
|
-
host.writeFile(
|
|
28765
|
-
diagnostics.add(createCompilerDiagnostic(ts3.Diagnostics.Could_not_write_file_0_Colon_1,
|
|
28763
|
+
function writeFile(host, diagnostics, fileName2, data, writeByteOrderMark, sourceFiles) {
|
|
28764
|
+
host.writeFile(fileName2, data, writeByteOrderMark, function(hostErrorMessage) {
|
|
28765
|
+
diagnostics.add(createCompilerDiagnostic(ts3.Diagnostics.Could_not_write_file_0_Colon_1, fileName2, hostErrorMessage));
|
|
28766
28766
|
}, sourceFiles);
|
|
28767
28767
|
}
|
|
28768
28768
|
ts3.writeFile = writeFile;
|
|
@@ -29308,9 +29308,9 @@ var require_typescript = __commonJS({
|
|
|
29308
29308
|
function isExportDefaultSymbol(symbol) {
|
|
29309
29309
|
return symbol && ts3.length(symbol.declarations) > 0 && hasSyntacticModifier(symbol.declarations[0], 512);
|
|
29310
29310
|
}
|
|
29311
|
-
function tryExtractTSExtension(
|
|
29311
|
+
function tryExtractTSExtension(fileName2) {
|
|
29312
29312
|
return ts3.find(ts3.supportedTSExtensionsForExtractExtension, function(extension) {
|
|
29313
|
-
return ts3.fileExtensionIs(
|
|
29313
|
+
return ts3.fileExtensionIs(fileName2, extension);
|
|
29314
29314
|
});
|
|
29315
29315
|
}
|
|
29316
29316
|
ts3.tryExtractTSExtension = tryExtractTSExtension;
|
|
@@ -29902,8 +29902,8 @@ var require_typescript = __commonJS({
|
|
|
29902
29902
|
this.original = void 0;
|
|
29903
29903
|
this.flowNode = void 0;
|
|
29904
29904
|
}
|
|
29905
|
-
function SourceMapSource(
|
|
29906
|
-
this.fileName =
|
|
29905
|
+
function SourceMapSource(fileName2, text, skipTrivia) {
|
|
29906
|
+
this.fileName = fileName2;
|
|
29907
29907
|
this.text = text;
|
|
29908
29908
|
this.skipTrivia = skipTrivia || function(pos) {
|
|
29909
29909
|
return pos;
|
|
@@ -29959,7 +29959,7 @@ var require_typescript = __commonJS({
|
|
|
29959
29959
|
return ts3.localizedDiagnosticMessages && ts3.localizedDiagnosticMessages[message.key] || message.message;
|
|
29960
29960
|
}
|
|
29961
29961
|
ts3.getLocaleSpecificMessage = getLocaleSpecificMessage;
|
|
29962
|
-
function createDetachedDiagnostic(
|
|
29962
|
+
function createDetachedDiagnostic(fileName2, start, length, message) {
|
|
29963
29963
|
assertDiagnosticLocation(void 0, start, length);
|
|
29964
29964
|
var text = getLocaleSpecificMessage(message);
|
|
29965
29965
|
if (arguments.length > 4) {
|
|
@@ -29973,7 +29973,7 @@ var require_typescript = __commonJS({
|
|
|
29973
29973
|
category: message.category,
|
|
29974
29974
|
code: message.code,
|
|
29975
29975
|
reportsUnnecessary: message.reportsUnnecessary,
|
|
29976
|
-
fileName
|
|
29976
|
+
fileName: fileName2
|
|
29977
29977
|
};
|
|
29978
29978
|
}
|
|
29979
29979
|
ts3.createDetachedDiagnostic = createDetachedDiagnostic;
|
|
@@ -29981,9 +29981,9 @@ var require_typescript = __commonJS({
|
|
|
29981
29981
|
return diagnostic.file === void 0 && diagnostic.start !== void 0 && diagnostic.length !== void 0 && typeof diagnostic.fileName === "string";
|
|
29982
29982
|
}
|
|
29983
29983
|
function attachFileToDiagnostic(diagnostic, file) {
|
|
29984
|
-
var
|
|
29984
|
+
var fileName2 = file.fileName || "";
|
|
29985
29985
|
var length = file.text.length;
|
|
29986
|
-
ts3.Debug.assertEqual(diagnostic.fileName,
|
|
29986
|
+
ts3.Debug.assertEqual(diagnostic.fileName, fileName2);
|
|
29987
29987
|
ts3.Debug.assertLessThanOrEqual(diagnostic.start, length);
|
|
29988
29988
|
ts3.Debug.assertLessThanOrEqual(diagnostic.start + diagnostic.length, length);
|
|
29989
29989
|
var diagnosticWithLocation = {
|
|
@@ -29999,7 +29999,7 @@ var require_typescript = __commonJS({
|
|
|
29999
29999
|
diagnosticWithLocation.relatedInformation = [];
|
|
30000
30000
|
for (var _i = 0, _a = diagnostic.relatedInformation; _i < _a.length; _i++) {
|
|
30001
30001
|
var related = _a[_i];
|
|
30002
|
-
if (isDiagnosticWithDetachedLocation(related) && related.fileName ===
|
|
30002
|
+
if (isDiagnosticWithDetachedLocation(related) && related.fileName === fileName2) {
|
|
30003
30003
|
ts3.Debug.assertLessThanOrEqual(related.start, length);
|
|
30004
30004
|
ts3.Debug.assertLessThanOrEqual(related.start + related.length, length);
|
|
30005
30005
|
diagnosticWithLocation.relatedInformation.push(attachFileToDiagnostic(related, file));
|
|
@@ -30591,12 +30591,12 @@ var require_typescript = __commonJS({
|
|
|
30591
30591
|
}
|
|
30592
30592
|
return absolute.substring(0, absolute.lastIndexOf(ts3.directorySeparator, wildcardOffset));
|
|
30593
30593
|
}
|
|
30594
|
-
function ensureScriptKind(
|
|
30595
|
-
return scriptKind || getScriptKindFromFileName(
|
|
30594
|
+
function ensureScriptKind(fileName2, scriptKind) {
|
|
30595
|
+
return scriptKind || getScriptKindFromFileName(fileName2) || 3;
|
|
30596
30596
|
}
|
|
30597
30597
|
ts3.ensureScriptKind = ensureScriptKind;
|
|
30598
|
-
function getScriptKindFromFileName(
|
|
30599
|
-
var ext =
|
|
30598
|
+
function getScriptKindFromFileName(fileName2) {
|
|
30599
|
+
var ext = fileName2.substr(fileName2.lastIndexOf("."));
|
|
30600
30600
|
switch (ext.toLowerCase()) {
|
|
30601
30601
|
case ".js":
|
|
30602
30602
|
return 1;
|
|
@@ -30647,26 +30647,26 @@ var require_typescript = __commonJS({
|
|
|
30647
30647
|
function isJSLike(scriptKind) {
|
|
30648
30648
|
return scriptKind === 1 || scriptKind === 2;
|
|
30649
30649
|
}
|
|
30650
|
-
function hasJSFileExtension(
|
|
30650
|
+
function hasJSFileExtension(fileName2) {
|
|
30651
30651
|
return ts3.some(ts3.supportedJSExtensions, function(extension) {
|
|
30652
|
-
return ts3.fileExtensionIs(
|
|
30652
|
+
return ts3.fileExtensionIs(fileName2, extension);
|
|
30653
30653
|
});
|
|
30654
30654
|
}
|
|
30655
30655
|
ts3.hasJSFileExtension = hasJSFileExtension;
|
|
30656
|
-
function hasTSFileExtension(
|
|
30656
|
+
function hasTSFileExtension(fileName2) {
|
|
30657
30657
|
return ts3.some(ts3.supportedTSExtensions, function(extension) {
|
|
30658
|
-
return ts3.fileExtensionIs(
|
|
30658
|
+
return ts3.fileExtensionIs(fileName2, extension);
|
|
30659
30659
|
});
|
|
30660
30660
|
}
|
|
30661
30661
|
ts3.hasTSFileExtension = hasTSFileExtension;
|
|
30662
|
-
function isSupportedSourceFileName(
|
|
30663
|
-
if (!
|
|
30662
|
+
function isSupportedSourceFileName(fileName2, compilerOptions, extraFileExtensions) {
|
|
30663
|
+
if (!fileName2) {
|
|
30664
30664
|
return false;
|
|
30665
30665
|
}
|
|
30666
30666
|
var supportedExtensions = getSupportedExtensions(compilerOptions, extraFileExtensions);
|
|
30667
30667
|
for (var _i = 0, _a = getSuppoertedExtensionsWithJsonIfResolveJsonModule(compilerOptions, supportedExtensions); _i < _a.length; _i++) {
|
|
30668
30668
|
var extension = _a[_i];
|
|
30669
|
-
if (ts3.fileExtensionIs(
|
|
30669
|
+
if (ts3.fileExtensionIs(fileName2, extension)) {
|
|
30670
30670
|
return true;
|
|
30671
30671
|
}
|
|
30672
30672
|
}
|
|
@@ -35199,7 +35199,7 @@ var require_typescript = __commonJS({
|
|
|
35199
35199
|
function createUnparsedSourceFile(textOrInputFiles, mapPathOrType, mapTextOrStripInternal) {
|
|
35200
35200
|
var stripInternal;
|
|
35201
35201
|
var bundleFileInfo;
|
|
35202
|
-
var
|
|
35202
|
+
var fileName2;
|
|
35203
35203
|
var text;
|
|
35204
35204
|
var length;
|
|
35205
35205
|
var sourceMapPath;
|
|
@@ -35209,7 +35209,7 @@ var require_typescript = __commonJS({
|
|
|
35209
35209
|
var oldFileOfCurrentEmit;
|
|
35210
35210
|
if (!ts3.isString(textOrInputFiles)) {
|
|
35211
35211
|
ts3.Debug.assert(mapPathOrType === "js" || mapPathOrType === "dts");
|
|
35212
|
-
|
|
35212
|
+
fileName2 = (mapPathOrType === "js" ? textOrInputFiles.javascriptPath : textOrInputFiles.declarationPath) || "";
|
|
35213
35213
|
sourceMapPath = mapPathOrType === "js" ? textOrInputFiles.javascriptMapPath : textOrInputFiles.declarationMapPath;
|
|
35214
35214
|
getText = function() {
|
|
35215
35215
|
return mapPathOrType === "js" ? textOrInputFiles.javascriptText : textOrInputFiles.declarationText;
|
|
@@ -35227,14 +35227,14 @@ var require_typescript = __commonJS({
|
|
|
35227
35227
|
oldFileOfCurrentEmit = textOrInputFiles.oldFileOfCurrentEmit;
|
|
35228
35228
|
}
|
|
35229
35229
|
} else {
|
|
35230
|
-
|
|
35230
|
+
fileName2 = "";
|
|
35231
35231
|
text = textOrInputFiles;
|
|
35232
35232
|
length = textOrInputFiles.length;
|
|
35233
35233
|
sourceMapPath = mapPathOrType;
|
|
35234
35234
|
sourceMapText = mapTextOrStripInternal;
|
|
35235
35235
|
}
|
|
35236
35236
|
var node = oldFileOfCurrentEmit ? parseOldFileOfCurrentEmit(ts3.Debug.assertDefined(bundleFileInfo)) : parseUnparsedSourceFile(bundleFileInfo, stripInternal, length);
|
|
35237
|
-
node.fileName =
|
|
35237
|
+
node.fileName = fileName2;
|
|
35238
35238
|
node.sourceMapPath = sourceMapPath;
|
|
35239
35239
|
node.oldFileOfCurrentEmit = oldFileOfCurrentEmit;
|
|
35240
35240
|
if (getText && getSourceMapText) {
|
|
@@ -35417,8 +35417,8 @@ var require_typescript = __commonJS({
|
|
|
35417
35417
|
}
|
|
35418
35418
|
ts3.createInputFiles = createInputFiles;
|
|
35419
35419
|
var SourceMapSource;
|
|
35420
|
-
function createSourceMapSource(
|
|
35421
|
-
return new (SourceMapSource || (SourceMapSource = ts3.objectAllocator.getSourceMapSourceConstructor()))(
|
|
35420
|
+
function createSourceMapSource(fileName2, text, skipTrivia) {
|
|
35421
|
+
return new (SourceMapSource || (SourceMapSource = ts3.objectAllocator.getSourceMapSourceConstructor()))(fileName2, text, skipTrivia);
|
|
35422
35422
|
}
|
|
35423
35423
|
ts3.createSourceMapSource = createSourceMapSource;
|
|
35424
35424
|
function setOriginalNode(node, original) {
|
|
@@ -38010,18 +38010,18 @@ var require_typescript = __commonJS({
|
|
|
38010
38010
|
children.unshift(n);
|
|
38011
38011
|
}
|
|
38012
38012
|
}
|
|
38013
|
-
function createSourceFile(
|
|
38013
|
+
function createSourceFile(fileName2, sourceText, languageVersion, setParentNodes, scriptKind) {
|
|
38014
38014
|
if (setParentNodes === void 0) {
|
|
38015
38015
|
setParentNodes = false;
|
|
38016
38016
|
}
|
|
38017
|
-
ts3.tracing === null || ts3.tracing === void 0 ? void 0 : ts3.tracing.push("parse", "createSourceFile", { path:
|
|
38017
|
+
ts3.tracing === null || ts3.tracing === void 0 ? void 0 : ts3.tracing.push("parse", "createSourceFile", { path: fileName2 }, true);
|
|
38018
38018
|
ts3.performance.mark("beforeParse");
|
|
38019
38019
|
var result2;
|
|
38020
|
-
ts3.perfLogger.logStartParseSourceFile(
|
|
38020
|
+
ts3.perfLogger.logStartParseSourceFile(fileName2);
|
|
38021
38021
|
if (languageVersion === 100) {
|
|
38022
|
-
result2 = Parser.parseSourceFile(
|
|
38022
|
+
result2 = Parser.parseSourceFile(fileName2, sourceText, languageVersion, void 0, setParentNodes, 6);
|
|
38023
38023
|
} else {
|
|
38024
|
-
result2 = Parser.parseSourceFile(
|
|
38024
|
+
result2 = Parser.parseSourceFile(fileName2, sourceText, languageVersion, void 0, setParentNodes, scriptKind);
|
|
38025
38025
|
}
|
|
38026
38026
|
ts3.perfLogger.logStopParseSourceFile();
|
|
38027
38027
|
ts3.performance.mark("afterParse");
|
|
@@ -38034,8 +38034,8 @@ var require_typescript = __commonJS({
|
|
|
38034
38034
|
return Parser.parseIsolatedEntityName(text, languageVersion);
|
|
38035
38035
|
}
|
|
38036
38036
|
ts3.parseIsolatedEntityName = parseIsolatedEntityName;
|
|
38037
|
-
function parseJsonText(
|
|
38038
|
-
return Parser.parseJsonText(
|
|
38037
|
+
function parseJsonText(fileName2, sourceText) {
|
|
38038
|
+
return Parser.parseJsonText(fileName2, sourceText);
|
|
38039
38039
|
}
|
|
38040
38040
|
ts3.parseJsonText = parseJsonText;
|
|
38041
38041
|
function isExternalModule(file) {
|
|
@@ -38094,7 +38094,7 @@ var require_typescript = __commonJS({
|
|
|
38094
38094
|
}
|
|
38095
38095
|
};
|
|
38096
38096
|
var factory = ts3.createNodeFactory(1 | 2 | 8, baseNodeFactory);
|
|
38097
|
-
var
|
|
38097
|
+
var fileName2;
|
|
38098
38098
|
var sourceFlags;
|
|
38099
38099
|
var sourceText;
|
|
38100
38100
|
var languageVersion;
|
|
@@ -38113,14 +38113,14 @@ var require_typescript = __commonJS({
|
|
|
38113
38113
|
var contextFlags;
|
|
38114
38114
|
var topLevel = true;
|
|
38115
38115
|
var parseErrorBeforeNextFinishedNode = false;
|
|
38116
|
-
function parseSourceFile(
|
|
38116
|
+
function parseSourceFile(fileName3, sourceText2, languageVersion2, syntaxCursor2, setParentNodes, scriptKind2) {
|
|
38117
38117
|
var _a;
|
|
38118
38118
|
if (setParentNodes === void 0) {
|
|
38119
38119
|
setParentNodes = false;
|
|
38120
38120
|
}
|
|
38121
|
-
scriptKind2 = ts3.ensureScriptKind(
|
|
38121
|
+
scriptKind2 = ts3.ensureScriptKind(fileName3, scriptKind2);
|
|
38122
38122
|
if (scriptKind2 === 6) {
|
|
38123
|
-
var result_3 = parseJsonText2(
|
|
38123
|
+
var result_3 = parseJsonText2(fileName3, sourceText2, languageVersion2, syntaxCursor2, setParentNodes);
|
|
38124
38124
|
ts3.convertToObjectWorker(result_3, (_a = result_3.statements[0]) === null || _a === void 0 ? void 0 : _a.expression, result_3.parseDiagnostics, false, void 0, void 0);
|
|
38125
38125
|
result_3.referencedFiles = ts3.emptyArray;
|
|
38126
38126
|
result_3.typeReferenceDirectives = ts3.emptyArray;
|
|
@@ -38130,7 +38130,7 @@ var require_typescript = __commonJS({
|
|
|
38130
38130
|
result_3.pragmas = ts3.emptyMap;
|
|
38131
38131
|
return result_3;
|
|
38132
38132
|
}
|
|
38133
|
-
initializeState(
|
|
38133
|
+
initializeState(fileName3, sourceText2, languageVersion2, syntaxCursor2, scriptKind2);
|
|
38134
38134
|
var result2 = parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2);
|
|
38135
38135
|
clearState();
|
|
38136
38136
|
return result2;
|
|
@@ -38145,14 +38145,14 @@ var require_typescript = __commonJS({
|
|
|
38145
38145
|
return isInvalid ? entityName : void 0;
|
|
38146
38146
|
}
|
|
38147
38147
|
Parser2.parseIsolatedEntityName = parseIsolatedEntityName2;
|
|
38148
|
-
function parseJsonText2(
|
|
38148
|
+
function parseJsonText2(fileName3, sourceText2, languageVersion2, syntaxCursor2, setParentNodes) {
|
|
38149
38149
|
if (languageVersion2 === void 0) {
|
|
38150
38150
|
languageVersion2 = 2;
|
|
38151
38151
|
}
|
|
38152
38152
|
if (setParentNodes === void 0) {
|
|
38153
38153
|
setParentNodes = false;
|
|
38154
38154
|
}
|
|
38155
|
-
initializeState(
|
|
38155
|
+
initializeState(fileName3, sourceText2, languageVersion2, syntaxCursor2, 6);
|
|
38156
38156
|
sourceFlags = contextFlags;
|
|
38157
38157
|
nextToken();
|
|
38158
38158
|
var pos = getNodePos();
|
|
@@ -38211,7 +38211,7 @@ var require_typescript = __commonJS({
|
|
|
38211
38211
|
statements = createNodeArray([statement], pos);
|
|
38212
38212
|
endOfFileToken = parseExpectedToken(1, ts3.Diagnostics.Unexpected_token);
|
|
38213
38213
|
}
|
|
38214
|
-
var sourceFile = createSourceFile2(
|
|
38214
|
+
var sourceFile = createSourceFile2(fileName3, 2, 6, false, statements, endOfFileToken, sourceFlags);
|
|
38215
38215
|
if (setParentNodes) {
|
|
38216
38216
|
fixupParentReferences(sourceFile);
|
|
38217
38217
|
}
|
|
@@ -38233,7 +38233,7 @@ var require_typescript = __commonJS({
|
|
|
38233
38233
|
IdentifierConstructor2 = ts3.objectAllocator.getIdentifierConstructor();
|
|
38234
38234
|
PrivateIdentifierConstructor2 = ts3.objectAllocator.getPrivateIdentifierConstructor();
|
|
38235
38235
|
SourceFileConstructor2 = ts3.objectAllocator.getSourceFileConstructor();
|
|
38236
|
-
|
|
38236
|
+
fileName2 = ts3.normalizePath(_fileName);
|
|
38237
38237
|
sourceText = _sourceText;
|
|
38238
38238
|
languageVersion = _languageVersion;
|
|
38239
38239
|
syntaxCursor = _syntaxCursor;
|
|
@@ -38283,7 +38283,7 @@ var require_typescript = __commonJS({
|
|
|
38283
38283
|
topLevel = true;
|
|
38284
38284
|
}
|
|
38285
38285
|
function parseSourceFileWorker(languageVersion2, setParentNodes, scriptKind2) {
|
|
38286
|
-
var isDeclarationFile = isDeclarationFileName(
|
|
38286
|
+
var isDeclarationFile = isDeclarationFileName(fileName2);
|
|
38287
38287
|
if (isDeclarationFile) {
|
|
38288
38288
|
contextFlags |= 8388608;
|
|
38289
38289
|
}
|
|
@@ -38292,7 +38292,7 @@ var require_typescript = __commonJS({
|
|
|
38292
38292
|
var statements = parseList(0, parseStatement);
|
|
38293
38293
|
ts3.Debug.assert(token() === 1);
|
|
38294
38294
|
var endOfFileToken = addJSDocComment(parseTokenNode());
|
|
38295
|
-
var sourceFile = createSourceFile2(
|
|
38295
|
+
var sourceFile = createSourceFile2(fileName2, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, sourceFlags);
|
|
38296
38296
|
processCommentPragmas(sourceFile, sourceText);
|
|
38297
38297
|
processPragmasIntoFields(sourceFile, reportPragmaDiagnostic);
|
|
38298
38298
|
sourceFile.commentDirectives = scanner.getCommentDirectives();
|
|
@@ -38308,7 +38308,7 @@ var require_typescript = __commonJS({
|
|
|
38308
38308
|
}
|
|
38309
38309
|
return sourceFile;
|
|
38310
38310
|
function reportPragmaDiagnostic(pos, end, diagnostic) {
|
|
38311
|
-
parseDiagnostics.push(ts3.createDetachedDiagnostic(
|
|
38311
|
+
parseDiagnostics.push(ts3.createDetachedDiagnostic(fileName2, pos, end, diagnostic));
|
|
38312
38312
|
}
|
|
38313
38313
|
}
|
|
38314
38314
|
function withJSDoc(node, hasJSDoc) {
|
|
@@ -38423,7 +38423,7 @@ var require_typescript = __commonJS({
|
|
|
38423
38423
|
ts3.setParentRecursive(rootNode, true);
|
|
38424
38424
|
}
|
|
38425
38425
|
Parser2.fixupParentReferences = fixupParentReferences;
|
|
38426
|
-
function createSourceFile2(
|
|
38426
|
+
function createSourceFile2(fileName3, languageVersion2, scriptKind2, isDeclarationFile, statements, endOfFileToken, flags) {
|
|
38427
38427
|
var sourceFile = factory.createSourceFile(statements, endOfFileToken, flags);
|
|
38428
38428
|
ts3.setTextRangePosWidth(sourceFile, 0, sourceText.length);
|
|
38429
38429
|
setExternalModuleIndicator(sourceFile);
|
|
@@ -38434,7 +38434,7 @@ var require_typescript = __commonJS({
|
|
|
38434
38434
|
sourceFile.bindDiagnostics = [];
|
|
38435
38435
|
sourceFile.bindSuggestionDiagnostics = void 0;
|
|
38436
38436
|
sourceFile.languageVersion = languageVersion2;
|
|
38437
|
-
sourceFile.fileName =
|
|
38437
|
+
sourceFile.fileName = fileName3;
|
|
38438
38438
|
sourceFile.languageVariant = ts3.getLanguageVariant(scriptKind2);
|
|
38439
38439
|
sourceFile.isDeclarationFile = isDeclarationFile;
|
|
38440
38440
|
sourceFile.scriptKind = scriptKind2;
|
|
@@ -38524,7 +38524,7 @@ var require_typescript = __commonJS({
|
|
|
38524
38524
|
function parseErrorAtPosition(start, length, message, arg0) {
|
|
38525
38525
|
var lastError = ts3.lastOrUndefined(parseDiagnostics);
|
|
38526
38526
|
if (!lastError || start !== lastError.start) {
|
|
38527
|
-
parseDiagnostics.push(ts3.createDetachedDiagnostic(
|
|
38527
|
+
parseDiagnostics.push(ts3.createDetachedDiagnostic(fileName2, start, length, message, arg0));
|
|
38528
38528
|
}
|
|
38529
38529
|
parseErrorBeforeNextFinishedNode = true;
|
|
38530
38530
|
}
|
|
@@ -41216,7 +41216,7 @@ var require_typescript = __commonJS({
|
|
|
41216
41216
|
if (!parseExpected(19)) {
|
|
41217
41217
|
var lastError = ts3.lastOrUndefined(parseDiagnostics);
|
|
41218
41218
|
if (lastError && lastError.code === ts3.Diagnostics._0_expected.code) {
|
|
41219
|
-
ts3.addRelatedInfo(lastError, ts3.createDetachedDiagnostic(
|
|
41219
|
+
ts3.addRelatedInfo(lastError, ts3.createDetachedDiagnostic(fileName2, openBracePosition, 1, ts3.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
|
|
41220
41220
|
}
|
|
41221
41221
|
}
|
|
41222
41222
|
return finishNode(factory.createObjectLiteralExpression(properties, multiLine), pos);
|
|
@@ -41285,7 +41285,7 @@ var require_typescript = __commonJS({
|
|
|
41285
41285
|
if (!parseExpected(19)) {
|
|
41286
41286
|
var lastError = ts3.lastOrUndefined(parseDiagnostics);
|
|
41287
41287
|
if (lastError && lastError.code === ts3.Diagnostics._0_expected.code) {
|
|
41288
|
-
ts3.addRelatedInfo(lastError, ts3.createDetachedDiagnostic(
|
|
41288
|
+
ts3.addRelatedInfo(lastError, ts3.createDetachedDiagnostic(fileName2, openBracePosition, 1, ts3.Diagnostics.The_parser_expected_to_find_a_to_match_the_token_here));
|
|
41289
41289
|
}
|
|
41290
41290
|
}
|
|
41291
41291
|
var result2 = withJSDoc(finishNode(factory.createBlock(statements, multiLine), pos), hasJSDoc);
|
|
@@ -43157,7 +43157,7 @@ var require_typescript = __commonJS({
|
|
|
43157
43157
|
parseErrorAtCurrentToken(ts3.Diagnostics.A_JSDoc_typedef_comment_may_not_contain_multiple_type_tags);
|
|
43158
43158
|
var lastError = ts3.lastOrUndefined(parseDiagnostics);
|
|
43159
43159
|
if (lastError) {
|
|
43160
|
-
ts3.addRelatedInfo(lastError, ts3.createDetachedDiagnostic(
|
|
43160
|
+
ts3.addRelatedInfo(lastError, ts3.createDetachedDiagnostic(fileName2, 0, 0, ts3.Diagnostics.The_tag_was_first_specified_here));
|
|
43161
43161
|
}
|
|
43162
43162
|
break;
|
|
43163
43163
|
} else {
|
|
@@ -43683,8 +43683,8 @@ var require_typescript = __commonJS({
|
|
|
43683
43683
|
InvalidPosition2[InvalidPosition2["Value"] = -1] = "Value";
|
|
43684
43684
|
})(InvalidPosition || (InvalidPosition = {}));
|
|
43685
43685
|
})(IncrementalParser || (IncrementalParser = {}));
|
|
43686
|
-
function isDeclarationFileName(
|
|
43687
|
-
return ts3.fileExtensionIs(
|
|
43686
|
+
function isDeclarationFileName(fileName2) {
|
|
43687
|
+
return ts3.fileExtensionIs(fileName2, ".d.ts");
|
|
43688
43688
|
}
|
|
43689
43689
|
ts3.isDeclarationFileName = isDeclarationFileName;
|
|
43690
43690
|
function processCommentPragmas(context, sourceText) {
|
|
@@ -45146,9 +45146,9 @@ var require_typescript = __commonJS({
|
|
|
45146
45146
|
}
|
|
45147
45147
|
}
|
|
45148
45148
|
}
|
|
45149
|
-
function parseResponseFile(
|
|
45150
|
-
var text = tryReadFile(
|
|
45151
|
-
return ts3.sys.readFile(
|
|
45149
|
+
function parseResponseFile(fileName2) {
|
|
45150
|
+
var text = tryReadFile(fileName2, readFile || function(fileName3) {
|
|
45151
|
+
return ts3.sys.readFile(fileName3);
|
|
45152
45152
|
});
|
|
45153
45153
|
if (!ts3.isString(text)) {
|
|
45154
45154
|
errors.push(text);
|
|
@@ -45170,7 +45170,7 @@ var require_typescript = __commonJS({
|
|
|
45170
45170
|
args.push(text.substring(start + 1, pos));
|
|
45171
45171
|
pos++;
|
|
45172
45172
|
} else {
|
|
45173
|
-
errors.push(ts3.createCompilerDiagnostic(ts3.Diagnostics.Unterminated_quoted_string_in_response_file_0,
|
|
45173
|
+
errors.push(ts3.createCompilerDiagnostic(ts3.Diagnostics.Unterminated_quoted_string_in_response_file_0, fileName2));
|
|
45174
45174
|
}
|
|
45175
45175
|
} else {
|
|
45176
45176
|
while (text.charCodeAt(pos) > 32)
|
|
@@ -45319,8 +45319,8 @@ var require_typescript = __commonJS({
|
|
|
45319
45319
|
}
|
|
45320
45320
|
ts3.getDiagnosticText = getDiagnosticText;
|
|
45321
45321
|
function getParsedCommandLineOfConfigFile(configFileName, optionsToExtend, host, extendedConfigCache, watchOptionsToExtend, extraFileExtensions) {
|
|
45322
|
-
var configFileText = tryReadFile(configFileName, function(
|
|
45323
|
-
return host.readFile(
|
|
45322
|
+
var configFileText = tryReadFile(configFileName, function(fileName2) {
|
|
45323
|
+
return host.readFile(fileName2);
|
|
45324
45324
|
});
|
|
45325
45325
|
if (!ts3.isString(configFileText)) {
|
|
45326
45326
|
host.onUnRecoverableConfigFileDiagnostic(configFileText);
|
|
@@ -45334,32 +45334,32 @@ var require_typescript = __commonJS({
|
|
|
45334
45334
|
return parseJsonSourceFileConfigFileContent(result2, host, ts3.getNormalizedAbsolutePath(ts3.getDirectoryPath(configFileName), cwd), optionsToExtend, ts3.getNormalizedAbsolutePath(configFileName, cwd), void 0, extraFileExtensions, extendedConfigCache, watchOptionsToExtend);
|
|
45335
45335
|
}
|
|
45336
45336
|
ts3.getParsedCommandLineOfConfigFile = getParsedCommandLineOfConfigFile;
|
|
45337
|
-
function readConfigFile(
|
|
45338
|
-
var textOrDiagnostic = tryReadFile(
|
|
45339
|
-
return ts3.isString(textOrDiagnostic) ? parseConfigFileTextToJson(
|
|
45337
|
+
function readConfigFile(fileName2, readFile) {
|
|
45338
|
+
var textOrDiagnostic = tryReadFile(fileName2, readFile);
|
|
45339
|
+
return ts3.isString(textOrDiagnostic) ? parseConfigFileTextToJson(fileName2, textOrDiagnostic) : { config: {}, error: textOrDiagnostic };
|
|
45340
45340
|
}
|
|
45341
45341
|
ts3.readConfigFile = readConfigFile;
|
|
45342
|
-
function parseConfigFileTextToJson(
|
|
45343
|
-
var jsonSourceFile = ts3.parseJsonText(
|
|
45342
|
+
function parseConfigFileTextToJson(fileName2, jsonText) {
|
|
45343
|
+
var jsonSourceFile = ts3.parseJsonText(fileName2, jsonText);
|
|
45344
45344
|
return {
|
|
45345
45345
|
config: convertConfigFileToObject(jsonSourceFile, jsonSourceFile.parseDiagnostics, false, void 0),
|
|
45346
45346
|
error: jsonSourceFile.parseDiagnostics.length ? jsonSourceFile.parseDiagnostics[0] : void 0
|
|
45347
45347
|
};
|
|
45348
45348
|
}
|
|
45349
45349
|
ts3.parseConfigFileTextToJson = parseConfigFileTextToJson;
|
|
45350
|
-
function readJsonConfigFile(
|
|
45351
|
-
var textOrDiagnostic = tryReadFile(
|
|
45352
|
-
return ts3.isString(textOrDiagnostic) ? ts3.parseJsonText(
|
|
45350
|
+
function readJsonConfigFile(fileName2, readFile) {
|
|
45351
|
+
var textOrDiagnostic = tryReadFile(fileName2, readFile);
|
|
45352
|
+
return ts3.isString(textOrDiagnostic) ? ts3.parseJsonText(fileName2, textOrDiagnostic) : { fileName: fileName2, parseDiagnostics: [textOrDiagnostic] };
|
|
45353
45353
|
}
|
|
45354
45354
|
ts3.readJsonConfigFile = readJsonConfigFile;
|
|
45355
|
-
function tryReadFile(
|
|
45355
|
+
function tryReadFile(fileName2, readFile) {
|
|
45356
45356
|
var text;
|
|
45357
45357
|
try {
|
|
45358
|
-
text = readFile(
|
|
45358
|
+
text = readFile(fileName2);
|
|
45359
45359
|
} catch (e) {
|
|
45360
|
-
return ts3.createCompilerDiagnostic(ts3.Diagnostics.Cannot_read_file_0_Colon_1,
|
|
45360
|
+
return ts3.createCompilerDiagnostic(ts3.Diagnostics.Cannot_read_file_0_Colon_1, fileName2, e.message);
|
|
45361
45361
|
}
|
|
45362
|
-
return text === void 0 ? ts3.createCompilerDiagnostic(ts3.Diagnostics.Cannot_read_file_0,
|
|
45362
|
+
return text === void 0 ? ts3.createCompilerDiagnostic(ts3.Diagnostics.Cannot_read_file_0, fileName2) : text;
|
|
45363
45363
|
}
|
|
45364
45364
|
ts3.tryReadFile = tryReadFile;
|
|
45365
45365
|
function commandLineOptionsToMap(options) {
|
|
@@ -45899,8 +45899,8 @@ var require_typescript = __commonJS({
|
|
|
45899
45899
|
function isNullOrUndefined(x) {
|
|
45900
45900
|
return x === void 0 || x === null;
|
|
45901
45901
|
}
|
|
45902
|
-
function directoryOfCombinedPath(
|
|
45903
|
-
return ts3.getDirectoryPath(ts3.getNormalizedAbsolutePath(
|
|
45902
|
+
function directoryOfCombinedPath(fileName2, basePath) {
|
|
45903
|
+
return ts3.getDirectoryPath(ts3.getNormalizedAbsolutePath(fileName2, basePath));
|
|
45904
45904
|
}
|
|
45905
45905
|
function parseJsonConfigFileContentWorker(json2, sourceFile, host, basePath, existingOptions, existingWatchOptions, configFileName, resolutionStack, extraFileExtensions, extendedConfigCache) {
|
|
45906
45906
|
if (existingOptions === void 0) {
|
|
@@ -45945,12 +45945,12 @@ var require_typescript = __commonJS({
|
|
|
45945
45945
|
var hasExtends = ts3.hasProperty(raw, "extends");
|
|
45946
45946
|
if (filesSpecs.length === 0 && hasZeroOrNoReferences && !hasExtends) {
|
|
45947
45947
|
if (sourceFile) {
|
|
45948
|
-
var
|
|
45948
|
+
var fileName2 = configFileName || "tsconfig.json";
|
|
45949
45949
|
var diagnosticMessage = ts3.Diagnostics.The_files_list_in_config_file_0_is_empty;
|
|
45950
45950
|
var nodeValue = ts3.firstDefined(ts3.getTsConfigPropArray(sourceFile, "files"), function(property) {
|
|
45951
45951
|
return property.initializer;
|
|
45952
45952
|
});
|
|
45953
|
-
var error = nodeValue ? ts3.createDiagnosticForNodeInSourceFile(sourceFile, nodeValue, diagnosticMessage,
|
|
45953
|
+
var error = nodeValue ? ts3.createDiagnosticForNodeInSourceFile(sourceFile, nodeValue, diagnosticMessage, fileName2) : ts3.createCompilerDiagnostic(diagnosticMessage, fileName2);
|
|
45954
45954
|
errors.push(error);
|
|
45955
45955
|
} else {
|
|
45956
45956
|
createCompilerDiagnosticOnlyIfJson(ts3.Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json");
|
|
@@ -46385,8 +46385,8 @@ var require_typescript = __commonJS({
|
|
|
46385
46385
|
var supportedExtensionsWithJsonIfResolveJsonModule = ts3.getSuppoertedExtensionsWithJsonIfResolveJsonModule(options, supportedExtensions);
|
|
46386
46386
|
if (validatedFilesSpec) {
|
|
46387
46387
|
for (var _i = 0, validatedFilesSpec_1 = validatedFilesSpec; _i < validatedFilesSpec_1.length; _i++) {
|
|
46388
|
-
var
|
|
46389
|
-
var file = ts3.getNormalizedAbsolutePath(
|
|
46388
|
+
var fileName2 = validatedFilesSpec_1[_i];
|
|
46389
|
+
var file = ts3.getNormalizedAbsolutePath(fileName2, basePath);
|
|
46390
46390
|
literalFileMap.set(keyMapper(file), file);
|
|
46391
46391
|
}
|
|
46392
46392
|
}
|
|
@@ -46443,8 +46443,8 @@ var require_typescript = __commonJS({
|
|
|
46443
46443
|
var keyMapper = ts3.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
46444
46444
|
if (validatedFilesSpec) {
|
|
46445
46445
|
for (var _i = 0, validatedFilesSpec_2 = validatedFilesSpec; _i < validatedFilesSpec_2.length; _i++) {
|
|
46446
|
-
var
|
|
46447
|
-
if (keyMapper(ts3.getNormalizedAbsolutePath(
|
|
46446
|
+
var fileName2 = validatedFilesSpec_2[_i];
|
|
46447
|
+
if (keyMapper(ts3.getNormalizedAbsolutePath(fileName2, basePath)) === pathToCheck)
|
|
46448
46448
|
return false;
|
|
46449
46449
|
}
|
|
46450
46450
|
}
|
|
@@ -46676,19 +46676,19 @@ var require_typescript = __commonJS({
|
|
|
46676
46676
|
return value;
|
|
46677
46677
|
}
|
|
46678
46678
|
function readPackageJsonPathField(jsonContent, fieldName, baseDirectory, state) {
|
|
46679
|
-
var
|
|
46680
|
-
if (
|
|
46679
|
+
var fileName2 = readPackageJsonField(jsonContent, fieldName, "string", state);
|
|
46680
|
+
if (fileName2 === void 0) {
|
|
46681
46681
|
return;
|
|
46682
46682
|
}
|
|
46683
|
-
if (!
|
|
46683
|
+
if (!fileName2) {
|
|
46684
46684
|
if (state.traceEnabled) {
|
|
46685
46685
|
trace(state.host, ts3.Diagnostics.package_json_had_a_falsy_0_field, fieldName);
|
|
46686
46686
|
}
|
|
46687
46687
|
return;
|
|
46688
46688
|
}
|
|
46689
|
-
var path2 = ts3.normalizePath(ts3.combinePaths(baseDirectory,
|
|
46689
|
+
var path2 = ts3.normalizePath(ts3.combinePaths(baseDirectory, fileName2));
|
|
46690
46690
|
if (state.traceEnabled) {
|
|
46691
|
-
trace(state.host, ts3.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName,
|
|
46691
|
+
trace(state.host, ts3.Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName2, path2);
|
|
46692
46692
|
}
|
|
46693
46693
|
return path2;
|
|
46694
46694
|
}
|
|
@@ -46831,14 +46831,14 @@ var require_typescript = __commonJS({
|
|
|
46831
46831
|
}
|
|
46832
46832
|
var resolvedTypeReferenceDirective;
|
|
46833
46833
|
if (resolved) {
|
|
46834
|
-
var
|
|
46835
|
-
var resolvedFileName = options.preserveSymlinks ?
|
|
46834
|
+
var fileName2 = resolved.fileName, packageId = resolved.packageId;
|
|
46835
|
+
var resolvedFileName = options.preserveSymlinks ? fileName2 : realPath(fileName2, host, traceEnabled);
|
|
46836
46836
|
resolvedTypeReferenceDirective = {
|
|
46837
46837
|
primary,
|
|
46838
46838
|
resolvedFileName,
|
|
46839
|
-
originalPath:
|
|
46839
|
+
originalPath: fileName2 === resolvedFileName ? void 0 : fileName2,
|
|
46840
46840
|
packageId,
|
|
46841
|
-
isExternalLibraryImport: pathContainsNodeModules(
|
|
46841
|
+
isExternalLibraryImport: pathContainsNodeModules(fileName2)
|
|
46842
46842
|
};
|
|
46843
46843
|
}
|
|
46844
46844
|
result2 = { resolvedTypeReferenceDirective, failedLookupLocations };
|
|
@@ -47446,20 +47446,20 @@ var require_typescript = __commonJS({
|
|
|
47446
47446
|
return path2 === void 0 ? void 0 : { path: path2, ext };
|
|
47447
47447
|
}
|
|
47448
47448
|
}
|
|
47449
|
-
function tryFile(
|
|
47449
|
+
function tryFile(fileName2, onlyRecordFailures, state) {
|
|
47450
47450
|
if (!onlyRecordFailures) {
|
|
47451
|
-
if (state.host.fileExists(
|
|
47451
|
+
if (state.host.fileExists(fileName2)) {
|
|
47452
47452
|
if (state.traceEnabled) {
|
|
47453
|
-
trace(state.host, ts3.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result,
|
|
47453
|
+
trace(state.host, ts3.Diagnostics.File_0_exist_use_it_as_a_name_resolution_result, fileName2);
|
|
47454
47454
|
}
|
|
47455
|
-
return
|
|
47455
|
+
return fileName2;
|
|
47456
47456
|
} else {
|
|
47457
47457
|
if (state.traceEnabled) {
|
|
47458
|
-
trace(state.host, ts3.Diagnostics.File_0_does_not_exist,
|
|
47458
|
+
trace(state.host, ts3.Diagnostics.File_0_does_not_exist, fileName2);
|
|
47459
47459
|
}
|
|
47460
47460
|
}
|
|
47461
47461
|
}
|
|
47462
|
-
state.failedLookupLocations.push(
|
|
47462
|
+
state.failedLookupLocations.push(fileName2);
|
|
47463
47463
|
return void 0;
|
|
47464
47464
|
}
|
|
47465
47465
|
function loadNodeModuleFromDirectory(extensions, candidate, onlyRecordFailures, state, considerPackageJson) {
|
|
@@ -54180,14 +54180,14 @@ var require_typescript = __commonJS({
|
|
|
54180
54180
|
getSymlinkCache: ts3.maybeBind(host, host.getSymlinkCache),
|
|
54181
54181
|
useCaseSensitiveFileNames: ts3.maybeBind(host, host.useCaseSensitiveFileNames),
|
|
54182
54182
|
redirectTargetsMap: host.redirectTargetsMap,
|
|
54183
|
-
getProjectReferenceRedirect: function(
|
|
54184
|
-
return host.getProjectReferenceRedirect(
|
|
54183
|
+
getProjectReferenceRedirect: function(fileName2) {
|
|
54184
|
+
return host.getProjectReferenceRedirect(fileName2);
|
|
54185
54185
|
},
|
|
54186
|
-
isSourceOfProjectReferenceRedirect: function(
|
|
54187
|
-
return host.isSourceOfProjectReferenceRedirect(
|
|
54186
|
+
isSourceOfProjectReferenceRedirect: function(fileName2) {
|
|
54187
|
+
return host.isSourceOfProjectReferenceRedirect(fileName2);
|
|
54188
54188
|
},
|
|
54189
|
-
fileExists: function(
|
|
54190
|
-
return host.fileExists(
|
|
54189
|
+
fileExists: function(fileName2) {
|
|
54190
|
+
return host.fileExists(fileName2);
|
|
54191
54191
|
},
|
|
54192
54192
|
getFileIncludeReasons: function() {
|
|
54193
54193
|
return host.getFileIncludeReasons();
|
|
@@ -81456,8 +81456,8 @@ var require_typescript = __commonJS({
|
|
|
81456
81456
|
return;
|
|
81457
81457
|
fileToDirective.set(file.path, key);
|
|
81458
81458
|
for (var _i = 0, _a = file.referencedFiles; _i < _a.length; _i++) {
|
|
81459
|
-
var
|
|
81460
|
-
var resolvedFile = ts3.resolveTripleslashReference(
|
|
81459
|
+
var fileName2 = _a[_i].fileName;
|
|
81460
|
+
var resolvedFile = ts3.resolveTripleslashReference(fileName2, file.fileName);
|
|
81461
81461
|
var referencedFile = host.getSourceFile(resolvedFile);
|
|
81462
81462
|
if (referencedFile) {
|
|
81463
81463
|
addReferencedFilesToTypeDirective(referencedFile, key);
|
|
@@ -83678,14 +83678,14 @@ var require_typescript = __commonJS({
|
|
|
83678
83678
|
return JSON.stringify(toJSON());
|
|
83679
83679
|
}
|
|
83680
83680
|
};
|
|
83681
|
-
function addSource(
|
|
83681
|
+
function addSource(fileName2) {
|
|
83682
83682
|
enter();
|
|
83683
|
-
var source = ts3.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath,
|
|
83683
|
+
var source = ts3.getRelativePathToDirectoryOrUrl(sourcesDirectoryPath, fileName2, host.getCurrentDirectory(), host.getCanonicalFileName, true);
|
|
83684
83684
|
var sourceIndex = sourceToSourceIndexMap.get(source);
|
|
83685
83685
|
if (sourceIndex === void 0) {
|
|
83686
83686
|
sourceIndex = sources.length;
|
|
83687
83687
|
sources.push(source);
|
|
83688
|
-
rawSources.push(
|
|
83688
|
+
rawSources.push(fileName2);
|
|
83689
83689
|
sourceToSourceIndexMap.set(source, sourceIndex);
|
|
83690
83690
|
}
|
|
83691
83691
|
exit();
|
|
@@ -95319,14 +95319,14 @@ var require_typescript = __commonJS({
|
|
|
95319
95319
|
recordTypeReferenceDirectivesIfNecessary([specifier]);
|
|
95320
95320
|
return;
|
|
95321
95321
|
}
|
|
95322
|
-
var
|
|
95323
|
-
if (ts3.startsWith(
|
|
95324
|
-
|
|
95322
|
+
var fileName2 = ts3.getRelativePathToDirectoryOrUrl(outputFilePath2, declFileName, host.getCurrentDirectory(), host.getCanonicalFileName, false);
|
|
95323
|
+
if (ts3.startsWith(fileName2, "./") && ts3.hasExtension(fileName2)) {
|
|
95324
|
+
fileName2 = fileName2.substring(2);
|
|
95325
95325
|
}
|
|
95326
|
-
if (ts3.startsWith(
|
|
95326
|
+
if (ts3.startsWith(fileName2, "node_modules/") || ts3.pathContainsNodeModules(fileName2)) {
|
|
95327
95327
|
return;
|
|
95328
95328
|
}
|
|
95329
|
-
references2.push({ pos: -1, end: -1, fileName });
|
|
95329
|
+
references2.push({ pos: -1, end: -1, fileName: fileName2 });
|
|
95330
95330
|
}
|
|
95331
95331
|
};
|
|
95332
95332
|
}
|
|
@@ -97229,7 +97229,7 @@ var require_typescript = __commonJS({
|
|
|
97229
97229
|
var prologueMap = ((_a = jsBundle.sources) === null || _a === void 0 ? void 0 : _a.prologues) && ts3.arrayToMap(jsBundle.sources.prologues, function(prologueInfo) {
|
|
97230
97230
|
return prologueInfo.file;
|
|
97231
97231
|
});
|
|
97232
|
-
return bundle.sourceFiles.map(function(
|
|
97232
|
+
return bundle.sourceFiles.map(function(fileName2, index) {
|
|
97233
97233
|
var _a2, _b;
|
|
97234
97234
|
var prologueInfo = prologueMap === null || prologueMap === void 0 ? void 0 : prologueMap.get(index);
|
|
97235
97235
|
var statements = prologueInfo === null || prologueInfo === void 0 ? void 0 : prologueInfo.directives.map(function(directive) {
|
|
@@ -97240,7 +97240,7 @@ var require_typescript = __commonJS({
|
|
|
97240
97240
|
});
|
|
97241
97241
|
var eofToken = ts3.factory.createToken(1);
|
|
97242
97242
|
var sourceFile = ts3.factory.createSourceFile(statements !== null && statements !== void 0 ? statements : [], eofToken, 0);
|
|
97243
|
-
sourceFile.fileName = ts3.getRelativePathFromDirectory(host.getCurrentDirectory(), ts3.getNormalizedAbsolutePath(
|
|
97243
|
+
sourceFile.fileName = ts3.getRelativePathFromDirectory(host.getCurrentDirectory(), ts3.getNormalizedAbsolutePath(fileName2, buildInfoDirectory), !host.useCaseSensitiveFileNames());
|
|
97244
97244
|
sourceFile.text = (_a2 = prologueInfo === null || prologueInfo === void 0 ? void 0 : prologueInfo.text) !== null && _a2 !== void 0 ? _a2 : "";
|
|
97245
97245
|
ts3.setTextRangePosWidth(sourceFile, 0, (_b = prologueInfo === null || prologueInfo === void 0 ? void 0 : prologueInfo.text.length) !== null && _b !== void 0 ? _b : 0);
|
|
97246
97246
|
ts3.setEachParent(sourceFile.statements, sourceFile);
|
|
@@ -101211,8 +101211,8 @@ var require_typescript = __commonJS({
|
|
|
101211
101211
|
clearCache,
|
|
101212
101212
|
realpath: host.realpath && realpath
|
|
101213
101213
|
};
|
|
101214
|
-
function toPath(
|
|
101215
|
-
return ts3.toPath(
|
|
101214
|
+
function toPath(fileName2) {
|
|
101215
|
+
return ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
101216
101216
|
}
|
|
101217
101217
|
function getCachedFileSystemEntries(rootDirPath) {
|
|
101218
101218
|
return cachedReadDirectoryResult.get(ts3.ensureTrailingDirectorySeparator(rootDirPath));
|
|
@@ -101220,8 +101220,8 @@ var require_typescript = __commonJS({
|
|
|
101220
101220
|
function getCachedFileSystemEntriesForBaseDir(path2) {
|
|
101221
101221
|
return getCachedFileSystemEntries(ts3.getDirectoryPath(path2));
|
|
101222
101222
|
}
|
|
101223
|
-
function getBaseNameOfFileName(
|
|
101224
|
-
return ts3.getBaseFileName(ts3.normalizePath(
|
|
101223
|
+
function getBaseNameOfFileName(fileName2) {
|
|
101224
|
+
return ts3.getBaseFileName(ts3.normalizePath(fileName2));
|
|
101225
101225
|
}
|
|
101226
101226
|
function createCachedFileSystemEntries(rootDir, rootDirPath) {
|
|
101227
101227
|
var _a;
|
|
@@ -101271,18 +101271,18 @@ var require_typescript = __commonJS({
|
|
|
101271
101271
|
return entries.push(baseName);
|
|
101272
101272
|
}
|
|
101273
101273
|
}
|
|
101274
|
-
function writeFile(
|
|
101275
|
-
var path2 = toPath(
|
|
101274
|
+
function writeFile(fileName2, data, writeByteOrderMark) {
|
|
101275
|
+
var path2 = toPath(fileName2);
|
|
101276
101276
|
var result2 = getCachedFileSystemEntriesForBaseDir(path2);
|
|
101277
101277
|
if (result2) {
|
|
101278
|
-
updateFilesOfFileSystemEntry(result2, getBaseNameOfFileName(
|
|
101278
|
+
updateFilesOfFileSystemEntry(result2, getBaseNameOfFileName(fileName2), true);
|
|
101279
101279
|
}
|
|
101280
|
-
return host.writeFile(
|
|
101280
|
+
return host.writeFile(fileName2, data, writeByteOrderMark);
|
|
101281
101281
|
}
|
|
101282
|
-
function fileExists(
|
|
101283
|
-
var path2 = toPath(
|
|
101282
|
+
function fileExists(fileName2) {
|
|
101283
|
+
var path2 = toPath(fileName2);
|
|
101284
101284
|
var result2 = getCachedFileSystemEntriesForBaseDir(path2);
|
|
101285
|
-
return result2 && hasEntry(result2.files, getBaseNameOfFileName(
|
|
101285
|
+
return result2 && hasEntry(result2.files, getBaseNameOfFileName(fileName2)) || host.fileExists(fileName2);
|
|
101286
101286
|
}
|
|
101287
101287
|
function directoryExists(dirPath) {
|
|
101288
101288
|
var path2 = toPath(dirPath);
|
|
@@ -101362,13 +101362,13 @@ var require_typescript = __commonJS({
|
|
|
101362
101362
|
}
|
|
101363
101363
|
return fsQueryResult;
|
|
101364
101364
|
}
|
|
101365
|
-
function addOrDeleteFile(
|
|
101365
|
+
function addOrDeleteFile(fileName2, filePath, eventKind) {
|
|
101366
101366
|
if (eventKind === ts3.FileWatcherEventKind.Changed) {
|
|
101367
101367
|
return;
|
|
101368
101368
|
}
|
|
101369
101369
|
var parentResult = getCachedFileSystemEntriesForBaseDir(filePath);
|
|
101370
101370
|
if (parentResult) {
|
|
101371
|
-
updateFilesOfFileSystemEntry(parentResult, getBaseNameOfFileName(
|
|
101371
|
+
updateFilesOfFileSystemEntry(parentResult, getBaseNameOfFileName(fileName2), eventKind === ts3.FileWatcherEventKind.Created);
|
|
101372
101372
|
}
|
|
101373
101373
|
}
|
|
101374
101374
|
function updateFilesOfFileSystemEntry(parentResult, baseName, fileExists2) {
|
|
@@ -101632,8 +101632,8 @@ var require_typescript = __commonJS({
|
|
|
101632
101632
|
configName = "tsconfig.json";
|
|
101633
101633
|
}
|
|
101634
101634
|
return ts3.forEachAncestorDirectory(searchPath, function(ancestor) {
|
|
101635
|
-
var
|
|
101636
|
-
return fileExists(
|
|
101635
|
+
var fileName2 = ts3.combinePaths(ancestor, configName);
|
|
101636
|
+
return fileExists(fileName2) ? fileName2 : void 0;
|
|
101637
101637
|
});
|
|
101638
101638
|
}
|
|
101639
101639
|
ts3.findConfigFile = findConfigFile;
|
|
@@ -101686,11 +101686,11 @@ var require_typescript = __commonJS({
|
|
|
101686
101686
|
var existingDirectories = new ts3.Map();
|
|
101687
101687
|
var getCanonicalFileName = ts3.createGetCanonicalFileName(system.useCaseSensitiveFileNames);
|
|
101688
101688
|
var computeHash = ts3.maybeBind(system, system.createHash) || ts3.generateDjb2Hash;
|
|
101689
|
-
function getSourceFile(
|
|
101689
|
+
function getSourceFile(fileName2, languageVersion, onError) {
|
|
101690
101690
|
var text;
|
|
101691
101691
|
try {
|
|
101692
101692
|
ts3.performance.mark("beforeIORead");
|
|
101693
|
-
text = compilerHost.readFile(
|
|
101693
|
+
text = compilerHost.readFile(fileName2);
|
|
101694
101694
|
ts3.performance.mark("afterIORead");
|
|
101695
101695
|
ts3.performance.measure("I/O Read", "beforeIORead", "afterIORead");
|
|
101696
101696
|
} catch (e) {
|
|
@@ -101699,7 +101699,7 @@ var require_typescript = __commonJS({
|
|
|
101699
101699
|
}
|
|
101700
101700
|
text = "";
|
|
101701
101701
|
}
|
|
101702
|
-
return text !== void 0 ? ts3.createSourceFile(
|
|
101702
|
+
return text !== void 0 ? ts3.createSourceFile(fileName2, text, languageVersion, setParentNodes) : void 0;
|
|
101703
101703
|
}
|
|
101704
101704
|
function directoryExists(directoryPath) {
|
|
101705
101705
|
if (existingDirectories.has(directoryPath)) {
|
|
@@ -101711,10 +101711,10 @@ var require_typescript = __commonJS({
|
|
|
101711
101711
|
}
|
|
101712
101712
|
return false;
|
|
101713
101713
|
}
|
|
101714
|
-
function writeFile(
|
|
101714
|
+
function writeFile(fileName2, data, writeByteOrderMark, onError) {
|
|
101715
101715
|
try {
|
|
101716
101716
|
ts3.performance.mark("beforeIOWrite");
|
|
101717
|
-
ts3.writeFileEnsuringDirectories(
|
|
101717
|
+
ts3.writeFileEnsuringDirectories(fileName2, data, writeByteOrderMark, function(path2, data2, writeByteOrderMark2) {
|
|
101718
101718
|
return writeFileWorker(path2, data2, writeByteOrderMark2);
|
|
101719
101719
|
}, function(path2) {
|
|
101720
101720
|
return (compilerHost.createDirectory || system.createDirectory)(path2);
|
|
@@ -101730,25 +101730,25 @@ var require_typescript = __commonJS({
|
|
|
101730
101730
|
}
|
|
101731
101731
|
}
|
|
101732
101732
|
var outputFingerprints;
|
|
101733
|
-
function writeFileWorker(
|
|
101733
|
+
function writeFileWorker(fileName2, data, writeByteOrderMark) {
|
|
101734
101734
|
if (!ts3.isWatchSet(options) || !system.getModifiedTime) {
|
|
101735
|
-
system.writeFile(
|
|
101735
|
+
system.writeFile(fileName2, data, writeByteOrderMark);
|
|
101736
101736
|
return;
|
|
101737
101737
|
}
|
|
101738
101738
|
if (!outputFingerprints) {
|
|
101739
101739
|
outputFingerprints = new ts3.Map();
|
|
101740
101740
|
}
|
|
101741
101741
|
var hash = computeHash(data);
|
|
101742
|
-
var mtimeBefore = system.getModifiedTime(
|
|
101742
|
+
var mtimeBefore = system.getModifiedTime(fileName2);
|
|
101743
101743
|
if (mtimeBefore) {
|
|
101744
|
-
var fingerprint = outputFingerprints.get(
|
|
101744
|
+
var fingerprint = outputFingerprints.get(fileName2);
|
|
101745
101745
|
if (fingerprint && fingerprint.byteOrderMark === writeByteOrderMark && fingerprint.hash === hash && fingerprint.mtime.getTime() === mtimeBefore.getTime()) {
|
|
101746
101746
|
return;
|
|
101747
101747
|
}
|
|
101748
101748
|
}
|
|
101749
|
-
system.writeFile(
|
|
101750
|
-
var mtimeAfter = system.getModifiedTime(
|
|
101751
|
-
outputFingerprints.set(
|
|
101749
|
+
system.writeFile(fileName2, data, writeByteOrderMark);
|
|
101750
|
+
var mtimeAfter = system.getModifiedTime(fileName2) || ts3.missingFileModifiedTime;
|
|
101751
|
+
outputFingerprints.set(fileName2, {
|
|
101752
101752
|
hash,
|
|
101753
101753
|
byteOrderMark: writeByteOrderMark,
|
|
101754
101754
|
mtime: mtimeAfter
|
|
@@ -101780,11 +101780,11 @@ var require_typescript = __commonJS({
|
|
|
101780
101780
|
getNewLine: function() {
|
|
101781
101781
|
return newLine;
|
|
101782
101782
|
},
|
|
101783
|
-
fileExists: function(
|
|
101784
|
-
return system.fileExists(
|
|
101783
|
+
fileExists: function(fileName2) {
|
|
101784
|
+
return system.fileExists(fileName2);
|
|
101785
101785
|
},
|
|
101786
|
-
readFile: function(
|
|
101787
|
-
return system.readFile(
|
|
101786
|
+
readFile: function(fileName2) {
|
|
101787
|
+
return system.readFile(fileName2);
|
|
101788
101788
|
},
|
|
101789
101789
|
trace: function(s) {
|
|
101790
101790
|
return system.write(s + newLine);
|
|
@@ -101820,51 +101820,51 @@ var require_typescript = __commonJS({
|
|
|
101820
101820
|
var fileExistsCache = new ts3.Map();
|
|
101821
101821
|
var directoryExistsCache = new ts3.Map();
|
|
101822
101822
|
var sourceFileCache = new ts3.Map();
|
|
101823
|
-
var readFileWithCache = function(
|
|
101824
|
-
var key = toPath(
|
|
101823
|
+
var readFileWithCache = function(fileName2) {
|
|
101824
|
+
var key = toPath(fileName2);
|
|
101825
101825
|
var value = readFileCache.get(key);
|
|
101826
101826
|
if (value !== void 0)
|
|
101827
101827
|
return value !== false ? value : void 0;
|
|
101828
|
-
return setReadFileCache(key,
|
|
101828
|
+
return setReadFileCache(key, fileName2);
|
|
101829
101829
|
};
|
|
101830
|
-
var setReadFileCache = function(key,
|
|
101831
|
-
var newValue = originalReadFile.call(host,
|
|
101830
|
+
var setReadFileCache = function(key, fileName2) {
|
|
101831
|
+
var newValue = originalReadFile.call(host, fileName2);
|
|
101832
101832
|
readFileCache.set(key, newValue !== void 0 ? newValue : false);
|
|
101833
101833
|
return newValue;
|
|
101834
101834
|
};
|
|
101835
|
-
host.readFile = function(
|
|
101836
|
-
var key = toPath(
|
|
101835
|
+
host.readFile = function(fileName2) {
|
|
101836
|
+
var key = toPath(fileName2);
|
|
101837
101837
|
var value = readFileCache.get(key);
|
|
101838
101838
|
if (value !== void 0)
|
|
101839
101839
|
return value !== false ? value : void 0;
|
|
101840
|
-
if (!ts3.fileExtensionIs(
|
|
101841
|
-
return originalReadFile.call(host,
|
|
101840
|
+
if (!ts3.fileExtensionIs(fileName2, ".json") && !ts3.isBuildInfoFile(fileName2)) {
|
|
101841
|
+
return originalReadFile.call(host, fileName2);
|
|
101842
101842
|
}
|
|
101843
|
-
return setReadFileCache(key,
|
|
101843
|
+
return setReadFileCache(key, fileName2);
|
|
101844
101844
|
};
|
|
101845
|
-
var getSourceFileWithCache = getSourceFile ? function(
|
|
101846
|
-
var key = toPath(
|
|
101845
|
+
var getSourceFileWithCache = getSourceFile ? function(fileName2, languageVersion, onError, shouldCreateNewSourceFile) {
|
|
101846
|
+
var key = toPath(fileName2);
|
|
101847
101847
|
var value = sourceFileCache.get(key);
|
|
101848
101848
|
if (value)
|
|
101849
101849
|
return value;
|
|
101850
|
-
var sourceFile = getSourceFile(
|
|
101851
|
-
if (sourceFile && (ts3.isDeclarationFileName(
|
|
101850
|
+
var sourceFile = getSourceFile(fileName2, languageVersion, onError, shouldCreateNewSourceFile);
|
|
101851
|
+
if (sourceFile && (ts3.isDeclarationFileName(fileName2) || ts3.fileExtensionIs(fileName2, ".json"))) {
|
|
101852
101852
|
sourceFileCache.set(key, sourceFile);
|
|
101853
101853
|
}
|
|
101854
101854
|
return sourceFile;
|
|
101855
101855
|
} : void 0;
|
|
101856
|
-
host.fileExists = function(
|
|
101857
|
-
var key = toPath(
|
|
101856
|
+
host.fileExists = function(fileName2) {
|
|
101857
|
+
var key = toPath(fileName2);
|
|
101858
101858
|
var value = fileExistsCache.get(key);
|
|
101859
101859
|
if (value !== void 0)
|
|
101860
101860
|
return value;
|
|
101861
|
-
var newValue = originalFileExists.call(host,
|
|
101861
|
+
var newValue = originalFileExists.call(host, fileName2);
|
|
101862
101862
|
fileExistsCache.set(key, !!newValue);
|
|
101863
101863
|
return newValue;
|
|
101864
101864
|
};
|
|
101865
101865
|
if (originalWriteFile) {
|
|
101866
|
-
host.writeFile = function(
|
|
101867
|
-
var key = toPath(
|
|
101866
|
+
host.writeFile = function(fileName2, data, writeByteOrderMark, onError, sourceFiles) {
|
|
101867
|
+
var key = toPath(fileName2);
|
|
101868
101868
|
fileExistsCache.delete(key);
|
|
101869
101869
|
var value = readFileCache.get(key);
|
|
101870
101870
|
if (value !== void 0 && value !== data) {
|
|
@@ -101876,7 +101876,7 @@ var require_typescript = __commonJS({
|
|
|
101876
101876
|
sourceFileCache.delete(key);
|
|
101877
101877
|
}
|
|
101878
101878
|
}
|
|
101879
|
-
originalWriteFile.call(host,
|
|
101879
|
+
originalWriteFile.call(host, fileName2, data, writeByteOrderMark, onError, sourceFiles);
|
|
101880
101880
|
};
|
|
101881
101881
|
}
|
|
101882
101882
|
if (originalDirectoryExists && originalCreateDirectory) {
|
|
@@ -101932,9 +101932,9 @@ var require_typescript = __commonJS({
|
|
|
101932
101932
|
var errorMessage = ts3.diagnosticCategoryName(diagnostic) + " TS" + diagnostic.code + ": " + flattenDiagnosticMessageText(diagnostic.messageText, host.getNewLine()) + host.getNewLine();
|
|
101933
101933
|
if (diagnostic.file) {
|
|
101934
101934
|
var _a = ts3.getLineAndCharacterOfPosition(diagnostic.file, diagnostic.start), line = _a.line, character = _a.character;
|
|
101935
|
-
var
|
|
101936
|
-
var relativeFileName = ts3.convertToRelativePath(
|
|
101937
|
-
return host.getCanonicalFileName(
|
|
101935
|
+
var fileName2 = diagnostic.file.fileName;
|
|
101936
|
+
var relativeFileName = ts3.convertToRelativePath(fileName2, host.getCurrentDirectory(), function(fileName3) {
|
|
101937
|
+
return host.getCanonicalFileName(fileName3);
|
|
101938
101938
|
});
|
|
101939
101939
|
return relativeFileName + "(" + (line + 1) + "," + (character + 1) + "): " + errorMessage;
|
|
101940
101940
|
}
|
|
@@ -102014,8 +102014,8 @@ var require_typescript = __commonJS({
|
|
|
102014
102014
|
color = formatColorAndReset;
|
|
102015
102015
|
}
|
|
102016
102016
|
var _a = ts3.getLineAndCharacterOfPosition(file, start), firstLine = _a.line, firstLineChar = _a.character;
|
|
102017
|
-
var relativeFileName = host ? ts3.convertToRelativePath(file.fileName, host.getCurrentDirectory(), function(
|
|
102018
|
-
return host.getCanonicalFileName(
|
|
102017
|
+
var relativeFileName = host ? ts3.convertToRelativePath(file.fileName, host.getCurrentDirectory(), function(fileName2) {
|
|
102018
|
+
return host.getCanonicalFileName(fileName2);
|
|
102019
102019
|
}) : file.fileName;
|
|
102020
102020
|
var output = "";
|
|
102021
102021
|
output += color(relativeFileName, ForegroundColorEscapeSequences.Cyan);
|
|
@@ -102370,8 +102370,8 @@ var require_typescript = __commonJS({
|
|
|
102370
102370
|
if (useSourceOfProjectReferenceRedirect) {
|
|
102371
102371
|
if (out || ts3.getEmitModuleKind(parsedRef.commandLine.options) === ts3.ModuleKind.None) {
|
|
102372
102372
|
for (var _i2 = 0, _a2 = parsedRef.commandLine.fileNames; _i2 < _a2.length; _i2++) {
|
|
102373
|
-
var
|
|
102374
|
-
processProjectReferenceFile(
|
|
102373
|
+
var fileName2 = _a2[_i2];
|
|
102374
|
+
processProjectReferenceFile(fileName2, { kind: ts3.FileIncludeKind.SourceFromProjectReference, index });
|
|
102375
102375
|
}
|
|
102376
102376
|
}
|
|
102377
102377
|
} else {
|
|
@@ -102382,9 +102382,9 @@ var require_typescript = __commonJS({
|
|
|
102382
102382
|
return ts3.getCommonSourceDirectoryOfConfig(parsedRef.commandLine, !host.useCaseSensitiveFileNames());
|
|
102383
102383
|
});
|
|
102384
102384
|
for (var _b2 = 0, _c2 = parsedRef.commandLine.fileNames; _b2 < _c2.length; _b2++) {
|
|
102385
|
-
var
|
|
102386
|
-
if (!ts3.fileExtensionIs(
|
|
102387
|
-
processProjectReferenceFile(ts3.getOutputDeclarationFileName(
|
|
102385
|
+
var fileName2 = _c2[_b2];
|
|
102386
|
+
if (!ts3.fileExtensionIs(fileName2, ".d.ts") && !ts3.fileExtensionIs(fileName2, ".json")) {
|
|
102387
|
+
processProjectReferenceFile(ts3.getOutputDeclarationFileName(fileName2, parsedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory_2), { kind: ts3.FileIncludeKind.OutputFromProjectReference, index });
|
|
102388
102388
|
}
|
|
102389
102389
|
}
|
|
102390
102390
|
}
|
|
@@ -102600,8 +102600,8 @@ var require_typescript = __commonJS({
|
|
|
102600
102600
|
var realDeclarationPath = toPath(realDeclarationFileName);
|
|
102601
102601
|
return realDeclarationPath === file.path ? void 0 : getRedirectReferenceForResolutionFromSourceOfProject(realDeclarationFileName, realDeclarationPath);
|
|
102602
102602
|
}
|
|
102603
|
-
function getRedirectReferenceForResolutionFromSourceOfProject(
|
|
102604
|
-
var source = getSourceOfProjectReferenceRedirect(
|
|
102603
|
+
function getRedirectReferenceForResolutionFromSourceOfProject(fileName2, filePath) {
|
|
102604
|
+
var source = getSourceOfProjectReferenceRedirect(fileName2);
|
|
102605
102605
|
if (ts3.isString(source))
|
|
102606
102606
|
return getResolvedProjectReferenceToRedirect(source);
|
|
102607
102607
|
if (!source)
|
|
@@ -102631,8 +102631,8 @@ var require_typescript = __commonJS({
|
|
|
102631
102631
|
function getResolvedModuleWithFailedLookupLocationsFromCache(moduleName, containingFile) {
|
|
102632
102632
|
return moduleResolutionCache && ts3.resolveModuleNameFromCache(moduleName, containingFile, moduleResolutionCache);
|
|
102633
102633
|
}
|
|
102634
|
-
function toPath(
|
|
102635
|
-
return ts3.toPath(
|
|
102634
|
+
function toPath(fileName2) {
|
|
102635
|
+
return ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
102636
102636
|
}
|
|
102637
102637
|
function getCommonSourceDirectory() {
|
|
102638
102638
|
if (commonSourceDirectory === void 0) {
|
|
@@ -102952,8 +102952,8 @@ var require_typescript = __commonJS({
|
|
|
102952
102952
|
getProjectReferenceRedirect,
|
|
102953
102953
|
isSourceOfProjectReferenceRedirect,
|
|
102954
102954
|
getSymlinkCache,
|
|
102955
|
-
writeFile: writeFileCallback || function(
|
|
102956
|
-
return host.writeFile(
|
|
102955
|
+
writeFile: writeFileCallback || function(fileName2, data, writeByteOrderMark, onError, sourceFiles) {
|
|
102956
|
+
return host.writeFile(fileName2, data, writeByteOrderMark, onError, sourceFiles);
|
|
102957
102957
|
},
|
|
102958
102958
|
isEmitBlocked,
|
|
102959
102959
|
readFile: function(f) {
|
|
@@ -103000,8 +103000,8 @@ var require_typescript = __commonJS({
|
|
|
103000
103000
|
return createPrependNodes(projectReferences, function(_ref, index) {
|
|
103001
103001
|
var _a2;
|
|
103002
103002
|
return (_a2 = resolvedProjectReferences[index]) === null || _a2 === void 0 ? void 0 : _a2.commandLine;
|
|
103003
|
-
}, function(
|
|
103004
|
-
var path2 = toPath(
|
|
103003
|
+
}, function(fileName2) {
|
|
103004
|
+
var path2 = toPath(fileName2);
|
|
103005
103005
|
var sourceFile = getSourceFileByPath(path2);
|
|
103006
103006
|
return sourceFile ? sourceFile.text : filesByName.has(path2) ? void 0 : host.readFile(path2);
|
|
103007
103007
|
});
|
|
@@ -103058,8 +103058,8 @@ var require_typescript = __commonJS({
|
|
|
103058
103058
|
ts3.performance.measure("Emit", "beforeEmit", "afterEmit");
|
|
103059
103059
|
return emitResult;
|
|
103060
103060
|
}
|
|
103061
|
-
function getSourceFile(
|
|
103062
|
-
return getSourceFileByPath(toPath(
|
|
103061
|
+
function getSourceFile(fileName2) {
|
|
103062
|
+
return getSourceFileByPath(toPath(fileName2));
|
|
103063
103063
|
}
|
|
103064
103064
|
function getSourceFileByPath(path2) {
|
|
103065
103065
|
return filesByName.get(path2) || void 0;
|
|
@@ -103411,8 +103411,8 @@ var require_typescript = __commonJS({
|
|
|
103411
103411
|
function getConfigFileParsingDiagnostics2() {
|
|
103412
103412
|
return configFileParsingDiagnostics || ts3.emptyArray;
|
|
103413
103413
|
}
|
|
103414
|
-
function processRootFile(
|
|
103415
|
-
processSourceFile(ts3.normalizePath(
|
|
103414
|
+
function processRootFile(fileName2, isDefaultLib, ignoreNoDefaultLib, reason) {
|
|
103415
|
+
processSourceFile(ts3.normalizePath(fileName2), isDefaultLib, ignoreNoDefaultLib, void 0, reason);
|
|
103416
103416
|
}
|
|
103417
103417
|
function fileReferenceIsEqualTo(a, b) {
|
|
103418
103418
|
return a.fileName === b.fileName;
|
|
@@ -103524,29 +103524,29 @@ var require_typescript = __commonJS({
|
|
|
103524
103524
|
function getSourceFileFromReference(referencingFile, ref) {
|
|
103525
103525
|
return getSourceFileFromReferenceWorker(resolveTripleslashReference(ref.fileName, referencingFile.fileName), getSourceFile);
|
|
103526
103526
|
}
|
|
103527
|
-
function getSourceFileFromReferenceWorker(
|
|
103528
|
-
if (ts3.hasExtension(
|
|
103529
|
-
var canonicalFileName_1 = host.getCanonicalFileName(
|
|
103527
|
+
function getSourceFileFromReferenceWorker(fileName2, getSourceFile2, fail, reason) {
|
|
103528
|
+
if (ts3.hasExtension(fileName2)) {
|
|
103529
|
+
var canonicalFileName_1 = host.getCanonicalFileName(fileName2);
|
|
103530
103530
|
if (!options.allowNonTsExtensions && !ts3.forEach(supportedExtensionsWithJsonIfResolveJsonModule, function(extension) {
|
|
103531
103531
|
return ts3.fileExtensionIs(canonicalFileName_1, extension);
|
|
103532
103532
|
})) {
|
|
103533
103533
|
if (fail) {
|
|
103534
103534
|
if (ts3.hasJSFileExtension(canonicalFileName_1)) {
|
|
103535
|
-
fail(ts3.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option,
|
|
103535
|
+
fail(ts3.Diagnostics.File_0_is_a_JavaScript_file_Did_you_mean_to_enable_the_allowJs_option, fileName2);
|
|
103536
103536
|
} else {
|
|
103537
|
-
fail(ts3.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1,
|
|
103537
|
+
fail(ts3.Diagnostics.File_0_has_an_unsupported_extension_The_only_supported_extensions_are_1, fileName2, "'" + supportedExtensions.join("', '") + "'");
|
|
103538
103538
|
}
|
|
103539
103539
|
}
|
|
103540
103540
|
return void 0;
|
|
103541
103541
|
}
|
|
103542
|
-
var sourceFile = getSourceFile2(
|
|
103542
|
+
var sourceFile = getSourceFile2(fileName2);
|
|
103543
103543
|
if (fail) {
|
|
103544
103544
|
if (!sourceFile) {
|
|
103545
|
-
var redirect = getProjectReferenceRedirect(
|
|
103545
|
+
var redirect = getProjectReferenceRedirect(fileName2);
|
|
103546
103546
|
if (redirect) {
|
|
103547
|
-
fail(ts3.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect,
|
|
103547
|
+
fail(ts3.Diagnostics.Output_file_0_has_not_been_built_from_source_file_1, redirect, fileName2);
|
|
103548
103548
|
} else {
|
|
103549
|
-
fail(ts3.Diagnostics.File_0_not_found,
|
|
103549
|
+
fail(ts3.Diagnostics.File_0_not_found, fileName2);
|
|
103550
103550
|
}
|
|
103551
103551
|
} else if (isReferencedFile(reason) && canonicalFileName_1 === host.getCanonicalFileName(getSourceFileByPath(reason.file).fileName)) {
|
|
103552
103552
|
fail(ts3.Diagnostics.A_file_cannot_have_a_reference_to_itself);
|
|
@@ -103554,24 +103554,24 @@ var require_typescript = __commonJS({
|
|
|
103554
103554
|
}
|
|
103555
103555
|
return sourceFile;
|
|
103556
103556
|
} else {
|
|
103557
|
-
var sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile2(
|
|
103557
|
+
var sourceFileNoExtension = options.allowNonTsExtensions && getSourceFile2(fileName2);
|
|
103558
103558
|
if (sourceFileNoExtension)
|
|
103559
103559
|
return sourceFileNoExtension;
|
|
103560
103560
|
if (fail && options.allowNonTsExtensions) {
|
|
103561
|
-
fail(ts3.Diagnostics.File_0_not_found,
|
|
103561
|
+
fail(ts3.Diagnostics.File_0_not_found, fileName2);
|
|
103562
103562
|
return void 0;
|
|
103563
103563
|
}
|
|
103564
103564
|
var sourceFileWithAddedExtension = ts3.forEach(supportedExtensions, function(extension) {
|
|
103565
|
-
return getSourceFile2(
|
|
103565
|
+
return getSourceFile2(fileName2 + extension);
|
|
103566
103566
|
});
|
|
103567
103567
|
if (fail && !sourceFileWithAddedExtension)
|
|
103568
|
-
fail(ts3.Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1,
|
|
103568
|
+
fail(ts3.Diagnostics.Could_not_resolve_the_path_0_with_the_extensions_Colon_1, fileName2, "'" + supportedExtensions.join("', '") + "'");
|
|
103569
103569
|
return sourceFileWithAddedExtension;
|
|
103570
103570
|
}
|
|
103571
103571
|
}
|
|
103572
|
-
function processSourceFile(
|
|
103573
|
-
getSourceFileFromReferenceWorker(
|
|
103574
|
-
return findSourceFile(
|
|
103572
|
+
function processSourceFile(fileName2, isDefaultLib, ignoreNoDefaultLib, packageId, reason) {
|
|
103573
|
+
getSourceFileFromReferenceWorker(fileName2, function(fileName3) {
|
|
103574
|
+
return findSourceFile(fileName3, toPath(fileName3), isDefaultLib, ignoreNoDefaultLib, reason, packageId);
|
|
103575
103575
|
}, function(diagnostic) {
|
|
103576
103576
|
var args = [];
|
|
103577
103577
|
for (var _i2 = 1; _i2 < arguments.length; _i2++) {
|
|
@@ -103580,20 +103580,20 @@ var require_typescript = __commonJS({
|
|
|
103580
103580
|
return addFilePreprocessingFileExplainingDiagnostic(void 0, reason, diagnostic, args);
|
|
103581
103581
|
}, reason);
|
|
103582
103582
|
}
|
|
103583
|
-
function processProjectReferenceFile(
|
|
103584
|
-
return processSourceFile(
|
|
103583
|
+
function processProjectReferenceFile(fileName2, reason) {
|
|
103584
|
+
return processSourceFile(fileName2, false, false, void 0, reason);
|
|
103585
103585
|
}
|
|
103586
|
-
function reportFileNamesDifferOnlyInCasingError(
|
|
103586
|
+
function reportFileNamesDifferOnlyInCasingError(fileName2, existingFile, reason) {
|
|
103587
103587
|
var hasExistingReasonToReportErrorOn = !isReferencedFile(reason) && ts3.some(fileReasons.get(existingFile.path), isReferencedFile);
|
|
103588
103588
|
if (hasExistingReasonToReportErrorOn) {
|
|
103589
|
-
addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, ts3.Diagnostics.Already_included_file_name_0_differs_from_file_name_1_only_in_casing, [existingFile.fileName,
|
|
103589
|
+
addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, ts3.Diagnostics.Already_included_file_name_0_differs_from_file_name_1_only_in_casing, [existingFile.fileName, fileName2]);
|
|
103590
103590
|
} else {
|
|
103591
|
-
addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, ts3.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [
|
|
103591
|
+
addFilePreprocessingFileExplainingDiagnostic(existingFile, reason, ts3.Diagnostics.File_name_0_differs_from_already_included_file_name_1_only_in_casing, [fileName2, existingFile.fileName]);
|
|
103592
103592
|
}
|
|
103593
103593
|
}
|
|
103594
|
-
function createRedirectSourceFile(redirectTarget, unredirected,
|
|
103594
|
+
function createRedirectSourceFile(redirectTarget, unredirected, fileName2, path2, resolvedPath, originalFileName) {
|
|
103595
103595
|
var redirect = Object.create(redirectTarget);
|
|
103596
|
-
redirect.fileName =
|
|
103596
|
+
redirect.fileName = fileName2;
|
|
103597
103597
|
redirect.path = path2;
|
|
103598
103598
|
redirect.resolvedPath = resolvedPath;
|
|
103599
103599
|
redirect.originalFileName = originalFileName;
|
|
@@ -103619,22 +103619,22 @@ var require_typescript = __commonJS({
|
|
|
103619
103619
|
});
|
|
103620
103620
|
return redirect;
|
|
103621
103621
|
}
|
|
103622
|
-
function findSourceFile(
|
|
103622
|
+
function findSourceFile(fileName2, path2, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
103623
103623
|
ts3.tracing === null || ts3.tracing === void 0 ? void 0 : ts3.tracing.push("program", "findSourceFile", {
|
|
103624
|
-
fileName,
|
|
103624
|
+
fileName: fileName2,
|
|
103625
103625
|
isDefaultLib: isDefaultLib || void 0,
|
|
103626
103626
|
fileIncludeKind: ts3.FileIncludeKind[reason.kind]
|
|
103627
103627
|
});
|
|
103628
|
-
var result2 = findSourceFileWorker(
|
|
103628
|
+
var result2 = findSourceFileWorker(fileName2, path2, isDefaultLib, ignoreNoDefaultLib, reason, packageId);
|
|
103629
103629
|
ts3.tracing === null || ts3.tracing === void 0 ? void 0 : ts3.tracing.pop();
|
|
103630
103630
|
return result2;
|
|
103631
103631
|
}
|
|
103632
|
-
function findSourceFileWorker(
|
|
103632
|
+
function findSourceFileWorker(fileName2, path2, isDefaultLib, ignoreNoDefaultLib, reason, packageId) {
|
|
103633
103633
|
if (useSourceOfProjectReferenceRedirect) {
|
|
103634
|
-
var source = getSourceOfProjectReferenceRedirect(
|
|
103635
|
-
if (!source && host.realpath && options.preserveSymlinks && ts3.isDeclarationFileName(
|
|
103636
|
-
var realPath = host.realpath(
|
|
103637
|
-
if (realPath !==
|
|
103634
|
+
var source = getSourceOfProjectReferenceRedirect(fileName2);
|
|
103635
|
+
if (!source && host.realpath && options.preserveSymlinks && ts3.isDeclarationFileName(fileName2) && ts3.stringContains(fileName2, ts3.nodeModulesPathPart)) {
|
|
103636
|
+
var realPath = host.realpath(fileName2);
|
|
103637
|
+
if (realPath !== fileName2)
|
|
103638
103638
|
source = getSourceOfProjectReferenceRedirect(realPath);
|
|
103639
103639
|
}
|
|
103640
103640
|
if (source) {
|
|
@@ -103644,20 +103644,20 @@ var require_typescript = __commonJS({
|
|
|
103644
103644
|
return file_1;
|
|
103645
103645
|
}
|
|
103646
103646
|
}
|
|
103647
|
-
var originalFileName =
|
|
103647
|
+
var originalFileName = fileName2;
|
|
103648
103648
|
if (filesByName.has(path2)) {
|
|
103649
103649
|
var file_2 = filesByName.get(path2);
|
|
103650
103650
|
addFileIncludeReason(file_2 || void 0, reason);
|
|
103651
103651
|
if (file_2 && options.forceConsistentCasingInFileNames) {
|
|
103652
103652
|
var checkedName = file_2.fileName;
|
|
103653
|
-
var isRedirect = toPath(checkedName) !== toPath(
|
|
103653
|
+
var isRedirect = toPath(checkedName) !== toPath(fileName2);
|
|
103654
103654
|
if (isRedirect) {
|
|
103655
|
-
|
|
103655
|
+
fileName2 = getProjectReferenceRedirect(fileName2) || fileName2;
|
|
103656
103656
|
}
|
|
103657
103657
|
var checkedAbsolutePath = ts3.getNormalizedAbsolutePathWithoutRoot(checkedName, currentDirectory);
|
|
103658
|
-
var inputAbsolutePath = ts3.getNormalizedAbsolutePathWithoutRoot(
|
|
103658
|
+
var inputAbsolutePath = ts3.getNormalizedAbsolutePathWithoutRoot(fileName2, currentDirectory);
|
|
103659
103659
|
if (checkedAbsolutePath !== inputAbsolutePath) {
|
|
103660
|
-
reportFileNamesDifferOnlyInCasingError(
|
|
103660
|
+
reportFileNamesDifferOnlyInCasingError(fileName2, file_2, reason);
|
|
103661
103661
|
}
|
|
103662
103662
|
}
|
|
103663
103663
|
if (file_2 && sourceFilesFoundSearchingNodeModules.get(file_2.path) && currentNodeModulesDepth === 0) {
|
|
@@ -103681,25 +103681,25 @@ var require_typescript = __commonJS({
|
|
|
103681
103681
|
}
|
|
103682
103682
|
var redirectedPath;
|
|
103683
103683
|
if (isReferencedFile(reason) && !useSourceOfProjectReferenceRedirect) {
|
|
103684
|
-
var redirectProject = getProjectReferenceRedirectProject(
|
|
103684
|
+
var redirectProject = getProjectReferenceRedirectProject(fileName2);
|
|
103685
103685
|
if (redirectProject) {
|
|
103686
103686
|
if (ts3.outFile(redirectProject.commandLine.options)) {
|
|
103687
103687
|
return void 0;
|
|
103688
103688
|
}
|
|
103689
|
-
var redirect = getProjectReferenceOutputName(redirectProject,
|
|
103690
|
-
|
|
103689
|
+
var redirect = getProjectReferenceOutputName(redirectProject, fileName2);
|
|
103690
|
+
fileName2 = redirect;
|
|
103691
103691
|
redirectedPath = toPath(redirect);
|
|
103692
103692
|
}
|
|
103693
103693
|
}
|
|
103694
|
-
var file = host.getSourceFile(
|
|
103695
|
-
return addFilePreprocessingFileExplainingDiagnostic(void 0, reason, ts3.Diagnostics.Cannot_read_file_0_Colon_1, [
|
|
103694
|
+
var file = host.getSourceFile(fileName2, options.target, function(hostErrorMessage) {
|
|
103695
|
+
return addFilePreprocessingFileExplainingDiagnostic(void 0, reason, ts3.Diagnostics.Cannot_read_file_0_Colon_1, [fileName2, hostErrorMessage]);
|
|
103696
103696
|
}, shouldCreateNewSourceFile);
|
|
103697
103697
|
if (packageId) {
|
|
103698
103698
|
var packageIdKey = ts3.packageIdToString(packageId);
|
|
103699
103699
|
var fileFromPackageId = packageIdToSourceFile.get(packageIdKey);
|
|
103700
103700
|
if (fileFromPackageId) {
|
|
103701
|
-
var dupFile = createRedirectSourceFile(fileFromPackageId, file,
|
|
103702
|
-
redirectTargetsMap.add(fileFromPackageId.path,
|
|
103701
|
+
var dupFile = createRedirectSourceFile(fileFromPackageId, file, fileName2, path2, toPath(fileName2), originalFileName);
|
|
103702
|
+
redirectTargetsMap.add(fileFromPackageId.path, fileName2);
|
|
103703
103703
|
addFileToFilesByName(dupFile, path2, redirectedPath);
|
|
103704
103704
|
addFileIncludeReason(dupFile, reason);
|
|
103705
103705
|
sourceFileToPackageName.set(path2, packageId.name);
|
|
@@ -103713,16 +103713,16 @@ var require_typescript = __commonJS({
|
|
|
103713
103713
|
addFileToFilesByName(file, path2, redirectedPath);
|
|
103714
103714
|
if (file) {
|
|
103715
103715
|
sourceFilesFoundSearchingNodeModules.set(path2, currentNodeModulesDepth > 0);
|
|
103716
|
-
file.fileName =
|
|
103716
|
+
file.fileName = fileName2;
|
|
103717
103717
|
file.path = path2;
|
|
103718
|
-
file.resolvedPath = toPath(
|
|
103718
|
+
file.resolvedPath = toPath(fileName2);
|
|
103719
103719
|
file.originalFileName = originalFileName;
|
|
103720
103720
|
addFileIncludeReason(file, reason);
|
|
103721
103721
|
if (host.useCaseSensitiveFileNames()) {
|
|
103722
103722
|
var pathLowerCase = ts3.toFileNameLowerCase(path2);
|
|
103723
103723
|
var existingFile = filesByNameIgnoreCase.get(pathLowerCase);
|
|
103724
103724
|
if (existingFile) {
|
|
103725
|
-
reportFileNamesDifferOnlyInCasingError(
|
|
103725
|
+
reportFileNamesDifferOnlyInCasingError(fileName2, existingFile, reason);
|
|
103726
103726
|
} else {
|
|
103727
103727
|
filesByNameIgnoreCase.set(pathLowerCase, file);
|
|
103728
103728
|
}
|
|
@@ -103756,21 +103756,21 @@ var require_typescript = __commonJS({
|
|
|
103756
103756
|
filesByName.set(path2, file);
|
|
103757
103757
|
}
|
|
103758
103758
|
}
|
|
103759
|
-
function getProjectReferenceRedirect(
|
|
103760
|
-
var referencedProject = getProjectReferenceRedirectProject(
|
|
103761
|
-
return referencedProject && getProjectReferenceOutputName(referencedProject,
|
|
103759
|
+
function getProjectReferenceRedirect(fileName2) {
|
|
103760
|
+
var referencedProject = getProjectReferenceRedirectProject(fileName2);
|
|
103761
|
+
return referencedProject && getProjectReferenceOutputName(referencedProject, fileName2);
|
|
103762
103762
|
}
|
|
103763
|
-
function getProjectReferenceRedirectProject(
|
|
103764
|
-
if (!resolvedProjectReferences || !resolvedProjectReferences.length || ts3.fileExtensionIs(
|
|
103763
|
+
function getProjectReferenceRedirectProject(fileName2) {
|
|
103764
|
+
if (!resolvedProjectReferences || !resolvedProjectReferences.length || ts3.fileExtensionIs(fileName2, ".d.ts") || ts3.fileExtensionIs(fileName2, ".json")) {
|
|
103765
103765
|
return void 0;
|
|
103766
103766
|
}
|
|
103767
|
-
return getResolvedProjectReferenceToRedirect(
|
|
103767
|
+
return getResolvedProjectReferenceToRedirect(fileName2);
|
|
103768
103768
|
}
|
|
103769
|
-
function getProjectReferenceOutputName(referencedProject,
|
|
103769
|
+
function getProjectReferenceOutputName(referencedProject, fileName2) {
|
|
103770
103770
|
var out = ts3.outFile(referencedProject.commandLine.options);
|
|
103771
|
-
return out ? ts3.changeExtension(out, ".d.ts") : ts3.getOutputDeclarationFileName(
|
|
103771
|
+
return out ? ts3.changeExtension(out, ".d.ts") : ts3.getOutputDeclarationFileName(fileName2, referencedProject.commandLine, !host.useCaseSensitiveFileNames());
|
|
103772
103772
|
}
|
|
103773
|
-
function getResolvedProjectReferenceToRedirect(
|
|
103773
|
+
function getResolvedProjectReferenceToRedirect(fileName2) {
|
|
103774
103774
|
if (mapFromFileToProjectReferenceRedirects === void 0) {
|
|
103775
103775
|
mapFromFileToProjectReferenceRedirects = new ts3.Map();
|
|
103776
103776
|
forEachResolvedProjectReference2(function(referencedProject) {
|
|
@@ -103781,7 +103781,7 @@ var require_typescript = __commonJS({
|
|
|
103781
103781
|
}
|
|
103782
103782
|
});
|
|
103783
103783
|
}
|
|
103784
|
-
var referencedProjectPath = mapFromFileToProjectReferenceRedirects.get(toPath(
|
|
103784
|
+
var referencedProjectPath = mapFromFileToProjectReferenceRedirects.get(toPath(fileName2));
|
|
103785
103785
|
return referencedProjectPath && getResolvedProjectReferenceByPath(referencedProjectPath);
|
|
103786
103786
|
}
|
|
103787
103787
|
function forEachResolvedProjectReference2(cb) {
|
|
@@ -103801,10 +103801,10 @@ var require_typescript = __commonJS({
|
|
|
103801
103801
|
var getCommonSourceDirectory_3 = ts3.memoize(function() {
|
|
103802
103802
|
return ts3.getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames());
|
|
103803
103803
|
});
|
|
103804
|
-
ts3.forEach(resolvedRef.commandLine.fileNames, function(
|
|
103805
|
-
if (!ts3.fileExtensionIs(
|
|
103806
|
-
var outputDts2 = ts3.getOutputDeclarationFileName(
|
|
103807
|
-
mapFromToProjectReferenceRedirectSource.set(toPath(outputDts2),
|
|
103804
|
+
ts3.forEach(resolvedRef.commandLine.fileNames, function(fileName2) {
|
|
103805
|
+
if (!ts3.fileExtensionIs(fileName2, ".d.ts") && !ts3.fileExtensionIs(fileName2, ".json")) {
|
|
103806
|
+
var outputDts2 = ts3.getOutputDeclarationFileName(fileName2, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory_3);
|
|
103807
|
+
mapFromToProjectReferenceRedirectSource.set(toPath(outputDts2), fileName2);
|
|
103808
103808
|
}
|
|
103809
103809
|
});
|
|
103810
103810
|
}
|
|
@@ -103812,8 +103812,8 @@ var require_typescript = __commonJS({
|
|
|
103812
103812
|
}
|
|
103813
103813
|
return mapFromToProjectReferenceRedirectSource.get(toPath(file));
|
|
103814
103814
|
}
|
|
103815
|
-
function isSourceOfProjectReferenceRedirect(
|
|
103816
|
-
return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(
|
|
103815
|
+
function isSourceOfProjectReferenceRedirect(fileName2) {
|
|
103816
|
+
return useSourceOfProjectReferenceRedirect && !!getResolvedProjectReferenceToRedirect(fileName2);
|
|
103817
103817
|
}
|
|
103818
103818
|
function getResolvedProjectReferenceByPath(projectReferencePath) {
|
|
103819
103819
|
if (!projectReferenceRedirects) {
|
|
@@ -103837,9 +103837,9 @@ var require_typescript = __commonJS({
|
|
|
103837
103837
|
for (var index = 0; index < typeDirectives.length; index++) {
|
|
103838
103838
|
var ref = file.typeReferenceDirectives[index];
|
|
103839
103839
|
var resolvedTypeReferenceDirective = resolutions2[index];
|
|
103840
|
-
var
|
|
103841
|
-
ts3.setResolvedTypeReferenceDirective(file,
|
|
103842
|
-
processTypeReferenceDirective(
|
|
103840
|
+
var fileName2 = ts3.toFileNameLowerCase(ref.fileName);
|
|
103841
|
+
ts3.setResolvedTypeReferenceDirective(file, fileName2, resolvedTypeReferenceDirective);
|
|
103842
|
+
processTypeReferenceDirective(fileName2, resolvedTypeReferenceDirective, { kind: ts3.FileIncludeKind.TypeReferenceDirective, file: file.path, index });
|
|
103843
103843
|
}
|
|
103844
103844
|
}
|
|
103845
103845
|
function processTypeReferenceDirective(typeReferenceDirective, resolvedTypeReferenceDirective, reason) {
|
|
@@ -103900,8 +103900,8 @@ var require_typescript = __commonJS({
|
|
|
103900
103900
|
}
|
|
103901
103901
|
});
|
|
103902
103902
|
}
|
|
103903
|
-
function getCanonicalFileName(
|
|
103904
|
-
return host.getCanonicalFileName(
|
|
103903
|
+
function getCanonicalFileName(fileName2) {
|
|
103904
|
+
return host.getCanonicalFileName(fileName2);
|
|
103905
103905
|
}
|
|
103906
103906
|
function processImportedModules(file) {
|
|
103907
103907
|
var _a2;
|
|
@@ -104302,14 +104302,14 @@ var require_typescript = __commonJS({
|
|
|
104302
104302
|
case ts3.FileIncludeKind.RootFile:
|
|
104303
104303
|
if (!options.configFile.configFileSpecs)
|
|
104304
104304
|
return void 0;
|
|
104305
|
-
var
|
|
104306
|
-
var matchedByFiles = ts3.getMatchedFileSpec(program2,
|
|
104305
|
+
var fileName2 = ts3.getNormalizedAbsolutePath(rootNames[reason.index], currentDirectory);
|
|
104306
|
+
var matchedByFiles = ts3.getMatchedFileSpec(program2, fileName2);
|
|
104307
104307
|
if (matchedByFiles) {
|
|
104308
104308
|
configFileNode = ts3.getTsConfigPropArrayElementValue(options.configFile, "files", matchedByFiles);
|
|
104309
104309
|
message = ts3.Diagnostics.File_is_matched_by_files_list_specified_here;
|
|
104310
104310
|
break;
|
|
104311
104311
|
}
|
|
104312
|
-
var matchedByInclude = ts3.getMatchedIncludeSpec(program2,
|
|
104312
|
+
var matchedByInclude = ts3.getMatchedIncludeSpec(program2, fileName2);
|
|
104313
104313
|
if (!matchedByInclude)
|
|
104314
104314
|
return void 0;
|
|
104315
104315
|
configFileNode = ts3.getTsConfigPropArrayElementValue(options.configFile, "include", matchedByInclude);
|
|
@@ -104790,8 +104790,8 @@ var require_typescript = __commonJS({
|
|
|
104790
104790
|
var outputFiles = [];
|
|
104791
104791
|
var _a = program2.emit(sourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers, forceDtsEmit), emitSkipped = _a.emitSkipped, diagnostics = _a.diagnostics, exportedModulesFromDeclarationEmit = _a.exportedModulesFromDeclarationEmit;
|
|
104792
104792
|
return { outputFiles, emitSkipped, diagnostics, exportedModulesFromDeclarationEmit };
|
|
104793
|
-
function writeFile(
|
|
104794
|
-
outputFiles.push({ name:
|
|
104793
|
+
function writeFile(fileName2, text, writeByteOrderMark) {
|
|
104794
|
+
outputFiles.push({ name: fileName2, writeByteOrderMark, text });
|
|
104795
104795
|
}
|
|
104796
104796
|
}
|
|
104797
104797
|
ts3.getFileEmitOutput = getFileEmitOutput;
|
|
@@ -104807,8 +104807,8 @@ var require_typescript = __commonJS({
|
|
|
104807
104807
|
var symbol = checker.getSymbolAtLocation(importName);
|
|
104808
104808
|
return symbol && getReferencedFileFromImportedModuleSymbol(symbol);
|
|
104809
104809
|
}
|
|
104810
|
-
function getReferencedFileFromFileName(program2,
|
|
104811
|
-
return ts3.toPath(program2.getProjectReferenceRedirect(
|
|
104810
|
+
function getReferencedFileFromFileName(program2, fileName2, sourceFileDirectory, getCanonicalFileName) {
|
|
104811
|
+
return ts3.toPath(program2.getProjectReferenceRedirect(fileName2) || fileName2, sourceFileDirectory, getCanonicalFileName);
|
|
104812
104812
|
}
|
|
104813
104813
|
function getReferencedFiles(program2, sourceFile, getCanonicalFileName) {
|
|
104814
104814
|
var referencedFiles;
|
|
@@ -104835,8 +104835,8 @@ var require_typescript = __commonJS({
|
|
|
104835
104835
|
if (!resolvedTypeReferenceDirective) {
|
|
104836
104836
|
return;
|
|
104837
104837
|
}
|
|
104838
|
-
var
|
|
104839
|
-
var typeFilePath = getReferencedFileFromFileName(program2,
|
|
104838
|
+
var fileName2 = resolvedTypeReferenceDirective.resolvedFileName;
|
|
104839
|
+
var typeFilePath = getReferencedFileFromFileName(program2, fileName2, sourceFileDirectory, getCanonicalFileName);
|
|
104840
104840
|
addReferencedFile(typeFilePath);
|
|
104841
104841
|
});
|
|
104842
104842
|
}
|
|
@@ -105955,8 +105955,8 @@ var require_typescript = __commonJS({
|
|
|
105955
105955
|
getCompilerOptions: function() {
|
|
105956
105956
|
return state.compilerOptions;
|
|
105957
105957
|
},
|
|
105958
|
-
getSourceFile: function(
|
|
105959
|
-
return getProgram().getSourceFile(
|
|
105958
|
+
getSourceFile: function(fileName2) {
|
|
105959
|
+
return getProgram().getSourceFile(fileName2);
|
|
105960
105960
|
},
|
|
105961
105961
|
getSourceFiles: function() {
|
|
105962
105962
|
return getProgram().getSourceFiles();
|
|
@@ -106808,11 +106808,11 @@ var require_typescript = __commonJS({
|
|
|
106808
106808
|
function comparePathsByRedirectAndNumberOfDirectorySeparators(a, b) {
|
|
106809
106809
|
return ts3.compareBooleans(b.isRedirect, a.isRedirect) || ts3.compareNumberOfDirectorySeparators(a.path, b.path);
|
|
106810
106810
|
}
|
|
106811
|
-
function getNearestAncestorDirectoryWithPackageJson(host,
|
|
106811
|
+
function getNearestAncestorDirectoryWithPackageJson(host, fileName2) {
|
|
106812
106812
|
if (host.getNearestAncestorDirectoryWithPackageJson) {
|
|
106813
|
-
return host.getNearestAncestorDirectoryWithPackageJson(
|
|
106813
|
+
return host.getNearestAncestorDirectoryWithPackageJson(fileName2);
|
|
106814
106814
|
}
|
|
106815
|
-
return !!ts3.forEachAncestorDirectory(
|
|
106815
|
+
return !!ts3.forEachAncestorDirectory(fileName2, function(directory) {
|
|
106816
106816
|
return host.fileExists(ts3.combinePaths(directory, "package.json")) ? true : void 0;
|
|
106817
106817
|
});
|
|
106818
106818
|
}
|
|
@@ -106884,11 +106884,11 @@ var require_typescript = __commonJS({
|
|
|
106884
106884
|
var _loop_26 = function(directory2) {
|
|
106885
106885
|
var directoryStart = ts3.ensureTrailingDirectorySeparator(directory2);
|
|
106886
106886
|
var pathsInDirectory;
|
|
106887
|
-
allFileNames.forEach(function(_a2,
|
|
106887
|
+
allFileNames.forEach(function(_a2, fileName2) {
|
|
106888
106888
|
var path2 = _a2.path, isRedirect = _a2.isRedirect, isInNodeModules = _a2.isInNodeModules;
|
|
106889
106889
|
if (ts3.startsWith(path2, directoryStart)) {
|
|
106890
|
-
(pathsInDirectory || (pathsInDirectory = [])).push({ path:
|
|
106891
|
-
allFileNames.delete(
|
|
106890
|
+
(pathsInDirectory || (pathsInDirectory = [])).push({ path: fileName2, isRedirect, isInNodeModules });
|
|
106891
|
+
allFileNames.delete(fileName2);
|
|
106892
106892
|
}
|
|
106893
106893
|
});
|
|
106894
106894
|
if (pathsInDirectory) {
|
|
@@ -107124,23 +107124,23 @@ var require_typescript = __commonJS({
|
|
|
107124
107124
|
return isPathRelativeToParent(relativePath) ? void 0 : relativePath;
|
|
107125
107125
|
});
|
|
107126
107126
|
}
|
|
107127
|
-
function removeExtensionAndIndexPostFix(
|
|
107128
|
-
if (ts3.fileExtensionIs(
|
|
107129
|
-
return
|
|
107130
|
-
var noExtension = ts3.removeFileExtension(
|
|
107127
|
+
function removeExtensionAndIndexPostFix(fileName2, ending, options) {
|
|
107128
|
+
if (ts3.fileExtensionIs(fileName2, ".json"))
|
|
107129
|
+
return fileName2;
|
|
107130
|
+
var noExtension = ts3.removeFileExtension(fileName2);
|
|
107131
107131
|
switch (ending) {
|
|
107132
107132
|
case 0:
|
|
107133
107133
|
return ts3.removeSuffix(noExtension, "/index");
|
|
107134
107134
|
case 1:
|
|
107135
107135
|
return noExtension;
|
|
107136
107136
|
case 2:
|
|
107137
|
-
return noExtension + getJSExtensionForFile(
|
|
107137
|
+
return noExtension + getJSExtensionForFile(fileName2, options);
|
|
107138
107138
|
default:
|
|
107139
107139
|
return ts3.Debug.assertNever(ending);
|
|
107140
107140
|
}
|
|
107141
107141
|
}
|
|
107142
|
-
function getJSExtensionForFile(
|
|
107143
|
-
var ext = ts3.extensionFromPath(
|
|
107142
|
+
function getJSExtensionForFile(fileName2, options) {
|
|
107143
|
+
var ext = ts3.extensionFromPath(fileName2);
|
|
107144
107144
|
switch (ext) {
|
|
107145
107145
|
case ".ts":
|
|
107146
107146
|
case ".d.ts":
|
|
@@ -107152,7 +107152,7 @@ var require_typescript = __commonJS({
|
|
|
107152
107152
|
case ".json":
|
|
107153
107153
|
return ext;
|
|
107154
107154
|
case ".tsbuildinfo":
|
|
107155
|
-
return ts3.Debug.fail("Extension .tsbuildinfo is unsupported:: FileName:: " +
|
|
107155
|
+
return ts3.Debug.fail("Extension .tsbuildinfo is unsupported:: FileName:: " + fileName2);
|
|
107156
107156
|
default:
|
|
107157
107157
|
return ts3.Debug.assertNever(ext);
|
|
107158
107158
|
}
|
|
@@ -107281,8 +107281,8 @@ var require_typescript = __commonJS({
|
|
|
107281
107281
|
var _a, _b;
|
|
107282
107282
|
var reasons = program2.getFileIncludeReasons();
|
|
107283
107283
|
var getCanonicalFileName = ts3.createGetCanonicalFileName(program2.useCaseSensitiveFileNames());
|
|
107284
|
-
var relativeFileName = function(
|
|
107285
|
-
return ts3.convertToRelativePath(
|
|
107284
|
+
var relativeFileName = function(fileName2) {
|
|
107285
|
+
return ts3.convertToRelativePath(fileName2, program2.getCurrentDirectory(), getCanonicalFileName);
|
|
107286
107286
|
};
|
|
107287
107287
|
for (var _i = 0, _c = program2.getSourceFiles(); _i < _c.length; _i++) {
|
|
107288
107288
|
var file = _c[_i];
|
|
@@ -107307,32 +107307,32 @@ var require_typescript = __commonJS({
|
|
|
107307
107307
|
return result2;
|
|
107308
107308
|
}
|
|
107309
107309
|
ts3.explainIfFileIsRedirect = explainIfFileIsRedirect;
|
|
107310
|
-
function getMatchedFileSpec(program2,
|
|
107310
|
+
function getMatchedFileSpec(program2, fileName2) {
|
|
107311
107311
|
var _a;
|
|
107312
107312
|
var configFile = program2.getCompilerOptions().configFile;
|
|
107313
107313
|
if (!((_a = configFile === null || configFile === void 0 ? void 0 : configFile.configFileSpecs) === null || _a === void 0 ? void 0 : _a.validatedFilesSpec))
|
|
107314
107314
|
return void 0;
|
|
107315
107315
|
var getCanonicalFileName = ts3.createGetCanonicalFileName(program2.useCaseSensitiveFileNames());
|
|
107316
|
-
var filePath = getCanonicalFileName(
|
|
107316
|
+
var filePath = getCanonicalFileName(fileName2);
|
|
107317
107317
|
var basePath = ts3.getDirectoryPath(ts3.getNormalizedAbsolutePath(configFile.fileName, program2.getCurrentDirectory()));
|
|
107318
107318
|
return ts3.find(configFile.configFileSpecs.validatedFilesSpec, function(fileSpec) {
|
|
107319
107319
|
return getCanonicalFileName(ts3.getNormalizedAbsolutePath(fileSpec, basePath)) === filePath;
|
|
107320
107320
|
});
|
|
107321
107321
|
}
|
|
107322
107322
|
ts3.getMatchedFileSpec = getMatchedFileSpec;
|
|
107323
|
-
function getMatchedIncludeSpec(program2,
|
|
107323
|
+
function getMatchedIncludeSpec(program2, fileName2) {
|
|
107324
107324
|
var _a, _b;
|
|
107325
107325
|
var configFile = program2.getCompilerOptions().configFile;
|
|
107326
107326
|
if (!((_a = configFile === null || configFile === void 0 ? void 0 : configFile.configFileSpecs) === null || _a === void 0 ? void 0 : _a.validatedIncludeSpecs))
|
|
107327
107327
|
return void 0;
|
|
107328
|
-
var isJsonFile = ts3.fileExtensionIs(
|
|
107328
|
+
var isJsonFile = ts3.fileExtensionIs(fileName2, ".json");
|
|
107329
107329
|
var basePath = ts3.getDirectoryPath(ts3.getNormalizedAbsolutePath(configFile.fileName, program2.getCurrentDirectory()));
|
|
107330
107330
|
var useCaseSensitiveFileNames = program2.useCaseSensitiveFileNames();
|
|
107331
107331
|
return ts3.find((_b = configFile === null || configFile === void 0 ? void 0 : configFile.configFileSpecs) === null || _b === void 0 ? void 0 : _b.validatedIncludeSpecs, function(includeSpec) {
|
|
107332
107332
|
if (isJsonFile && !ts3.endsWith(includeSpec, ".json"))
|
|
107333
107333
|
return false;
|
|
107334
107334
|
var pattern = ts3.getPatternFromSpec(includeSpec, basePath, "files");
|
|
107335
|
-
return !!pattern && ts3.getRegexFromPattern("(" + pattern + ")$", useCaseSensitiveFileNames).test(
|
|
107335
|
+
return !!pattern && ts3.getRegexFromPattern("(" + pattern + ")$", useCaseSensitiveFileNames).test(fileName2);
|
|
107336
107336
|
});
|
|
107337
107337
|
}
|
|
107338
107338
|
ts3.getMatchedIncludeSpec = getMatchedIncludeSpec;
|
|
@@ -107376,11 +107376,11 @@ var require_typescript = __commonJS({
|
|
|
107376
107376
|
case ts3.FileIncludeKind.RootFile:
|
|
107377
107377
|
if (!((_a = options.configFile) === null || _a === void 0 ? void 0 : _a.configFileSpecs))
|
|
107378
107378
|
return ts3.chainDiagnosticMessages(void 0, ts3.Diagnostics.Root_file_specified_for_compilation);
|
|
107379
|
-
var
|
|
107380
|
-
var matchedByFiles = getMatchedFileSpec(program2,
|
|
107379
|
+
var fileName2 = ts3.getNormalizedAbsolutePath(program2.getRootFileNames()[reason.index], program2.getCurrentDirectory());
|
|
107380
|
+
var matchedByFiles = getMatchedFileSpec(program2, fileName2);
|
|
107381
107381
|
if (matchedByFiles)
|
|
107382
107382
|
return ts3.chainDiagnosticMessages(void 0, ts3.Diagnostics.Part_of_files_list_in_tsconfig_json);
|
|
107383
|
-
var matchedByInclude = getMatchedIncludeSpec(program2,
|
|
107383
|
+
var matchedByInclude = getMatchedIncludeSpec(program2, fileName2);
|
|
107384
107384
|
return matchedByInclude ? ts3.chainDiagnosticMessages(void 0, ts3.Diagnostics.Matched_by_include_pattern_0_in_1, matchedByInclude, toFileName(options.configFile, fileNameConvertor)) : ts3.chainDiagnosticMessages(void 0, ts3.Diagnostics.Root_file_specified_for_compilation);
|
|
107385
107385
|
case ts3.FileIncludeKind.SourceFromProjectReference:
|
|
107386
107386
|
case ts3.FileIncludeKind.OutputFromProjectReference:
|
|
@@ -107402,8 +107402,8 @@ var require_typescript = __commonJS({
|
|
|
107402
107402
|
}
|
|
107403
107403
|
ts3.fileIncludeReasonToDiagnostics = fileIncludeReasonToDiagnostics;
|
|
107404
107404
|
function toFileName(file, fileNameConvertor) {
|
|
107405
|
-
var
|
|
107406
|
-
return fileNameConvertor ? fileNameConvertor(
|
|
107405
|
+
var fileName2 = ts3.isString(file) ? file : file.fileName;
|
|
107406
|
+
return fileNameConvertor ? fileNameConvertor(fileName2) : fileName2;
|
|
107407
107407
|
}
|
|
107408
107408
|
function emitFilesAndReportErrors(program2, reportDiagnostic, write, reportSummary, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
|
|
107409
107409
|
var isListFilesOnly = !!program2.getCompilerOptions().listFilesOnly;
|
|
@@ -107500,11 +107500,11 @@ var require_typescript = __commonJS({
|
|
|
107500
107500
|
return host.getNewLine();
|
|
107501
107501
|
});
|
|
107502
107502
|
return {
|
|
107503
|
-
getSourceFile: function(
|
|
107503
|
+
getSourceFile: function(fileName2, languageVersion, onError) {
|
|
107504
107504
|
var text;
|
|
107505
107505
|
try {
|
|
107506
107506
|
ts3.performance.mark("beforeIORead");
|
|
107507
|
-
text = host.readFile(
|
|
107507
|
+
text = host.readFile(fileName2, getCompilerOptions().charset);
|
|
107508
107508
|
ts3.performance.mark("afterIORead");
|
|
107509
107509
|
ts3.performance.measure("I/O Read", "beforeIORead", "afterIORead");
|
|
107510
107510
|
} catch (e) {
|
|
@@ -107513,7 +107513,7 @@ var require_typescript = __commonJS({
|
|
|
107513
107513
|
}
|
|
107514
107514
|
text = "";
|
|
107515
107515
|
}
|
|
107516
|
-
return text !== void 0 ? ts3.createSourceFile(
|
|
107516
|
+
return text !== void 0 ? ts3.createSourceFile(fileName2, text, languageVersion) : void 0;
|
|
107517
107517
|
},
|
|
107518
107518
|
getDefaultLibLocation: ts3.maybeBind(host, host.getDefaultLibLocation),
|
|
107519
107519
|
getDefaultLibFileName: function(options) {
|
|
@@ -107547,10 +107547,10 @@ var require_typescript = __commonJS({
|
|
|
107547
107547
|
readDirectory: ts3.maybeBind(host, host.readDirectory),
|
|
107548
107548
|
disableUseFileVersionAsSignature: host.disableUseFileVersionAsSignature
|
|
107549
107549
|
};
|
|
107550
|
-
function writeFile(
|
|
107550
|
+
function writeFile(fileName2, text, writeByteOrderMark, onError) {
|
|
107551
107551
|
try {
|
|
107552
107552
|
ts3.performance.mark("beforeIOWrite");
|
|
107553
|
-
ts3.writeFileEnsuringDirectories(
|
|
107553
|
+
ts3.writeFileEnsuringDirectories(fileName2, text, writeByteOrderMark, function(path2, data, writeByteOrderMark2) {
|
|
107554
107554
|
return host.writeFile(path2, data, writeByteOrderMark2);
|
|
107555
107555
|
}, function(path2) {
|
|
107556
107556
|
return host.createDirectory(path2);
|
|
@@ -107723,8 +107723,8 @@ var require_typescript = __commonJS({
|
|
|
107723
107723
|
host.createHash = ts3.maybeBind(system, system.createHash);
|
|
107724
107724
|
host.disableUseFileVersionAsSignature = system.disableUseFileVersionAsSignature;
|
|
107725
107725
|
ts3.setGetSourceFileAsHashVersioned(host, system);
|
|
107726
|
-
ts3.changeCompilerHostLikeToUseCache(host, function(
|
|
107727
|
-
return ts3.toPath(
|
|
107726
|
+
ts3.changeCompilerHostLikeToUseCache(host, function(fileName2) {
|
|
107727
|
+
return ts3.toPath(fileName2, host.getCurrentDirectory(), host.getCanonicalFileName);
|
|
107728
107728
|
});
|
|
107729
107729
|
return host;
|
|
107730
107730
|
}
|
|
@@ -107813,12 +107813,12 @@ var require_typescript = __commonJS({
|
|
|
107813
107813
|
}, directoryStructureHost);
|
|
107814
107814
|
ts3.setGetSourceFileAsHashVersioned(compilerHost, host);
|
|
107815
107815
|
var getNewSourceFile = compilerHost.getSourceFile;
|
|
107816
|
-
compilerHost.getSourceFile = function(
|
|
107816
|
+
compilerHost.getSourceFile = function(fileName2) {
|
|
107817
107817
|
var args = [];
|
|
107818
107818
|
for (var _i = 1; _i < arguments.length; _i++) {
|
|
107819
107819
|
args[_i - 1] = arguments[_i];
|
|
107820
107820
|
}
|
|
107821
|
-
return getVersionedSourceFileByPath.apply(void 0, __spreadArray([
|
|
107821
|
+
return getVersionedSourceFileByPath.apply(void 0, __spreadArray([fileName2, toPath(fileName2)], args));
|
|
107822
107822
|
};
|
|
107823
107823
|
compilerHost.getSourceFileByPath = getVersionedSourceFileByPath;
|
|
107824
107824
|
compilerHost.getNewLine = function() {
|
|
@@ -107981,8 +107981,8 @@ var require_typescript = __commonJS({
|
|
|
107981
107981
|
return host.getNewLine();
|
|
107982
107982
|
});
|
|
107983
107983
|
}
|
|
107984
|
-
function toPath(
|
|
107985
|
-
return ts3.toPath(
|
|
107984
|
+
function toPath(fileName2) {
|
|
107985
|
+
return ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
107986
107986
|
}
|
|
107987
107987
|
function isFileMissingOnHost(hostSourceFile) {
|
|
107988
107988
|
return typeof hostSourceFile === "boolean";
|
|
@@ -107990,26 +107990,26 @@ var require_typescript = __commonJS({
|
|
|
107990
107990
|
function isFilePresenceUnknownOnHost(hostSourceFile) {
|
|
107991
107991
|
return typeof hostSourceFile.version === "boolean";
|
|
107992
107992
|
}
|
|
107993
|
-
function fileExists(
|
|
107994
|
-
var path2 = toPath(
|
|
107993
|
+
function fileExists(fileName2) {
|
|
107994
|
+
var path2 = toPath(fileName2);
|
|
107995
107995
|
if (isFileMissingOnHost(sourceFilesCache.get(path2))) {
|
|
107996
107996
|
return false;
|
|
107997
107997
|
}
|
|
107998
|
-
return directoryStructureHost.fileExists(
|
|
107998
|
+
return directoryStructureHost.fileExists(fileName2);
|
|
107999
107999
|
}
|
|
108000
|
-
function getVersionedSourceFileByPath(
|
|
108000
|
+
function getVersionedSourceFileByPath(fileName2, path2, languageVersion, onError, shouldCreateNewSourceFile) {
|
|
108001
108001
|
var hostSourceFile = sourceFilesCache.get(path2);
|
|
108002
108002
|
if (isFileMissingOnHost(hostSourceFile)) {
|
|
108003
108003
|
return void 0;
|
|
108004
108004
|
}
|
|
108005
108005
|
if (hostSourceFile === void 0 || shouldCreateNewSourceFile || isFilePresenceUnknownOnHost(hostSourceFile)) {
|
|
108006
|
-
var sourceFile = getNewSourceFile(
|
|
108006
|
+
var sourceFile = getNewSourceFile(fileName2, languageVersion, onError);
|
|
108007
108007
|
if (hostSourceFile) {
|
|
108008
108008
|
if (sourceFile) {
|
|
108009
108009
|
hostSourceFile.sourceFile = sourceFile;
|
|
108010
108010
|
hostSourceFile.version = sourceFile.version;
|
|
108011
108011
|
if (!hostSourceFile.fileWatcher) {
|
|
108012
|
-
hostSourceFile.fileWatcher = watchFilePath(path2,
|
|
108012
|
+
hostSourceFile.fileWatcher = watchFilePath(path2, fileName2, onSourceFileChange, ts3.PollingInterval.Low, watchOptions, ts3.WatchType.SourceFile);
|
|
108013
108013
|
}
|
|
108014
108014
|
} else {
|
|
108015
108015
|
if (hostSourceFile.fileWatcher) {
|
|
@@ -108019,7 +108019,7 @@ var require_typescript = __commonJS({
|
|
|
108019
108019
|
}
|
|
108020
108020
|
} else {
|
|
108021
108021
|
if (sourceFile) {
|
|
108022
|
-
var fileWatcher = watchFilePath(path2,
|
|
108022
|
+
var fileWatcher = watchFilePath(path2, fileName2, onSourceFileChange, ts3.PollingInterval.Low, watchOptions, ts3.WatchType.SourceFile);
|
|
108023
108023
|
sourceFilesCache.set(path2, { sourceFile, version: sourceFile.version, fileWatcher });
|
|
108024
108024
|
} else {
|
|
108025
108025
|
sourceFilesCache.set(path2, false);
|
|
@@ -108191,9 +108191,9 @@ var require_typescript = __commonJS({
|
|
|
108191
108191
|
parseConfigFileHost.onUnRecoverableConfigFileDiagnostic = onUnRecoverableConfigFileDiagnostic;
|
|
108192
108192
|
return parsedCommandLine;
|
|
108193
108193
|
}
|
|
108194
|
-
function onReleaseParsedCommandLine(
|
|
108194
|
+
function onReleaseParsedCommandLine(fileName2) {
|
|
108195
108195
|
var _a2;
|
|
108196
|
-
var path2 = toPath(
|
|
108196
|
+
var path2 = toPath(fileName2);
|
|
108197
108197
|
var config = parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.get(path2);
|
|
108198
108198
|
if (!config)
|
|
108199
108199
|
return;
|
|
@@ -108204,28 +108204,28 @@ var require_typescript = __commonJS({
|
|
|
108204
108204
|
ts3.clearSharedExtendedConfigFileWatcher(path2, sharedExtendedConfigFileWatchers);
|
|
108205
108205
|
}
|
|
108206
108206
|
function watchFilePath(path2, file, callback, pollingInterval, options, watchType) {
|
|
108207
|
-
return watchFile(file, function(
|
|
108208
|
-
return callback(
|
|
108207
|
+
return watchFile(file, function(fileName2, eventKind) {
|
|
108208
|
+
return callback(fileName2, eventKind, path2);
|
|
108209
108209
|
}, pollingInterval, options, watchType);
|
|
108210
108210
|
}
|
|
108211
|
-
function onSourceFileChange(
|
|
108212
|
-
updateCachedSystemWithFile(
|
|
108211
|
+
function onSourceFileChange(fileName2, eventKind, path2) {
|
|
108212
|
+
updateCachedSystemWithFile(fileName2, path2, eventKind);
|
|
108213
108213
|
if (eventKind === ts3.FileWatcherEventKind.Deleted && sourceFilesCache.has(path2)) {
|
|
108214
108214
|
resolutionCache.invalidateResolutionOfFile(path2);
|
|
108215
108215
|
}
|
|
108216
108216
|
nextSourceFileVersion(path2);
|
|
108217
108217
|
scheduleProgramUpdate();
|
|
108218
108218
|
}
|
|
108219
|
-
function updateCachedSystemWithFile(
|
|
108219
|
+
function updateCachedSystemWithFile(fileName2, path2, eventKind) {
|
|
108220
108220
|
if (cachedDirectoryStructureHost) {
|
|
108221
|
-
cachedDirectoryStructureHost.addOrDeleteFile(
|
|
108221
|
+
cachedDirectoryStructureHost.addOrDeleteFile(fileName2, path2, eventKind);
|
|
108222
108222
|
}
|
|
108223
108223
|
}
|
|
108224
108224
|
function watchMissingFilePath(missingFilePath) {
|
|
108225
108225
|
return (parsedConfigs === null || parsedConfigs === void 0 ? void 0 : parsedConfigs.has(missingFilePath)) ? ts3.noopFileWatcher : watchFilePath(missingFilePath, missingFilePath, onMissingFileChange, ts3.PollingInterval.Medium, watchOptions, ts3.WatchType.MissingFile);
|
|
108226
108226
|
}
|
|
108227
|
-
function onMissingFileChange(
|
|
108228
|
-
updateCachedSystemWithFile(
|
|
108227
|
+
function onMissingFileChange(fileName2, eventKind, missingFilePath) {
|
|
108228
|
+
updateCachedSystemWithFile(fileName2, missingFilePath, eventKind);
|
|
108229
108229
|
if (eventKind === ts3.FileWatcherEventKind.Created && missingFilesMap.has(missingFilePath)) {
|
|
108230
108230
|
missingFilesMap.get(missingFilePath).close();
|
|
108231
108231
|
missingFilesMap.delete(missingFilePath);
|
|
@@ -108400,8 +108400,8 @@ var require_typescript = __commonJS({
|
|
|
108400
108400
|
function newer(date1, date2) {
|
|
108401
108401
|
return date2 > date1 ? date2 : date1;
|
|
108402
108402
|
}
|
|
108403
|
-
function isDeclarationFile(
|
|
108404
|
-
return ts3.fileExtensionIs(
|
|
108403
|
+
function isDeclarationFile(fileName2) {
|
|
108404
|
+
return ts3.fileExtensionIs(fileName2, ".d.ts");
|
|
108405
108405
|
}
|
|
108406
108406
|
function isCircularBuildOrder(buildOrder) {
|
|
108407
108407
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
@@ -108480,8 +108480,8 @@ var require_typescript = __commonJS({
|
|
|
108480
108480
|
return state.projectCompilerOptions;
|
|
108481
108481
|
});
|
|
108482
108482
|
ts3.setGetSourceFileAsHashVersioned(compilerHost, host);
|
|
108483
|
-
compilerHost.getParsedCommandLine = function(
|
|
108484
|
-
return parseConfigFile(state,
|
|
108483
|
+
compilerHost.getParsedCommandLine = function(fileName2) {
|
|
108484
|
+
return parseConfigFile(state, fileName2, toResolvedConfigFilePath(state, fileName2));
|
|
108485
108485
|
};
|
|
108486
108486
|
compilerHost.resolveModuleNames = ts3.maybeBind(host, host.resolveModuleNames);
|
|
108487
108487
|
compilerHost.resolveTypeReferenceDirectives = ts3.maybeBind(host, host.resolveTypeReferenceDirectives);
|
|
@@ -108550,16 +108550,16 @@ var require_typescript = __commonJS({
|
|
|
108550
108550
|
};
|
|
108551
108551
|
return state;
|
|
108552
108552
|
}
|
|
108553
|
-
function toPath(state,
|
|
108554
|
-
return ts3.toPath(
|
|
108553
|
+
function toPath(state, fileName2) {
|
|
108554
|
+
return ts3.toPath(fileName2, state.currentDirectory, state.getCanonicalFileName);
|
|
108555
108555
|
}
|
|
108556
|
-
function toResolvedConfigFilePath(state,
|
|
108556
|
+
function toResolvedConfigFilePath(state, fileName2) {
|
|
108557
108557
|
var resolvedConfigFilePaths = state.resolvedConfigFilePaths;
|
|
108558
|
-
var path2 = resolvedConfigFilePaths.get(
|
|
108558
|
+
var path2 = resolvedConfigFilePaths.get(fileName2);
|
|
108559
108559
|
if (path2 !== void 0)
|
|
108560
108560
|
return path2;
|
|
108561
|
-
var resolvedPath = toPath(state,
|
|
108562
|
-
resolvedConfigFilePaths.set(
|
|
108561
|
+
var resolvedPath = toPath(state, fileName2);
|
|
108562
|
+
resolvedConfigFilePaths.set(fileName2, resolvedPath);
|
|
108563
108563
|
return resolvedPath;
|
|
108564
108564
|
}
|
|
108565
108565
|
function isParsedCommandLine(entry) {
|
|
@@ -108695,8 +108695,8 @@ var require_typescript = __commonJS({
|
|
|
108695
108695
|
var compilerHost = state.compilerHost, host = state.host;
|
|
108696
108696
|
var originalReadFileWithCache = state.readFileWithCache;
|
|
108697
108697
|
var originalGetSourceFile = compilerHost.getSourceFile;
|
|
108698
|
-
var _a = ts3.changeCompilerHostLikeToUseCache(host, function(
|
|
108699
|
-
return toPath(state,
|
|
108698
|
+
var _a = ts3.changeCompilerHostLikeToUseCache(host, function(fileName2) {
|
|
108699
|
+
return toPath(state, fileName2);
|
|
108700
108700
|
}, function() {
|
|
108701
108701
|
var args = [];
|
|
108702
108702
|
for (var _i = 0; _i < arguments.length; _i++) {
|
|
@@ -108833,9 +108833,9 @@ var require_typescript = __commonJS({
|
|
|
108833
108833
|
return program3.getProgramOrUndefined();
|
|
108834
108834
|
});
|
|
108835
108835
|
},
|
|
108836
|
-
getSourceFile: function(
|
|
108836
|
+
getSourceFile: function(fileName2) {
|
|
108837
108837
|
return withProgramOrUndefined(function(program3) {
|
|
108838
|
-
return program3.getSourceFile(
|
|
108838
|
+
return program3.getSourceFile(fileName2);
|
|
108839
108839
|
});
|
|
108840
108840
|
},
|
|
108841
108841
|
getSourceFiles: function() {
|
|
@@ -109640,8 +109640,8 @@ var require_typescript = __commonJS({
|
|
|
109640
109640
|
return invalidateProjectAndScheduleBuilds(state, projectConfigFilePath, ts3.ConfigFileProgramReloadLevel.Full);
|
|
109641
109641
|
});
|
|
109642
109642
|
}, ts3.PollingInterval.High, parsed === null || parsed === void 0 ? void 0 : parsed.watchOptions, ts3.WatchType.ExtendedConfigFile);
|
|
109643
|
-
}, function(
|
|
109644
|
-
return toPath(state,
|
|
109643
|
+
}, function(fileName2) {
|
|
109644
|
+
return toPath(state, fileName2);
|
|
109645
109645
|
});
|
|
109646
109646
|
}
|
|
109647
109647
|
function watchWildCardDirectories(state, resolved, resolvedPath, parsed) {
|
|
@@ -109662,8 +109662,8 @@ var require_typescript = __commonJS({
|
|
|
109662
109662
|
writeLog: function(s) {
|
|
109663
109663
|
return state.writeLog(s);
|
|
109664
109664
|
},
|
|
109665
|
-
toPath: function(
|
|
109666
|
-
return toPath(state,
|
|
109665
|
+
toPath: function(fileName2) {
|
|
109666
|
+
return toPath(state, fileName2);
|
|
109667
109667
|
}
|
|
109668
109668
|
}))
|
|
109669
109669
|
return;
|
|
@@ -109674,8 +109674,8 @@ var require_typescript = __commonJS({
|
|
|
109674
109674
|
function watchInputFiles(state, resolved, resolvedPath, parsed) {
|
|
109675
109675
|
if (!state.watch)
|
|
109676
109676
|
return;
|
|
109677
|
-
ts3.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts3.arrayToMap(parsed.fileNames, function(
|
|
109678
|
-
return toPath(state,
|
|
109677
|
+
ts3.mutateMap(getOrCreateValueMapFromConfigFileMap(state.allWatchedInputFiles, resolvedPath), ts3.arrayToMap(parsed.fileNames, function(fileName2) {
|
|
109678
|
+
return toPath(state, fileName2);
|
|
109679
109679
|
}), {
|
|
109680
109680
|
createNewValue: function(_path, input) {
|
|
109681
109681
|
return state.watchFile(input, function() {
|
|
@@ -109979,8 +109979,8 @@ var require_typescript = __commonJS({
|
|
|
109979
109979
|
return { cachedTypingPaths: [], newTypingNames: [], filesToWatch: [] };
|
|
109980
109980
|
}
|
|
109981
109981
|
var inferredTypings = new ts3.Map();
|
|
109982
|
-
fileNames = ts3.mapDefined(fileNames, function(
|
|
109983
|
-
var path2 = ts3.normalizePath(
|
|
109982
|
+
fileNames = ts3.mapDefined(fileNames, function(fileName2) {
|
|
109983
|
+
var path2 = ts3.normalizePath(fileName2);
|
|
109984
109984
|
if (ts3.hasJSFileExtension(path2)) {
|
|
109985
109985
|
return path2;
|
|
109986
109986
|
}
|
|
@@ -110084,8 +110084,8 @@ var require_typescript = __commonJS({
|
|
|
110084
110084
|
log("Searching for typing names in " + packagesFolderPath + "; all files: " + JSON.stringify(fileNames2));
|
|
110085
110085
|
var packageNames = [];
|
|
110086
110086
|
for (var _i2 = 0, fileNames_1 = fileNames2; _i2 < fileNames_1.length; _i2++) {
|
|
110087
|
-
var
|
|
110088
|
-
var normalizedFileName = ts3.normalizePath(
|
|
110087
|
+
var fileName2 = fileNames_1[_i2];
|
|
110088
|
+
var normalizedFileName = ts3.normalizePath(fileName2);
|
|
110089
110089
|
var baseFileName = ts3.getBaseFileName(normalizedFileName);
|
|
110090
110090
|
if (baseFileName !== "package.json" && baseFileName !== "bower.json") {
|
|
110091
110091
|
continue;
|
|
@@ -111920,8 +111920,8 @@ var require_typescript = __commonJS({
|
|
|
111920
111920
|
ts3.compilerOptionsIndicateEs6Modules = compilerOptionsIndicateEs6Modules;
|
|
111921
111921
|
function createModuleSpecifierResolutionHost(program2, host) {
|
|
111922
111922
|
return {
|
|
111923
|
-
fileExists: function(
|
|
111924
|
-
return program2.fileExists(
|
|
111923
|
+
fileExists: function(fileName2) {
|
|
111924
|
+
return program2.fileExists(fileName2);
|
|
111925
111925
|
},
|
|
111926
111926
|
getCurrentDirectory: function() {
|
|
111927
111927
|
return host.getCurrentDirectory();
|
|
@@ -111935,11 +111935,11 @@ var require_typescript = __commonJS({
|
|
|
111935
111935
|
return program2.getSourceFiles();
|
|
111936
111936
|
},
|
|
111937
111937
|
redirectTargetsMap: program2.redirectTargetsMap,
|
|
111938
|
-
getProjectReferenceRedirect: function(
|
|
111939
|
-
return program2.getProjectReferenceRedirect(
|
|
111938
|
+
getProjectReferenceRedirect: function(fileName2) {
|
|
111939
|
+
return program2.getProjectReferenceRedirect(fileName2);
|
|
111940
111940
|
},
|
|
111941
|
-
isSourceOfProjectReferenceRedirect: function(
|
|
111942
|
-
return program2.isSourceOfProjectReferenceRedirect(
|
|
111941
|
+
isSourceOfProjectReferenceRedirect: function(fileName2) {
|
|
111942
|
+
return program2.isSourceOfProjectReferenceRedirect(fileName2);
|
|
111943
111943
|
},
|
|
111944
111944
|
getNearestAncestorDirectoryWithPackageJson: ts3.maybeBind(host, host.getNearestAncestorDirectoryWithPackageJson),
|
|
111945
111945
|
getFileIncludeReasons: function() {
|
|
@@ -112419,8 +112419,8 @@ var require_typescript = __commonJS({
|
|
|
112419
112419
|
return !!location.parent && ts3.isImportOrExportSpecifier(location.parent) && location.parent.propertyName === location;
|
|
112420
112420
|
}
|
|
112421
112421
|
ts3.isImportOrExportSpecifierName = isImportOrExportSpecifierName;
|
|
112422
|
-
function getScriptKind(
|
|
112423
|
-
return ts3.ensureScriptKind(
|
|
112422
|
+
function getScriptKind(fileName2, host) {
|
|
112423
|
+
return ts3.ensureScriptKind(fileName2, host.getScriptKind && host.getScriptKind(fileName2));
|
|
112424
112424
|
}
|
|
112425
112425
|
ts3.getScriptKind = getScriptKind;
|
|
112426
112426
|
function getSymbolTarget(symbol, checker) {
|
|
@@ -112563,8 +112563,8 @@ var require_typescript = __commonJS({
|
|
|
112563
112563
|
var delta = 0;
|
|
112564
112564
|
var lastPos = -1;
|
|
112565
112565
|
for (var _i = 0, edits_1 = edits; _i < edits_1.length; _i++) {
|
|
112566
|
-
var _a = edits_1[_i],
|
|
112567
|
-
ts3.Debug.assert(
|
|
112566
|
+
var _a = edits_1[_i], fileName2 = _a.fileName, textChanges_2 = _a.textChanges;
|
|
112567
|
+
ts3.Debug.assert(fileName2 === renameFilename);
|
|
112568
112568
|
for (var _b = 0, textChanges_1 = textChanges_2; _b < textChanges_1.length; _b++) {
|
|
112569
112569
|
var change = textChanges_1[_b];
|
|
112570
112570
|
var span = change.span, newText = change.newText;
|
|
@@ -112845,12 +112845,12 @@ var require_typescript = __commonJS({
|
|
|
112845
112845
|
return packageJson;
|
|
112846
112846
|
}
|
|
112847
112847
|
ts3.findPackageJson = findPackageJson;
|
|
112848
|
-
function getPackageJsonsVisibleToFile(
|
|
112848
|
+
function getPackageJsonsVisibleToFile(fileName2, host) {
|
|
112849
112849
|
if (!host.fileExists) {
|
|
112850
112850
|
return [];
|
|
112851
112851
|
}
|
|
112852
112852
|
var packageJsons = [];
|
|
112853
|
-
ts3.forEachAncestorDirectory(ts3.getDirectoryPath(
|
|
112853
|
+
ts3.forEachAncestorDirectory(ts3.getDirectoryPath(fileName2), function(ancestor) {
|
|
112854
112854
|
var packageJsonFileName = ts3.combinePaths(ancestor, "package.json");
|
|
112855
112855
|
if (host.fileExists(packageJsonFileName)) {
|
|
112856
112856
|
var info = createPackageJsonInfo(packageJsonFileName, host);
|
|
@@ -112862,12 +112862,12 @@ var require_typescript = __commonJS({
|
|
|
112862
112862
|
return packageJsons;
|
|
112863
112863
|
}
|
|
112864
112864
|
ts3.getPackageJsonsVisibleToFile = getPackageJsonsVisibleToFile;
|
|
112865
|
-
function createPackageJsonInfo(
|
|
112865
|
+
function createPackageJsonInfo(fileName2, host) {
|
|
112866
112866
|
if (!host.readFile) {
|
|
112867
112867
|
return void 0;
|
|
112868
112868
|
}
|
|
112869
112869
|
var dependencyKeys = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"];
|
|
112870
|
-
var stringContent = host.readFile(
|
|
112870
|
+
var stringContent = host.readFile(fileName2) || "";
|
|
112871
112871
|
var content = tryParseJson(stringContent);
|
|
112872
112872
|
var info = {};
|
|
112873
112873
|
if (content) {
|
|
@@ -112890,7 +112890,7 @@ var require_typescript = __commonJS({
|
|
|
112890
112890
|
[8, info.optionalDependencies],
|
|
112891
112891
|
[4, info.peerDependencies]
|
|
112892
112892
|
];
|
|
112893
|
-
return __assign(__assign({}, info), { parseable: !!content, fileName, get, has: function(dependencyName, inGroups) {
|
|
112893
|
+
return __assign(__assign({}, info), { parseable: !!content, fileName: fileName2, get, has: function(dependencyName, inGroups) {
|
|
112894
112894
|
return !!get(dependencyName, inGroups);
|
|
112895
112895
|
} });
|
|
112896
112896
|
function get(dependencyName, inGroups) {
|
|
@@ -117116,19 +117116,19 @@ var require_typescript = __commonJS({
|
|
|
117116
117116
|
return e.span;
|
|
117117
117117
|
});
|
|
117118
117118
|
return ts3.mapDefined(ts3.arrayFrom(map2.entries()), function(_a) {
|
|
117119
|
-
var
|
|
117120
|
-
if (!sourceFilesSet.has(
|
|
117121
|
-
if (!program2.redirectTargetsMap.has(
|
|
117119
|
+
var fileName2 = _a[0], highlightSpans = _a[1];
|
|
117120
|
+
if (!sourceFilesSet.has(fileName2)) {
|
|
117121
|
+
if (!program2.redirectTargetsMap.has(fileName2)) {
|
|
117122
117122
|
return void 0;
|
|
117123
117123
|
}
|
|
117124
|
-
var redirectTarget_1 = program2.getSourceFile(
|
|
117124
|
+
var redirectTarget_1 = program2.getSourceFile(fileName2);
|
|
117125
117125
|
var redirect = ts3.find(sourceFilesToSearch, function(f) {
|
|
117126
117126
|
return !!f.redirectInfo && f.redirectInfo.redirectTarget === redirectTarget_1;
|
|
117127
117127
|
});
|
|
117128
|
-
|
|
117129
|
-
ts3.Debug.assert(sourceFilesSet.has(
|
|
117128
|
+
fileName2 = redirect.fileName;
|
|
117129
|
+
ts3.Debug.assert(sourceFilesSet.has(fileName2));
|
|
117130
117130
|
}
|
|
117131
|
-
return { fileName, highlightSpans };
|
|
117131
|
+
return { fileName: fileName2, highlightSpans };
|
|
117132
117132
|
});
|
|
117133
117133
|
}
|
|
117134
117134
|
function getSyntacticDocumentHighlights(node, sourceFile) {
|
|
@@ -117541,29 +117541,29 @@ var require_typescript = __commonJS({
|
|
|
117541
117541
|
});
|
|
117542
117542
|
return JSON.stringify(bucketInfoArray, void 0, 2);
|
|
117543
117543
|
}
|
|
117544
|
-
function acquireDocument(
|
|
117545
|
-
var path2 = ts3.toPath(
|
|
117544
|
+
function acquireDocument(fileName2, compilationSettings, scriptSnapshot, version, scriptKind) {
|
|
117545
|
+
var path2 = ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
117546
117546
|
var key = getKeyForCompilationSettings(compilationSettings);
|
|
117547
|
-
return acquireDocumentWithKey(
|
|
117547
|
+
return acquireDocumentWithKey(fileName2, path2, compilationSettings, key, scriptSnapshot, version, scriptKind);
|
|
117548
117548
|
}
|
|
117549
|
-
function acquireDocumentWithKey(
|
|
117550
|
-
return acquireOrUpdateDocument(
|
|
117549
|
+
function acquireDocumentWithKey(fileName2, path2, compilationSettings, key, scriptSnapshot, version, scriptKind) {
|
|
117550
|
+
return acquireOrUpdateDocument(fileName2, path2, compilationSettings, key, scriptSnapshot, version, true, scriptKind);
|
|
117551
117551
|
}
|
|
117552
|
-
function updateDocument(
|
|
117553
|
-
var path2 = ts3.toPath(
|
|
117552
|
+
function updateDocument(fileName2, compilationSettings, scriptSnapshot, version, scriptKind) {
|
|
117553
|
+
var path2 = ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
117554
117554
|
var key = getKeyForCompilationSettings(compilationSettings);
|
|
117555
|
-
return updateDocumentWithKey(
|
|
117555
|
+
return updateDocumentWithKey(fileName2, path2, compilationSettings, key, scriptSnapshot, version, scriptKind);
|
|
117556
117556
|
}
|
|
117557
|
-
function updateDocumentWithKey(
|
|
117558
|
-
return acquireOrUpdateDocument(
|
|
117557
|
+
function updateDocumentWithKey(fileName2, path2, compilationSettings, key, scriptSnapshot, version, scriptKind) {
|
|
117558
|
+
return acquireOrUpdateDocument(fileName2, path2, compilationSettings, key, scriptSnapshot, version, false, scriptKind);
|
|
117559
117559
|
}
|
|
117560
117560
|
function getDocumentRegistryEntry(bucketEntry, scriptKind) {
|
|
117561
117561
|
var entry = isDocumentRegistryEntry(bucketEntry) ? bucketEntry : bucketEntry.get(ts3.Debug.checkDefined(scriptKind, "If there are more than one scriptKind's for same document the scriptKind should be provided"));
|
|
117562
117562
|
ts3.Debug.assert(scriptKind === void 0 || !entry || entry.sourceFile.scriptKind === scriptKind, "Script kind should match provided ScriptKind:" + scriptKind + " and sourceFile.scriptKind: " + (entry === null || entry === void 0 ? void 0 : entry.sourceFile.scriptKind) + ", !entry: " + !entry);
|
|
117563
117563
|
return entry;
|
|
117564
117564
|
}
|
|
117565
|
-
function acquireOrUpdateDocument(
|
|
117566
|
-
scriptKind = ts3.ensureScriptKind(
|
|
117565
|
+
function acquireOrUpdateDocument(fileName2, path2, compilationSettings, key, scriptSnapshot, version, acquiring, scriptKind) {
|
|
117566
|
+
scriptKind = ts3.ensureScriptKind(fileName2, scriptKind);
|
|
117567
117567
|
var scriptTarget = scriptKind === 6 ? 100 : compilationSettings.target || 1;
|
|
117568
117568
|
var bucket = ts3.getOrUpdate(buckets, key, function() {
|
|
117569
117569
|
return new ts3.Map();
|
|
@@ -117582,7 +117582,7 @@ var require_typescript = __commonJS({
|
|
|
117582
117582
|
}
|
|
117583
117583
|
}
|
|
117584
117584
|
if (!entry) {
|
|
117585
|
-
var sourceFile = ts3.createLanguageServiceSourceFile(
|
|
117585
|
+
var sourceFile = ts3.createLanguageServiceSourceFile(fileName2, scriptSnapshot, scriptTarget, version, false, scriptKind);
|
|
117586
117586
|
if (externalCache) {
|
|
117587
117587
|
externalCache.setDocument(key, path2, sourceFile);
|
|
117588
117588
|
}
|
|
@@ -117617,8 +117617,8 @@ var require_typescript = __commonJS({
|
|
|
117617
117617
|
}
|
|
117618
117618
|
}
|
|
117619
117619
|
}
|
|
117620
|
-
function releaseDocument(
|
|
117621
|
-
var path2 = ts3.toPath(
|
|
117620
|
+
function releaseDocument(fileName2, compilationSettings, scriptKind) {
|
|
117621
|
+
var path2 = ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
117622
117622
|
var key = getKeyForCompilationSettings(compilationSettings);
|
|
117623
117623
|
return releaseDocumentWithKey(path2, key, scriptKind);
|
|
117624
117624
|
}
|
|
@@ -118692,19 +118692,19 @@ var require_typescript = __commonJS({
|
|
|
118692
118692
|
return mergeReferences(program2, moduleReferences, references, moduleReferencesOfExportTarget);
|
|
118693
118693
|
}
|
|
118694
118694
|
Core2.getReferencedSymbolsForNode = getReferencedSymbolsForNode;
|
|
118695
|
-
function getReferencesForFileName(
|
|
118695
|
+
function getReferencesForFileName(fileName2, program2, sourceFiles, sourceFilesSet) {
|
|
118696
118696
|
var _a, _b;
|
|
118697
118697
|
if (sourceFilesSet === void 0) {
|
|
118698
118698
|
sourceFilesSet = new ts3.Set(sourceFiles.map(function(f) {
|
|
118699
118699
|
return f.fileName;
|
|
118700
118700
|
}));
|
|
118701
118701
|
}
|
|
118702
|
-
var moduleSymbol = (_a = program2.getSourceFile(
|
|
118702
|
+
var moduleSymbol = (_a = program2.getSourceFile(fileName2)) === null || _a === void 0 ? void 0 : _a.symbol;
|
|
118703
118703
|
if (moduleSymbol) {
|
|
118704
118704
|
return ((_b = getReferencedSymbolsForModule(program2, moduleSymbol, false, sourceFiles, sourceFilesSet)[0]) === null || _b === void 0 ? void 0 : _b.references) || ts3.emptyArray;
|
|
118705
118705
|
}
|
|
118706
118706
|
var fileIncludeReasons = program2.getFileIncludeReasons();
|
|
118707
|
-
var referencedFile = program2.getSourceFile(
|
|
118707
|
+
var referencedFile = program2.getSourceFile(fileName2);
|
|
118708
118708
|
return referencedFile && fileIncludeReasons && getReferencesForNonModule(referencedFile, fileIncludeReasons, program2) || ts3.emptyArray;
|
|
118709
118709
|
}
|
|
118710
118710
|
Core2.getReferencesForFileName = getReferencesForFileName;
|
|
@@ -118995,10 +118995,10 @@ var require_typescript = __commonJS({
|
|
|
118995
118995
|
return references.push(nodeEntry(node, kind));
|
|
118996
118996
|
};
|
|
118997
118997
|
};
|
|
118998
|
-
State3.prototype.addStringOrCommentReference = function(
|
|
118998
|
+
State3.prototype.addStringOrCommentReference = function(fileName2, textSpan) {
|
|
118999
118999
|
this.result.push({
|
|
119000
119000
|
definition: void 0,
|
|
119001
|
-
references: [{ kind: 0, fileName, textSpan }]
|
|
119001
|
+
references: [{ kind: 0, fileName: fileName2, textSpan }]
|
|
119002
119002
|
});
|
|
119003
119003
|
};
|
|
119004
119004
|
State3.prototype.markSearchedSymbols = function(sourceFile, symbols) {
|
|
@@ -120575,10 +120575,10 @@ var require_typescript = __commonJS({
|
|
|
120575
120575
|
var node = ts3.getTokenAtPosition(sourceFile, position);
|
|
120576
120576
|
if (ts3.isModuleSpecifierLike(node) && ts3.isExternalModuleNameRelative(node.text) && sourceFile.resolvedModules.has(node.text)) {
|
|
120577
120577
|
var verifiedFileName = (_b = sourceFile.resolvedModules.get(node.text)) === null || _b === void 0 ? void 0 : _b.resolvedFileName;
|
|
120578
|
-
var
|
|
120578
|
+
var fileName2 = verifiedFileName || ts3.resolvePath(ts3.getDirectoryPath(sourceFile.fileName), node.text);
|
|
120579
120579
|
return {
|
|
120580
|
-
file: program2.getSourceFile(
|
|
120581
|
-
fileName,
|
|
120580
|
+
file: program2.getSourceFile(fileName2),
|
|
120581
|
+
fileName: fileName2,
|
|
120582
120582
|
reference: {
|
|
120583
120583
|
pos: node.getStart(),
|
|
120584
120584
|
end: node.getEnd(),
|
|
@@ -121198,7 +121198,7 @@ var require_typescript = __commonJS({
|
|
|
121198
121198
|
return (maxResultCount === void 0 ? rawItems : rawItems.slice(0, maxResultCount)).map(createNavigateToItem);
|
|
121199
121199
|
}
|
|
121200
121200
|
NavigateTo2.getNavigateToItems = getNavigateToItems;
|
|
121201
|
-
function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker,
|
|
121201
|
+
function getItemsFromNamedDeclaration(patternMatcher, name, declarations, checker, fileName2, rawItems) {
|
|
121202
121202
|
var match = patternMatcher.getMatchForLastSegmentOfPattern(name);
|
|
121203
121203
|
if (!match) {
|
|
121204
121204
|
return;
|
|
@@ -121210,10 +121210,10 @@ var require_typescript = __commonJS({
|
|
|
121210
121210
|
if (patternMatcher.patternContainsDots) {
|
|
121211
121211
|
var fullMatch = patternMatcher.getFullMatch(getContainers(declaration), name);
|
|
121212
121212
|
if (fullMatch) {
|
|
121213
|
-
rawItems.push({ name, fileName, matchKind: fullMatch.kind, isCaseSensitive: fullMatch.isCaseSensitive, declaration });
|
|
121213
|
+
rawItems.push({ name, fileName: fileName2, matchKind: fullMatch.kind, isCaseSensitive: fullMatch.isCaseSensitive, declaration });
|
|
121214
121214
|
}
|
|
121215
121215
|
} else {
|
|
121216
|
-
rawItems.push({ name, fileName, matchKind: match.kind, isCaseSensitive: match.isCaseSensitive, declaration });
|
|
121216
|
+
rawItems.push({ name, fileName: fileName2, matchKind: match.kind, isCaseSensitive: match.isCaseSensitive, declaration });
|
|
121217
121217
|
}
|
|
121218
121218
|
}
|
|
121219
121219
|
}
|
|
@@ -123001,9 +123001,9 @@ var require_typescript = __commonJS({
|
|
|
123001
123001
|
return currentToken;
|
|
123002
123002
|
}
|
|
123003
123003
|
function getFileReference() {
|
|
123004
|
-
var
|
|
123004
|
+
var fileName2 = ts3.scanner.getTokenValue();
|
|
123005
123005
|
var pos = ts3.scanner.getTokenPos();
|
|
123006
|
-
return { fileName, pos, end: pos +
|
|
123006
|
+
return { fileName: fileName2, pos, end: pos + fileName2.length };
|
|
123007
123007
|
}
|
|
123008
123008
|
function recordAmbientExternalModule() {
|
|
123009
123009
|
if (!ambientExternalModules) {
|
|
@@ -124085,8 +124085,8 @@ var require_typescript = __commonJS({
|
|
|
124085
124085
|
var sourceFileLike = new ts3.Map();
|
|
124086
124086
|
var documentPositionMappers = new ts3.Map();
|
|
124087
124087
|
return { tryGetSourcePosition, tryGetGeneratedPosition, toLineColumnOffset, clearCache };
|
|
124088
|
-
function toPath(
|
|
124089
|
-
return ts3.toPath(
|
|
124088
|
+
function toPath(fileName2) {
|
|
124089
|
+
return ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
124090
124090
|
}
|
|
124091
124091
|
function getDocumentPositionMapper2(generatedFileName, sourceFileName) {
|
|
124092
124092
|
var path2 = toPath(generatedFileName);
|
|
@@ -124134,16 +124134,16 @@ var require_typescript = __commonJS({
|
|
|
124134
124134
|
var newLoc = getDocumentPositionMapper2(declarationPath, info.fileName).getGeneratedPosition(info);
|
|
124135
124135
|
return newLoc === info ? void 0 : newLoc;
|
|
124136
124136
|
}
|
|
124137
|
-
function getSourceFile(
|
|
124137
|
+
function getSourceFile(fileName2) {
|
|
124138
124138
|
var program2 = host.getProgram();
|
|
124139
124139
|
if (!program2)
|
|
124140
124140
|
return void 0;
|
|
124141
|
-
var path2 = toPath(
|
|
124141
|
+
var path2 = toPath(fileName2);
|
|
124142
124142
|
var file = program2.getSourceFileByPath(path2);
|
|
124143
124143
|
return file && file.resolvedPath === path2 ? file : void 0;
|
|
124144
124144
|
}
|
|
124145
|
-
function getOrCreateSourceFileLike(
|
|
124146
|
-
var path2 = toPath(
|
|
124145
|
+
function getOrCreateSourceFileLike(fileName2) {
|
|
124146
|
+
var path2 = toPath(fileName2);
|
|
124147
124147
|
var fileFromCache = sourceFileLike.get(path2);
|
|
124148
124148
|
if (fileFromCache !== void 0)
|
|
124149
124149
|
return fileFromCache ? fileFromCache : void 0;
|
|
@@ -124156,11 +124156,11 @@ var require_typescript = __commonJS({
|
|
|
124156
124156
|
sourceFileLike.set(path2, file);
|
|
124157
124157
|
return file ? file : void 0;
|
|
124158
124158
|
}
|
|
124159
|
-
function getSourceFileLike(
|
|
124160
|
-
return !host.getSourceFileLike ? getSourceFile(
|
|
124159
|
+
function getSourceFileLike(fileName2) {
|
|
124160
|
+
return !host.getSourceFileLike ? getSourceFile(fileName2) || getOrCreateSourceFileLike(fileName2) : host.getSourceFileLike(fileName2);
|
|
124161
124161
|
}
|
|
124162
|
-
function toLineColumnOffset(
|
|
124163
|
-
var file = getSourceFileLike(
|
|
124162
|
+
function toLineColumnOffset(fileName2, position) {
|
|
124163
|
+
var file = getSourceFileLike(fileName2);
|
|
124164
124164
|
return file.getLineAndCharacterOfPosition(position);
|
|
124165
124165
|
}
|
|
124166
124166
|
function clearCache() {
|
|
@@ -125052,8 +125052,8 @@ var require_typescript = __commonJS({
|
|
|
125052
125052
|
var outputText;
|
|
125053
125053
|
var sourceMapText;
|
|
125054
125054
|
var compilerHost = {
|
|
125055
|
-
getSourceFile: function(
|
|
125056
|
-
return
|
|
125055
|
+
getSourceFile: function(fileName2) {
|
|
125056
|
+
return fileName2 === ts3.normalizePath(inputFileName) ? sourceFile : void 0;
|
|
125057
125057
|
},
|
|
125058
125058
|
writeFile: function(name, text) {
|
|
125059
125059
|
if (ts3.fileExtensionIs(name, ".map")) {
|
|
@@ -125070,8 +125070,8 @@ var require_typescript = __commonJS({
|
|
|
125070
125070
|
useCaseSensitiveFileNames: function() {
|
|
125071
125071
|
return false;
|
|
125072
125072
|
},
|
|
125073
|
-
getCanonicalFileName: function(
|
|
125074
|
-
return
|
|
125073
|
+
getCanonicalFileName: function(fileName2) {
|
|
125074
|
+
return fileName2;
|
|
125075
125075
|
},
|
|
125076
125076
|
getCurrentDirectory: function() {
|
|
125077
125077
|
return "";
|
|
@@ -125079,8 +125079,8 @@ var require_typescript = __commonJS({
|
|
|
125079
125079
|
getNewLine: function() {
|
|
125080
125080
|
return newLine;
|
|
125081
125081
|
},
|
|
125082
|
-
fileExists: function(
|
|
125083
|
-
return
|
|
125082
|
+
fileExists: function(fileName2) {
|
|
125083
|
+
return fileName2 === inputFileName;
|
|
125084
125084
|
},
|
|
125085
125085
|
readFile: function() {
|
|
125086
125086
|
return "";
|
|
@@ -125103,8 +125103,8 @@ var require_typescript = __commonJS({
|
|
|
125103
125103
|
return { outputText, diagnostics, sourceMapText };
|
|
125104
125104
|
}
|
|
125105
125105
|
ts3.transpileModule = transpileModule;
|
|
125106
|
-
function transpile(input, compilerOptions,
|
|
125107
|
-
var output = transpileModule(input, { compilerOptions, fileName, reportDiagnostics: !!diagnostics, moduleName });
|
|
125106
|
+
function transpile(input, compilerOptions, fileName2, diagnostics, moduleName) {
|
|
125107
|
+
var output = transpileModule(input, { compilerOptions, fileName: fileName2, reportDiagnostics: !!diagnostics, moduleName });
|
|
125108
125108
|
ts3.addRange(diagnostics, output.diagnostics);
|
|
125109
125109
|
return output.outputText;
|
|
125110
125110
|
}
|
|
@@ -128210,13 +128210,13 @@ var require_typescript = __commonJS({
|
|
|
128210
128210
|
this.finishClassesWithNodesInsertedAtStart();
|
|
128211
128211
|
var changes = changesToText.getTextChangesFromChanges(this.changes, this.newLineCharacter, this.formatContext, validate);
|
|
128212
128212
|
for (var _i = 0, _a = this.newFiles; _i < _a.length; _i++) {
|
|
128213
|
-
var _b = _a[_i], oldFile = _b.oldFile,
|
|
128214
|
-
changes.push(changesToText.newFileChanges(oldFile,
|
|
128213
|
+
var _b = _a[_i], oldFile = _b.oldFile, fileName2 = _b.fileName, statements = _b.statements;
|
|
128214
|
+
changes.push(changesToText.newFileChanges(oldFile, fileName2, statements, this.newLineCharacter, this.formatContext));
|
|
128215
128215
|
}
|
|
128216
128216
|
return changes;
|
|
128217
128217
|
};
|
|
128218
|
-
ChangeTracker2.prototype.createNewFile = function(oldFile,
|
|
128219
|
-
this.newFiles.push({ oldFile, fileName, statements });
|
|
128218
|
+
ChangeTracker2.prototype.createNewFile = function(oldFile, fileName2, statements) {
|
|
128219
|
+
this.newFiles.push({ oldFile, fileName: fileName2, statements });
|
|
128220
128220
|
};
|
|
128221
128221
|
return ChangeTracker2;
|
|
128222
128222
|
}();
|
|
@@ -128266,9 +128266,9 @@ var require_typescript = __commonJS({
|
|
|
128266
128266
|
});
|
|
128267
128267
|
}
|
|
128268
128268
|
changesToText2.getTextChangesFromChanges = getTextChangesFromChanges;
|
|
128269
|
-
function newFileChanges(oldFile,
|
|
128270
|
-
var text = newFileChangesWorker(oldFile, ts3.getScriptKindFromFileName(
|
|
128271
|
-
return { fileName, textChanges: [ts3.createTextChange(ts3.createTextSpan(0, 0), text)], isNewFile: true };
|
|
128269
|
+
function newFileChanges(oldFile, fileName2, statements, newLineCharacter, formatContext) {
|
|
128270
|
+
var text = newFileChangesWorker(oldFile, ts3.getScriptKindFromFileName(fileName2), statements, newLineCharacter, formatContext);
|
|
128271
|
+
return { fileName: fileName2, textChanges: [ts3.createTextChange(ts3.createTextSpan(0, 0), text)], isNewFile: true };
|
|
128272
128272
|
}
|
|
128273
128273
|
changesToText2.newFileChanges = newFileChanges;
|
|
128274
128274
|
function newFileChangesWorker(oldFile, scriptKind, statements, newLineCharacter, formatContext) {
|
|
@@ -128819,8 +128819,8 @@ var require_typescript = __commonJS({
|
|
|
128819
128819
|
return { changes, commands };
|
|
128820
128820
|
}
|
|
128821
128821
|
codefix2.createCombinedCodeActions = createCombinedCodeActions;
|
|
128822
|
-
function createFileTextChanges(
|
|
128823
|
-
return { fileName, textChanges };
|
|
128822
|
+
function createFileTextChanges(fileName2, textChanges) {
|
|
128823
|
+
return { fileName: fileName2, textChanges };
|
|
128824
128824
|
}
|
|
128825
128825
|
codefix2.createFileTextChanges = createFileTextChanges;
|
|
128826
128826
|
function codeFixAll(context, errorCodes, use) {
|
|
@@ -132771,8 +132771,8 @@ var require_typescript = __commonJS({
|
|
|
132771
132771
|
});
|
|
132772
132772
|
}
|
|
132773
132773
|
});
|
|
132774
|
-
function getInstallCommand(
|
|
132775
|
-
return { type: "install package", file:
|
|
132774
|
+
function getInstallCommand(fileName2, packageName) {
|
|
132775
|
+
return { type: "install package", file: fileName2, packageName };
|
|
132776
132776
|
}
|
|
132777
132777
|
function tryGetImportedPackageName(sourceFile, pos) {
|
|
132778
132778
|
var moduleSpecifierText = ts3.tryCast(ts3.getTokenAtPosition(sourceFile, pos), ts3.isStringLiteral);
|
|
@@ -141188,8 +141188,8 @@ var require_typescript = __commonJS({
|
|
|
141188
141188
|
return SourceFileObject2;
|
|
141189
141189
|
}(NodeObject);
|
|
141190
141190
|
var SourceMapSourceObject = function() {
|
|
141191
|
-
function SourceMapSourceObject2(
|
|
141192
|
-
this.fileName =
|
|
141191
|
+
function SourceMapSourceObject2(fileName2, text, skipTrivia) {
|
|
141192
|
+
this.fileName = fileName2;
|
|
141193
141193
|
this.text = text;
|
|
141194
141194
|
this.skipTrivia = skipTrivia;
|
|
141195
141195
|
}
|
|
@@ -141280,22 +141280,22 @@ var require_typescript = __commonJS({
|
|
|
141280
141280
|
this.fileNameToEntry = new ts3.Map();
|
|
141281
141281
|
var rootFileNames = host.getScriptFileNames();
|
|
141282
141282
|
for (var _i = 0, rootFileNames_1 = rootFileNames; _i < rootFileNames_1.length; _i++) {
|
|
141283
|
-
var
|
|
141284
|
-
this.createEntry(
|
|
141283
|
+
var fileName2 = rootFileNames_1[_i];
|
|
141284
|
+
this.createEntry(fileName2, ts3.toPath(fileName2, this.currentDirectory, getCanonicalFileName));
|
|
141285
141285
|
}
|
|
141286
141286
|
}
|
|
141287
|
-
HostCache2.prototype.createEntry = function(
|
|
141287
|
+
HostCache2.prototype.createEntry = function(fileName2, path2) {
|
|
141288
141288
|
var entry;
|
|
141289
|
-
var scriptSnapshot = this.host.getScriptSnapshot(
|
|
141289
|
+
var scriptSnapshot = this.host.getScriptSnapshot(fileName2);
|
|
141290
141290
|
if (scriptSnapshot) {
|
|
141291
141291
|
entry = {
|
|
141292
|
-
hostFileName:
|
|
141293
|
-
version: this.host.getScriptVersion(
|
|
141292
|
+
hostFileName: fileName2,
|
|
141293
|
+
version: this.host.getScriptVersion(fileName2),
|
|
141294
141294
|
scriptSnapshot,
|
|
141295
|
-
scriptKind: ts3.getScriptKind(
|
|
141295
|
+
scriptKind: ts3.getScriptKind(fileName2, this.host)
|
|
141296
141296
|
};
|
|
141297
141297
|
} else {
|
|
141298
|
-
entry =
|
|
141298
|
+
entry = fileName2;
|
|
141299
141299
|
}
|
|
141300
141300
|
this.fileNameToEntry.set(path2, entry);
|
|
141301
141301
|
return entry;
|
|
@@ -141307,8 +141307,8 @@ var require_typescript = __commonJS({
|
|
|
141307
141307
|
var entry = this.fileNameToEntry.get(path2);
|
|
141308
141308
|
return !ts3.isString(entry) ? entry : void 0;
|
|
141309
141309
|
};
|
|
141310
|
-
HostCache2.prototype.getOrCreateEntryByPath = function(
|
|
141311
|
-
var info = this.getEntryByPath(path2) || this.createEntry(
|
|
141310
|
+
HostCache2.prototype.getOrCreateEntryByPath = function(fileName2, path2) {
|
|
141311
|
+
var info = this.getEntryByPath(path2) || this.createEntry(fileName2, path2);
|
|
141312
141312
|
return ts3.isString(info) ? void 0 : info;
|
|
141313
141313
|
};
|
|
141314
141314
|
HostCache2.prototype.getRootFileNames = function() {
|
|
@@ -141332,23 +141332,23 @@ var require_typescript = __commonJS({
|
|
|
141332
141332
|
function SyntaxTreeCache2(host) {
|
|
141333
141333
|
this.host = host;
|
|
141334
141334
|
}
|
|
141335
|
-
SyntaxTreeCache2.prototype.getCurrentSourceFile = function(
|
|
141336
|
-
var scriptSnapshot = this.host.getScriptSnapshot(
|
|
141335
|
+
SyntaxTreeCache2.prototype.getCurrentSourceFile = function(fileName2) {
|
|
141336
|
+
var scriptSnapshot = this.host.getScriptSnapshot(fileName2);
|
|
141337
141337
|
if (!scriptSnapshot) {
|
|
141338
|
-
throw new Error("Could not find file: '" +
|
|
141338
|
+
throw new Error("Could not find file: '" + fileName2 + "'.");
|
|
141339
141339
|
}
|
|
141340
|
-
var scriptKind = ts3.getScriptKind(
|
|
141341
|
-
var version = this.host.getScriptVersion(
|
|
141340
|
+
var scriptKind = ts3.getScriptKind(fileName2, this.host);
|
|
141341
|
+
var version = this.host.getScriptVersion(fileName2);
|
|
141342
141342
|
var sourceFile;
|
|
141343
|
-
if (this.currentFileName !==
|
|
141344
|
-
sourceFile = createLanguageServiceSourceFile(
|
|
141343
|
+
if (this.currentFileName !== fileName2) {
|
|
141344
|
+
sourceFile = createLanguageServiceSourceFile(fileName2, scriptSnapshot, 99, version, true, scriptKind);
|
|
141345
141345
|
} else if (this.currentFileVersion !== version) {
|
|
141346
141346
|
var editRange = scriptSnapshot.getChangeRange(this.currentFileScriptSnapshot);
|
|
141347
141347
|
sourceFile = updateLanguageServiceSourceFile(this.currentSourceFile, scriptSnapshot, version, editRange);
|
|
141348
141348
|
}
|
|
141349
141349
|
if (sourceFile) {
|
|
141350
141350
|
this.currentFileVersion = version;
|
|
141351
|
-
this.currentFileName =
|
|
141351
|
+
this.currentFileName = fileName2;
|
|
141352
141352
|
this.currentFileScriptSnapshot = scriptSnapshot;
|
|
141353
141353
|
this.currentSourceFile = sourceFile;
|
|
141354
141354
|
}
|
|
@@ -141360,8 +141360,8 @@ var require_typescript = __commonJS({
|
|
|
141360
141360
|
sourceFile.version = version;
|
|
141361
141361
|
sourceFile.scriptSnapshot = scriptSnapshot;
|
|
141362
141362
|
}
|
|
141363
|
-
function createLanguageServiceSourceFile(
|
|
141364
|
-
var sourceFile = ts3.createSourceFile(
|
|
141363
|
+
function createLanguageServiceSourceFile(fileName2, scriptSnapshot, scriptTarget, version, setNodeParents, scriptKind) {
|
|
141364
|
+
var sourceFile = ts3.createSourceFile(fileName2, ts3.getSnapshotText(scriptSnapshot), scriptTarget, setNodeParents, scriptKind);
|
|
141365
141365
|
setSourceFileFields(sourceFile, scriptSnapshot, version);
|
|
141366
141366
|
return sourceFile;
|
|
141367
141367
|
}
|
|
@@ -141520,10 +141520,10 @@ var require_typescript = __commonJS({
|
|
|
141520
141520
|
getSourceFileLike: ts3.maybeBind(host, host.getSourceFileLike),
|
|
141521
141521
|
log
|
|
141522
141522
|
});
|
|
141523
|
-
function getValidSourceFile(
|
|
141524
|
-
var sourceFile = program2.getSourceFile(
|
|
141523
|
+
function getValidSourceFile(fileName2) {
|
|
141524
|
+
var sourceFile = program2.getSourceFile(fileName2);
|
|
141525
141525
|
if (!sourceFile) {
|
|
141526
|
-
var error = new Error("Could not find source file: '" +
|
|
141526
|
+
var error = new Error("Could not find source file: '" + fileName2 + "'.");
|
|
141527
141527
|
error.ProgramFiles = program2.getSourceFiles().map(function(f) {
|
|
141528
141528
|
return f.fileName;
|
|
141529
141529
|
});
|
|
@@ -141567,8 +141567,8 @@ var require_typescript = __commonJS({
|
|
|
141567
141567
|
},
|
|
141568
141568
|
onUnRecoverableConfigFileDiagnostic: ts3.noop
|
|
141569
141569
|
};
|
|
141570
|
-
if (ts3.isProgramUptoDate(program2, rootFileNames, newSettings, function(_path,
|
|
141571
|
-
return host.getScriptVersion(
|
|
141570
|
+
if (ts3.isProgramUptoDate(program2, rootFileNames, newSettings, function(_path, fileName2) {
|
|
141571
|
+
return host.getScriptVersion(fileName2);
|
|
141572
141572
|
}, fileExists, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
|
141573
141573
|
return;
|
|
141574
141574
|
}
|
|
@@ -141630,12 +141630,12 @@ var require_typescript = __commonJS({
|
|
|
141630
141630
|
sourceMapper.clearCache();
|
|
141631
141631
|
program2.getTypeChecker();
|
|
141632
141632
|
return;
|
|
141633
|
-
function getParsedCommandLine(
|
|
141634
|
-
var path2 = ts3.toPath(
|
|
141633
|
+
function getParsedCommandLine(fileName2) {
|
|
141634
|
+
var path2 = ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
141635
141635
|
var existing = parsedCommandLines === null || parsedCommandLines === void 0 ? void 0 : parsedCommandLines.get(path2);
|
|
141636
141636
|
if (existing !== void 0)
|
|
141637
141637
|
return existing || void 0;
|
|
141638
|
-
var result2 = host.getParsedCommandLine ? host.getParsedCommandLine(
|
|
141638
|
+
var result2 = host.getParsedCommandLine ? host.getParsedCommandLine(fileName2) : getParsedCommandLineOfConfigFileUsingSourceFile(fileName2);
|
|
141639
141639
|
(parsedCommandLines || (parsedCommandLines = new ts3.Map())).set(path2, result2 || false);
|
|
141640
141640
|
return result2;
|
|
141641
141641
|
}
|
|
@@ -141656,18 +141656,18 @@ var require_typescript = __commonJS({
|
|
|
141656
141656
|
onReleaseOldSourceFile(oldResolvedRef.sourceFile, oldOptions);
|
|
141657
141657
|
}
|
|
141658
141658
|
}
|
|
141659
|
-
function fileExists(
|
|
141660
|
-
var path2 = ts3.toPath(
|
|
141659
|
+
function fileExists(fileName2) {
|
|
141660
|
+
var path2 = ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
141661
141661
|
var entry = hostCache && hostCache.getEntryByPath(path2);
|
|
141662
|
-
return entry ? !ts3.isString(entry) : !!host.fileExists && host.fileExists(
|
|
141662
|
+
return entry ? !ts3.isString(entry) : !!host.fileExists && host.fileExists(fileName2);
|
|
141663
141663
|
}
|
|
141664
|
-
function readFile(
|
|
141665
|
-
var path2 = ts3.toPath(
|
|
141664
|
+
function readFile(fileName2) {
|
|
141665
|
+
var path2 = ts3.toPath(fileName2, currentDirectory, getCanonicalFileName);
|
|
141666
141666
|
var entry = hostCache && hostCache.getEntryByPath(path2);
|
|
141667
141667
|
if (entry) {
|
|
141668
141668
|
return ts3.isString(entry) ? void 0 : ts3.getSnapshotText(entry.scriptSnapshot);
|
|
141669
141669
|
}
|
|
141670
|
-
return host.readFile && host.readFile(
|
|
141670
|
+
return host.readFile && host.readFile(fileName2);
|
|
141671
141671
|
}
|
|
141672
141672
|
function readDirectory(path2, extensions, exclude, include, depth) {
|
|
141673
141673
|
ts3.Debug.checkDefined(host.readDirectory, "'LanguageServiceHost.readDirectory' must be implemented to correctly process 'projectReferences'");
|
|
@@ -141677,12 +141677,12 @@ var require_typescript = __commonJS({
|
|
|
141677
141677
|
var oldSettingsKey = documentRegistry.getKeyForCompilationSettings(oldOptions);
|
|
141678
141678
|
documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, oldSettingsKey, oldSourceFile.scriptKind);
|
|
141679
141679
|
}
|
|
141680
|
-
function getOrCreateSourceFile(
|
|
141681
|
-
return getOrCreateSourceFileByPath(
|
|
141680
|
+
function getOrCreateSourceFile(fileName2, languageVersion, onError, shouldCreateNewSourceFile) {
|
|
141681
|
+
return getOrCreateSourceFileByPath(fileName2, ts3.toPath(fileName2, currentDirectory, getCanonicalFileName), languageVersion, onError, shouldCreateNewSourceFile);
|
|
141682
141682
|
}
|
|
141683
|
-
function getOrCreateSourceFileByPath(
|
|
141683
|
+
function getOrCreateSourceFileByPath(fileName2, path2, _languageVersion, _onError, shouldCreateNewSourceFile) {
|
|
141684
141684
|
ts3.Debug.assert(hostCache !== void 0, "getOrCreateSourceFileByPath called after typical CompilerHost lifetime, check the callstack something with a reference to an old host.");
|
|
141685
|
-
var hostFileInformation = hostCache && hostCache.getOrCreateEntryByPath(
|
|
141685
|
+
var hostFileInformation = hostCache && hostCache.getOrCreateEntryByPath(fileName2, path2);
|
|
141686
141686
|
if (!hostFileInformation) {
|
|
141687
141687
|
return void 0;
|
|
141688
141688
|
}
|
|
@@ -141690,13 +141690,13 @@ var require_typescript = __commonJS({
|
|
|
141690
141690
|
var oldSourceFile = program2 && program2.getSourceFileByPath(path2);
|
|
141691
141691
|
if (oldSourceFile) {
|
|
141692
141692
|
if (hostFileInformation.scriptKind === oldSourceFile.scriptKind) {
|
|
141693
|
-
return documentRegistry.updateDocumentWithKey(
|
|
141693
|
+
return documentRegistry.updateDocumentWithKey(fileName2, path2, newSettings, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind);
|
|
141694
141694
|
} else {
|
|
141695
141695
|
documentRegistry.releaseDocumentWithKey(oldSourceFile.resolvedPath, documentRegistry.getKeyForCompilationSettings(program2.getCompilerOptions()), oldSourceFile.scriptKind);
|
|
141696
141696
|
}
|
|
141697
141697
|
}
|
|
141698
141698
|
}
|
|
141699
|
-
return documentRegistry.acquireDocumentWithKey(
|
|
141699
|
+
return documentRegistry.acquireDocumentWithKey(fileName2, path2, newSettings, documentRegistryBucketKey, hostFileInformation.scriptSnapshot, hostFileInformation.version, hostFileInformation.scriptKind);
|
|
141700
141700
|
}
|
|
141701
141701
|
}
|
|
141702
141702
|
function getProgram() {
|
|
@@ -141724,13 +141724,13 @@ var require_typescript = __commonJS({
|
|
|
141724
141724
|
}
|
|
141725
141725
|
host = void 0;
|
|
141726
141726
|
}
|
|
141727
|
-
function getSyntacticDiagnostics(
|
|
141727
|
+
function getSyntacticDiagnostics(fileName2) {
|
|
141728
141728
|
synchronizeHostData();
|
|
141729
|
-
return program2.getSyntacticDiagnostics(getValidSourceFile(
|
|
141729
|
+
return program2.getSyntacticDiagnostics(getValidSourceFile(fileName2), cancellationToken).slice();
|
|
141730
141730
|
}
|
|
141731
|
-
function getSemanticDiagnostics(
|
|
141731
|
+
function getSemanticDiagnostics(fileName2) {
|
|
141732
141732
|
synchronizeHostData();
|
|
141733
|
-
var targetSourceFile = getValidSourceFile(
|
|
141733
|
+
var targetSourceFile = getValidSourceFile(fileName2);
|
|
141734
141734
|
var semanticDiagnostics = program2.getSemanticDiagnostics(targetSourceFile, cancellationToken);
|
|
141735
141735
|
if (!ts3.getEmitDeclarations(program2.getCompilerOptions())) {
|
|
141736
141736
|
return semanticDiagnostics.slice();
|
|
@@ -141738,39 +141738,39 @@ var require_typescript = __commonJS({
|
|
|
141738
141738
|
var declarationDiagnostics = program2.getDeclarationDiagnostics(targetSourceFile, cancellationToken);
|
|
141739
141739
|
return __spreadArray(__spreadArray([], semanticDiagnostics), declarationDiagnostics);
|
|
141740
141740
|
}
|
|
141741
|
-
function getSuggestionDiagnostics(
|
|
141741
|
+
function getSuggestionDiagnostics(fileName2) {
|
|
141742
141742
|
synchronizeHostData();
|
|
141743
|
-
return ts3.computeSuggestionDiagnostics(getValidSourceFile(
|
|
141743
|
+
return ts3.computeSuggestionDiagnostics(getValidSourceFile(fileName2), program2, cancellationToken);
|
|
141744
141744
|
}
|
|
141745
141745
|
function getCompilerOptionsDiagnostics() {
|
|
141746
141746
|
synchronizeHostData();
|
|
141747
141747
|
return __spreadArray(__spreadArray([], program2.getOptionsDiagnostics(cancellationToken)), program2.getGlobalDiagnostics(cancellationToken));
|
|
141748
141748
|
}
|
|
141749
|
-
function getCompletionsAtPosition(
|
|
141749
|
+
function getCompletionsAtPosition(fileName2, position, options) {
|
|
141750
141750
|
if (options === void 0) {
|
|
141751
141751
|
options = ts3.emptyOptions;
|
|
141752
141752
|
}
|
|
141753
141753
|
var fullPreferences = __assign(__assign({}, ts3.identity(options)), { includeCompletionsForModuleExports: options.includeCompletionsForModuleExports || options.includeExternalModuleExports, includeCompletionsWithInsertText: options.includeCompletionsWithInsertText || options.includeInsertTextCompletions });
|
|
141754
141754
|
synchronizeHostData();
|
|
141755
|
-
return ts3.Completions.getCompletionsAtPosition(host, program2, log, getValidSourceFile(
|
|
141755
|
+
return ts3.Completions.getCompletionsAtPosition(host, program2, log, getValidSourceFile(fileName2), position, fullPreferences, options.triggerCharacter);
|
|
141756
141756
|
}
|
|
141757
|
-
function getCompletionEntryDetails(
|
|
141757
|
+
function getCompletionEntryDetails(fileName2, position, name, formattingOptions, source, preferences, data) {
|
|
141758
141758
|
if (preferences === void 0) {
|
|
141759
141759
|
preferences = ts3.emptyOptions;
|
|
141760
141760
|
}
|
|
141761
141761
|
synchronizeHostData();
|
|
141762
|
-
return ts3.Completions.getCompletionEntryDetails(program2, log, getValidSourceFile(
|
|
141762
|
+
return ts3.Completions.getCompletionEntryDetails(program2, log, getValidSourceFile(fileName2), position, { name, source, data }, host, formattingOptions && ts3.formatting.getFormatContext(formattingOptions, host), preferences, cancellationToken);
|
|
141763
141763
|
}
|
|
141764
|
-
function getCompletionEntrySymbol(
|
|
141764
|
+
function getCompletionEntrySymbol(fileName2, position, name, source, preferences) {
|
|
141765
141765
|
if (preferences === void 0) {
|
|
141766
141766
|
preferences = ts3.emptyOptions;
|
|
141767
141767
|
}
|
|
141768
141768
|
synchronizeHostData();
|
|
141769
|
-
return ts3.Completions.getCompletionEntrySymbol(program2, log, getValidSourceFile(
|
|
141769
|
+
return ts3.Completions.getCompletionEntrySymbol(program2, log, getValidSourceFile(fileName2), position, { name, source }, host, preferences);
|
|
141770
141770
|
}
|
|
141771
|
-
function getQuickInfoAtPosition(
|
|
141771
|
+
function getQuickInfoAtPosition(fileName2, position) {
|
|
141772
141772
|
synchronizeHostData();
|
|
141773
|
-
var sourceFile = getValidSourceFile(
|
|
141773
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
141774
141774
|
var node = ts3.getTouchingPropertyName(sourceFile, position);
|
|
141775
141775
|
if (node === sourceFile) {
|
|
141776
141776
|
return void 0;
|
|
@@ -141828,44 +141828,44 @@ var require_typescript = __commonJS({
|
|
|
141828
141828
|
return false;
|
|
141829
141829
|
}
|
|
141830
141830
|
}
|
|
141831
|
-
function getDefinitionAtPosition(
|
|
141831
|
+
function getDefinitionAtPosition(fileName2, position) {
|
|
141832
141832
|
synchronizeHostData();
|
|
141833
|
-
return ts3.GoToDefinition.getDefinitionAtPosition(program2, getValidSourceFile(
|
|
141833
|
+
return ts3.GoToDefinition.getDefinitionAtPosition(program2, getValidSourceFile(fileName2), position);
|
|
141834
141834
|
}
|
|
141835
|
-
function getDefinitionAndBoundSpan(
|
|
141835
|
+
function getDefinitionAndBoundSpan(fileName2, position) {
|
|
141836
141836
|
synchronizeHostData();
|
|
141837
|
-
return ts3.GoToDefinition.getDefinitionAndBoundSpan(program2, getValidSourceFile(
|
|
141837
|
+
return ts3.GoToDefinition.getDefinitionAndBoundSpan(program2, getValidSourceFile(fileName2), position);
|
|
141838
141838
|
}
|
|
141839
|
-
function getTypeDefinitionAtPosition(
|
|
141839
|
+
function getTypeDefinitionAtPosition(fileName2, position) {
|
|
141840
141840
|
synchronizeHostData();
|
|
141841
|
-
return ts3.GoToDefinition.getTypeDefinitionAtPosition(program2.getTypeChecker(), getValidSourceFile(
|
|
141841
|
+
return ts3.GoToDefinition.getTypeDefinitionAtPosition(program2.getTypeChecker(), getValidSourceFile(fileName2), position);
|
|
141842
141842
|
}
|
|
141843
|
-
function getImplementationAtPosition(
|
|
141843
|
+
function getImplementationAtPosition(fileName2, position) {
|
|
141844
141844
|
synchronizeHostData();
|
|
141845
|
-
return ts3.FindAllReferences.getImplementationsAtPosition(program2, cancellationToken, program2.getSourceFiles(), getValidSourceFile(
|
|
141845
|
+
return ts3.FindAllReferences.getImplementationsAtPosition(program2, cancellationToken, program2.getSourceFiles(), getValidSourceFile(fileName2), position);
|
|
141846
141846
|
}
|
|
141847
|
-
function getOccurrencesAtPosition(
|
|
141848
|
-
return ts3.flatMap(getDocumentHighlights(
|
|
141847
|
+
function getOccurrencesAtPosition(fileName2, position) {
|
|
141848
|
+
return ts3.flatMap(getDocumentHighlights(fileName2, position, [fileName2]), function(entry) {
|
|
141849
141849
|
return entry.highlightSpans.map(function(highlightSpan) {
|
|
141850
141850
|
return __assign(__assign({ fileName: entry.fileName, textSpan: highlightSpan.textSpan, isWriteAccess: highlightSpan.kind === "writtenReference", isDefinition: false }, highlightSpan.isInString && { isInString: true }), highlightSpan.contextSpan && { contextSpan: highlightSpan.contextSpan });
|
|
141851
141851
|
});
|
|
141852
141852
|
});
|
|
141853
141853
|
}
|
|
141854
|
-
function getDocumentHighlights(
|
|
141855
|
-
var normalizedFileName = ts3.normalizePath(
|
|
141854
|
+
function getDocumentHighlights(fileName2, position, filesToSearch) {
|
|
141855
|
+
var normalizedFileName = ts3.normalizePath(fileName2);
|
|
141856
141856
|
ts3.Debug.assert(filesToSearch.some(function(f) {
|
|
141857
141857
|
return ts3.normalizePath(f) === normalizedFileName;
|
|
141858
141858
|
}));
|
|
141859
141859
|
synchronizeHostData();
|
|
141860
|
-
var sourceFilesToSearch = ts3.mapDefined(filesToSearch, function(
|
|
141861
|
-
return program2.getSourceFile(
|
|
141860
|
+
var sourceFilesToSearch = ts3.mapDefined(filesToSearch, function(fileName3) {
|
|
141861
|
+
return program2.getSourceFile(fileName3);
|
|
141862
141862
|
});
|
|
141863
|
-
var sourceFile = getValidSourceFile(
|
|
141863
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
141864
141864
|
return ts3.DocumentHighlights.getDocumentHighlights(program2, cancellationToken, sourceFile, position, sourceFilesToSearch);
|
|
141865
141865
|
}
|
|
141866
|
-
function findRenameLocations(
|
|
141866
|
+
function findRenameLocations(fileName2, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) {
|
|
141867
141867
|
synchronizeHostData();
|
|
141868
|
-
var sourceFile = getValidSourceFile(
|
|
141868
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
141869
141869
|
var node = ts3.getAdjustedRenameLocation(ts3.getTouchingPropertyName(sourceFile, position));
|
|
141870
141870
|
if (ts3.isIdentifier(node) && (ts3.isJsxOpeningElement(node.parent) || ts3.isJsxClosingElement(node.parent)) && ts3.isIntrinsicJsxName(node.escapedText)) {
|
|
141871
141871
|
var _a2 = node.parent.parent, openingElement = _a2.openingElement, closingElement = _a2.closingElement;
|
|
@@ -141879,9 +141879,9 @@ var require_typescript = __commonJS({
|
|
|
141879
141879
|
});
|
|
141880
141880
|
}
|
|
141881
141881
|
}
|
|
141882
|
-
function getReferencesAtPosition(
|
|
141882
|
+
function getReferencesAtPosition(fileName2, position) {
|
|
141883
141883
|
synchronizeHostData();
|
|
141884
|
-
return getReferencesWorker(ts3.getTouchingPropertyName(getValidSourceFile(
|
|
141884
|
+
return getReferencesWorker(ts3.getTouchingPropertyName(getValidSourceFile(fileName2), position), position, { use: 1 }, ts3.FindAllReferences.toReferenceEntry);
|
|
141885
141885
|
}
|
|
141886
141886
|
function getReferencesWorker(node, position, options, cb) {
|
|
141887
141887
|
synchronizeHostData();
|
|
@@ -141890,39 +141890,39 @@ var require_typescript = __commonJS({
|
|
|
141890
141890
|
}) : program2.getSourceFiles();
|
|
141891
141891
|
return ts3.FindAllReferences.findReferenceOrRenameEntries(program2, cancellationToken, sourceFiles, node, position, options, cb);
|
|
141892
141892
|
}
|
|
141893
|
-
function findReferences(
|
|
141893
|
+
function findReferences(fileName2, position) {
|
|
141894
141894
|
synchronizeHostData();
|
|
141895
|
-
return ts3.FindAllReferences.findReferencedSymbols(program2, cancellationToken, program2.getSourceFiles(), getValidSourceFile(
|
|
141895
|
+
return ts3.FindAllReferences.findReferencedSymbols(program2, cancellationToken, program2.getSourceFiles(), getValidSourceFile(fileName2), position);
|
|
141896
141896
|
}
|
|
141897
|
-
function getFileReferences(
|
|
141897
|
+
function getFileReferences(fileName2) {
|
|
141898
141898
|
synchronizeHostData();
|
|
141899
|
-
return ts3.FindAllReferences.Core.getReferencesForFileName(
|
|
141899
|
+
return ts3.FindAllReferences.Core.getReferencesForFileName(fileName2, program2, program2.getSourceFiles()).map(ts3.FindAllReferences.toReferenceEntry);
|
|
141900
141900
|
}
|
|
141901
|
-
function getNavigateToItems(searchValue, maxResultCount,
|
|
141901
|
+
function getNavigateToItems(searchValue, maxResultCount, fileName2, excludeDtsFiles) {
|
|
141902
141902
|
if (excludeDtsFiles === void 0) {
|
|
141903
141903
|
excludeDtsFiles = false;
|
|
141904
141904
|
}
|
|
141905
141905
|
synchronizeHostData();
|
|
141906
|
-
var sourceFiles =
|
|
141906
|
+
var sourceFiles = fileName2 ? [getValidSourceFile(fileName2)] : program2.getSourceFiles();
|
|
141907
141907
|
return ts3.NavigateTo.getNavigateToItems(sourceFiles, program2.getTypeChecker(), cancellationToken, searchValue, maxResultCount, excludeDtsFiles);
|
|
141908
141908
|
}
|
|
141909
|
-
function getEmitOutput(
|
|
141909
|
+
function getEmitOutput(fileName2, emitOnlyDtsFiles, forceDtsEmit) {
|
|
141910
141910
|
synchronizeHostData();
|
|
141911
|
-
var sourceFile = getValidSourceFile(
|
|
141911
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
141912
141912
|
var customTransformers = host.getCustomTransformers && host.getCustomTransformers();
|
|
141913
141913
|
return ts3.getFileEmitOutput(program2, sourceFile, !!emitOnlyDtsFiles, cancellationToken, customTransformers, forceDtsEmit);
|
|
141914
141914
|
}
|
|
141915
|
-
function getSignatureHelpItems(
|
|
141915
|
+
function getSignatureHelpItems(fileName2, position, _a2) {
|
|
141916
141916
|
var _b = _a2 === void 0 ? ts3.emptyOptions : _a2, triggerReason = _b.triggerReason;
|
|
141917
141917
|
synchronizeHostData();
|
|
141918
|
-
var sourceFile = getValidSourceFile(
|
|
141918
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
141919
141919
|
return ts3.SignatureHelp.getSignatureHelpItems(program2, sourceFile, position, triggerReason, cancellationToken);
|
|
141920
141920
|
}
|
|
141921
|
-
function getNonBoundSourceFile(
|
|
141922
|
-
return syntaxTreeCache.getCurrentSourceFile(
|
|
141921
|
+
function getNonBoundSourceFile(fileName2) {
|
|
141922
|
+
return syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
141923
141923
|
}
|
|
141924
|
-
function getNameOrDottedNameSpan(
|
|
141925
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
141924
|
+
function getNameOrDottedNameSpan(fileName2, startPos, _endPos) {
|
|
141925
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
141926
141926
|
var node = ts3.getTouchingPropertyName(sourceFile, startPos);
|
|
141927
141927
|
if (node === sourceFile) {
|
|
141928
141928
|
return void 0;
|
|
@@ -141958,50 +141958,50 @@ var require_typescript = __commonJS({
|
|
|
141958
141958
|
}
|
|
141959
141959
|
return ts3.createTextSpanFromBounds(nodeForStartPos.getStart(), node.getEnd());
|
|
141960
141960
|
}
|
|
141961
|
-
function getBreakpointStatementAtPosition(
|
|
141962
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
141961
|
+
function getBreakpointStatementAtPosition(fileName2, position) {
|
|
141962
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
141963
141963
|
return ts3.BreakpointResolver.spanInSourceFileAtLocation(sourceFile, position);
|
|
141964
141964
|
}
|
|
141965
|
-
function getNavigationBarItems(
|
|
141966
|
-
return ts3.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(
|
|
141965
|
+
function getNavigationBarItems(fileName2) {
|
|
141966
|
+
return ts3.NavigationBar.getNavigationBarItems(syntaxTreeCache.getCurrentSourceFile(fileName2), cancellationToken);
|
|
141967
141967
|
}
|
|
141968
|
-
function getNavigationTree(
|
|
141969
|
-
return ts3.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(
|
|
141968
|
+
function getNavigationTree(fileName2) {
|
|
141969
|
+
return ts3.NavigationBar.getNavigationTree(syntaxTreeCache.getCurrentSourceFile(fileName2), cancellationToken);
|
|
141970
141970
|
}
|
|
141971
|
-
function getSemanticClassifications(
|
|
141971
|
+
function getSemanticClassifications(fileName2, span, format) {
|
|
141972
141972
|
synchronizeHostData();
|
|
141973
141973
|
var responseFormat = format || "original";
|
|
141974
141974
|
if (responseFormat === "2020") {
|
|
141975
|
-
return ts3.classifier.v2020.getSemanticClassifications(program2, cancellationToken, getValidSourceFile(
|
|
141975
|
+
return ts3.classifier.v2020.getSemanticClassifications(program2, cancellationToken, getValidSourceFile(fileName2), span);
|
|
141976
141976
|
} else {
|
|
141977
|
-
return ts3.getSemanticClassifications(program2.getTypeChecker(), cancellationToken, getValidSourceFile(
|
|
141977
|
+
return ts3.getSemanticClassifications(program2.getTypeChecker(), cancellationToken, getValidSourceFile(fileName2), program2.getClassifiableNames(), span);
|
|
141978
141978
|
}
|
|
141979
141979
|
}
|
|
141980
|
-
function getEncodedSemanticClassifications(
|
|
141980
|
+
function getEncodedSemanticClassifications(fileName2, span, format) {
|
|
141981
141981
|
synchronizeHostData();
|
|
141982
141982
|
var responseFormat = format || "original";
|
|
141983
141983
|
if (responseFormat === "original") {
|
|
141984
|
-
return ts3.getEncodedSemanticClassifications(program2.getTypeChecker(), cancellationToken, getValidSourceFile(
|
|
141984
|
+
return ts3.getEncodedSemanticClassifications(program2.getTypeChecker(), cancellationToken, getValidSourceFile(fileName2), program2.getClassifiableNames(), span);
|
|
141985
141985
|
} else {
|
|
141986
|
-
return ts3.classifier.v2020.getEncodedSemanticClassifications(program2, cancellationToken, getValidSourceFile(
|
|
141986
|
+
return ts3.classifier.v2020.getEncodedSemanticClassifications(program2, cancellationToken, getValidSourceFile(fileName2), span);
|
|
141987
141987
|
}
|
|
141988
141988
|
}
|
|
141989
|
-
function getSyntacticClassifications(
|
|
141990
|
-
return ts3.getSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(
|
|
141989
|
+
function getSyntacticClassifications(fileName2, span) {
|
|
141990
|
+
return ts3.getSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(fileName2), span);
|
|
141991
141991
|
}
|
|
141992
|
-
function getEncodedSyntacticClassifications(
|
|
141993
|
-
return ts3.getEncodedSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(
|
|
141992
|
+
function getEncodedSyntacticClassifications(fileName2, span) {
|
|
141993
|
+
return ts3.getEncodedSyntacticClassifications(cancellationToken, syntaxTreeCache.getCurrentSourceFile(fileName2), span);
|
|
141994
141994
|
}
|
|
141995
|
-
function getOutliningSpans(
|
|
141996
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
141995
|
+
function getOutliningSpans(fileName2) {
|
|
141996
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
141997
141997
|
return ts3.OutliningElementsCollector.collectElements(sourceFile, cancellationToken);
|
|
141998
141998
|
}
|
|
141999
141999
|
var braceMatching = new ts3.Map(ts3.getEntries((_a = {}, _a[18] = 19, _a[20] = 21, _a[22] = 23, _a[31] = 29, _a)));
|
|
142000
142000
|
braceMatching.forEach(function(value, key) {
|
|
142001
142001
|
return braceMatching.set(value.toString(), Number(key));
|
|
142002
142002
|
});
|
|
142003
|
-
function getBraceMatchingAtPosition(
|
|
142004
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142003
|
+
function getBraceMatchingAtPosition(fileName2, position) {
|
|
142004
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142005
142005
|
var token = ts3.getTouchingToken(sourceFile, position);
|
|
142006
142006
|
var matchKind = token.getStart(sourceFile) === position ? braceMatching.get(token.kind.toString()) : void 0;
|
|
142007
142007
|
var match = matchKind && ts3.findChildOfKind(token.parent, matchKind, sourceFile);
|
|
@@ -142009,25 +142009,25 @@ var require_typescript = __commonJS({
|
|
|
142009
142009
|
return a.start - b.start;
|
|
142010
142010
|
}) : ts3.emptyArray;
|
|
142011
142011
|
}
|
|
142012
|
-
function getIndentationAtPosition(
|
|
142012
|
+
function getIndentationAtPosition(fileName2, position, editorOptions) {
|
|
142013
142013
|
var start = ts3.timestamp();
|
|
142014
142014
|
var settings = toEditorSettings(editorOptions);
|
|
142015
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142015
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142016
142016
|
log("getIndentationAtPosition: getCurrentSourceFile: " + (ts3.timestamp() - start));
|
|
142017
142017
|
start = ts3.timestamp();
|
|
142018
142018
|
var result2 = ts3.formatting.SmartIndenter.getIndentation(position, sourceFile, settings);
|
|
142019
142019
|
log("getIndentationAtPosition: computeIndentation : " + (ts3.timestamp() - start));
|
|
142020
142020
|
return result2;
|
|
142021
142021
|
}
|
|
142022
|
-
function getFormattingEditsForRange(
|
|
142023
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142022
|
+
function getFormattingEditsForRange(fileName2, start, end, options) {
|
|
142023
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142024
142024
|
return ts3.formatting.formatSelection(start, end, sourceFile, ts3.formatting.getFormatContext(toEditorSettings(options), host));
|
|
142025
142025
|
}
|
|
142026
|
-
function getFormattingEditsForDocument(
|
|
142027
|
-
return ts3.formatting.formatDocument(syntaxTreeCache.getCurrentSourceFile(
|
|
142026
|
+
function getFormattingEditsForDocument(fileName2, options) {
|
|
142027
|
+
return ts3.formatting.formatDocument(syntaxTreeCache.getCurrentSourceFile(fileName2), ts3.formatting.getFormatContext(toEditorSettings(options), host));
|
|
142028
142028
|
}
|
|
142029
|
-
function getFormattingEditsAfterKeystroke(
|
|
142030
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142029
|
+
function getFormattingEditsAfterKeystroke(fileName2, position, key, options) {
|
|
142030
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142031
142031
|
var formatContext = ts3.formatting.getFormatContext(toEditorSettings(options), host);
|
|
142032
142032
|
if (!ts3.isInComment(sourceFile, position)) {
|
|
142033
142033
|
switch (key) {
|
|
@@ -142043,12 +142043,12 @@ var require_typescript = __commonJS({
|
|
|
142043
142043
|
}
|
|
142044
142044
|
return [];
|
|
142045
142045
|
}
|
|
142046
|
-
function getCodeFixesAtPosition(
|
|
142046
|
+
function getCodeFixesAtPosition(fileName2, start, end, errorCodes, formatOptions, preferences) {
|
|
142047
142047
|
if (preferences === void 0) {
|
|
142048
142048
|
preferences = ts3.emptyOptions;
|
|
142049
142049
|
}
|
|
142050
142050
|
synchronizeHostData();
|
|
142051
|
-
var sourceFile = getValidSourceFile(
|
|
142051
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
142052
142052
|
var span = ts3.createTextSpanFromBounds(start, end);
|
|
142053
142053
|
var formatContext = ts3.formatting.getFormatContext(formatOptions, host);
|
|
142054
142054
|
return ts3.flatMap(ts3.deduplicate(errorCodes, ts3.equateValues, ts3.compareValues), function(errorCode) {
|
|
@@ -142082,8 +142082,8 @@ var require_typescript = __commonJS({
|
|
|
142082
142082
|
}
|
|
142083
142083
|
return ts3.getEditsForFileRename(getProgram(), oldFilePath, newFilePath, host, ts3.formatting.getFormatContext(formatOptions, host), preferences, sourceMapper);
|
|
142084
142084
|
}
|
|
142085
|
-
function applyCodeActionCommand(
|
|
142086
|
-
var action = typeof
|
|
142085
|
+
function applyCodeActionCommand(fileName2, actionOrFormatSettingsOrUndefined) {
|
|
142086
|
+
var action = typeof fileName2 === "string" ? actionOrFormatSettingsOrUndefined : fileName2;
|
|
142087
142087
|
return ts3.isArray(action) ? Promise.all(action.map(function(a) {
|
|
142088
142088
|
return applySingleCodeActionCommand(a);
|
|
142089
142089
|
})) : applySingleCodeActionCommand(action);
|
|
@@ -142095,14 +142095,14 @@ var require_typescript = __commonJS({
|
|
|
142095
142095
|
ts3.Debug.assertEqual(action.type, "install package");
|
|
142096
142096
|
return host.installPackage ? host.installPackage({ fileName: getPath(action.file), packageName: action.packageName }) : Promise.reject("Host does not implement `installPackage`");
|
|
142097
142097
|
}
|
|
142098
|
-
function getDocCommentTemplateAtPosition(
|
|
142099
|
-
return ts3.JsDoc.getDocCommentTemplateAtPosition(ts3.getNewLineOrDefaultFromHost(host), syntaxTreeCache.getCurrentSourceFile(
|
|
142098
|
+
function getDocCommentTemplateAtPosition(fileName2, position, options) {
|
|
142099
|
+
return ts3.JsDoc.getDocCommentTemplateAtPosition(ts3.getNewLineOrDefaultFromHost(host), syntaxTreeCache.getCurrentSourceFile(fileName2), position, options);
|
|
142100
142100
|
}
|
|
142101
|
-
function isValidBraceCompletionAtPosition(
|
|
142101
|
+
function isValidBraceCompletionAtPosition(fileName2, position, openingBrace) {
|
|
142102
142102
|
if (openingBrace === 60) {
|
|
142103
142103
|
return false;
|
|
142104
142104
|
}
|
|
142105
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142105
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142106
142106
|
if (ts3.isInString(sourceFile, position)) {
|
|
142107
142107
|
return false;
|
|
142108
142108
|
}
|
|
@@ -142120,8 +142120,8 @@ var require_typescript = __commonJS({
|
|
|
142120
142120
|
}
|
|
142121
142121
|
return true;
|
|
142122
142122
|
}
|
|
142123
|
-
function getJsxClosingTagAtPosition(
|
|
142124
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142123
|
+
function getJsxClosingTagAtPosition(fileName2, position) {
|
|
142124
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142125
142125
|
var token = ts3.findPrecedingToken(position, sourceFile);
|
|
142126
142126
|
if (!token)
|
|
142127
142127
|
return void 0;
|
|
@@ -142137,8 +142137,8 @@ var require_typescript = __commonJS({
|
|
|
142137
142137
|
lastLine: sourceFile.getLineAndCharacterOfPosition(textRange.end).line
|
|
142138
142138
|
};
|
|
142139
142139
|
}
|
|
142140
|
-
function toggleLineComment(
|
|
142141
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142140
|
+
function toggleLineComment(fileName2, textRange, insertComment) {
|
|
142141
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142142
142142
|
var textChanges = [];
|
|
142143
142143
|
var _a2 = getLinesForRange(sourceFile, textRange), lineStarts = _a2.lineStarts, firstLine = _a2.firstLine, lastLine = _a2.lastLine;
|
|
142144
142144
|
var isCommenting = insertComment || false;
|
|
@@ -142165,7 +142165,7 @@ var require_typescript = __commonJS({
|
|
|
142165
142165
|
var lineTextStart = lineTextStarts.get(i.toString());
|
|
142166
142166
|
if (lineTextStart !== void 0) {
|
|
142167
142167
|
if (isJsx) {
|
|
142168
|
-
textChanges.push.apply(textChanges, toggleMultilineComment(
|
|
142168
|
+
textChanges.push.apply(textChanges, toggleMultilineComment(fileName2, { pos: lineStarts[i] + leftMostPosition, end: sourceFile.getLineEndOfPosition(lineStarts[i]) }, isCommenting, isJsx));
|
|
142169
142169
|
} else if (isCommenting) {
|
|
142170
142170
|
textChanges.push({
|
|
142171
142171
|
newText: openComment,
|
|
@@ -142187,9 +142187,9 @@ var require_typescript = __commonJS({
|
|
|
142187
142187
|
}
|
|
142188
142188
|
return textChanges;
|
|
142189
142189
|
}
|
|
142190
|
-
function toggleMultilineComment(
|
|
142190
|
+
function toggleMultilineComment(fileName2, textRange, insertComment, isInsideJsx) {
|
|
142191
142191
|
var _a2;
|
|
142192
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142192
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142193
142193
|
var textChanges = [];
|
|
142194
142194
|
var text = sourceFile.text;
|
|
142195
142195
|
var hasComment = false;
|
|
@@ -142281,13 +142281,13 @@ var require_typescript = __commonJS({
|
|
|
142281
142281
|
}
|
|
142282
142282
|
return textChanges;
|
|
142283
142283
|
}
|
|
142284
|
-
function commentSelection(
|
|
142285
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142284
|
+
function commentSelection(fileName2, textRange) {
|
|
142285
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142286
142286
|
var _a2 = getLinesForRange(sourceFile, textRange), firstLine = _a2.firstLine, lastLine = _a2.lastLine;
|
|
142287
|
-
return firstLine === lastLine && textRange.pos !== textRange.end ? toggleMultilineComment(
|
|
142287
|
+
return firstLine === lastLine && textRange.pos !== textRange.end ? toggleMultilineComment(fileName2, textRange, true) : toggleLineComment(fileName2, textRange, true);
|
|
142288
142288
|
}
|
|
142289
|
-
function uncommentSelection(
|
|
142290
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142289
|
+
function uncommentSelection(fileName2, textRange) {
|
|
142290
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142291
142291
|
var textChanges = [];
|
|
142292
142292
|
var pos = textRange.pos;
|
|
142293
142293
|
var end = textRange.end;
|
|
@@ -142299,10 +142299,10 @@ var require_typescript = __commonJS({
|
|
|
142299
142299
|
if (commentRange) {
|
|
142300
142300
|
switch (commentRange.kind) {
|
|
142301
142301
|
case 2:
|
|
142302
|
-
textChanges.push.apply(textChanges, toggleLineComment(
|
|
142302
|
+
textChanges.push.apply(textChanges, toggleLineComment(fileName2, { end: commentRange.end, pos: commentRange.pos + 1 }, false));
|
|
142303
142303
|
break;
|
|
142304
142304
|
case 3:
|
|
142305
|
-
textChanges.push.apply(textChanges, toggleMultilineComment(
|
|
142305
|
+
textChanges.push.apply(textChanges, toggleMultilineComment(fileName2, { end: commentRange.end, pos: commentRange.pos + 1 }, false));
|
|
142306
142306
|
}
|
|
142307
142307
|
i = commentRange.end + 1;
|
|
142308
142308
|
}
|
|
@@ -142313,14 +142313,14 @@ var require_typescript = __commonJS({
|
|
|
142313
142313
|
var openingElement = _a2.openingElement, closingElement = _a2.closingElement, parent = _a2.parent;
|
|
142314
142314
|
return !ts3.tagNamesAreEquivalent(openingElement.tagName, closingElement.tagName) || ts3.isJsxElement(parent) && ts3.tagNamesAreEquivalent(openingElement.tagName, parent.openingElement.tagName) && isUnclosedTag(parent);
|
|
142315
142315
|
}
|
|
142316
|
-
function getSpanOfEnclosingComment(
|
|
142317
|
-
var sourceFile = syntaxTreeCache.getCurrentSourceFile(
|
|
142316
|
+
function getSpanOfEnclosingComment(fileName2, position, onlyMultiLine) {
|
|
142317
|
+
var sourceFile = syntaxTreeCache.getCurrentSourceFile(fileName2);
|
|
142318
142318
|
var range = ts3.formatting.getRangeOfEnclosingComment(sourceFile, position);
|
|
142319
142319
|
return range && (!onlyMultiLine || range.kind === 3) ? ts3.createTextSpanFromRange(range) : void 0;
|
|
142320
142320
|
}
|
|
142321
|
-
function getTodoComments(
|
|
142321
|
+
function getTodoComments(fileName2, descriptors) {
|
|
142322
142322
|
synchronizeHostData();
|
|
142323
|
-
var sourceFile = getValidSourceFile(
|
|
142323
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
142324
142324
|
cancellationToken.throwIfCancellationRequested();
|
|
142325
142325
|
var fileContents = sourceFile.text;
|
|
142326
142326
|
var result2 = [];
|
|
@@ -142376,9 +142376,9 @@ var require_typescript = __commonJS({
|
|
|
142376
142376
|
return ts3.stringContains(path2, "/node_modules/");
|
|
142377
142377
|
}
|
|
142378
142378
|
}
|
|
142379
|
-
function getRenameInfo(
|
|
142379
|
+
function getRenameInfo(fileName2, position, options) {
|
|
142380
142380
|
synchronizeHostData();
|
|
142381
|
-
return ts3.Rename.getRenameInfo(program2, getValidSourceFile(
|
|
142381
|
+
return ts3.Rename.getRenameInfo(program2, getValidSourceFile(fileName2), position, options);
|
|
142382
142382
|
}
|
|
142383
142383
|
function getRefactorContext(file, positionOrRange, preferences, formatOptions, triggerReason, kind) {
|
|
142384
142384
|
var _a2 = typeof positionOrRange === "number" ? [positionOrRange, void 0] : [positionOrRange.pos, positionOrRange.end], startPosition = _a2[0], endPosition = _a2[1];
|
|
@@ -142395,47 +142395,47 @@ var require_typescript = __commonJS({
|
|
|
142395
142395
|
kind
|
|
142396
142396
|
};
|
|
142397
142397
|
}
|
|
142398
|
-
function getSmartSelectionRange(
|
|
142399
|
-
return ts3.SmartSelectionRange.getSmartSelectionRange(position, syntaxTreeCache.getCurrentSourceFile(
|
|
142398
|
+
function getSmartSelectionRange(fileName2, position) {
|
|
142399
|
+
return ts3.SmartSelectionRange.getSmartSelectionRange(position, syntaxTreeCache.getCurrentSourceFile(fileName2));
|
|
142400
142400
|
}
|
|
142401
|
-
function getApplicableRefactors(
|
|
142401
|
+
function getApplicableRefactors(fileName2, positionOrRange, preferences, triggerReason, kind) {
|
|
142402
142402
|
if (preferences === void 0) {
|
|
142403
142403
|
preferences = ts3.emptyOptions;
|
|
142404
142404
|
}
|
|
142405
142405
|
synchronizeHostData();
|
|
142406
|
-
var file = getValidSourceFile(
|
|
142406
|
+
var file = getValidSourceFile(fileName2);
|
|
142407
142407
|
return ts3.refactor.getApplicableRefactors(getRefactorContext(file, positionOrRange, preferences, ts3.emptyOptions, triggerReason, kind));
|
|
142408
142408
|
}
|
|
142409
|
-
function getEditsForRefactor(
|
|
142409
|
+
function getEditsForRefactor(fileName2, formatOptions, positionOrRange, refactorName, actionName, preferences) {
|
|
142410
142410
|
if (preferences === void 0) {
|
|
142411
142411
|
preferences = ts3.emptyOptions;
|
|
142412
142412
|
}
|
|
142413
142413
|
synchronizeHostData();
|
|
142414
|
-
var file = getValidSourceFile(
|
|
142414
|
+
var file = getValidSourceFile(fileName2);
|
|
142415
142415
|
return ts3.refactor.getEditsForRefactor(getRefactorContext(file, positionOrRange, preferences, formatOptions), refactorName, actionName);
|
|
142416
142416
|
}
|
|
142417
|
-
function toLineColumnOffset(
|
|
142417
|
+
function toLineColumnOffset(fileName2, position) {
|
|
142418
142418
|
if (position === 0) {
|
|
142419
142419
|
return { line: 0, character: 0 };
|
|
142420
142420
|
}
|
|
142421
|
-
return sourceMapper.toLineColumnOffset(
|
|
142421
|
+
return sourceMapper.toLineColumnOffset(fileName2, position);
|
|
142422
142422
|
}
|
|
142423
|
-
function prepareCallHierarchy(
|
|
142423
|
+
function prepareCallHierarchy(fileName2, position) {
|
|
142424
142424
|
synchronizeHostData();
|
|
142425
|
-
var declarations = ts3.CallHierarchy.resolveCallHierarchyDeclaration(program2, ts3.getTouchingPropertyName(getValidSourceFile(
|
|
142425
|
+
var declarations = ts3.CallHierarchy.resolveCallHierarchyDeclaration(program2, ts3.getTouchingPropertyName(getValidSourceFile(fileName2), position));
|
|
142426
142426
|
return declarations && ts3.mapOneOrMany(declarations, function(declaration) {
|
|
142427
142427
|
return ts3.CallHierarchy.createCallHierarchyItem(program2, declaration);
|
|
142428
142428
|
});
|
|
142429
142429
|
}
|
|
142430
|
-
function provideCallHierarchyIncomingCalls(
|
|
142430
|
+
function provideCallHierarchyIncomingCalls(fileName2, position) {
|
|
142431
142431
|
synchronizeHostData();
|
|
142432
|
-
var sourceFile = getValidSourceFile(
|
|
142432
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
142433
142433
|
var declaration = ts3.firstOrOnly(ts3.CallHierarchy.resolveCallHierarchyDeclaration(program2, position === 0 ? sourceFile : ts3.getTouchingPropertyName(sourceFile, position)));
|
|
142434
142434
|
return declaration ? ts3.CallHierarchy.getIncomingCalls(program2, declaration, cancellationToken) : [];
|
|
142435
142435
|
}
|
|
142436
|
-
function provideCallHierarchyOutgoingCalls(
|
|
142436
|
+
function provideCallHierarchyOutgoingCalls(fileName2, position) {
|
|
142437
142437
|
synchronizeHostData();
|
|
142438
|
-
var sourceFile = getValidSourceFile(
|
|
142438
|
+
var sourceFile = getValidSourceFile(fileName2);
|
|
142439
142439
|
var declaration = ts3.firstOrOnly(ts3.CallHierarchy.resolveCallHierarchyDeclaration(program2, position === 0 ? sourceFile : ts3.getTouchingPropertyName(sourceFile, position)));
|
|
142440
142440
|
return declaration ? ts3.CallHierarchy.getOutgoingCalls(program2, declaration) : [];
|
|
142441
142441
|
}
|
|
@@ -143216,19 +143216,19 @@ var require_typescript = __commonJS({
|
|
|
143216
143216
|
var encoded = this.shimHost.getScriptFileNames();
|
|
143217
143217
|
return JSON.parse(encoded);
|
|
143218
143218
|
};
|
|
143219
|
-
LanguageServiceShimHostAdapter2.prototype.getScriptSnapshot = function(
|
|
143220
|
-
var scriptSnapshot = this.shimHost.getScriptSnapshot(
|
|
143219
|
+
LanguageServiceShimHostAdapter2.prototype.getScriptSnapshot = function(fileName2) {
|
|
143220
|
+
var scriptSnapshot = this.shimHost.getScriptSnapshot(fileName2);
|
|
143221
143221
|
return scriptSnapshot && new ScriptSnapshotShimAdapter(scriptSnapshot);
|
|
143222
143222
|
};
|
|
143223
|
-
LanguageServiceShimHostAdapter2.prototype.getScriptKind = function(
|
|
143223
|
+
LanguageServiceShimHostAdapter2.prototype.getScriptKind = function(fileName2) {
|
|
143224
143224
|
if ("getScriptKind" in this.shimHost) {
|
|
143225
|
-
return this.shimHost.getScriptKind(
|
|
143225
|
+
return this.shimHost.getScriptKind(fileName2);
|
|
143226
143226
|
} else {
|
|
143227
143227
|
return 0;
|
|
143228
143228
|
}
|
|
143229
143229
|
};
|
|
143230
|
-
LanguageServiceShimHostAdapter2.prototype.getScriptVersion = function(
|
|
143231
|
-
return this.shimHost.getScriptVersion(
|
|
143230
|
+
LanguageServiceShimHostAdapter2.prototype.getScriptVersion = function(fileName2) {
|
|
143231
|
+
return this.shimHost.getScriptVersion(fileName2);
|
|
143232
143232
|
};
|
|
143233
143233
|
LanguageServiceShimHostAdapter2.prototype.getLocalizedDiagnosticMessages = function() {
|
|
143234
143234
|
var diagnosticMessagesJson = this.shimHost.getLocalizedDiagnosticMessages();
|
|
@@ -143292,11 +143292,11 @@ var require_typescript = __commonJS({
|
|
|
143292
143292
|
var pattern = ts3.getFileMatcherPatterns(rootDir, exclude, include, this.shimHost.useCaseSensitiveFileNames(), this.shimHost.getCurrentDirectory());
|
|
143293
143293
|
return JSON.parse(this.shimHost.readDirectory(rootDir, JSON.stringify(extensions), JSON.stringify(pattern.basePaths), pattern.excludePattern, pattern.includeFilePattern, pattern.includeDirectoryPattern, depth));
|
|
143294
143294
|
};
|
|
143295
|
-
CoreServicesShimHostAdapter2.prototype.fileExists = function(
|
|
143296
|
-
return this.shimHost.fileExists(
|
|
143295
|
+
CoreServicesShimHostAdapter2.prototype.fileExists = function(fileName2) {
|
|
143296
|
+
return this.shimHost.fileExists(fileName2);
|
|
143297
143297
|
};
|
|
143298
|
-
CoreServicesShimHostAdapter2.prototype.readFile = function(
|
|
143299
|
-
return this.shimHost.readFile(
|
|
143298
|
+
CoreServicesShimHostAdapter2.prototype.readFile = function(fileName2) {
|
|
143299
|
+
return this.shimHost.readFile(fileName2);
|
|
143300
143300
|
};
|
|
143301
143301
|
CoreServicesShimHostAdapter2.prototype.getDirectories = function(path2) {
|
|
143302
143302
|
return JSON.parse(this.shimHost.getDirectories(path2));
|
|
@@ -143407,48 +143407,48 @@ var require_typescript = __commonJS({
|
|
|
143407
143407
|
var newLine = ts3.getNewLineOrDefaultFromHost(this.host);
|
|
143408
143408
|
return realizeDiagnostics(diagnostics, newLine);
|
|
143409
143409
|
};
|
|
143410
|
-
LanguageServiceShimObject2.prototype.getSyntacticClassifications = function(
|
|
143410
|
+
LanguageServiceShimObject2.prototype.getSyntacticClassifications = function(fileName2, start, length) {
|
|
143411
143411
|
var _this = this;
|
|
143412
|
-
return this.forwardJSONCall("getSyntacticClassifications('" +
|
|
143413
|
-
return _this.languageService.getSyntacticClassifications(
|
|
143412
|
+
return this.forwardJSONCall("getSyntacticClassifications('" + fileName2 + "', " + start + ", " + length + ")", function() {
|
|
143413
|
+
return _this.languageService.getSyntacticClassifications(fileName2, ts3.createTextSpan(start, length));
|
|
143414
143414
|
});
|
|
143415
143415
|
};
|
|
143416
|
-
LanguageServiceShimObject2.prototype.getSemanticClassifications = function(
|
|
143416
|
+
LanguageServiceShimObject2.prototype.getSemanticClassifications = function(fileName2, start, length) {
|
|
143417
143417
|
var _this = this;
|
|
143418
|
-
return this.forwardJSONCall("getSemanticClassifications('" +
|
|
143419
|
-
return _this.languageService.getSemanticClassifications(
|
|
143418
|
+
return this.forwardJSONCall("getSemanticClassifications('" + fileName2 + "', " + start + ", " + length + ")", function() {
|
|
143419
|
+
return _this.languageService.getSemanticClassifications(fileName2, ts3.createTextSpan(start, length));
|
|
143420
143420
|
});
|
|
143421
143421
|
};
|
|
143422
|
-
LanguageServiceShimObject2.prototype.getEncodedSyntacticClassifications = function(
|
|
143422
|
+
LanguageServiceShimObject2.prototype.getEncodedSyntacticClassifications = function(fileName2, start, length) {
|
|
143423
143423
|
var _this = this;
|
|
143424
|
-
return this.forwardJSONCall("getEncodedSyntacticClassifications('" +
|
|
143425
|
-
return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(
|
|
143424
|
+
return this.forwardJSONCall("getEncodedSyntacticClassifications('" + fileName2 + "', " + start + ", " + length + ")", function() {
|
|
143425
|
+
return convertClassifications(_this.languageService.getEncodedSyntacticClassifications(fileName2, ts3.createTextSpan(start, length)));
|
|
143426
143426
|
});
|
|
143427
143427
|
};
|
|
143428
|
-
LanguageServiceShimObject2.prototype.getEncodedSemanticClassifications = function(
|
|
143428
|
+
LanguageServiceShimObject2.prototype.getEncodedSemanticClassifications = function(fileName2, start, length) {
|
|
143429
143429
|
var _this = this;
|
|
143430
|
-
return this.forwardJSONCall("getEncodedSemanticClassifications('" +
|
|
143431
|
-
return convertClassifications(_this.languageService.getEncodedSemanticClassifications(
|
|
143430
|
+
return this.forwardJSONCall("getEncodedSemanticClassifications('" + fileName2 + "', " + start + ", " + length + ")", function() {
|
|
143431
|
+
return convertClassifications(_this.languageService.getEncodedSemanticClassifications(fileName2, ts3.createTextSpan(start, length)));
|
|
143432
143432
|
});
|
|
143433
143433
|
};
|
|
143434
|
-
LanguageServiceShimObject2.prototype.getSyntacticDiagnostics = function(
|
|
143434
|
+
LanguageServiceShimObject2.prototype.getSyntacticDiagnostics = function(fileName2) {
|
|
143435
143435
|
var _this = this;
|
|
143436
|
-
return this.forwardJSONCall("getSyntacticDiagnostics('" +
|
|
143437
|
-
var diagnostics = _this.languageService.getSyntacticDiagnostics(
|
|
143436
|
+
return this.forwardJSONCall("getSyntacticDiagnostics('" + fileName2 + "')", function() {
|
|
143437
|
+
var diagnostics = _this.languageService.getSyntacticDiagnostics(fileName2);
|
|
143438
143438
|
return _this.realizeDiagnostics(diagnostics);
|
|
143439
143439
|
});
|
|
143440
143440
|
};
|
|
143441
|
-
LanguageServiceShimObject2.prototype.getSemanticDiagnostics = function(
|
|
143441
|
+
LanguageServiceShimObject2.prototype.getSemanticDiagnostics = function(fileName2) {
|
|
143442
143442
|
var _this = this;
|
|
143443
|
-
return this.forwardJSONCall("getSemanticDiagnostics('" +
|
|
143444
|
-
var diagnostics = _this.languageService.getSemanticDiagnostics(
|
|
143443
|
+
return this.forwardJSONCall("getSemanticDiagnostics('" + fileName2 + "')", function() {
|
|
143444
|
+
var diagnostics = _this.languageService.getSemanticDiagnostics(fileName2);
|
|
143445
143445
|
return _this.realizeDiagnostics(diagnostics);
|
|
143446
143446
|
});
|
|
143447
143447
|
};
|
|
143448
|
-
LanguageServiceShimObject2.prototype.getSuggestionDiagnostics = function(
|
|
143448
|
+
LanguageServiceShimObject2.prototype.getSuggestionDiagnostics = function(fileName2) {
|
|
143449
143449
|
var _this = this;
|
|
143450
|
-
return this.forwardJSONCall("getSuggestionDiagnostics('" +
|
|
143451
|
-
return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(
|
|
143450
|
+
return this.forwardJSONCall("getSuggestionDiagnostics('" + fileName2 + "')", function() {
|
|
143451
|
+
return _this.realizeDiagnostics(_this.languageService.getSuggestionDiagnostics(fileName2));
|
|
143452
143452
|
});
|
|
143453
143453
|
};
|
|
143454
143454
|
LanguageServiceShimObject2.prototype.getCompilerOptionsDiagnostics = function() {
|
|
@@ -143458,254 +143458,254 @@ var require_typescript = __commonJS({
|
|
|
143458
143458
|
return _this.realizeDiagnostics(diagnostics);
|
|
143459
143459
|
});
|
|
143460
143460
|
};
|
|
143461
|
-
LanguageServiceShimObject2.prototype.getQuickInfoAtPosition = function(
|
|
143461
|
+
LanguageServiceShimObject2.prototype.getQuickInfoAtPosition = function(fileName2, position) {
|
|
143462
143462
|
var _this = this;
|
|
143463
|
-
return this.forwardJSONCall("getQuickInfoAtPosition('" +
|
|
143464
|
-
return _this.languageService.getQuickInfoAtPosition(
|
|
143463
|
+
return this.forwardJSONCall("getQuickInfoAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143464
|
+
return _this.languageService.getQuickInfoAtPosition(fileName2, position);
|
|
143465
143465
|
});
|
|
143466
143466
|
};
|
|
143467
|
-
LanguageServiceShimObject2.prototype.getNameOrDottedNameSpan = function(
|
|
143467
|
+
LanguageServiceShimObject2.prototype.getNameOrDottedNameSpan = function(fileName2, startPos, endPos) {
|
|
143468
143468
|
var _this = this;
|
|
143469
|
-
return this.forwardJSONCall("getNameOrDottedNameSpan('" +
|
|
143470
|
-
return _this.languageService.getNameOrDottedNameSpan(
|
|
143469
|
+
return this.forwardJSONCall("getNameOrDottedNameSpan('" + fileName2 + "', " + startPos + ", " + endPos + ")", function() {
|
|
143470
|
+
return _this.languageService.getNameOrDottedNameSpan(fileName2, startPos, endPos);
|
|
143471
143471
|
});
|
|
143472
143472
|
};
|
|
143473
|
-
LanguageServiceShimObject2.prototype.getBreakpointStatementAtPosition = function(
|
|
143473
|
+
LanguageServiceShimObject2.prototype.getBreakpointStatementAtPosition = function(fileName2, position) {
|
|
143474
143474
|
var _this = this;
|
|
143475
|
-
return this.forwardJSONCall("getBreakpointStatementAtPosition('" +
|
|
143476
|
-
return _this.languageService.getBreakpointStatementAtPosition(
|
|
143475
|
+
return this.forwardJSONCall("getBreakpointStatementAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143476
|
+
return _this.languageService.getBreakpointStatementAtPosition(fileName2, position);
|
|
143477
143477
|
});
|
|
143478
143478
|
};
|
|
143479
|
-
LanguageServiceShimObject2.prototype.getSignatureHelpItems = function(
|
|
143479
|
+
LanguageServiceShimObject2.prototype.getSignatureHelpItems = function(fileName2, position, options) {
|
|
143480
143480
|
var _this = this;
|
|
143481
|
-
return this.forwardJSONCall("getSignatureHelpItems('" +
|
|
143482
|
-
return _this.languageService.getSignatureHelpItems(
|
|
143481
|
+
return this.forwardJSONCall("getSignatureHelpItems('" + fileName2 + "', " + position + ")", function() {
|
|
143482
|
+
return _this.languageService.getSignatureHelpItems(fileName2, position, options);
|
|
143483
143483
|
});
|
|
143484
143484
|
};
|
|
143485
|
-
LanguageServiceShimObject2.prototype.getDefinitionAtPosition = function(
|
|
143485
|
+
LanguageServiceShimObject2.prototype.getDefinitionAtPosition = function(fileName2, position) {
|
|
143486
143486
|
var _this = this;
|
|
143487
|
-
return this.forwardJSONCall("getDefinitionAtPosition('" +
|
|
143488
|
-
return _this.languageService.getDefinitionAtPosition(
|
|
143487
|
+
return this.forwardJSONCall("getDefinitionAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143488
|
+
return _this.languageService.getDefinitionAtPosition(fileName2, position);
|
|
143489
143489
|
});
|
|
143490
143490
|
};
|
|
143491
|
-
LanguageServiceShimObject2.prototype.getDefinitionAndBoundSpan = function(
|
|
143491
|
+
LanguageServiceShimObject2.prototype.getDefinitionAndBoundSpan = function(fileName2, position) {
|
|
143492
143492
|
var _this = this;
|
|
143493
|
-
return this.forwardJSONCall("getDefinitionAndBoundSpan('" +
|
|
143494
|
-
return _this.languageService.getDefinitionAndBoundSpan(
|
|
143493
|
+
return this.forwardJSONCall("getDefinitionAndBoundSpan('" + fileName2 + "', " + position + ")", function() {
|
|
143494
|
+
return _this.languageService.getDefinitionAndBoundSpan(fileName2, position);
|
|
143495
143495
|
});
|
|
143496
143496
|
};
|
|
143497
|
-
LanguageServiceShimObject2.prototype.getTypeDefinitionAtPosition = function(
|
|
143497
|
+
LanguageServiceShimObject2.prototype.getTypeDefinitionAtPosition = function(fileName2, position) {
|
|
143498
143498
|
var _this = this;
|
|
143499
|
-
return this.forwardJSONCall("getTypeDefinitionAtPosition('" +
|
|
143500
|
-
return _this.languageService.getTypeDefinitionAtPosition(
|
|
143499
|
+
return this.forwardJSONCall("getTypeDefinitionAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143500
|
+
return _this.languageService.getTypeDefinitionAtPosition(fileName2, position);
|
|
143501
143501
|
});
|
|
143502
143502
|
};
|
|
143503
|
-
LanguageServiceShimObject2.prototype.getImplementationAtPosition = function(
|
|
143503
|
+
LanguageServiceShimObject2.prototype.getImplementationAtPosition = function(fileName2, position) {
|
|
143504
143504
|
var _this = this;
|
|
143505
|
-
return this.forwardJSONCall("getImplementationAtPosition('" +
|
|
143506
|
-
return _this.languageService.getImplementationAtPosition(
|
|
143505
|
+
return this.forwardJSONCall("getImplementationAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143506
|
+
return _this.languageService.getImplementationAtPosition(fileName2, position);
|
|
143507
143507
|
});
|
|
143508
143508
|
};
|
|
143509
|
-
LanguageServiceShimObject2.prototype.getRenameInfo = function(
|
|
143509
|
+
LanguageServiceShimObject2.prototype.getRenameInfo = function(fileName2, position, options) {
|
|
143510
143510
|
var _this = this;
|
|
143511
|
-
return this.forwardJSONCall("getRenameInfo('" +
|
|
143512
|
-
return _this.languageService.getRenameInfo(
|
|
143511
|
+
return this.forwardJSONCall("getRenameInfo('" + fileName2 + "', " + position + ")", function() {
|
|
143512
|
+
return _this.languageService.getRenameInfo(fileName2, position, options);
|
|
143513
143513
|
});
|
|
143514
143514
|
};
|
|
143515
|
-
LanguageServiceShimObject2.prototype.getSmartSelectionRange = function(
|
|
143515
|
+
LanguageServiceShimObject2.prototype.getSmartSelectionRange = function(fileName2, position) {
|
|
143516
143516
|
var _this = this;
|
|
143517
|
-
return this.forwardJSONCall("getSmartSelectionRange('" +
|
|
143518
|
-
return _this.languageService.getSmartSelectionRange(
|
|
143517
|
+
return this.forwardJSONCall("getSmartSelectionRange('" + fileName2 + "', " + position + ")", function() {
|
|
143518
|
+
return _this.languageService.getSmartSelectionRange(fileName2, position);
|
|
143519
143519
|
});
|
|
143520
143520
|
};
|
|
143521
|
-
LanguageServiceShimObject2.prototype.findRenameLocations = function(
|
|
143521
|
+
LanguageServiceShimObject2.prototype.findRenameLocations = function(fileName2, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename) {
|
|
143522
143522
|
var _this = this;
|
|
143523
|
-
return this.forwardJSONCall("findRenameLocations('" +
|
|
143524
|
-
return _this.languageService.findRenameLocations(
|
|
143523
|
+
return this.forwardJSONCall("findRenameLocations('" + fileName2 + "', " + position + ", " + findInStrings + ", " + findInComments + ", " + providePrefixAndSuffixTextForRename + ")", function() {
|
|
143524
|
+
return _this.languageService.findRenameLocations(fileName2, position, findInStrings, findInComments, providePrefixAndSuffixTextForRename);
|
|
143525
143525
|
});
|
|
143526
143526
|
};
|
|
143527
|
-
LanguageServiceShimObject2.prototype.getBraceMatchingAtPosition = function(
|
|
143527
|
+
LanguageServiceShimObject2.prototype.getBraceMatchingAtPosition = function(fileName2, position) {
|
|
143528
143528
|
var _this = this;
|
|
143529
|
-
return this.forwardJSONCall("getBraceMatchingAtPosition('" +
|
|
143530
|
-
return _this.languageService.getBraceMatchingAtPosition(
|
|
143529
|
+
return this.forwardJSONCall("getBraceMatchingAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143530
|
+
return _this.languageService.getBraceMatchingAtPosition(fileName2, position);
|
|
143531
143531
|
});
|
|
143532
143532
|
};
|
|
143533
|
-
LanguageServiceShimObject2.prototype.isValidBraceCompletionAtPosition = function(
|
|
143533
|
+
LanguageServiceShimObject2.prototype.isValidBraceCompletionAtPosition = function(fileName2, position, openingBrace) {
|
|
143534
143534
|
var _this = this;
|
|
143535
|
-
return this.forwardJSONCall("isValidBraceCompletionAtPosition('" +
|
|
143536
|
-
return _this.languageService.isValidBraceCompletionAtPosition(
|
|
143535
|
+
return this.forwardJSONCall("isValidBraceCompletionAtPosition('" + fileName2 + "', " + position + ", " + openingBrace + ")", function() {
|
|
143536
|
+
return _this.languageService.isValidBraceCompletionAtPosition(fileName2, position, openingBrace);
|
|
143537
143537
|
});
|
|
143538
143538
|
};
|
|
143539
|
-
LanguageServiceShimObject2.prototype.getSpanOfEnclosingComment = function(
|
|
143539
|
+
LanguageServiceShimObject2.prototype.getSpanOfEnclosingComment = function(fileName2, position, onlyMultiLine) {
|
|
143540
143540
|
var _this = this;
|
|
143541
|
-
return this.forwardJSONCall("getSpanOfEnclosingComment('" +
|
|
143542
|
-
return _this.languageService.getSpanOfEnclosingComment(
|
|
143541
|
+
return this.forwardJSONCall("getSpanOfEnclosingComment('" + fileName2 + "', " + position + ")", function() {
|
|
143542
|
+
return _this.languageService.getSpanOfEnclosingComment(fileName2, position, onlyMultiLine);
|
|
143543
143543
|
});
|
|
143544
143544
|
};
|
|
143545
|
-
LanguageServiceShimObject2.prototype.getIndentationAtPosition = function(
|
|
143545
|
+
LanguageServiceShimObject2.prototype.getIndentationAtPosition = function(fileName2, position, options) {
|
|
143546
143546
|
var _this = this;
|
|
143547
|
-
return this.forwardJSONCall("getIndentationAtPosition('" +
|
|
143547
|
+
return this.forwardJSONCall("getIndentationAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143548
143548
|
var localOptions = JSON.parse(options);
|
|
143549
|
-
return _this.languageService.getIndentationAtPosition(
|
|
143549
|
+
return _this.languageService.getIndentationAtPosition(fileName2, position, localOptions);
|
|
143550
143550
|
});
|
|
143551
143551
|
};
|
|
143552
|
-
LanguageServiceShimObject2.prototype.getReferencesAtPosition = function(
|
|
143552
|
+
LanguageServiceShimObject2.prototype.getReferencesAtPosition = function(fileName2, position) {
|
|
143553
143553
|
var _this = this;
|
|
143554
|
-
return this.forwardJSONCall("getReferencesAtPosition('" +
|
|
143555
|
-
return _this.languageService.getReferencesAtPosition(
|
|
143554
|
+
return this.forwardJSONCall("getReferencesAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143555
|
+
return _this.languageService.getReferencesAtPosition(fileName2, position);
|
|
143556
143556
|
});
|
|
143557
143557
|
};
|
|
143558
|
-
LanguageServiceShimObject2.prototype.findReferences = function(
|
|
143558
|
+
LanguageServiceShimObject2.prototype.findReferences = function(fileName2, position) {
|
|
143559
143559
|
var _this = this;
|
|
143560
|
-
return this.forwardJSONCall("findReferences('" +
|
|
143561
|
-
return _this.languageService.findReferences(
|
|
143560
|
+
return this.forwardJSONCall("findReferences('" + fileName2 + "', " + position + ")", function() {
|
|
143561
|
+
return _this.languageService.findReferences(fileName2, position);
|
|
143562
143562
|
});
|
|
143563
143563
|
};
|
|
143564
|
-
LanguageServiceShimObject2.prototype.getFileReferences = function(
|
|
143564
|
+
LanguageServiceShimObject2.prototype.getFileReferences = function(fileName2) {
|
|
143565
143565
|
var _this = this;
|
|
143566
|
-
return this.forwardJSONCall("getFileReferences('" +
|
|
143567
|
-
return _this.languageService.getFileReferences(
|
|
143566
|
+
return this.forwardJSONCall("getFileReferences('" + fileName2 + ")", function() {
|
|
143567
|
+
return _this.languageService.getFileReferences(fileName2);
|
|
143568
143568
|
});
|
|
143569
143569
|
};
|
|
143570
|
-
LanguageServiceShimObject2.prototype.getOccurrencesAtPosition = function(
|
|
143570
|
+
LanguageServiceShimObject2.prototype.getOccurrencesAtPosition = function(fileName2, position) {
|
|
143571
143571
|
var _this = this;
|
|
143572
|
-
return this.forwardJSONCall("getOccurrencesAtPosition('" +
|
|
143573
|
-
return _this.languageService.getOccurrencesAtPosition(
|
|
143572
|
+
return this.forwardJSONCall("getOccurrencesAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143573
|
+
return _this.languageService.getOccurrencesAtPosition(fileName2, position);
|
|
143574
143574
|
});
|
|
143575
143575
|
};
|
|
143576
|
-
LanguageServiceShimObject2.prototype.getDocumentHighlights = function(
|
|
143576
|
+
LanguageServiceShimObject2.prototype.getDocumentHighlights = function(fileName2, position, filesToSearch) {
|
|
143577
143577
|
var _this = this;
|
|
143578
|
-
return this.forwardJSONCall("getDocumentHighlights('" +
|
|
143579
|
-
var results = _this.languageService.getDocumentHighlights(
|
|
143580
|
-
var normalizedName = ts3.toFileNameLowerCase(ts3.normalizeSlashes(
|
|
143578
|
+
return this.forwardJSONCall("getDocumentHighlights('" + fileName2 + "', " + position + ")", function() {
|
|
143579
|
+
var results = _this.languageService.getDocumentHighlights(fileName2, position, JSON.parse(filesToSearch));
|
|
143580
|
+
var normalizedName = ts3.toFileNameLowerCase(ts3.normalizeSlashes(fileName2));
|
|
143581
143581
|
return ts3.filter(results, function(r) {
|
|
143582
143582
|
return ts3.toFileNameLowerCase(ts3.normalizeSlashes(r.fileName)) === normalizedName;
|
|
143583
143583
|
});
|
|
143584
143584
|
});
|
|
143585
143585
|
};
|
|
143586
|
-
LanguageServiceShimObject2.prototype.getCompletionsAtPosition = function(
|
|
143586
|
+
LanguageServiceShimObject2.prototype.getCompletionsAtPosition = function(fileName2, position, preferences) {
|
|
143587
143587
|
var _this = this;
|
|
143588
|
-
return this.forwardJSONCall("getCompletionsAtPosition('" +
|
|
143589
|
-
return _this.languageService.getCompletionsAtPosition(
|
|
143588
|
+
return this.forwardJSONCall("getCompletionsAtPosition('" + fileName2 + "', " + position + ", " + preferences + ")", function() {
|
|
143589
|
+
return _this.languageService.getCompletionsAtPosition(fileName2, position, preferences);
|
|
143590
143590
|
});
|
|
143591
143591
|
};
|
|
143592
|
-
LanguageServiceShimObject2.prototype.getCompletionEntryDetails = function(
|
|
143592
|
+
LanguageServiceShimObject2.prototype.getCompletionEntryDetails = function(fileName2, position, entryName, formatOptions, source, preferences, data) {
|
|
143593
143593
|
var _this = this;
|
|
143594
|
-
return this.forwardJSONCall("getCompletionEntryDetails('" +
|
|
143594
|
+
return this.forwardJSONCall("getCompletionEntryDetails('" + fileName2 + "', " + position + ", '" + entryName + "')", function() {
|
|
143595
143595
|
var localOptions = formatOptions === void 0 ? void 0 : JSON.parse(formatOptions);
|
|
143596
|
-
return _this.languageService.getCompletionEntryDetails(
|
|
143596
|
+
return _this.languageService.getCompletionEntryDetails(fileName2, position, entryName, localOptions, source, preferences, data);
|
|
143597
143597
|
});
|
|
143598
143598
|
};
|
|
143599
|
-
LanguageServiceShimObject2.prototype.getFormattingEditsForRange = function(
|
|
143599
|
+
LanguageServiceShimObject2.prototype.getFormattingEditsForRange = function(fileName2, start, end, options) {
|
|
143600
143600
|
var _this = this;
|
|
143601
|
-
return this.forwardJSONCall("getFormattingEditsForRange('" +
|
|
143601
|
+
return this.forwardJSONCall("getFormattingEditsForRange('" + fileName2 + "', " + start + ", " + end + ")", function() {
|
|
143602
143602
|
var localOptions = JSON.parse(options);
|
|
143603
|
-
return _this.languageService.getFormattingEditsForRange(
|
|
143603
|
+
return _this.languageService.getFormattingEditsForRange(fileName2, start, end, localOptions);
|
|
143604
143604
|
});
|
|
143605
143605
|
};
|
|
143606
|
-
LanguageServiceShimObject2.prototype.getFormattingEditsForDocument = function(
|
|
143606
|
+
LanguageServiceShimObject2.prototype.getFormattingEditsForDocument = function(fileName2, options) {
|
|
143607
143607
|
var _this = this;
|
|
143608
|
-
return this.forwardJSONCall("getFormattingEditsForDocument('" +
|
|
143608
|
+
return this.forwardJSONCall("getFormattingEditsForDocument('" + fileName2 + "')", function() {
|
|
143609
143609
|
var localOptions = JSON.parse(options);
|
|
143610
|
-
return _this.languageService.getFormattingEditsForDocument(
|
|
143610
|
+
return _this.languageService.getFormattingEditsForDocument(fileName2, localOptions);
|
|
143611
143611
|
});
|
|
143612
143612
|
};
|
|
143613
|
-
LanguageServiceShimObject2.prototype.getFormattingEditsAfterKeystroke = function(
|
|
143613
|
+
LanguageServiceShimObject2.prototype.getFormattingEditsAfterKeystroke = function(fileName2, position, key, options) {
|
|
143614
143614
|
var _this = this;
|
|
143615
|
-
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('" +
|
|
143615
|
+
return this.forwardJSONCall("getFormattingEditsAfterKeystroke('" + fileName2 + "', " + position + ", '" + key + "')", function() {
|
|
143616
143616
|
var localOptions = JSON.parse(options);
|
|
143617
|
-
return _this.languageService.getFormattingEditsAfterKeystroke(
|
|
143617
|
+
return _this.languageService.getFormattingEditsAfterKeystroke(fileName2, position, key, localOptions);
|
|
143618
143618
|
});
|
|
143619
143619
|
};
|
|
143620
|
-
LanguageServiceShimObject2.prototype.getDocCommentTemplateAtPosition = function(
|
|
143620
|
+
LanguageServiceShimObject2.prototype.getDocCommentTemplateAtPosition = function(fileName2, position, options) {
|
|
143621
143621
|
var _this = this;
|
|
143622
|
-
return this.forwardJSONCall("getDocCommentTemplateAtPosition('" +
|
|
143623
|
-
return _this.languageService.getDocCommentTemplateAtPosition(
|
|
143622
|
+
return this.forwardJSONCall("getDocCommentTemplateAtPosition('" + fileName2 + "', " + position + ")", function() {
|
|
143623
|
+
return _this.languageService.getDocCommentTemplateAtPosition(fileName2, position, options);
|
|
143624
143624
|
});
|
|
143625
143625
|
};
|
|
143626
|
-
LanguageServiceShimObject2.prototype.getNavigateToItems = function(searchValue, maxResultCount,
|
|
143626
|
+
LanguageServiceShimObject2.prototype.getNavigateToItems = function(searchValue, maxResultCount, fileName2) {
|
|
143627
143627
|
var _this = this;
|
|
143628
|
-
return this.forwardJSONCall("getNavigateToItems('" + searchValue + "', " + maxResultCount + ", " +
|
|
143629
|
-
return _this.languageService.getNavigateToItems(searchValue, maxResultCount,
|
|
143628
|
+
return this.forwardJSONCall("getNavigateToItems('" + searchValue + "', " + maxResultCount + ", " + fileName2 + ")", function() {
|
|
143629
|
+
return _this.languageService.getNavigateToItems(searchValue, maxResultCount, fileName2);
|
|
143630
143630
|
});
|
|
143631
143631
|
};
|
|
143632
|
-
LanguageServiceShimObject2.prototype.getNavigationBarItems = function(
|
|
143632
|
+
LanguageServiceShimObject2.prototype.getNavigationBarItems = function(fileName2) {
|
|
143633
143633
|
var _this = this;
|
|
143634
|
-
return this.forwardJSONCall("getNavigationBarItems('" +
|
|
143635
|
-
return _this.languageService.getNavigationBarItems(
|
|
143634
|
+
return this.forwardJSONCall("getNavigationBarItems('" + fileName2 + "')", function() {
|
|
143635
|
+
return _this.languageService.getNavigationBarItems(fileName2);
|
|
143636
143636
|
});
|
|
143637
143637
|
};
|
|
143638
|
-
LanguageServiceShimObject2.prototype.getNavigationTree = function(
|
|
143638
|
+
LanguageServiceShimObject2.prototype.getNavigationTree = function(fileName2) {
|
|
143639
143639
|
var _this = this;
|
|
143640
|
-
return this.forwardJSONCall("getNavigationTree('" +
|
|
143641
|
-
return _this.languageService.getNavigationTree(
|
|
143640
|
+
return this.forwardJSONCall("getNavigationTree('" + fileName2 + "')", function() {
|
|
143641
|
+
return _this.languageService.getNavigationTree(fileName2);
|
|
143642
143642
|
});
|
|
143643
143643
|
};
|
|
143644
|
-
LanguageServiceShimObject2.prototype.getOutliningSpans = function(
|
|
143644
|
+
LanguageServiceShimObject2.prototype.getOutliningSpans = function(fileName2) {
|
|
143645
143645
|
var _this = this;
|
|
143646
|
-
return this.forwardJSONCall("getOutliningSpans('" +
|
|
143647
|
-
return _this.languageService.getOutliningSpans(
|
|
143646
|
+
return this.forwardJSONCall("getOutliningSpans('" + fileName2 + "')", function() {
|
|
143647
|
+
return _this.languageService.getOutliningSpans(fileName2);
|
|
143648
143648
|
});
|
|
143649
143649
|
};
|
|
143650
|
-
LanguageServiceShimObject2.prototype.getTodoComments = function(
|
|
143650
|
+
LanguageServiceShimObject2.prototype.getTodoComments = function(fileName2, descriptors) {
|
|
143651
143651
|
var _this = this;
|
|
143652
|
-
return this.forwardJSONCall("getTodoComments('" +
|
|
143653
|
-
return _this.languageService.getTodoComments(
|
|
143652
|
+
return this.forwardJSONCall("getTodoComments('" + fileName2 + "')", function() {
|
|
143653
|
+
return _this.languageService.getTodoComments(fileName2, JSON.parse(descriptors));
|
|
143654
143654
|
});
|
|
143655
143655
|
};
|
|
143656
|
-
LanguageServiceShimObject2.prototype.prepareCallHierarchy = function(
|
|
143656
|
+
LanguageServiceShimObject2.prototype.prepareCallHierarchy = function(fileName2, position) {
|
|
143657
143657
|
var _this = this;
|
|
143658
|
-
return this.forwardJSONCall("prepareCallHierarchy('" +
|
|
143659
|
-
return _this.languageService.prepareCallHierarchy(
|
|
143658
|
+
return this.forwardJSONCall("prepareCallHierarchy('" + fileName2 + "', " + position + ")", function() {
|
|
143659
|
+
return _this.languageService.prepareCallHierarchy(fileName2, position);
|
|
143660
143660
|
});
|
|
143661
143661
|
};
|
|
143662
|
-
LanguageServiceShimObject2.prototype.provideCallHierarchyIncomingCalls = function(
|
|
143662
|
+
LanguageServiceShimObject2.prototype.provideCallHierarchyIncomingCalls = function(fileName2, position) {
|
|
143663
143663
|
var _this = this;
|
|
143664
|
-
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('" +
|
|
143665
|
-
return _this.languageService.provideCallHierarchyIncomingCalls(
|
|
143664
|
+
return this.forwardJSONCall("provideCallHierarchyIncomingCalls('" + fileName2 + "', " + position + ")", function() {
|
|
143665
|
+
return _this.languageService.provideCallHierarchyIncomingCalls(fileName2, position);
|
|
143666
143666
|
});
|
|
143667
143667
|
};
|
|
143668
|
-
LanguageServiceShimObject2.prototype.provideCallHierarchyOutgoingCalls = function(
|
|
143668
|
+
LanguageServiceShimObject2.prototype.provideCallHierarchyOutgoingCalls = function(fileName2, position) {
|
|
143669
143669
|
var _this = this;
|
|
143670
|
-
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('" +
|
|
143671
|
-
return _this.languageService.provideCallHierarchyOutgoingCalls(
|
|
143670
|
+
return this.forwardJSONCall("provideCallHierarchyOutgoingCalls('" + fileName2 + "', " + position + ")", function() {
|
|
143671
|
+
return _this.languageService.provideCallHierarchyOutgoingCalls(fileName2, position);
|
|
143672
143672
|
});
|
|
143673
143673
|
};
|
|
143674
|
-
LanguageServiceShimObject2.prototype.getEmitOutput = function(
|
|
143674
|
+
LanguageServiceShimObject2.prototype.getEmitOutput = function(fileName2) {
|
|
143675
143675
|
var _this = this;
|
|
143676
|
-
return this.forwardJSONCall("getEmitOutput('" +
|
|
143677
|
-
var _a = _this.languageService.getEmitOutput(
|
|
143676
|
+
return this.forwardJSONCall("getEmitOutput('" + fileName2 + "')", function() {
|
|
143677
|
+
var _a = _this.languageService.getEmitOutput(fileName2), diagnostics = _a.diagnostics, rest = __rest(_a, ["diagnostics"]);
|
|
143678
143678
|
return __assign(__assign({}, rest), { diagnostics: _this.realizeDiagnostics(diagnostics) });
|
|
143679
143679
|
});
|
|
143680
143680
|
};
|
|
143681
|
-
LanguageServiceShimObject2.prototype.getEmitOutputObject = function(
|
|
143681
|
+
LanguageServiceShimObject2.prototype.getEmitOutputObject = function(fileName2) {
|
|
143682
143682
|
var _this = this;
|
|
143683
|
-
return forwardCall(this.logger, "getEmitOutput('" +
|
|
143684
|
-
return _this.languageService.getEmitOutput(
|
|
143683
|
+
return forwardCall(this.logger, "getEmitOutput('" + fileName2 + "')", false, function() {
|
|
143684
|
+
return _this.languageService.getEmitOutput(fileName2);
|
|
143685
143685
|
}, this.logPerformance);
|
|
143686
143686
|
};
|
|
143687
|
-
LanguageServiceShimObject2.prototype.toggleLineComment = function(
|
|
143687
|
+
LanguageServiceShimObject2.prototype.toggleLineComment = function(fileName2, textRange) {
|
|
143688
143688
|
var _this = this;
|
|
143689
|
-
return this.forwardJSONCall("toggleLineComment('" +
|
|
143690
|
-
return _this.languageService.toggleLineComment(
|
|
143689
|
+
return this.forwardJSONCall("toggleLineComment('" + fileName2 + "', '" + JSON.stringify(textRange) + "')", function() {
|
|
143690
|
+
return _this.languageService.toggleLineComment(fileName2, textRange);
|
|
143691
143691
|
});
|
|
143692
143692
|
};
|
|
143693
|
-
LanguageServiceShimObject2.prototype.toggleMultilineComment = function(
|
|
143693
|
+
LanguageServiceShimObject2.prototype.toggleMultilineComment = function(fileName2, textRange) {
|
|
143694
143694
|
var _this = this;
|
|
143695
|
-
return this.forwardJSONCall("toggleMultilineComment('" +
|
|
143696
|
-
return _this.languageService.toggleMultilineComment(
|
|
143695
|
+
return this.forwardJSONCall("toggleMultilineComment('" + fileName2 + "', '" + JSON.stringify(textRange) + "')", function() {
|
|
143696
|
+
return _this.languageService.toggleMultilineComment(fileName2, textRange);
|
|
143697
143697
|
});
|
|
143698
143698
|
};
|
|
143699
|
-
LanguageServiceShimObject2.prototype.commentSelection = function(
|
|
143699
|
+
LanguageServiceShimObject2.prototype.commentSelection = function(fileName2, textRange) {
|
|
143700
143700
|
var _this = this;
|
|
143701
|
-
return this.forwardJSONCall("commentSelection('" +
|
|
143702
|
-
return _this.languageService.commentSelection(
|
|
143701
|
+
return this.forwardJSONCall("commentSelection('" + fileName2 + "', '" + JSON.stringify(textRange) + "')", function() {
|
|
143702
|
+
return _this.languageService.commentSelection(fileName2, textRange);
|
|
143703
143703
|
});
|
|
143704
143704
|
};
|
|
143705
|
-
LanguageServiceShimObject2.prototype.uncommentSelection = function(
|
|
143705
|
+
LanguageServiceShimObject2.prototype.uncommentSelection = function(fileName2, textRange) {
|
|
143706
143706
|
var _this = this;
|
|
143707
|
-
return this.forwardJSONCall("uncommentSelection('" +
|
|
143708
|
-
return _this.languageService.uncommentSelection(
|
|
143707
|
+
return this.forwardJSONCall("uncommentSelection('" + fileName2 + "', '" + JSON.stringify(textRange) + "')", function() {
|
|
143708
|
+
return _this.languageService.uncommentSelection(fileName2, textRange);
|
|
143709
143709
|
});
|
|
143710
143710
|
};
|
|
143711
143711
|
return LanguageServiceShimObject2;
|
|
@@ -143759,11 +143759,11 @@ var require_typescript = __commonJS({
|
|
|
143759
143759
|
CoreServicesShimObject2.prototype.forwardJSONCall = function(actionDescription, action) {
|
|
143760
143760
|
return forwardJSONCall(this.logger, actionDescription, action, this.logPerformance);
|
|
143761
143761
|
};
|
|
143762
|
-
CoreServicesShimObject2.prototype.resolveModuleName = function(
|
|
143762
|
+
CoreServicesShimObject2.prototype.resolveModuleName = function(fileName2, moduleName, compilerOptionsJson) {
|
|
143763
143763
|
var _this = this;
|
|
143764
|
-
return this.forwardJSONCall("resolveModuleName('" +
|
|
143764
|
+
return this.forwardJSONCall("resolveModuleName('" + fileName2 + "')", function() {
|
|
143765
143765
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
143766
|
-
var result2 = ts3.resolveModuleName(moduleName, ts3.normalizeSlashes(
|
|
143766
|
+
var result2 = ts3.resolveModuleName(moduleName, ts3.normalizeSlashes(fileName2), compilerOptions, _this.host);
|
|
143767
143767
|
var resolvedFileName = result2.resolvedModule ? result2.resolvedModule.resolvedFileName : void 0;
|
|
143768
143768
|
if (result2.resolvedModule && result2.resolvedModule.extension !== ".ts" && result2.resolvedModule.extension !== ".tsx" && result2.resolvedModule.extension !== ".d.ts") {
|
|
143769
143769
|
resolvedFileName = void 0;
|
|
@@ -143774,11 +143774,11 @@ var require_typescript = __commonJS({
|
|
|
143774
143774
|
};
|
|
143775
143775
|
});
|
|
143776
143776
|
};
|
|
143777
|
-
CoreServicesShimObject2.prototype.resolveTypeReferenceDirective = function(
|
|
143777
|
+
CoreServicesShimObject2.prototype.resolveTypeReferenceDirective = function(fileName2, typeReferenceDirective, compilerOptionsJson) {
|
|
143778
143778
|
var _this = this;
|
|
143779
|
-
return this.forwardJSONCall("resolveTypeReferenceDirective(" +
|
|
143779
|
+
return this.forwardJSONCall("resolveTypeReferenceDirective(" + fileName2 + ")", function() {
|
|
143780
143780
|
var compilerOptions = JSON.parse(compilerOptionsJson);
|
|
143781
|
-
var result2 = ts3.resolveTypeReferenceDirective(typeReferenceDirective, ts3.normalizeSlashes(
|
|
143781
|
+
var result2 = ts3.resolveTypeReferenceDirective(typeReferenceDirective, ts3.normalizeSlashes(fileName2), compilerOptions, _this.host);
|
|
143782
143782
|
return {
|
|
143783
143783
|
resolvedFileName: result2.resolvedTypeReferenceDirective ? result2.resolvedTypeReferenceDirective.resolvedFileName : void 0,
|
|
143784
143784
|
primary: result2.resolvedTypeReferenceDirective ? result2.resolvedTypeReferenceDirective.primary : true,
|
|
@@ -143786,9 +143786,9 @@ var require_typescript = __commonJS({
|
|
|
143786
143786
|
};
|
|
143787
143787
|
});
|
|
143788
143788
|
};
|
|
143789
|
-
CoreServicesShimObject2.prototype.getPreProcessedFileInfo = function(
|
|
143789
|
+
CoreServicesShimObject2.prototype.getPreProcessedFileInfo = function(fileName2, sourceTextSnapshot) {
|
|
143790
143790
|
var _this = this;
|
|
143791
|
-
return this.forwardJSONCall("getPreProcessedFileInfo('" +
|
|
143791
|
+
return this.forwardJSONCall("getPreProcessedFileInfo('" + fileName2 + "')", function() {
|
|
143792
143792
|
var result2 = ts3.preProcessFile(ts3.getSnapshotText(sourceTextSnapshot), true, true);
|
|
143793
143793
|
return {
|
|
143794
143794
|
referencedFiles: _this.convertFileReferences(result2.referencedFiles),
|
|
@@ -143822,11 +143822,11 @@ var require_typescript = __commonJS({
|
|
|
143822
143822
|
}
|
|
143823
143823
|
return result2;
|
|
143824
143824
|
};
|
|
143825
|
-
CoreServicesShimObject2.prototype.getTSConfigFileInfo = function(
|
|
143825
|
+
CoreServicesShimObject2.prototype.getTSConfigFileInfo = function(fileName2, sourceTextSnapshot) {
|
|
143826
143826
|
var _this = this;
|
|
143827
|
-
return this.forwardJSONCall("getTSConfigFileInfo('" +
|
|
143828
|
-
var result2 = ts3.parseJsonText(
|
|
143829
|
-
var normalizedFileName = ts3.normalizeSlashes(
|
|
143827
|
+
return this.forwardJSONCall("getTSConfigFileInfo('" + fileName2 + "')", function() {
|
|
143828
|
+
var result2 = ts3.parseJsonText(fileName2, ts3.getSnapshotText(sourceTextSnapshot));
|
|
143829
|
+
var normalizedFileName = ts3.normalizeSlashes(fileName2);
|
|
143830
143830
|
var configFile = ts3.parseJsonSourceFileConfigFileContent(result2, _this.host, ts3.getDirectoryPath(normalizedFileName), {}, normalizedFileName);
|
|
143831
143831
|
return {
|
|
143832
143832
|
options: configFile.options,
|
|
@@ -146218,7 +146218,7 @@ var require_locale = __commonJS({
|
|
|
146218
146218
|
function _interopRequireDefault(obj) {
|
|
146219
146219
|
return obj && obj.__esModule ? obj : { default: obj };
|
|
146220
146220
|
}
|
|
146221
|
-
var
|
|
146221
|
+
var mixed2 = {
|
|
146222
146222
|
default: "${path} is invalid",
|
|
146223
146223
|
required: "${path} is a required field",
|
|
146224
146224
|
oneOf: "${path} must be one of the following values: ${values}",
|
|
@@ -146239,7 +146239,7 @@ var require_locale = __commonJS({
|
|
|
146239
146239
|
},
|
|
146240
146240
|
defined: "${path} must be defined"
|
|
146241
146241
|
};
|
|
146242
|
-
exports2.mixed =
|
|
146242
|
+
exports2.mixed = mixed2;
|
|
146243
146243
|
var string2 = {
|
|
146244
146244
|
length: "${path} must be exactly ${length} characters",
|
|
146245
146245
|
min: "${path} must be at least ${min} characters",
|
|
@@ -146283,7 +146283,7 @@ var require_locale = __commonJS({
|
|
|
146283
146283
|
};
|
|
146284
146284
|
exports2.array = array;
|
|
146285
146285
|
var _default2 = Object.assign(Object.create(null), {
|
|
146286
|
-
mixed,
|
|
146286
|
+
mixed: mixed2,
|
|
146287
146287
|
string: string2,
|
|
146288
146288
|
number,
|
|
146289
146289
|
date,
|
|
@@ -161640,16 +161640,16 @@ var require_MixedDeclarationSet = __commonJS({
|
|
|
161640
161640
|
}], [{
|
|
161641
161641
|
key: "mix",
|
|
161642
161642
|
value: function mix() {
|
|
161643
|
-
var i, len,
|
|
161644
|
-
|
|
161643
|
+
var i, len, mixed2, rules;
|
|
161644
|
+
mixed2 = new self2();
|
|
161645
161645
|
for (var _len = arguments.length, ruleSets = new Array(_len), _key = 0; _key < _len; _key++) {
|
|
161646
161646
|
ruleSets[_key] = arguments[_key];
|
|
161647
161647
|
}
|
|
161648
161648
|
for (i = 0, len = ruleSets.length; i < len; i++) {
|
|
161649
161649
|
rules = ruleSets[i];
|
|
161650
|
-
|
|
161650
|
+
mixed2.mixWithList(rules);
|
|
161651
161651
|
}
|
|
161652
|
-
return
|
|
161652
|
+
return mixed2;
|
|
161653
161653
|
}
|
|
161654
161654
|
}]);
|
|
161655
161655
|
return MixedDeclarationSet3;
|
|
@@ -167240,7 +167240,7 @@ var import_string_decoder = __toModule(require("string_decoder"));
|
|
|
167240
167240
|
var import_typescript = __toModule(require_typescript());
|
|
167241
167241
|
var import_fs = __toModule(require("fs"));
|
|
167242
167242
|
var printer = import_typescript.default.createPrinter();
|
|
167243
|
-
var prepareFabricFile = (folder) => {
|
|
167243
|
+
var prepareFabricFile = (folder, fileName2) => {
|
|
167244
167244
|
const staticImports = [
|
|
167245
167245
|
import_typescript.default.createImportDeclaration(void 0, void 0, import_typescript.default.createImportClause(void 0, import_typescript.default.createNamespaceImport(import_typescript.default.createIdentifier("drizzle"))), import_typescript.default.createStringLiteral("drizzle-orm")),
|
|
167246
167246
|
import_typescript.default.createImportDeclaration(void 0, void 0, import_typescript.default.createImportClause(import_typescript.default.createIdentifier("Session"), void 0), import_typescript.default.createStringLiteral("drizzle-orm/db/session")),
|
|
@@ -167249,7 +167249,7 @@ var prepareFabricFile = (folder) => {
|
|
|
167249
167249
|
import_typescript.default.createImportDeclaration(void 0, void 0, import_typescript.default.createImportClause(void 0, import_typescript.default.createNamespaceImport(import_typescript.default.createIdentifier("pg"))), import_typescript.default.createStringLiteral("pg"))
|
|
167250
167250
|
];
|
|
167251
167251
|
const dynamicImports = [];
|
|
167252
|
-
const filenames = import_fs.default.readdirSync(folder);
|
|
167252
|
+
const filenames = fileName2 ? [fileName2] : import_fs.default.readdirSync(folder);
|
|
167253
167253
|
for (let i = 0; i < filenames.length; i++) {
|
|
167254
167254
|
const filename = filenames[i];
|
|
167255
167255
|
const importPath = `${folder}/${filename.split(".")[0]}`;
|
|
@@ -167327,9 +167327,9 @@ var factory_default = prepareFabricFile;
|
|
|
167327
167327
|
|
|
167328
167328
|
// src/serializer/index.ts
|
|
167329
167329
|
var esbuild = require("esbuild");
|
|
167330
|
-
var serialize = (path) => {
|
|
167330
|
+
var serialize = (path, fileName) => {
|
|
167331
167331
|
const decoder = new import_string_decoder.StringDecoder();
|
|
167332
|
-
const preparedFarbic = factory_default(path);
|
|
167332
|
+
const preparedFarbic = factory_default(path, fileName);
|
|
167333
167333
|
import_fs2.default.writeFileSync("__out.ts", preparedFarbic, "utf-8");
|
|
167334
167334
|
const result = esbuild.buildSync({
|
|
167335
167335
|
entryPoints: ["__out.ts"],
|
|
@@ -167638,8 +167638,8 @@ function diffForRenamedColumn(t1, t2) {
|
|
|
167638
167638
|
}
|
|
167639
167639
|
var renameNestedObjects = (obj, keyFrom, keyTo) => {
|
|
167640
167640
|
Object.entries(obj).forEach(([key, value]) => {
|
|
167641
|
-
if ((key === keyFrom || key.includes(keyFrom)) && typeof value !== "object") {
|
|
167642
|
-
const newKey = key.replace(
|
|
167641
|
+
if ((key === keyFrom || key.includes(keyFrom) && key !== keyFrom) && typeof value !== "object") {
|
|
167642
|
+
const newKey = key.replace(key, keyTo);
|
|
167643
167643
|
obj[newKey] = value;
|
|
167644
167644
|
delete obj[key];
|
|
167645
167645
|
}
|
|
@@ -167962,7 +167962,7 @@ var columnSchema = (0, import_yup.object)({
|
|
|
167962
167962
|
type: (0, import_yup.string)().required(),
|
|
167963
167963
|
primaryKey: (0, import_yup.boolean)().optional(),
|
|
167964
167964
|
unique: (0, import_yup.boolean)().optional(),
|
|
167965
|
-
defaultValue: (0, import_yup.
|
|
167965
|
+
defaultValue: (0, import_yup.mixed)().optional(),
|
|
167966
167966
|
notNull: (0, import_yup.boolean)().optional(),
|
|
167967
167967
|
references: (0, import_yup.object)({
|
|
167968
167968
|
table: (0, import_yup.string)().required(),
|