diff --git a/app/srv/api/deploy.ts b/app/srv/api/prod.ts similarity index 95% rename from app/srv/api/deploy.ts rename to app/srv/api/prod.ts index fce709a6..79a6d10d 100644 --- a/app/srv/api/deploy.ts +++ b/app/srv/api/prod.ts @@ -5,7 +5,7 @@ import { code } from "../ws/sync/editor/code/util-code"; import { gzipAsync } from "../ws/sync/entity/zlib"; export const _ = { - url: "/deploy/:site_id/**", + url: "/prod/:site_id/**", async api() { const { req, res } = apiContext(this); @@ -25,9 +25,9 @@ export const _ = {
- + `, { headers: { "content-type": "text/html" } } @@ -158,7 +158,7 @@ window._prasi={basepath: "/deploy/${site_id}",site_id:"${site_id}"} } else if (pathname === "index.html" || pathname === "_") { return index_html; } else { - const res = dir.data(`/deploy/${pathname}`); + const res = dir.data(`/prod/${pathname}`); const file = Bun.file(res); if (!(await file.exists())) { return index_html; diff --git a/app/web/src/nova/ed/panel/popup/code/code.tsx b/app/web/src/nova/ed/panel/popup/code/code.tsx index 4120ea06..05c7a127 100644 --- a/app/web/src/nova/ed/panel/popup/code/code.tsx +++ b/app/web/src/nova/ed/panel/popup/code/code.tsx @@ -128,7 +128,7 @@ const CodeBody = () => {
- { __html: iconChevronDown, }} >
- + */} {/* { const site_script = evalCJS( await ( - await fetch(`/deploy/${base.site.id}/_prasi/code/index.js`) + await fetch(`/prod/${base.site.id}/_prasi/code/index.js`) ).text() ); if (site_script) { diff --git a/app/web/src/nova/deploy/w.ts b/app/web/src/nova/prod/w.ts similarity index 100% rename from app/web/src/nova/deploy/w.ts rename to app/web/src/nova/prod/w.ts diff --git a/pkgs/core/build-deploy.ts b/pkgs/core/build-prod.ts similarity index 71% rename from pkgs/core/build-deploy.ts rename to pkgs/core/build-prod.ts index 52c262a7..b221da7a 100644 --- a/pkgs/core/build-deploy.ts +++ b/pkgs/core/build-prod.ts @@ -1,12 +1,11 @@ import { dir } from "dir"; import { context } from "esbuild"; -import { g } from "./utils/global"; const ctx = await context({ bundle: true, absWorkingDir: dir.path(""), - entryPoints: [dir.path("app/web/src/nova/deploy/main.tsx")], - outdir: dir.data(`/deploy`), + entryPoints: [dir.path("app/web/src/nova/prod/main.tsx")], + outdir: dir.data(`/prod`), splitting: true, format: "esm", jsx: "transform", diff --git a/pkgs/core/build-site.ts b/pkgs/core/build-site.ts index fd9e9d8a..9b841a93 100644 --- a/pkgs/core/build-site.ts +++ b/pkgs/core/build-site.ts @@ -16,7 +16,7 @@ const onEndPlugin: Plugin = { }, }; -console.log("Building deploy"); +console.log("Building site deploy"); const ctx = await context({ bundle: true, absWorkingDir: dir.path(""), diff --git a/pkgs/core/index.ts b/pkgs/core/index.ts index 48ca4cd5..81dee2ca 100644 --- a/pkgs/core/index.ts +++ b/pkgs/core/index.ts @@ -76,7 +76,7 @@ if (!g.parcel) { await parcelBuild(); } -await import("./build-deploy"); +await import("./build-prod"); const { createServer } = await import("./server/create"); await createServer();