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

Function rejectEsbuild

ark/aot/unplugin.ts:1143–1154  ·  view source on GitHub ↗
(
		build: EsbuildPluginBuild,
		cwd: string,
		metafile: Metafile,
		problem: string
	)

Source from the content-addressed store, hash-verified

1141 }
1142 // a problem fails the build, removing what it wrote
1143 const rejectEsbuild = (
1144 build: EsbuildPluginBuild,
1145 cwd: string,
1146 metafile: Metafile,
1147 problem: string
1148 ) => {
1149 if (build.initialOptions.write !== false) {
1150 for (const path in metafile.outputs)
1151 rmSync(resolve(cwd, path), { force: true })
1152 }
1153 return { errors: [{ text: problem }] }
1154 }
1155 // a standalone bundle's externals, and the calls its folded helpers left,
1156 // checked once it's written
1157 const checkEsbuildBundle = (build: EsbuildPluginBuild, cwd: string) => {

Callers 2

checkEsbuildBundleFunction · 0.85
scanEsbuildBundleFunction · 0.85

Calls 1

resolveFunction · 0.70

Tested by

no test coverage detected