cloviz 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,8 @@
1
+ // src/server/runtime/detect.ts
2
+ var IS_BUN = typeof globalThis.Bun !== "undefined";
3
+ var RUNTIME = IS_BUN ? "bun" : "node";
4
+
5
+ export {
6
+ IS_BUN,
7
+ RUNTIME
8
+ };
@@ -0,0 +1,31 @@
1
+ #!/usr/bin/env node
2
+ import {
3
+ RUNTIME
4
+ } from "./chunk-E2OJZHOR.js";
5
+
6
+ // src/server/cli.ts
7
+ process.env.NODE_ENV = "production";
8
+ var PORT = parseInt(process.env.PORT || "3456");
9
+ console.log(`[cloviz] Starting with ${RUNTIME} runtime...`);
10
+ setTimeout(() => {
11
+ const url = `http://localhost:${PORT}`;
12
+ const { platform } = process;
13
+ let cmd;
14
+ let args;
15
+ if (platform === "darwin") {
16
+ cmd = "open";
17
+ args = [url];
18
+ } else if (platform === "win32") {
19
+ cmd = "cmd";
20
+ args = ["/c", "start", url];
21
+ } else {
22
+ cmd = "xdg-open";
23
+ args = [url];
24
+ }
25
+ import("child_process").then(({ spawn }) => {
26
+ const child = spawn(cmd, args, { stdio: "ignore", detached: true });
27
+ child.unref();
28
+ }).catch(() => {
29
+ });
30
+ }, 1e3);
31
+ await import("./-ZSFJZLUJ.js");
package/package.json ADDED
@@ -0,0 +1,57 @@
1
+ {
2
+ "name": "cloviz",
3
+ "version": "0.1.0",
4
+ "type": "module",
5
+ "bin": {
6
+ "cloviz": "dist/server/cli.js"
7
+ },
8
+ "files": [
9
+ "dist/"
10
+ ],
11
+ "engines": {
12
+ "node": ">=18.0.0"
13
+ },
14
+ "scripts": {
15
+ "dev": "concurrently \"bun run dev:server\" \"bun run dev:client\"",
16
+ "dev:server": "bun --watch src/server/index.ts",
17
+ "dev:client": "vite",
18
+ "build": "bun run build:client && bun run build:server",
19
+ "build:client": "vite build",
20
+ "build:server": "tsup src/server/cli.ts --format esm --target node18 --outDir dist/server --clean --external bun:sqlite --external better-sqlite3 --external chokidar --external @hono/node-server --external @hono/node-ws --external hono --external ws",
21
+ "start": "NODE_ENV=production bun src/server/index.ts",
22
+ "preview": "bun run build && bun dist/server/cli.js",
23
+ "screenshots": "node scripts/screenshots.mjs",
24
+ "prepublishOnly": "npm run build"
25
+ },
26
+ "dependencies": {
27
+ "@hono/node-server": "^1.13.0",
28
+ "@hono/node-ws": "^1.1.0",
29
+ "better-sqlite3": "^11.0.0",
30
+ "hono": "^4.7.0",
31
+ "chokidar": "^4.0.0",
32
+ "react": "^19.0.0",
33
+ "react-dom": "^19.0.0",
34
+ "react-router-dom": "^7.1.0",
35
+ "recharts": "^2.15.0",
36
+ "react-markdown": "^9.0.0",
37
+ "remark-gfm": "^4.0.0",
38
+ "@tanstack/react-table": "^8.21.0",
39
+ "diff": "^7.0.0",
40
+ "date-fns": "^4.1.0"
41
+ },
42
+ "devDependencies": {
43
+ "@tailwindcss/vite": "^4.0.0",
44
+ "@types/better-sqlite3": "^7.6.0",
45
+ "@types/bun": "^1.2.0",
46
+ "@types/diff": "^7.0.0",
47
+ "@types/react": "^19.0.0",
48
+ "@types/react-dom": "^19.0.0",
49
+ "@vitejs/plugin-react": "^4.3.0",
50
+ "concurrently": "^9.1.0",
51
+ "playwright": "^1.58.1",
52
+ "tailwindcss": "^4.0.0",
53
+ "tsup": "^8.0.0",
54
+ "typescript": "^5.7.0",
55
+ "vite": "^6.1.0"
56
+ }
57
+ }