MCPcopy Create free account
hub / github.com/arktypeio/arktype / esbuildEntryPathOf

Function esbuildEntryPathOf

ark/aot/unplugin.ts:2879–2886  ·  view source on GitHub ↗
(path: string, cwd: string)

Source from the content-addressed store, hash-verified

2877
2878// esbuild reads an entry naming a file in cwd as a path, though it would resolve it as a package
2879const esbuildEntryPathOf = (path: string, cwd: string) =>
2880 (
2881 !isAbsolute(path) &&
2882 !/^\.\.?(?:\/|$)/.test(path) &&
2883 statSync(join(cwd, path), { throwIfNoEntry: false })?.isFile()
2884 ) ?
2885 `./${path}`
2886 : path
2887
2888// esbuild's stdin, as a file beside what it imports
2889const stdinEntryOf = ({

Callers 1

esbuildEntriesOfFunction · 0.85

Calls 2

joinFunction · 0.85
testMethod · 0.80

Tested by

no test coverage detected