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

Function stdinProblemOf

ark/aot/unplugin.ts:1345–1355  ·  view source on GitHub ↗
(specifier: string)

Source from the content-addressed store, hash-verified

1343 const resolveEsbuildRuntime = (build: EsbuildPluginBuild) => {
1344 // esbuild loads stdin as written, which the runtime runs only where it defines no Type
1345 const stdinProblemOf = async (specifier: string) => {
1346 if (!resolvesToRuntime(specifier, opts)) return
1347 const stdin = stdinEntryOf(build.initialOptions)!
1348 const transformed = (await request(
1349 "transform",
1350 stdin.source,
1351 stdin.id
1352 )) as TransformedModule | undefined
1353 if (transformed?.code || transformed?.errors.length)
1354 return untransformedProblemOf(specifier, "<stdin>", "")
1355 }
1356 build.onResolve(
1357 {
1358 filter:

Callers 1

resolveEsbuildRuntimeFunction · 0.85

Calls 4

resolvesToRuntimeFunction · 0.90
stdinEntryOfFunction · 0.85
requestFunction · 0.70
untransformedProblemOfFunction · 0.70

Tested by

no test coverage detected