eve
Version:
Filesystem-first framework for durable backend AI agents that run anywhere.
1 lines • 1.04 kB
JavaScript
import{createBundledRuntimeCompiledArtifactsSource,createDiskRuntimeCompiledArtifactsSource}from"#runtime/compiled-artifacts-source.js";import{readBundledCompiledArtifacts}from"#runtime/loaders/bundled-artifacts.js";import{readDevelopmentRuntimeArtifactsSnapshotRoot}from"#internal/nitro/dev-runtime-artifacts.js";function resolveNitroCompiledArtifactsSource(e){let{appRoot:t,dev:n}=e;if(n&&t!==void 0){if(e.moduleMapLoaderPath===void 0)throw Error(`eve Nitro development routes require "moduleMapLoaderPath" in the artifacts config.`);return createDiskRuntimeCompiledArtifactsSource(readDevelopmentRuntimeArtifactsSnapshotRoot(e.devRuntimeArtifactsPointerPath)??t,{moduleMapLoaderPath:e.moduleMapLoaderPath,sandboxAppRoot:t})}if(readBundledCompiledArtifacts()!==null)return createBundledRuntimeCompiledArtifactsSource();if(t!==void 0)return createDiskRuntimeCompiledArtifactsSource(t);throw Error(`eve Nitro route requires bundled artifacts or an eve Nitro runtime configuration app root.`)}export{resolveNitroCompiledArtifactsSource};