History

fix build

Rhys Sullivan committed 8 months ago

Commit bcdff4d1 parent 7b9d40e4 files · +51 −6Browse files

Unified · Split

4 files
  1. apps/executor/package.json +2 −2
  2. apps/executor/src/distribution/artifact.ts +6 −1
  3. apps/web/src/components/shell.tsx +19 −3
  4. apps/web/vite.config.ts +24 −0
apps/executor/package.json+2−2
@@ -1,6 +1,6 @@
1{1{
2 "name": "executor",2 "name": "executor",
3 "version": "1.1.3",3 "version": "1.1.5",
4 "description": "Local AI executor with a CLI, local API server, and web UI.",4 "description": "Local AI executor with a CLI, local API server, and web UI.",
5 "keywords": [5 "keywords": [
6 "executor",6 "executor",
@@ -22,7 +22,7 @@ · 15 unmodified lines
22 "private": true,22 "private": true,
23 "type": "module",23 "type": "module",
24 "bin": {24 "bin": {
25 "executor": "./bin/executor"25 "executor": "bin/executor"
26 },26 },
27 "scripts": {27 "scripts": {
28 "typecheck": "bunx tsc --noEmit -p tsconfig.json",28 "typecheck": "bunx tsc --noEmit -p tsconfig.json",
apps/executor/src/distribution/artifact.ts+6−1
@@ -120,7 +120,7 @@ const createPackageJson = (input: { · 119 unmodified lines
120 type: "module",120 type: "module",
121 private: false,121 private: false,
122 bin: {122 bin: {
123 executor: "./bin/executor.js",123 executor: "bin/executor.js",
124 },124 },
125 files: [125 files: [
126 "bin",126 "bin",
@@ -195,6 +195,11 @@ export const buildDistributionPackage = async ( · 68 unmodified lines
195 });195 });
196 await cp(pgliteDataPath, join(binDir, "pglite.data"));196 await cp(pgliteDataPath, join(binDir, "pglite.data"));
197 await cp(pgliteWasmPath, join(binDir, "pglite.wasm"));197 await cp(pgliteWasmPath, join(binDir, "pglite.wasm"));
198 await mkdir(join(binDir, "openapi-extractor-wasm"), { recursive: true });
199 await cp(
200 join(repoRoot, "packages/codemode-openapi/src/openapi-extractor-wasm/openapi_extractor_bg.wasm"),
201 join(binDir, "openapi-extractor-wasm/openapi_extractor_bg.wasm"),
202 );
198 await cp(203 await cp(
199 join(repoRoot, "packages/runtime-deno-subprocess/src/deno-subprocess-worker.mjs"),204 join(repoRoot, "packages/runtime-deno-subprocess/src/deno-subprocess-worker.mjs"),
200 join(binDir, "deno-subprocess-worker.mjs"),205 join(binDir, "deno-subprocess-worker.mjs"),
apps/web/src/components/shell.tsx+19−3
@@ -15,8 +15,16 @@ const statusColor: Record<string, string> = { · 14 unmodified lines
15 error: "bg-destructive",15 error: "bg-destructive",
16};16};
17 17
18// ── AppShell ─────────────────────────────────────────────────────────────18type AppMetaEnv = {
19 readonly VITE_APP_VERSION: string;
20 readonly VITE_GITHUB_URL: string;
21};
19 22
23const { VITE_APP_VERSION, VITE_GITHUB_URL } = (import.meta as ImportMeta & {
24 readonly env: AppMetaEnv;
25}).env;
26
27// ── AppShell ─────────────────────────────────────────────────────────────
20export function AppShell() {28export function AppShell() {
21 const sources = useSources();29 const sources = useSources();
22 const matchRoute = useMatchRoute();30 const matchRoute = useMatchRoute();
@@ -75,8 +83,16 @@ export function AppShell() { · 52 unmodified lines
75 83
76 {/* Footer */}84 {/* Footer */}
77 <div className="shrink-0 border-t border-sidebar-border px-4 py-2.5">85 <div className="shrink-0 border-t border-sidebar-border px-4 py-2.5">
78 <div className="text-[10px] text-muted-foreground/30">86 <div className="flex flex-col items-start gap-1 text-[10px] leading-none">
79 executor v387 <span className="text-muted-foreground/35">v{VITE_APP_VERSION}</span>
88 <a
89 href={VITE_GITHUB_URL}
90 target="_blank"
91 rel="noreferrer"
92 className="text-muted-foreground/50 transition-colors hover:text-foreground"
93 >
94 Star on GitHub
95 </a>
80 </div>96 </div>
81 </div>97 </div>
82 </aside>98 </aside>
apps/web/vite.config.ts+24−0
@@ -1,8 +1,28 @@
1import { readFileSync } from "node:fs";
1import { defineConfig } from "vite";2import { defineConfig } from "vite";
2import react from "@vitejs/plugin-react";3import react from "@vitejs/plugin-react";
3import tailwindcss from "@tailwindcss/vite";4import tailwindcss from "@tailwindcss/vite";
4import devServer from "@hono/vite-dev-server";5import devServer from "@hono/vite-dev-server";
5 6
7type ExecutorPackageMetadata = {
8 version: string;
9 homepage?: string;
10 repository?: string | { url?: string };
11};
12
13const executorPackage = JSON.parse(
14 readFileSync(new URL("../executor/package.json", import.meta.url), "utf8"),
15) as ExecutorPackageMetadata;
16
17const repositoryUrl =
18 typeof executorPackage.repository === "string"
19 ? executorPackage.repository
20 : executorPackage.repository?.url;
21
22const githubUrl = (executorPackage.homepage ?? repositoryUrl ?? "https://github.com/RhysSullivan/executor")
23 .replace(/^git\+/, "")
24 .replace(/\.git$/, "");
25
6export default defineConfig({26export default defineConfig({
7 root: "src",27 root: "src",
8 plugins: [28 plugins: [
@@ -19,6 +39,10 @@ export default defineConfig({ · 10 unmodified lines
19 injectClientScript: false,39 injectClientScript: false,
20 }),40 }),
21 ],41 ],
42 define: {
43 "import.meta.env.VITE_APP_VERSION": JSON.stringify(executorPackage.version),
44 "import.meta.env.VITE_GITHUB_URL": JSON.stringify(githubUrl),
45 },
22 build: {46 build: {
23 outDir: "../dist",47 outDir: "../dist",
24 emptyOutDir: true,48 emptyOutDir: true,