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

Function stdinEntryOf

ark/aot/unplugin.ts:2889–2902  ·  view source on GitHub ↗
({
	stdin,
	absWorkingDir = process.cwd()
}: EsbuildBuild["initialOptions"])

Source from the content-addressed store, hash-verified

2887
2888// esbuild's stdin, as a file beside what it imports
2889const stdinEntryOf = ({
2890 stdin,
2891 absWorkingDir = process.cwd()
2892}: EsbuildBuild["initialOptions"]): Required<ScanEntry> | undefined => {
2893 if (!stdin) return
2894 const ext =
2895 stdin.loader === "ts" || stdin.loader === "tsx" || stdin.loader === "jsx" ?
2896 stdin.loader
2897 : "js"
2898 return {
2899 id: join(stdin.resolveDir ?? absWorkingDir, `<stdin>.${ext}`),
2900 source: String(stdin.contents)
2901 }
2902}
2903
2904// esbuild names stdin as a file only where both resolveDir and sourcefile are set
2905const isStdinOf = (

Callers 2

stdinProblemOfFunction · 0.85
esbuildEntriesOfFunction · 0.85

Calls 2

joinFunction · 0.85
StringInterface · 0.85

Tested by

no test coverage detected