UNPKG

life

Version:

Life.js is the first fullstack framework to build agentic web applications. It is minimal, extensible, and typesafe. Well, everything you love.

36 lines (34 loc) 919 B
import { failure, success } from "./chunk-ZHBK6UTM.mjs"; import { __name } from "./chunk-2D3UJWOA.mjs"; // exports/build/server.ts import path from "path"; var defaultBuild = { "Run `life dev` to see your agents here.": { definition: {}, globalConfigs: {}, sha: "" } }; async function importServerBuild(options) { try { const p = path.join(options.projectDirectory, ".life", "server", "dist", "index.js"); const v = options.noCache ? (Math.random() * 1e8).toFixed(0) : "cached"; const module = await import(p + `?v=${v}`); return success(module.default || module); } catch (e) { if (e instanceof Error && e.message.includes("Cannot find module")) { return success(defaultBuild); } return failure({ code: "Unknown", cause: e }); } } __name(importServerBuild, "importServerBuild"); export { importServerBuild }; //# sourceMappingURL=chunk-CUJAJGIJ.mjs.map