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

Function laterTransformersOf

ark/aot/unplugin.ts:2032–2050  ·  view source on GitHub ↗
(plugins: readonly object[])

Source from the content-addressed store, hash-verified

2030// each plugin whose transform runs after this one's, as any after it in the
2031// list does unless its transform's order is "pre", and any with order "post"
2032const laterTransformersOf = (plugins: readonly object[]): string[] => {
2033 const named: readonly TransformingPlugin[] = plugins
2034 const own = named.findIndex(({ name }) => name === pluginName)
2035 return [
2036 ...new Set(
2037 named.flatMap(({ name, transform }, i) => {
2038 if (
2039 !name ||
2040 !transform ||
2041 isVitesOwn(name) ||
2042 name.startsWith(pluginName)
2043 )
2044 return []
2045 const { order }: OrderedHook = transform
2046 return order === "post" || (order !== "pre" && i > own) ? name : []
2047 })
2048 )
2049 ]
2050}
2051
2052const pluginName = "arktype"
2053

Callers 1

rollupBuildStartFunction · 0.85

Calls 1

isVitesOwnFunction · 0.85

Tested by

no test coverage detected