lecodes-cli 2.0.9 → 2.0.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +151 -94
- package/package.json +8 -8
- package/runtime/sdk-types.json +1 -1
- package/runtime/web/VERSION.json +3 -3
- package/runtime/web/player.js +2 -2
- package/runtime/web-lite/assets/{index-3CbsYWmo.js → index-BttBnvIf.js} +1 -1
- package/runtime/web-lite/assets/scene3d-D8LdhX0V.js +888 -0
- package/runtime/web-lite/features.json +2 -2
- package/runtime/web-lite/lite.js +2 -2
- package/src/dev/webRunner.ts +1 -1
- package/runtime/web-lite/assets/scene3d-CX7MAqmN.js +0 -866
package/dist/index.js
CHANGED
|
@@ -52,7 +52,7 @@ var package_default;
|
|
|
52
52
|
var init_package = __esm(() => {
|
|
53
53
|
package_default = {
|
|
54
54
|
name: "lecodes-cli",
|
|
55
|
-
version: "2.0.
|
|
55
|
+
version: "2.0.11",
|
|
56
56
|
dependencies: {
|
|
57
57
|
"@letary/chisel": "^0.13.0",
|
|
58
58
|
jimp: "^1.6.1",
|
|
@@ -76,7 +76,7 @@ var init_package = __esm(() => {
|
|
|
76
76
|
},
|
|
77
77
|
peerDependencies: {
|
|
78
78
|
"lecodes-design": "^0.11.0",
|
|
79
|
-
"lecodes-headless": "^2.0.
|
|
79
|
+
"lecodes-headless": "^2.0.11",
|
|
80
80
|
"lecodes-3d-editor": "^0.9.0",
|
|
81
81
|
"lecodes-assets": "^0.2.1",
|
|
82
82
|
"heic-decode": "^2.1.0",
|
|
@@ -146,7 +146,7 @@ var init_package = __esm(() => {
|
|
|
146
146
|
});
|
|
147
147
|
|
|
148
148
|
// ../../sdk/src/version.ts
|
|
149
|
-
var SDK_VERSION = "2.0.
|
|
149
|
+
var SDK_VERSION = "2.0.11", sdkMajor = (version) => {
|
|
150
150
|
const m = version?.match(/^(\d+)\.\d+\.\d+/);
|
|
151
151
|
return m ? Number(m[1]) : null;
|
|
152
152
|
}, bundleSdkVersion = (head) => head.slice(0, 2000).match(/^\/\/ sdk: (\d+\.\d+\.\d+\S*)/m)?.[1] ?? null, bundleRunsOn = (bundleVersion, hostVersion) => sdkMajor(bundleVersion) !== null && sdkMajor(bundleVersion) === sdkMajor(hostVersion);
|
|
@@ -1211,7 +1211,7 @@ var init_peerInstall = __esm(() => {
|
|
|
1211
1211
|
});
|
|
1212
1212
|
|
|
1213
1213
|
// ../../sdk/src/compile/assetMacro.ts
|
|
1214
|
-
var ASSET_RE, ASSET_CALL_RE, hasAssetMacro = (src) => src.includes("asset("), maskNonCode = (src) => {
|
|
1214
|
+
var ASSET_RE, ASSET_CALL_RE, hasAssetMacro = (src) => src.includes("asset("), maskNonCode = (src, onString) => {
|
|
1215
1215
|
const out = src.split("");
|
|
1216
1216
|
const blank = (from, to) => {
|
|
1217
1217
|
for (let k = from;k < to && k < out.length; k++)
|
|
@@ -1265,6 +1265,7 @@ var ASSET_RE, ASSET_CALL_RE, hasAssetMacro = (src) => src.includes("asset("), ma
|
|
|
1265
1265
|
if (c2 === "'" || c2 === '"') {
|
|
1266
1266
|
const start = i;
|
|
1267
1267
|
i++;
|
|
1268
|
+
let closed = false;
|
|
1268
1269
|
while (i < src.length) {
|
|
1269
1270
|
const q = src[i];
|
|
1270
1271
|
if (q === "\\") {
|
|
@@ -1272,10 +1273,16 @@ var ASSET_RE, ASSET_CALL_RE, hasAssetMacro = (src) => src.includes("asset("), ma
|
|
|
1272
1273
|
continue;
|
|
1273
1274
|
}
|
|
1274
1275
|
i++;
|
|
1275
|
-
if (q === c2
|
|
1276
|
+
if (q === c2) {
|
|
1277
|
+
closed = true;
|
|
1278
|
+
break;
|
|
1279
|
+
}
|
|
1280
|
+
if (q === `
|
|
1276
1281
|
`)
|
|
1277
1282
|
break;
|
|
1278
1283
|
}
|
|
1284
|
+
if (closed && onString)
|
|
1285
|
+
onString(start, i);
|
|
1279
1286
|
blank(start, i);
|
|
1280
1287
|
continue;
|
|
1281
1288
|
}
|
|
@@ -1304,6 +1311,47 @@ var ASSET_RE, ASSET_CALL_RE, hasAssetMacro = (src) => src.includes("asset("), ma
|
|
|
1304
1311
|
i++;
|
|
1305
1312
|
}
|
|
1306
1313
|
return out.join("");
|
|
1314
|
+
}, BARE_PATH_EXT, CODE_EXT, IMPORT_BEFORE, normalizePath = (path) => {
|
|
1315
|
+
const out = [];
|
|
1316
|
+
for (const part of path.split("/")) {
|
|
1317
|
+
if (part === "" || part === ".")
|
|
1318
|
+
continue;
|
|
1319
|
+
if (part === "..") {
|
|
1320
|
+
out.pop();
|
|
1321
|
+
continue;
|
|
1322
|
+
}
|
|
1323
|
+
out.push(part);
|
|
1324
|
+
}
|
|
1325
|
+
return "/" + out.join("/");
|
|
1326
|
+
}, collectPathLiterals = (src, filePath, exists, taken = []) => {
|
|
1327
|
+
const refs = [];
|
|
1328
|
+
const dir = filePath.slice(0, filePath.lastIndexOf("/"));
|
|
1329
|
+
maskNonCode(src, (start, end) => {
|
|
1330
|
+
const value = src.slice(start + 1, end - 1);
|
|
1331
|
+
if (value.length === 0 || value.length > 256)
|
|
1332
|
+
return;
|
|
1333
|
+
if (!BARE_PATH_EXT.test(value) || CODE_EXT.test(value))
|
|
1334
|
+
return;
|
|
1335
|
+
if (/[\s:*?"'`<>|\\]/.test(value))
|
|
1336
|
+
return;
|
|
1337
|
+
if (taken.some((t) => start >= t.index && start < t.index + t.length))
|
|
1338
|
+
return;
|
|
1339
|
+
if (IMPORT_BEFORE.test(src.slice(Math.max(0, start - 32), start)))
|
|
1340
|
+
return;
|
|
1341
|
+
const relative2 = value.startsWith("./") || value.startsWith("../");
|
|
1342
|
+
const rooted = value.startsWith("/");
|
|
1343
|
+
const candidates = rooted ? [normalizePath(value)] : relative2 ? [normalizePath(`${dir}/${value}`), normalizePath(value)] : [normalizePath(value), normalizePath(`${dir}/${value}`)];
|
|
1344
|
+
const found = candidates.find(exists);
|
|
1345
|
+
if (found === undefined && !relative2 && !rooted && !value.includes("/"))
|
|
1346
|
+
return;
|
|
1347
|
+
let line = 1;
|
|
1348
|
+
for (let k = 0;k < start; k++)
|
|
1349
|
+
if (src[k] === `
|
|
1350
|
+
`)
|
|
1351
|
+
line++;
|
|
1352
|
+
refs.push(found !== undefined ? { path: found, index: start, length: end - start, line } : { path: value, index: start, length: end - start, line, missing: true });
|
|
1353
|
+
});
|
|
1354
|
+
return refs;
|
|
1307
1355
|
}, collectAssetMacros = (src, filePath) => {
|
|
1308
1356
|
const mask = maskNonCode(src);
|
|
1309
1357
|
const refs = [];
|
|
@@ -1353,6 +1401,9 @@ var ASSET_RE, ASSET_CALL_RE, hasAssetMacro = (src) => src.includes("asset("), ma
|
|
|
1353
1401
|
var init_assetMacro = __esm(() => {
|
|
1354
1402
|
ASSET_RE = /(?<![.\w$])asset\(\s*(["'])((?:[^"'\\]|\\.)*)\1\s*\)/g;
|
|
1355
1403
|
ASSET_CALL_RE = /(?<![.\w$])asset\(/g;
|
|
1404
|
+
BARE_PATH_EXT = /\.(png|jpe?g|webp|gif|avif|bmp|svg|mp3|wav|ogg|m4a|aac|flac|mp4|webm|mov|m4v|glb|gltf|ktx2|hdr|exr|ttf|otf|woff2?|bin|bake|filamat)$/i;
|
|
1405
|
+
CODE_EXT = /\.([tj]sx?|mjs|cjs|json)$/i;
|
|
1406
|
+
IMPORT_BEFORE = /(?:\bfrom|\bimport|\bimport\s*\(|\brequire\s*\()\s*$/;
|
|
1356
1407
|
});
|
|
1357
1408
|
|
|
1358
1409
|
// ../../sdk/src/compile/detectEntry.ts
|
|
@@ -1836,6 +1887,10 @@ var resolveInject = () => {
|
|
|
1836
1887
|
}, assertAssetsExist = (refs, files) => {
|
|
1837
1888
|
const missing = [];
|
|
1838
1889
|
for (const { file, ref } of refs) {
|
|
1890
|
+
if (ref.missing) {
|
|
1891
|
+
missing.push(`file not found: ${ref.path} (${file.replace(/^\//, "")}:${ref.line})`);
|
|
1892
|
+
continue;
|
|
1893
|
+
}
|
|
1839
1894
|
if (!ref.path.startsWith("./") && !ref.path.startsWith("../") && !ref.path.startsWith("/"))
|
|
1840
1895
|
continue;
|
|
1841
1896
|
const dir = file.slice(0, file.lastIndexOf("/"));
|
|
@@ -1860,8 +1915,10 @@ var resolveInject = () => {
|
|
|
1860
1915
|
if (hasImportStatement(src))
|
|
1861
1916
|
src = rewriteLibraryImports(src, slugs);
|
|
1862
1917
|
scanSources[path] = src;
|
|
1863
|
-
|
|
1864
|
-
|
|
1918
|
+
const macros = hasAssetMacro(src) ? collectAssetMacros(src, path) : [];
|
|
1919
|
+
const paths = collectPathLiterals(src, path, (rootPath) => files[rootPath] !== undefined, macros);
|
|
1920
|
+
const found = macros.concat(paths).sort((a, b) => a.index - b.index);
|
|
1921
|
+
if (found.length > 0) {
|
|
1865
1922
|
for (const ref of found)
|
|
1866
1923
|
assetRefs.push({ file: path, ref });
|
|
1867
1924
|
src = desugarAssetMacros(src, path, found);
|
|
@@ -3848,7 +3905,7 @@ var require_typescript = __commonJS((exports, module) => {
|
|
|
3848
3905
|
nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment,
|
|
3849
3906
|
noop: () => noop,
|
|
3850
3907
|
noopFileWatcher: () => noopFileWatcher,
|
|
3851
|
-
normalizePath: () =>
|
|
3908
|
+
normalizePath: () => normalizePath2,
|
|
3852
3909
|
normalizeSlashes: () => normalizeSlashes,
|
|
3853
3910
|
normalizeSpans: () => normalizeSpans,
|
|
3854
3911
|
not: () => not,
|
|
@@ -9649,13 +9706,13 @@ ${lanes.join(`
|
|
|
9649
9706
|
const parentWatcher = cache.get(parentDirPath);
|
|
9650
9707
|
if (!parentWatcher)
|
|
9651
9708
|
return false;
|
|
9652
|
-
const target =
|
|
9709
|
+
const target = normalizePath2(realpath(parentDir));
|
|
9653
9710
|
let hasChanges2;
|
|
9654
9711
|
let newChildWatches;
|
|
9655
9712
|
if (filePathComparer(target, parentDir) === 0) {
|
|
9656
9713
|
hasChanges2 = enumerateInsertsAndDeletes(fileSystemEntryExists(parentDir, 1) ? mapDefined(getAccessibleSortedChildDirectories(parentDir), (child) => {
|
|
9657
9714
|
const childFullName = getNormalizedAbsolutePath(child, parentDir);
|
|
9658
|
-
return !isIgnoredPath(childFullName, options) && filePathComparer(childFullName,
|
|
9715
|
+
return !isIgnoredPath(childFullName, options) && filePathComparer(childFullName, normalizePath2(realpath(childFullName))) === 0 ? childFullName : undefined;
|
|
9659
9716
|
}) : emptyArray, parentWatcher.childWatches, (child, childWatcher) => filePathComparer(child, childWatcher.dirName), createAndAddChildDirectoryWatcher, closeFileWatcher, addChildDirectoryWatcher);
|
|
9660
9717
|
} else if (parentWatcher.targetWatcher && filePathComparer(target, parentWatcher.targetWatcher.dirName) === 0) {
|
|
9661
9718
|
hasChanges2 = false;
|
|
@@ -9711,7 +9768,7 @@ ${lanes.join(`
|
|
|
9711
9768
|
function createFsWatchCallbackForDirectoryWatcherCallback(directoryName, callback, options, useCaseSensitiveFileNames2, getCurrentDirectory) {
|
|
9712
9769
|
return (eventName, relativeFileName) => {
|
|
9713
9770
|
if (eventName === "rename") {
|
|
9714
|
-
const fileName = !relativeFileName ? directoryName :
|
|
9771
|
+
const fileName = !relativeFileName ? directoryName : normalizePath2(combinePaths(directoryName, relativeFileName));
|
|
9715
9772
|
if (!relativeFileName || !isIgnoredByWatchOptions(fileName, options, useCaseSensitiveFileNames2, getCurrentDirectory)) {
|
|
9716
9773
|
callback(fileName);
|
|
9717
9774
|
}
|
|
@@ -10568,7 +10625,7 @@ ${lanes.join(`
|
|
|
10568
10625
|
return path;
|
|
10569
10626
|
}
|
|
10570
10627
|
function resolvePath(path, ...paths) {
|
|
10571
|
-
return
|
|
10628
|
+
return normalizePath2(some(paths) ? combinePaths(path, ...paths) : normalizeSlashes(path));
|
|
10572
10629
|
}
|
|
10573
10630
|
function getNormalizedPathComponents(path, currentDirectory) {
|
|
10574
10631
|
return reducePathComponents(getPathComponents(path, currentDirectory));
|
|
@@ -10648,7 +10705,7 @@ ${lanes.join(`
|
|
|
10648
10705
|
}
|
|
10649
10706
|
return normalized ?? (length2 > rootLength ? removeTrailingDirectorySeparator(path) : path);
|
|
10650
10707
|
}
|
|
10651
|
-
function
|
|
10708
|
+
function normalizePath2(path) {
|
|
10652
10709
|
path = normalizeSlashes(path);
|
|
10653
10710
|
let normalized = simpleNormalizePath(path);
|
|
10654
10711
|
if (normalized !== undefined) {
|
|
@@ -10682,7 +10739,7 @@ ${lanes.join(`
|
|
|
10682
10739
|
return getPathWithoutRoot(getNormalizedPathComponents(fileName, currentDirectory));
|
|
10683
10740
|
}
|
|
10684
10741
|
function toPath(fileName, basePath, getCanonicalFileName) {
|
|
10685
|
-
const nonCanonicalizedPath = isRootedDiskPath(fileName) ?
|
|
10742
|
+
const nonCanonicalizedPath = isRootedDiskPath(fileName) ? normalizePath2(fileName) : getNormalizedAbsolutePath(fileName, basePath);
|
|
10686
10743
|
return getCanonicalFileName(nonCanonicalizedPath);
|
|
10687
10744
|
}
|
|
10688
10745
|
function removeTrailingDirectorySeparator(path) {
|
|
@@ -16254,7 +16311,7 @@ ${lanes.join(`
|
|
|
16254
16311
|
}
|
|
16255
16312
|
setUILocale(locale);
|
|
16256
16313
|
function trySetLanguageAndTerritory(language2, territory2, errors2) {
|
|
16257
|
-
const compilerFilePath =
|
|
16314
|
+
const compilerFilePath = normalizePath2(sys2.getExecutingFilePath());
|
|
16258
16315
|
const containingDirectoryPath = getDirectoryPath(compilerFilePath);
|
|
16259
16316
|
let filePath = combinePaths(containingDirectoryPath, language2);
|
|
16260
16317
|
if (territory2) {
|
|
@@ -21516,7 +21573,7 @@ ${lanes.join(`
|
|
|
21516
21573
|
try {
|
|
21517
21574
|
writeFile2(path, data, writeByteOrderMark);
|
|
21518
21575
|
} catch {
|
|
21519
|
-
ensureDirectoriesExist(getDirectoryPath(
|
|
21576
|
+
ensureDirectoriesExist(getDirectoryPath(normalizePath2(path)), createDirectory, directoryExists);
|
|
21520
21577
|
writeFile2(path, data, writeByteOrderMark);
|
|
21521
21578
|
}
|
|
21522
21579
|
}
|
|
@@ -23424,8 +23481,8 @@ ${lanes.join(`
|
|
|
23424
23481
|
return match === "*" ? singleAsteriskRegexFragment : match === "?" ? "[^/]" : "\\" + match;
|
|
23425
23482
|
}
|
|
23426
23483
|
function getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory) {
|
|
23427
|
-
path =
|
|
23428
|
-
currentDirectory =
|
|
23484
|
+
path = normalizePath2(path);
|
|
23485
|
+
currentDirectory = normalizePath2(currentDirectory);
|
|
23429
23486
|
const absolutePath = combinePaths(currentDirectory, path);
|
|
23430
23487
|
return {
|
|
23431
23488
|
includeFilePatterns: map(getRegularExpressionsForWildcards(includes, absolutePath, "files"), (pattern) => `^${pattern}$`),
|
|
@@ -23439,8 +23496,8 @@ ${lanes.join(`
|
|
|
23439
23496
|
return new RegExp(pattern, useCaseSensitiveFileNames2 ? "" : "i");
|
|
23440
23497
|
}
|
|
23441
23498
|
function matchFiles(path, extensions, excludes, includes, useCaseSensitiveFileNames2, currentDirectory, depth, getFileSystemEntries, realpath) {
|
|
23442
|
-
path =
|
|
23443
|
-
currentDirectory =
|
|
23499
|
+
path = normalizePath2(path);
|
|
23500
|
+
currentDirectory = normalizePath2(currentDirectory);
|
|
23444
23501
|
const patterns = getFileMatcherPatterns(path, excludes, includes, useCaseSensitiveFileNames2, currentDirectory);
|
|
23445
23502
|
const includeFileRegexes = patterns.includeFilePatterns && patterns.includeFilePatterns.map((pattern) => getRegexFromPattern(pattern, useCaseSensitiveFileNames2));
|
|
23446
23503
|
const includeDirectoryRegex = patterns.includeDirectoryPattern && getRegexFromPattern(patterns.includeDirectoryPattern, useCaseSensitiveFileNames2);
|
|
@@ -23494,7 +23551,7 @@ ${lanes.join(`
|
|
|
23494
23551
|
if (includes) {
|
|
23495
23552
|
const includeBasePaths = [];
|
|
23496
23553
|
for (const include of includes) {
|
|
23497
|
-
const absolute = isRootedDiskPath(include) ? include :
|
|
23554
|
+
const absolute = isRootedDiskPath(include) ? include : normalizePath2(combinePaths(path, include));
|
|
23498
23555
|
includeBasePaths.push(getIncludeBasePath(absolute));
|
|
23499
23556
|
}
|
|
23500
23557
|
includeBasePaths.sort(getStringComparer(!useCaseSensitiveFileNames2));
|
|
@@ -33144,7 +33201,7 @@ ${lanes.join(`
|
|
|
33144
33201
|
IdentifierConstructor2 = objectAllocator.getIdentifierConstructor();
|
|
33145
33202
|
PrivateIdentifierConstructor2 = objectAllocator.getPrivateIdentifierConstructor();
|
|
33146
33203
|
SourceFileConstructor2 = objectAllocator.getSourceFileConstructor();
|
|
33147
|
-
fileName =
|
|
33204
|
+
fileName = normalizePath2(_fileName);
|
|
33148
33205
|
sourceText = _sourceText;
|
|
33149
33206
|
languageVersion = _languageVersion;
|
|
33150
33207
|
syntaxCursor = _syntaxCursor;
|
|
@@ -41769,7 +41826,7 @@ ${lanes.join(`
|
|
|
41769
41826
|
const options = handleOptionConfigDirTemplateSubstitution(extend(existingOptions, parsedConfig.options || {}), configDirTemplateSubstitutionOptions, basePath);
|
|
41770
41827
|
const watchOptions = handleWatchOptionsConfigDirTemplateSubstitution(existingWatchOptions && parsedConfig.watchOptions ? extend(existingWatchOptions, parsedConfig.watchOptions) : parsedConfig.watchOptions || existingWatchOptions, basePath);
|
|
41771
41828
|
options.configFilePath = configFileName && normalizeSlashes(configFileName);
|
|
41772
|
-
const basePathForFileNames =
|
|
41829
|
+
const basePathForFileNames = normalizePath2(configFileName ? directoryOfCombinedPath(configFileName, basePath) : basePath);
|
|
41773
41830
|
const configFileSpecs = getConfigFileSpecs();
|
|
41774
41831
|
if (sourceFile)
|
|
41775
41832
|
sourceFile.configFileSpecs = configFileSpecs;
|
|
@@ -42306,7 +42363,7 @@ ${lanes.join(`
|
|
|
42306
42363
|
var invalidTrailingRecursionPattern = /(?:^|\/)\*\*\/?$/;
|
|
42307
42364
|
var wildcardDirectoryPattern = /^[^*?]*(?=\/[^/]*[*?])/;
|
|
42308
42365
|
function getFileNamesFromConfigSpecs(configFileSpecs, basePath, options, host, extraFileExtensions = emptyArray) {
|
|
42309
|
-
basePath =
|
|
42366
|
+
basePath = normalizePath2(basePath);
|
|
42310
42367
|
const keyMapper = createGetCanonicalFileName(host.useCaseSensitiveFileNames);
|
|
42311
42368
|
const literalFileMap = /* @__PURE__ */ new Map;
|
|
42312
42369
|
const wildcardFileMap = /* @__PURE__ */ new Map;
|
|
@@ -42356,7 +42413,7 @@ ${lanes.join(`
|
|
|
42356
42413
|
const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec;
|
|
42357
42414
|
if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs))
|
|
42358
42415
|
return false;
|
|
42359
|
-
basePath =
|
|
42416
|
+
basePath = normalizePath2(basePath);
|
|
42360
42417
|
const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames2);
|
|
42361
42418
|
if (validatedFilesSpec) {
|
|
42362
42419
|
for (const fileName of validatedFilesSpec) {
|
|
@@ -42378,7 +42435,7 @@ ${lanes.join(`
|
|
|
42378
42435
|
return matchesExcludeWorker(pathToCheck, filter(excludeSpecs, (spec) => !invalidDotDotAfterRecursiveWildcard(spec)), useCaseSensitiveFileNames2, currentDirectory);
|
|
42379
42436
|
}
|
|
42380
42437
|
function matchesExcludeWorker(pathToCheck, excludeSpecs, useCaseSensitiveFileNames2, currentDirectory, basePath) {
|
|
42381
|
-
const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(
|
|
42438
|
+
const excludePattern = getRegularExpressionForWildcard(excludeSpecs, combinePaths(normalizePath2(currentDirectory), basePath), "exclude");
|
|
42382
42439
|
const excludeRegex = excludePattern && getRegexFromPattern(excludePattern, useCaseSensitiveFileNames2);
|
|
42383
42440
|
if (!excludeRegex)
|
|
42384
42441
|
return false;
|
|
@@ -42417,7 +42474,7 @@ ${lanes.join(`
|
|
|
42417
42474
|
if (include !== undefined) {
|
|
42418
42475
|
const recursiveKeys = [];
|
|
42419
42476
|
for (const file of include) {
|
|
42420
|
-
const spec =
|
|
42477
|
+
const spec = normalizePath2(combinePaths(basePath, file));
|
|
42421
42478
|
if (excludeRegex && excludeRegex.test(spec)) {
|
|
42422
42479
|
continue;
|
|
42423
42480
|
}
|
|
@@ -42712,7 +42769,7 @@ ${lanes.join(`
|
|
|
42712
42769
|
}
|
|
42713
42770
|
return;
|
|
42714
42771
|
}
|
|
42715
|
-
const path =
|
|
42772
|
+
const path = normalizePath2(combinePaths(baseDirectory, fileName));
|
|
42716
42773
|
if (state.traceEnabled) {
|
|
42717
42774
|
trace(state.host, Diagnostics.package_json_has_0_field_1_that_references_2, fieldName, fileName, path);
|
|
42718
42775
|
}
|
|
@@ -42795,7 +42852,7 @@ ${lanes.join(`
|
|
|
42795
42852
|
}
|
|
42796
42853
|
function getDefaultTypeRoots(currentDirectory) {
|
|
42797
42854
|
let typeRoots;
|
|
42798
|
-
forEachAncestorDirectory(
|
|
42855
|
+
forEachAncestorDirectory(normalizePath2(currentDirectory), (directory) => {
|
|
42799
42856
|
const atTypes = combinePaths(directory, nodeModulesAtTypes);
|
|
42800
42857
|
(typeRoots ?? (typeRoots = [])).push(atTypes);
|
|
42801
42858
|
});
|
|
@@ -43047,7 +43104,7 @@ ${lanes.join(`
|
|
|
43047
43104
|
for (const root of typeRoots) {
|
|
43048
43105
|
if (host.directoryExists(root)) {
|
|
43049
43106
|
for (const typeDirectivePath of host.getDirectories(root)) {
|
|
43050
|
-
const normalized =
|
|
43107
|
+
const normalized = normalizePath2(typeDirectivePath);
|
|
43051
43108
|
const packageJsonPath = combinePaths(root, normalized, "package.json");
|
|
43052
43109
|
const isNotNeededPackage = host.fileExists(packageJsonPath) && readJson2(packageJsonPath, host).typings === null;
|
|
43053
43110
|
if (!isNotNeededPackage) {
|
|
@@ -43467,11 +43524,11 @@ ${lanes.join(`
|
|
|
43467
43524
|
if (state.traceEnabled) {
|
|
43468
43525
|
trace(state.host, Diagnostics.rootDirs_option_is_set_using_it_to_resolve_relative_module_name_0, moduleName);
|
|
43469
43526
|
}
|
|
43470
|
-
const candidate =
|
|
43527
|
+
const candidate = normalizePath2(combinePaths(containingDirectory, moduleName));
|
|
43471
43528
|
let matchedRootDir;
|
|
43472
43529
|
let matchedNormalizedPrefix;
|
|
43473
43530
|
for (const rootDir of state.compilerOptions.rootDirs) {
|
|
43474
|
-
let normalizedRoot =
|
|
43531
|
+
let normalizedRoot = normalizePath2(rootDir);
|
|
43475
43532
|
if (!endsWith(normalizedRoot, directorySeparator)) {
|
|
43476
43533
|
normalizedRoot += directorySeparator;
|
|
43477
43534
|
}
|
|
@@ -43503,7 +43560,7 @@ ${lanes.join(`
|
|
|
43503
43560
|
if (rootDir === matchedRootDir) {
|
|
43504
43561
|
continue;
|
|
43505
43562
|
}
|
|
43506
|
-
const candidate2 = combinePaths(
|
|
43563
|
+
const candidate2 = combinePaths(normalizePath2(rootDir), suffix);
|
|
43507
43564
|
if (state.traceEnabled) {
|
|
43508
43565
|
trace(state.host, Diagnostics.Loading_0_from_the_root_dir_1_candidate_location_2, suffix, rootDir, candidate2);
|
|
43509
43566
|
}
|
|
@@ -43527,7 +43584,7 @@ ${lanes.join(`
|
|
|
43527
43584
|
if (state.traceEnabled) {
|
|
43528
43585
|
trace(state.host, Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, baseUrl, moduleName);
|
|
43529
43586
|
}
|
|
43530
|
-
const candidate =
|
|
43587
|
+
const candidate = normalizePath2(combinePaths(baseUrl, moduleName));
|
|
43531
43588
|
if (state.traceEnabled) {
|
|
43532
43589
|
trace(state.host, Diagnostics.Resolving_module_name_0_relative_to_base_url_1_2, moduleName, baseUrl, candidate);
|
|
43533
43590
|
}
|
|
@@ -43704,14 +43761,14 @@ ${lanes.join(`
|
|
|
43704
43761
|
const combined = combinePaths(containingDirectory, moduleName);
|
|
43705
43762
|
const parts = getPathComponents(combined);
|
|
43706
43763
|
const lastPart = lastOrUndefined(parts);
|
|
43707
|
-
const path = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(
|
|
43764
|
+
const path = lastPart === "." || lastPart === ".." ? ensureTrailingDirectorySeparator(normalizePath2(combined)) : normalizePath2(combined);
|
|
43708
43765
|
return { path, parts };
|
|
43709
43766
|
}
|
|
43710
43767
|
function realPath(path, host, traceEnabled) {
|
|
43711
43768
|
if (!host.realpath) {
|
|
43712
43769
|
return path;
|
|
43713
43770
|
}
|
|
43714
|
-
const real =
|
|
43771
|
+
const real = normalizePath2(host.realpath(path));
|
|
43715
43772
|
if (traceEnabled) {
|
|
43716
43773
|
trace(host, Diagnostics.Resolving_real_path_for_0_result_1, path, real);
|
|
43717
43774
|
}
|
|
@@ -43757,7 +43814,7 @@ ${lanes.join(`
|
|
|
43757
43814
|
return path.includes(nodeModulesPathPart);
|
|
43758
43815
|
}
|
|
43759
43816
|
function parseNodeModuleFromPath(resolved, isFolder) {
|
|
43760
|
-
const path =
|
|
43817
|
+
const path = normalizePath2(resolved);
|
|
43761
43818
|
const idx = path.lastIndexOf(nodeModulesPathPart);
|
|
43762
43819
|
if (idx === -1) {
|
|
43763
43820
|
return;
|
|
@@ -44523,7 +44580,7 @@ ${lanes.join(`
|
|
|
44523
44580
|
}
|
|
44524
44581
|
function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {
|
|
44525
44582
|
var _a, _b;
|
|
44526
|
-
const candidate =
|
|
44583
|
+
const candidate = normalizePath2(combinePaths(nodeModulesDirectory, moduleName));
|
|
44527
44584
|
const { packageName, rest } = parsePackageName(moduleName);
|
|
44528
44585
|
const packageDirectory = combinePaths(nodeModulesDirectory, packageName);
|
|
44529
44586
|
let rootPackageInfo;
|
|
@@ -44576,7 +44633,7 @@ ${lanes.join(`
|
|
|
44576
44633
|
}
|
|
44577
44634
|
const resolved = forEach(paths[matchedPatternText], (subst) => {
|
|
44578
44635
|
const path = matchedStar ? replaceFirstStar(subst, matchedStar) : subst;
|
|
44579
|
-
const candidate =
|
|
44636
|
+
const candidate = normalizePath2(combinePaths(baseDirectory, path));
|
|
44580
44637
|
if (state.traceEnabled) {
|
|
44581
44638
|
trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path);
|
|
44582
44639
|
}
|
|
@@ -44674,7 +44731,7 @@ ${lanes.join(`
|
|
|
44674
44731
|
if (resolutionFromCache) {
|
|
44675
44732
|
return resolutionFromCache;
|
|
44676
44733
|
}
|
|
44677
|
-
const searchName =
|
|
44734
|
+
const searchName = normalizePath2(combinePaths(directory, moduleName));
|
|
44678
44735
|
return toSearchResult(loadModuleFromFileNoPackageId(extensions, searchName, false, state));
|
|
44679
44736
|
});
|
|
44680
44737
|
if (resolved2)
|
|
@@ -44686,7 +44743,7 @@ ${lanes.join(`
|
|
|
44686
44743
|
return resolved3;
|
|
44687
44744
|
}
|
|
44688
44745
|
} else {
|
|
44689
|
-
const candidate =
|
|
44746
|
+
const candidate = normalizePath2(combinePaths(containingDirectory, moduleName));
|
|
44690
44747
|
return toSearchResult(loadModuleFromFileNoPackageId(extensions, candidate, false, state));
|
|
44691
44748
|
}
|
|
44692
44749
|
}
|
|
@@ -48101,7 +48158,7 @@ ${lanes.join(`
|
|
|
48101
48158
|
function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, baseDirectory, getCanonicalFileName, host, compilerOptions) {
|
|
48102
48159
|
for (const key in paths) {
|
|
48103
48160
|
for (const patternText2 of paths[key]) {
|
|
48104
|
-
const normalized =
|
|
48161
|
+
const normalized = normalizePath2(patternText2);
|
|
48105
48162
|
const pattern = getRelativePathIfInSameVolume(normalized, baseDirectory, getCanonicalFileName) ?? normalized;
|
|
48106
48163
|
const indexOfStar = pattern.indexOf("*");
|
|
48107
48164
|
const candidates = allowedEndings.map((ending) => ({
|
|
@@ -103370,7 +103427,7 @@ ${lanes.join(`
|
|
|
103370
103427
|
return getOutputs();
|
|
103371
103428
|
}
|
|
103372
103429
|
function getOutputFileNames(commandLine2, inputFileName, ignoreCase) {
|
|
103373
|
-
inputFileName =
|
|
103430
|
+
inputFileName = normalizePath2(inputFileName);
|
|
103374
103431
|
Debug.assert(contains(commandLine2.fileNames, inputFileName), `Expected fileName to be present in command line`);
|
|
103375
103432
|
const { addOutput, getOutputs } = createAddOutput();
|
|
103376
103433
|
if (commandLine2.options.outFile) {
|
|
@@ -103634,7 +103691,7 @@ ${lanes.join(`
|
|
|
103634
103691
|
}
|
|
103635
103692
|
return sourceMapDir;
|
|
103636
103693
|
}
|
|
103637
|
-
return getDirectoryPath(
|
|
103694
|
+
return getDirectoryPath(normalizePath2(filePath));
|
|
103638
103695
|
}
|
|
103639
103696
|
function getSourceMappingURL(mapOptions, sourceMapGenerator, filePath, sourceMapFilePath, sourceFile) {
|
|
103640
103697
|
if (mapOptions.inlineSourceMap) {
|
|
@@ -103650,7 +103707,7 @@ ${lanes.join(`
|
|
|
103650
103707
|
}
|
|
103651
103708
|
if (getRootLength(sourceMapDir) === 0) {
|
|
103652
103709
|
sourceMapDir = combinePaths(host.getCommonSourceDirectory(), sourceMapDir);
|
|
103653
|
-
return encodeURI(getRelativePathToDirectoryOrUrl(getDirectoryPath(
|
|
103710
|
+
return encodeURI(getRelativePathToDirectoryOrUrl(getDirectoryPath(normalizePath2(filePath)), combinePaths(sourceMapDir, sourceMapFile), host.getCurrentDirectory(), host.getCanonicalFileName, true));
|
|
103654
103711
|
} else {
|
|
103655
103712
|
return encodeURI(combinePaths(sourceMapDir, sourceMapFile));
|
|
103656
103713
|
}
|
|
@@ -107673,7 +107730,7 @@ ${lanes.join(`
|
|
|
107673
107730
|
return entries;
|
|
107674
107731
|
}
|
|
107675
107732
|
function getBaseNameOfFileName(fileName) {
|
|
107676
|
-
return getBaseFileName(
|
|
107733
|
+
return getBaseFileName(normalizePath2(fileName));
|
|
107677
107734
|
}
|
|
107678
107735
|
function createCachedFileSystemEntries(rootDir, rootDirPath) {
|
|
107679
107736
|
var _a;
|
|
@@ -108095,7 +108152,7 @@ ${lanes.join(`
|
|
|
108095
108152
|
function resolveTripleslashReference(moduleName, containingFile) {
|
|
108096
108153
|
const basePath = getDirectoryPath(containingFile);
|
|
108097
108154
|
const referencedFileName = isRootedDiskPath(moduleName) ? moduleName : combinePaths(basePath, moduleName);
|
|
108098
|
-
return
|
|
108155
|
+
return normalizePath2(referencedFileName);
|
|
108099
108156
|
}
|
|
108100
108157
|
function computeCommonSourceDirectoryOfFilenames(fileNames, currentDirectory, getCanonicalFileName) {
|
|
108101
108158
|
let commonPathComponents;
|
|
@@ -108176,7 +108233,7 @@ ${lanes.join(`
|
|
|
108176
108233
|
return false;
|
|
108177
108234
|
}
|
|
108178
108235
|
function getDefaultLibLocation() {
|
|
108179
|
-
return getDirectoryPath(
|
|
108236
|
+
return getDirectoryPath(normalizePath2(system.getExecutingFilePath()));
|
|
108180
108237
|
}
|
|
108181
108238
|
const newLine = getNewLineCharacter(options);
|
|
108182
108239
|
const realpath = system.realpath && ((path) => system.realpath(path));
|
|
@@ -110046,7 +110103,7 @@ ${lanes.join(`
|
|
|
110046
110103
|
return configFileParsingDiagnostics || emptyArray;
|
|
110047
110104
|
}
|
|
110048
110105
|
function processRootFile(fileName, isDefaultLib, ignoreNoDefaultLib, reason) {
|
|
110049
|
-
processSourceFile(
|
|
110106
|
+
processSourceFile(normalizePath2(fileName), isDefaultLib, ignoreNoDefaultLib, undefined, reason);
|
|
110050
110107
|
}
|
|
110051
110108
|
function fileReferenceIsEqualTo(a, b) {
|
|
110052
110109
|
return a.fileName === b.fileName;
|
|
@@ -111263,7 +111320,7 @@ ${lanes.join(`
|
|
|
111263
111320
|
const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory));
|
|
111264
111321
|
if ((_a = symlinkCache.getSymlinkedDirectories()) == null ? undefined : _a.has(directoryPath))
|
|
111265
111322
|
return;
|
|
111266
|
-
const real =
|
|
111323
|
+
const real = normalizePath2(originalRealpath.call(host.compilerHost, directory));
|
|
111267
111324
|
let realPath2;
|
|
111268
111325
|
if (real === directory || (realPath2 = ensureTrailingDirectorySeparator(host.toPath(real))) === directoryPath) {
|
|
111269
111326
|
symlinkCache.setSymlinkedDirectory(directoryPath, false);
|
|
@@ -113421,7 +113478,7 @@ ${lanes.join(`
|
|
|
113421
113478
|
}
|
|
113422
113479
|
function getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath, rootDir, rootPath, rootPathComponents, isRootWatchable, getCurrentDirectory, preferNonRecursiveWatch) {
|
|
113423
113480
|
const failedLookupPathComponents = getPathComponents(failedLookupLocationPath);
|
|
113424
|
-
failedLookupLocation = isRootedDiskPath(failedLookupLocation) ?
|
|
113481
|
+
failedLookupLocation = isRootedDiskPath(failedLookupLocation) ? normalizePath2(failedLookupLocation) : getNormalizedAbsolutePath(failedLookupLocation, getCurrentDirectory());
|
|
113425
113482
|
const failedLookupComponents = getPathComponents(failedLookupLocation);
|
|
113426
113483
|
const perceivedOsRootLength = perceivedOsRootLengthForWatching(failedLookupPathComponents, failedLookupPathComponents.length);
|
|
113427
113484
|
if (failedLookupPathComponents.length <= perceivedOsRootLength + 1)
|
|
@@ -113482,7 +113539,7 @@ ${lanes.join(`
|
|
|
113482
113539
|
if (isRootWatchable && isInDirectoryPath(rootPathComponents, typeRootPathComponents)) {
|
|
113483
113540
|
return rootPath;
|
|
113484
113541
|
}
|
|
113485
|
-
typeRoot = isRootedDiskPath(typeRoot) ?
|
|
113542
|
+
typeRoot = isRootedDiskPath(typeRoot) ? normalizePath2(typeRoot) : getNormalizedAbsolutePath(typeRoot, getCurrentDirectory());
|
|
113486
113543
|
const toWatch = getDirectoryToWatchFromFailedLookupLocationDirectory(getPathComponents(typeRoot), typeRootPathComponents, typeRootPathComponents.length, perceivedOsRootLengthForWatching(typeRootPathComponents, typeRootPathComponents.length), typeRootPathComponents.indexOf("node_modules"), rootPathComponents, typeRootPathComponents.lastIndexOf("node_modules"), preferNonRecursiveWatch);
|
|
113487
113544
|
return toWatch && filterCustomPath(toWatch.dirPath) ? toWatch.dirPath : undefined;
|
|
113488
113545
|
}
|
|
@@ -114763,7 +114820,7 @@ ${lanes.join(`
|
|
|
114763
114820
|
};
|
|
114764
114821
|
}
|
|
114765
114822
|
function createProgramHost(system, createProgram2) {
|
|
114766
|
-
const getDefaultLibLocation = memoize(() => getDirectoryPath(
|
|
114823
|
+
const getDefaultLibLocation = memoize(() => getDirectoryPath(normalizePath2(system.getExecutingFilePath())));
|
|
114767
114824
|
return {
|
|
114768
114825
|
useCaseSensitiveFileNames: () => system.useCaseSensitiveFileNames,
|
|
114769
114826
|
getNewLine: () => system.newLine,
|
|
@@ -117329,7 +117386,7 @@ ${lanes.join(`
|
|
|
117329
117386
|
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Option_project_cannot_be_mixed_with_source_files_on_a_command_line));
|
|
117330
117387
|
return sys2.exit(1);
|
|
117331
117388
|
}
|
|
117332
|
-
const fileOrDirectory =
|
|
117389
|
+
const fileOrDirectory = normalizePath2(commandLine2.options.project);
|
|
117333
117390
|
if (!fileOrDirectory || sys2.directoryExists(fileOrDirectory)) {
|
|
117334
117391
|
configFileName = combinePaths(fileOrDirectory, "tsconfig.json");
|
|
117335
117392
|
if (!sys2.fileExists(configFileName)) {
|
|
@@ -117344,12 +117401,12 @@ ${lanes.join(`
|
|
|
117344
117401
|
}
|
|
117345
117402
|
}
|
|
117346
117403
|
} else if (commandLine2.fileNames.length === 0) {
|
|
117347
|
-
const searchPath =
|
|
117404
|
+
const searchPath = normalizePath2(sys2.getCurrentDirectory());
|
|
117348
117405
|
configFileName = findConfigFile(searchPath, (fileName) => sys2.fileExists(fileName));
|
|
117349
117406
|
}
|
|
117350
117407
|
if (commandLine2.fileNames.length === 0 && !configFileName) {
|
|
117351
117408
|
if (commandLine2.options.showConfig) {
|
|
117352
|
-
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0,
|
|
117409
|
+
reportDiagnostic(createCompilerDiagnostic(Diagnostics.Cannot_find_a_tsconfig_json_file_at_the_current_directory_Colon_0, normalizePath2(sys2.getCurrentDirectory())));
|
|
117353
117410
|
} else {
|
|
117354
117411
|
printVersion(sys2);
|
|
117355
117412
|
printHelp(sys2, commandLine2);
|
|
@@ -117782,7 +117839,7 @@ ${lanes.join(`
|
|
|
117782
117839
|
}
|
|
117783
117840
|
function writeConfigFile(sys2, reportDiagnostic, options, fileNames) {
|
|
117784
117841
|
const currentDirectory = sys2.getCurrentDirectory();
|
|
117785
|
-
const file =
|
|
117842
|
+
const file = normalizePath2(combinePaths(currentDirectory, "tsconfig.json"));
|
|
117786
117843
|
if (sys2.fileExists(file)) {
|
|
117787
117844
|
reportDiagnostic(createCompilerDiagnostic(Diagnostics.A_tsconfig_json_file_is_already_defined_at_Colon_0, file));
|
|
117788
117845
|
} else {
|
|
@@ -118760,7 +118817,7 @@ ${lanes.join(`
|
|
|
118760
118817
|
}
|
|
118761
118818
|
const inferredTypings = /* @__PURE__ */ new Map;
|
|
118762
118819
|
fileNames = mapDefined(fileNames, (fileName) => {
|
|
118763
|
-
const path =
|
|
118820
|
+
const path = normalizePath2(fileName);
|
|
118764
118821
|
if (hasJSFileExtension(path)) {
|
|
118765
118822
|
return path;
|
|
118766
118823
|
}
|
|
@@ -118838,14 +118895,14 @@ ${lanes.join(`
|
|
|
118838
118895
|
if (getBaseFileName(manifestPath22) !== manifestName) {
|
|
118839
118896
|
return false;
|
|
118840
118897
|
}
|
|
118841
|
-
const pathComponents2 = getPathComponents(
|
|
118898
|
+
const pathComponents2 = getPathComponents(normalizePath2(manifestPath22));
|
|
118842
118899
|
const isScoped = pathComponents2[pathComponents2.length - 3][0] === "@";
|
|
118843
118900
|
return isScoped && toFileNameLowerCase(pathComponents2[pathComponents2.length - 4]) === modulesDirName || !isScoped && toFileNameLowerCase(pathComponents2[pathComponents2.length - 3]) === modulesDirName;
|
|
118844
118901
|
});
|
|
118845
118902
|
if (log2)
|
|
118846
118903
|
log2(`Searching for typing names in ${packagesFolderPath}; all files: ${JSON.stringify(dependencyManifestNames)}`);
|
|
118847
118904
|
for (const manifestPath22 of dependencyManifestNames) {
|
|
118848
|
-
const normalizedFileName =
|
|
118905
|
+
const normalizedFileName = normalizePath2(manifestPath22);
|
|
118849
118906
|
const result2 = readConfigFile(normalizedFileName, (path) => host.readFile(path));
|
|
118850
118907
|
const manifest2 = result2.config;
|
|
118851
118908
|
if (!manifest2.name) {
|
|
@@ -120799,7 +120856,7 @@ ${lanes.join(`
|
|
|
120799
120856
|
}
|
|
120800
120857
|
function getMappedLocation(location, sourceMapper, fileExists) {
|
|
120801
120858
|
const mapsTo = sourceMapper.tryGetSourcePosition(location);
|
|
120802
|
-
return mapsTo && (!fileExists || fileExists(
|
|
120859
|
+
return mapsTo && (!fileExists || fileExists(normalizePath2(mapsTo.fileName)) ? mapsTo : undefined);
|
|
120803
120860
|
}
|
|
120804
120861
|
function getMappedDocumentSpan(documentSpan, sourceMapper, fileExists) {
|
|
120805
120862
|
const { fileName, textSpan } = documentSpan;
|
|
@@ -123875,7 +123932,7 @@ ${lanes.join(`
|
|
|
123875
123932
|
}
|
|
123876
123933
|
}
|
|
123877
123934
|
function combineNormal(pathA, pathB) {
|
|
123878
|
-
return
|
|
123935
|
+
return normalizePath2(combinePaths(pathA, pathB));
|
|
123879
123936
|
}
|
|
123880
123937
|
function combinePathsSafe(pathA, pathB) {
|
|
123881
123938
|
return ensurePathIsNonModuleName(combineNormal(pathA, pathB));
|
|
@@ -124953,7 +125010,7 @@ interface Symbol {
|
|
|
124953
125010
|
}
|
|
124954
125011
|
const newLine = getNewLineCharacter(options);
|
|
124955
125012
|
const compilerHost = {
|
|
124956
|
-
getSourceFile: (fileName) => fileName ===
|
|
125013
|
+
getSourceFile: (fileName) => fileName === normalizePath2(inputFileName) ? sourceFile : fileName === normalizePath2(barebonesLibName) ? barebonesLibSourceFile : undefined,
|
|
124957
125014
|
writeFile: (name, text) => {
|
|
124958
125015
|
if (fileExtensionIs(name, ".map")) {
|
|
124959
125016
|
Debug.assertEqual(sourceMapText, undefined, "Unexpected multiple source map outputs, file:", name);
|
|
@@ -125658,7 +125715,7 @@ interface Symbol {
|
|
|
125658
125715
|
switch (node.kind) {
|
|
125659
125716
|
case 307:
|
|
125660
125717
|
const sourceFile = node;
|
|
125661
|
-
return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(
|
|
125718
|
+
return isExternalModule(sourceFile) ? `"${escapeString(getBaseFileName(removeFileExtension(normalizePath2(sourceFile.fileName))))}"` : "<global>";
|
|
125662
125719
|
case 277:
|
|
125663
125720
|
return isExportAssignment(node) && node.isExportEquals ? "export=" : "default";
|
|
125664
125721
|
case 219:
|
|
@@ -126683,7 +126740,7 @@ interface Symbol {
|
|
|
126683
126740
|
const cfg = program.getCompilerOptions().configFile;
|
|
126684
126741
|
if (!cfg)
|
|
126685
126742
|
return;
|
|
126686
|
-
const newFileAbsolutePath =
|
|
126743
|
+
const newFileAbsolutePath = normalizePath2(combinePaths(oldFileName, "..", newFileNameWithExtension));
|
|
126687
126744
|
const newFilePath = getRelativePathFromFile(cfg.fileName, newFileAbsolutePath, getCanonicalFileName);
|
|
126688
126745
|
const cfgObject = cfg.statements[0] && tryCast(cfg.statements[0].expression, isObjectLiteralExpression);
|
|
126689
126746
|
const filesProp = cfgObject && find2(cfgObject.properties, (prop) => isPropertyAssignment(prop) && isStringLiteral(prop.name) && prop.name.text === "files");
|
|
@@ -131943,8 +132000,8 @@ ${newComment.split(`
|
|
|
131943
132000
|
return ts_FindAllReferences_exports.getImplementationsAtPosition(program, cancellationToken, program.getSourceFiles(), getValidSourceFile(fileName), position);
|
|
131944
132001
|
}
|
|
131945
132002
|
function getDocumentHighlights(fileName, position, filesToSearch) {
|
|
131946
|
-
const normalizedFileName =
|
|
131947
|
-
Debug.assert(filesToSearch.some((f) =>
|
|
132003
|
+
const normalizedFileName = normalizePath2(fileName);
|
|
132004
|
+
Debug.assert(filesToSearch.some((f) => normalizePath2(f) === normalizedFileName));
|
|
131948
132005
|
synchronizeHostData();
|
|
131949
132006
|
const sourceFilesToSearch = mapDefined(filesToSearch, (fileName2) => program.getSourceFile(fileName2));
|
|
131950
132007
|
const sourceFile = getValidSourceFile(fileName);
|
|
@@ -132764,7 +132821,7 @@ ${newComment.split(`
|
|
|
132764
132821
|
}
|
|
132765
132822
|
function getDefaultLibFilePath(options) {
|
|
132766
132823
|
if (sys) {
|
|
132767
|
-
return combinePaths(getDirectoryPath(
|
|
132824
|
+
return combinePaths(getDirectoryPath(normalizePath2(sys.getExecutingFilePath())), getDefaultLibFileName(options));
|
|
132768
132825
|
}
|
|
132769
132826
|
throw new Error("getDefaultLibFilePath is only supported when consumed as a node module. ");
|
|
132770
132827
|
}
|
|
@@ -146753,7 +146810,7 @@ ${newComment.split(`
|
|
|
146753
146810
|
return moduleResolutionUsesNodeModules(moduleResolution) ? getSupportedExtensionsWithJsonIfResolveJsonModule(compilerOptions, extensions) : extensions;
|
|
146754
146811
|
}
|
|
146755
146812
|
function getBaseDirectoriesFromRootDirs(rootDirs, basePath, scriptDirectory, ignoreCase) {
|
|
146756
|
-
rootDirs = rootDirs.map((rootDirectory) => ensureTrailingDirectorySeparator(
|
|
146813
|
+
rootDirs = rootDirs.map((rootDirectory) => ensureTrailingDirectorySeparator(normalizePath2(isRootedDiskPath(rootDirectory) ? rootDirectory : combinePaths(basePath, rootDirectory))));
|
|
146757
146814
|
const relativeDirectory = firstDefined(rootDirs, (rootDirectory) => containsPath(rootDirectory, scriptDirectory, basePath, ignoreCase) ? scriptDirectory.substr(rootDirectory.length) : undefined);
|
|
146758
146815
|
return deduplicate([...rootDirs.map((rootDirectory) => combinePaths(rootDirectory, relativeDirectory)), scriptDirectory].map((baseDir) => removeTrailingDirectorySeparator(baseDir)), equateStringsCaseSensitive, compareStringsCaseSensitive);
|
|
146759
146816
|
}
|
|
@@ -146802,7 +146859,7 @@ ${newComment.split(`
|
|
|
146802
146859
|
const files = tryReadDirectory(host, baseDirectory, extensionOptions.extensionsToSearch, undefined, ["./*"]);
|
|
146803
146860
|
if (files) {
|
|
146804
146861
|
for (let filePath of files) {
|
|
146805
|
-
filePath =
|
|
146862
|
+
filePath = normalizePath2(filePath);
|
|
146806
146863
|
if (exclude && comparePaths(filePath, exclude, scriptDirectory, ignoreCase) === 0) {
|
|
146807
146864
|
continue;
|
|
146808
146865
|
}
|
|
@@ -146813,7 +146870,7 @@ ${newComment.split(`
|
|
|
146813
146870
|
const directories = tryGetDirectories(host, baseDirectory);
|
|
146814
146871
|
if (directories) {
|
|
146815
146872
|
for (const directory of directories) {
|
|
146816
|
-
const directoryName = getBaseFileName(
|
|
146873
|
+
const directoryName = getBaseFileName(normalizePath2(directory));
|
|
146817
146874
|
if (directoryName !== "@types") {
|
|
146818
146875
|
result.add(directoryResult(directoryName));
|
|
146819
146876
|
}
|
|
@@ -146893,7 +146950,7 @@ ${newComment.split(`
|
|
|
146893
146950
|
const result = createNameAndKindSet();
|
|
146894
146951
|
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
146895
146952
|
if (baseUrl) {
|
|
146896
|
-
const absolute =
|
|
146953
|
+
const absolute = normalizePath2(combinePaths(host.getCurrentDirectory(), baseUrl));
|
|
146897
146954
|
getCompletionEntriesForDirectoryFragment(fragment, absolute, extensionOptions, program, host, moduleSpecifierResolutionHost, false, undefined, result);
|
|
146898
146955
|
}
|
|
146899
146956
|
if (paths) {
|
|
@@ -147040,10 +147097,10 @@ ${newComment.split(`
|
|
|
147040
147097
|
const outDir = program.getCompilerOptions().outDir;
|
|
147041
147098
|
const declarationDir = program.getCompilerOptions().declarationDir;
|
|
147042
147099
|
const expandedPrefixDirectory = fragmentHasPath ? combinePaths(normalizedPrefixDirectory, normalizedPrefixBase + fragmentDirectory) : normalizedPrefixDirectory;
|
|
147043
|
-
const baseDirectory =
|
|
147100
|
+
const baseDirectory = normalizePath2(combinePaths(packageDirectory, expandedPrefixDirectory));
|
|
147044
147101
|
const possibleInputBaseDirectoryForOutDir = isImports && outDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, outDir, getCommonSourceDirectory2);
|
|
147045
147102
|
const possibleInputBaseDirectoryForDeclarationDir = isImports && declarationDir && getPossibleOriginalInputPathWithoutChangingExt(baseDirectory, ignoreCase, declarationDir, getCommonSourceDirectory2);
|
|
147046
|
-
const normalizedSuffix =
|
|
147103
|
+
const normalizedSuffix = normalizePath2(parsed.suffix);
|
|
147047
147104
|
const declarationExtension = normalizedSuffix && getDeclarationEmitExtensionForPath("_" + normalizedSuffix);
|
|
147048
147105
|
const inputExtension = normalizedSuffix ? getPossibleOriginalInputExtensionForExtension("_" + normalizedSuffix) : undefined;
|
|
147049
147106
|
const matchingSuffixes = [
|
|
@@ -147088,7 +147145,7 @@ ${newComment.split(`
|
|
|
147088
147145
|
}
|
|
147089
147146
|
function trimPrefixAndSuffix(path, prefix) {
|
|
147090
147147
|
return firstDefined(matchingSuffixes, (suffix) => {
|
|
147091
|
-
const inner = withoutStartAndEnd(
|
|
147148
|
+
const inner = withoutStartAndEnd(normalizePath2(path), prefix, suffix);
|
|
147092
147149
|
return inner === undefined ? undefined : removeLeadingDirectorySeparator(inner);
|
|
147093
147150
|
});
|
|
147094
147151
|
}
|
|
@@ -159111,7 +159168,7 @@ ${options.prefix}` : `
|
|
|
159111
159168
|
nodeStartsNewLexicalEnvironment: () => nodeStartsNewLexicalEnvironment,
|
|
159112
159169
|
noop: () => noop,
|
|
159113
159170
|
noopFileWatcher: () => noopFileWatcher,
|
|
159114
|
-
normalizePath: () =>
|
|
159171
|
+
normalizePath: () => normalizePath2,
|
|
159115
159172
|
normalizeSlashes: () => normalizeSlashes,
|
|
159116
159173
|
normalizeSpans: () => normalizeSpans,
|
|
159117
159174
|
not: () => not,
|
|
@@ -160116,7 +160173,7 @@ ${options.prefix}` : `
|
|
|
160116
160173
|
Errors2.ThrowProjectDoesNotContainDocument = ThrowProjectDoesNotContainDocument;
|
|
160117
160174
|
})(Errors || (Errors = {}));
|
|
160118
160175
|
function toNormalizedPath(fileName) {
|
|
160119
|
-
return
|
|
160176
|
+
return normalizePath2(fileName);
|
|
160120
160177
|
}
|
|
160121
160178
|
function normalizedPathToPath(normalizedPath, currentDirectory, getCanonicalFileName) {
|
|
160122
160179
|
const f = isRootedDiskPath(normalizedPath) ? normalizedPath : getNormalizedAbsolutePath(normalizedPath, currentDirectory);
|
|
@@ -161180,7 +161237,7 @@ ${options.prefix}` : `
|
|
|
161180
161237
|
return this.currentDirectory;
|
|
161181
161238
|
}
|
|
161182
161239
|
getDefaultLibFileName() {
|
|
161183
|
-
const nodeModuleBinDir = getDirectoryPath(
|
|
161240
|
+
const nodeModuleBinDir = getDirectoryPath(normalizePath2(this.projectService.getExecutingFilePath()));
|
|
161184
161241
|
return combinePaths(nodeModuleBinDir, getDefaultLibFileName(this.compilerOptions));
|
|
161185
161242
|
}
|
|
161186
161243
|
useCaseSensitiveFileNames() {
|
|
@@ -168269,7 +168326,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
168269
168326
|
if (!fileName) {
|
|
168270
168327
|
return;
|
|
168271
168328
|
}
|
|
168272
|
-
const file =
|
|
168329
|
+
const file = normalizePath2(fileName);
|
|
168273
168330
|
this.projectService.closeClientFile(file);
|
|
168274
168331
|
}
|
|
168275
168332
|
mapLocationNavigationBarItems(items, scriptInfo) {
|
|
@@ -168755,7 +168812,7 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
168755
168812
|
}
|
|
168756
168813
|
getCanonicalFileName(fileName) {
|
|
168757
168814
|
const name = this.host.useCaseSensitiveFileNames ? fileName : toFileNameLowerCase(fileName);
|
|
168758
|
-
return
|
|
168815
|
+
return normalizePath2(name);
|
|
168759
168816
|
}
|
|
168760
168817
|
exit() {}
|
|
168761
168818
|
notRequired(request) {
|
|
@@ -169924,7 +169981,7 @@ Additional information: BADCLIENT: Bad error code, ${badCode} not found in range
|
|
|
169924
169981
|
});
|
|
169925
169982
|
|
|
169926
169983
|
// ../../sdk/src/compile/serverTypes.ts
|
|
169927
|
-
var
|
|
169984
|
+
var normalizePath2 = (path) => {
|
|
169928
169985
|
const parts = [];
|
|
169929
169986
|
for (const part of path.split("\\").join("/").split("/")) {
|
|
169930
169987
|
if (!part || part === ".")
|
|
@@ -169993,11 +170050,11 @@ var normalizePath = (path) => {
|
|
|
169993
170050
|
continue;
|
|
169994
170051
|
if (!/\.[tj]sx?$/.test(e.path))
|
|
169995
170052
|
continue;
|
|
169996
|
-
files.set(
|
|
170053
|
+
files.set(normalizePath2(e.path), e.text);
|
|
169997
170054
|
}
|
|
169998
170055
|
files.set(FILE_TYPE_PATH, `interface File { readonly __lecodesFile: true, readonly name: string, readonly size: number, readonly type: string }
|
|
169999
170056
|
`);
|
|
170000
|
-
const roots = [...new Set([...Object.keys(modules).map(
|
|
170057
|
+
const roots = [...new Set([...Object.keys(modules).map(normalizePath2).filter((p) => files.has(p)), ...files.keys()])];
|
|
170001
170058
|
const options = {
|
|
170002
170059
|
target: ts.ScriptTarget.ESNext,
|
|
170003
170060
|
module: ts.ModuleKind.ESNext,
|
|
@@ -170013,10 +170070,10 @@ var normalizePath = (path) => {
|
|
|
170013
170070
|
const defaultLibDir = defaultLibPath.slice(0, defaultLibPath.lastIndexOf("/"));
|
|
170014
170071
|
const sys = ts.sys;
|
|
170015
170072
|
const host = {
|
|
170016
|
-
fileExists: (p) => files.has(
|
|
170017
|
-
readFile: (p) => files.get(
|
|
170073
|
+
fileExists: (p) => files.has(normalizePath2(p)) || p.split("\\").join("/").startsWith(defaultLibDir) && sys.fileExists(p),
|
|
170074
|
+
readFile: (p) => files.get(normalizePath2(p)) ?? (p.split("\\").join("/").startsWith(defaultLibDir) ? sys.readFile(p) : undefined),
|
|
170018
170075
|
getSourceFile: (p, lang) => {
|
|
170019
|
-
const text = files.get(
|
|
170076
|
+
const text = files.get(normalizePath2(p)) ?? (p.split("\\").join("/").startsWith(defaultLibDir) ? sys.readFile(p) : undefined);
|
|
170020
170077
|
return text === undefined ? undefined : ts.createSourceFile(p, text, lang, true);
|
|
170021
170078
|
},
|
|
170022
170079
|
getDefaultLibFileName: (o) => ts.getDefaultLibFilePath(o),
|
|
@@ -170037,7 +170094,7 @@ var normalizePath = (path) => {
|
|
|
170037
170094
|
const sync2 = [];
|
|
170038
170095
|
const awaitable = (type) => !!(type.flags & (ts.TypeFlags.Any | ts.TypeFlags.Unknown)) || (type.flags & ts.TypeFlags.Union ? type.types.every(awaitable) : !!type.getProperty("then"));
|
|
170039
170096
|
for (const [path, exports] of Object.entries(modules)) {
|
|
170040
|
-
const sf = program.getSourceFile(
|
|
170097
|
+
const sf = program.getSourceFile(normalizePath2(path));
|
|
170041
170098
|
if (!sf) {
|
|
170042
170099
|
warnings.push(`${path}: not in the TS program`);
|
|
170043
170100
|
continue;
|
|
@@ -170114,7 +170171,7 @@ var normalizePath = (path) => {
|
|
|
170114
170171
|
throw new WrongSideGlobalError(wrongSide);
|
|
170115
170172
|
const unawaited = [];
|
|
170116
170173
|
for (const path of Object.keys(modules)) {
|
|
170117
|
-
const sf = program.getSourceFile(
|
|
170174
|
+
const sf = program.getSourceFile(normalizePath2(path));
|
|
170118
170175
|
if (sf)
|
|
170119
170176
|
unawaited.push(...unawaitedUserQueries(ts, sf, serverModuleId(path)));
|
|
170120
170177
|
}
|
|
@@ -170457,12 +170514,12 @@ ${lines.join(`
|
|
|
170457
170514
|
if (e.type !== "text" || isServerPath(e.path) || !/\.[tj]sx?$/.test(e.path))
|
|
170458
170515
|
continue;
|
|
170459
170516
|
const src = e.text ?? "";
|
|
170460
|
-
const dir =
|
|
170517
|
+
const dir = normalizePath3(e.path).replace(/\/[^/]*$/, "");
|
|
170461
170518
|
const locals = [];
|
|
170462
170519
|
for (const m of src.matchAll(/import\s*\{([^}]*)\}\s*from\s*["']([^"']+)["']/g)) {
|
|
170463
170520
|
if (!m[2].startsWith("."))
|
|
170464
170521
|
continue;
|
|
170465
|
-
const names = channels.get(
|
|
170522
|
+
const names = channels.get(normalizePath3(`${dir}/${m[2]}`).replace(/\.[tj]s$/, ""));
|
|
170466
170523
|
if (!names)
|
|
170467
170524
|
continue;
|
|
170468
170525
|
for (const part of m[1].split(",")) {
|
|
@@ -170498,7 +170555,7 @@ ${lines.join(`
|
|
|
170498
170555
|
`)}
|
|
170499
170556
|
;(globalThis as any).__lecodesServer = { modules: { ${entries.join(", ")} }, manifest: ${JSON.stringify(manifest)} }
|
|
170500
170557
|
`;
|
|
170501
|
-
},
|
|
170558
|
+
}, normalizePath3 = (path) => {
|
|
170502
170559
|
const parts = [];
|
|
170503
170560
|
for (const part of path.split("\\").join("/").split("/")) {
|
|
170504
170561
|
if (!part || part === ".")
|
|
@@ -170514,7 +170571,7 @@ ${lines.join(`
|
|
|
170514
170571
|
for (const e of entries) {
|
|
170515
170572
|
if (e.type !== "text" || !isServerPath(e.path))
|
|
170516
170573
|
continue;
|
|
170517
|
-
out[
|
|
170574
|
+
out[normalizePath3(e.path)] = scanServerExports(e.text ?? "", serverModuleId(e.path));
|
|
170518
170575
|
}
|
|
170519
170576
|
return out;
|
|
170520
170577
|
}, stubServerEntries = (entries, serverUrl) => entries.map((e) => e.type === "text" && isServerPath(e.path) ? { ...e, text: serverStubSource(e.path, scanServerExports(e.text ?? "", serverModuleId(e.path)), serverUrl) } : e), compileServerBundle = async (opts) => {
|
|
@@ -170523,7 +170580,7 @@ ${lines.join(`
|
|
|
170523
170580
|
return null;
|
|
170524
170581
|
const files = {};
|
|
170525
170582
|
for (const e of opts.entries) {
|
|
170526
|
-
const path =
|
|
170583
|
+
const path = normalizePath3(e.path);
|
|
170527
170584
|
if (/^\/design\//.test(path))
|
|
170528
170585
|
continue;
|
|
170529
170586
|
if (e.type !== "text" || path.toLowerCase().endsWith(".svg")) {
|
|
@@ -224980,7 +225037,7 @@ var LITE = {
|
|
|
224980
225037
|
entry: "lite.js",
|
|
224981
225038
|
vendored: "web-lite",
|
|
224982
225039
|
build: [],
|
|
224983
|
-
sources: ["hosts/web-lite/src", "hosts/web-lite/index.html", "renderers/web-lite/src", "renderers/web-shared/src", "hosts/web-player/src/dev.ts"]
|
|
225040
|
+
sources: ["hosts/web-lite/src", "hosts/web-lite/index.html", "renderers/web-lite/src", "renderers/web-shared/src", "hosts/web-player/src/dev.ts", "engines/gl-lite/src"]
|
|
224984
225041
|
};
|
|
224985
225042
|
var resolveLiteRunner = (log2 = () => {}) => resolve17(LITE, log2);
|
|
224986
225043
|
var resolveWebRunner = (log2 = () => {}) => {
|