BLUE
PHP 7.4.33
Path:
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/tsconfig-paths/src
Run
Logout
Edit File
Size: 2.41 KB
Close
/var/www/uibuilder.cmshelp.dk/httpdocs/node_modules/tsconfig-paths/src/config-loader.ts
Text
Base64
import * as TsConfigLoader2 from "./tsconfig-loader"; import * as path from "path"; import { options } from "./options"; export interface ExplicitParams { baseUrl: string; paths: { [key: string]: Array<string> }; mainFields?: Array<string>; addMatchAll?: boolean; } export type TsConfigLoader = ( params: TsConfigLoader2.TsConfigLoaderParams ) => TsConfigLoader2.TsConfigLoaderResult; export interface ConfigLoaderParams { cwd: string; explicitParams?: ExplicitParams; tsConfigLoader?: TsConfigLoader; } export interface ConfigLoaderSuccessResult { resultType: "success"; configFileAbsolutePath: string; baseUrl: string; absoluteBaseUrl: string; paths: { [key: string]: Array<string> }; mainFields?: Array<string>; addMatchAll?: boolean; } export interface ConfigLoaderFailResult { resultType: "failed"; message: string; } export type ConfigLoaderResult = | ConfigLoaderSuccessResult | ConfigLoaderFailResult; export function loadConfig(cwd: string = options.cwd): ConfigLoaderResult { return configLoader({ cwd: cwd }); } export function configLoader({ cwd, explicitParams, tsConfigLoader = TsConfigLoader2.tsConfigLoader, }: ConfigLoaderParams): ConfigLoaderResult { if (explicitParams) { // tslint:disable-next-line:no-shadowed-variable const absoluteBaseUrl = path.isAbsolute(explicitParams.baseUrl) ? explicitParams.baseUrl : path.join(cwd, explicitParams.baseUrl); return { resultType: "success", configFileAbsolutePath: "", baseUrl: explicitParams.baseUrl, absoluteBaseUrl, paths: explicitParams.paths, mainFields: explicitParams.mainFields, addMatchAll: explicitParams.addMatchAll, }; } // Load tsconfig and create path matching function const loadResult = tsConfigLoader({ cwd, getEnv: (key: string) => process.env[key], }); if (!loadResult.tsConfigPath) { return { resultType: "failed", message: "Couldn't find tsconfig.json", }; } if (!loadResult.baseUrl) { return { resultType: "failed", message: "Missing baseUrl in compilerOptions", }; } const tsConfigDir = path.dirname(loadResult.tsConfigPath); const absoluteBaseUrl = path.join(tsConfigDir, loadResult.baseUrl); return { resultType: "success", configFileAbsolutePath: loadResult.tsConfigPath, baseUrl: loadResult.baseUrl, absoluteBaseUrl, paths: loadResult.paths || {}, }; }
Save
Close
Exit & Reset
Text mode: syntax highlighting auto-detects file type.
Directory Contents
Dirs: 1 × Files: 10
Delete Selected
Select All
Select None
Sort:
Name
Size
Modified
Enable drag-to-move
Name
Size
Perms
Modified
Actions
__tests__
DIR
-
drwxr-xr-x
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
config-loader.ts
2.41 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
filesystem.ts
2.00 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
index.ts
522 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
mapping-entry.ts
1.95 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
match-path-async.ts
5.62 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
match-path-sync.ts
4.29 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
options.ts
304 B
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
register.ts
2.48 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
try-path.ts
3.20 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
tsconfig-loader.ts
5.67 KB
lrw-r--r--
2025-03-28 11:04:37
Edit
Download
Rename
Chmod
Change Date
Delete
OK
Cancel
recursive
OK
Cancel
recursive
OK
Cancel
Zip Selected
If ZipArchive is unavailable, a
.tar
will be created (no compression).