Unified · Split
| @@ -1,6 +1,6 @@ | ||
| 1 | 1 | { |
| 2 | 2 | "name": "executor", |
| 3 | − "version": "1.1.3", | |
| 3 | + "version": "1.1.5", | |
| 4 | 4 | "description": "Local AI executor with a CLI, local API server, and web UI.", |
| 5 | 5 | "keywords": [ |
| 6 | 6 | "executor", |
| @@ -22,7 +22,7 @@ · 15 unmodified lines | ||
| 22 | 22 | "private": true, |
| 23 | 23 | "type": "module", |
| 24 | 24 | "bin": { |
| 25 | − "executor": "./bin/executor" | |
| 25 | + "executor": "bin/executor" | |
| 26 | 26 | }, |
| 27 | 27 | "scripts": { |
| 28 | 28 | "typecheck": "bunx tsc --noEmit -p tsconfig.json", |
| @@ -120,7 +120,7 @@ const createPackageJson = (input: { · 119 unmodified lines | ||
| 120 | 120 | type: "module", |
| 121 | 121 | private: false, |
| 122 | 122 | bin: { |
| 123 | − executor: "./bin/executor.js", | |
| 123 | + executor: "bin/executor.js", | |
| 124 | 124 | }, |
| 125 | 125 | files: [ |
| 126 | 126 | "bin", |
| @@ -195,6 +195,11 @@ export const buildDistributionPackage = async ( · 68 unmodified lines | ||
| 195 | 195 | }); |
| 196 | 196 | await cp(pgliteDataPath, join(binDir, "pglite.data")); |
| 197 | 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 | 203 | await cp( |
| 199 | 204 | join(repoRoot, "packages/runtime-deno-subprocess/src/deno-subprocess-worker.mjs"), |
| 200 | 205 | join(binDir, "deno-subprocess-worker.mjs"), |
| @@ -15,8 +15,16 @@ const statusColor: Record<string, string> = { · 14 unmodified lines | ||
| 15 | 15 | error: "bg-destructive", |
| 16 | 16 | }; |
| 17 | 17 | |
| 18 | −// ── AppShell ───────────────────────────────────────────────────────────── | |
| 18 | +type AppMetaEnv = { | |
| 19 | + readonly VITE_APP_VERSION: string; | |
| 20 | + readonly VITE_GITHUB_URL: string; | |
| 21 | +}; | |
| 19 | 22 | |
| 23 | +const { VITE_APP_VERSION, VITE_GITHUB_URL } = (import.meta as ImportMeta & { | |
| 24 | + readonly env: AppMetaEnv; | |
| 25 | +}).env; | |
| 26 | + | |
| 27 | +// ── AppShell ───────────────────────────────────────────────────────────── | |
| 20 | 28 | export function AppShell() { |
| 21 | 29 | const sources = useSources(); |
| 22 | 30 | const matchRoute = useMatchRoute(); |
| @@ -75,8 +83,16 @@ export function AppShell() { · 52 unmodified lines | ||
| 75 | 83 | |
| 76 | 84 | {/* Footer */} |
| 77 | 85 | <div className="shrink-0 border-t border-sidebar-border px-4 py-2.5"> |
| 78 | − <div className="text-[10px] text-muted-foreground/30"> | |
| 79 | − executor v3 | |
| 86 | + <div className="flex flex-col items-start gap-1 text-[10px] leading-none"> | |
| 87 | + <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 | 96 | </div> |
| 81 | 97 | </div> |
| 82 | 98 | </aside> |
| @@ -1,8 +1,28 @@ | ||
| 1 | +import { readFileSync } from "node:fs"; | |
| 1 | 2 | import { defineConfig } from "vite"; |
| 2 | 3 | import react from "@vitejs/plugin-react"; |
| 3 | 4 | import tailwindcss from "@tailwindcss/vite"; |
| 4 | 5 | import devServer from "@hono/vite-dev-server"; |
| 5 | 6 | |
| 7 | +type ExecutorPackageMetadata = { | |
| 8 | + version: string; | |
| 9 | + homepage?: string; | |
| 10 | + repository?: string | { url?: string }; | |
| 11 | +}; | |
| 12 | + | |
| 13 | +const executorPackage = JSON.parse( | |
| 14 | + readFileSync(new URL("../executor/package.json", import.meta.url), "utf8"), | |
| 15 | +) as ExecutorPackageMetadata; | |
| 16 | + | |
| 17 | +const repositoryUrl = | |
| 18 | + typeof executorPackage.repository === "string" | |
| 19 | + ? executorPackage.repository | |
| 20 | + : executorPackage.repository?.url; | |
| 21 | + | |
| 22 | +const githubUrl = (executorPackage.homepage ?? repositoryUrl ?? "https://github.com/RhysSullivan/executor") | |
| 23 | + .replace(/^git\+/, "") | |
| 24 | + .replace(/\.git$/, ""); | |
| 25 | + | |
| 6 | 26 | export default defineConfig({ |
| 7 | 27 | root: "src", |
| 8 | 28 | plugins: [ |
| @@ -19,6 +39,10 @@ export default defineConfig({ · 10 unmodified lines | ||
| 19 | 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 | 46 | build: { |
| 23 | 47 | outDir: "../dist", |
| 24 | 48 | emptyOutDir: true, |