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

Function untransformedProblemOf

ark/aot/node.ts:104–113  ·  view source on GitHub ↗
(specifier: string, importer: string)

Source from the content-addressed store, hash-verified

102 }
103 // e.g. a module another hook loads, code given to node --eval, or a file without an extension
104 const untransformedProblemOf = (specifier: string, importer: string) => {
105 if (!importer.startsWith("file:"))
106 return writeFilelessImportMessage(importer, specifier)
107 const file = fileURLToPath(importer)
108 if (isTransformed(file) || dependencyOf(file)) return
109 const cwd = realPathOf(opts?.cwd ?? process.cwd())
110 return existsSync(file) ?
111 writeUntransformedImportMessage(file, specifier, cwd)
112 : writeFilelessImportMessage(printablePathOf(cwd, file), specifier)
113 }
114 module.registerHooks({
115 resolve: (specifier, context, nextResolve) => {
116 if (specifier.startsWith("~arktype/"))

Callers 1

registerFunction · 0.70

Calls 4

dependencyOfFunction · 0.90
realPathOfFunction · 0.90
printablePathOfFunction · 0.90
isTransformedFunction · 0.70

Tested by

no test coverage detected