Prepare repo for open source

This commit is contained in:
Samraaj Bath
2026-06-29 16:14:44 -07:00
parent 66dfdcc58d
commit 3f7c9ed227
28 changed files with 1461 additions and 574 deletions
+12
View File
@@ -2,6 +2,18 @@
"name": "@cloner/api",
"version": "0.1.0",
"private": true,
"description": "Hono REST and MCP API for ditto.site clone jobs.",
"license": "MIT",
"author": "ion-design",
"repository": {
"type": "git",
"url": "https://github.com/ion-design/ditto.site.git",
"directory": "packages/api"
},
"bugs": {
"url": "https://github.com/ion-design/ditto.site/issues"
},
"homepage": "https://github.com/ion-design/ditto.site#readme",
"type": "module",
"exports": {
".": "./src/index.ts"
+12
View File
@@ -2,6 +2,18 @@
"name": "@cloner/core",
"version": "0.1.0",
"private": true,
"description": "Core compiler adapter and file-map helpers for the ditto.site service.",
"license": "MIT",
"author": "ion-design",
"repository": {
"type": "git",
"url": "https://github.com/ion-design/ditto.site.git",
"directory": "packages/core"
},
"bugs": {
"url": "https://github.com/ion-design/ditto.site/issues"
},
"homepage": "https://github.com/ion-design/ditto.site#readme",
"type": "module",
"exports": {
".": "./src/index.ts"
+16 -4
View File
@@ -2,6 +2,18 @@
"name": "@cloner/db",
"version": "0.1.0",
"private": true,
"description": "Drizzle schema, migrations, repository, and queue integration for ditto.site.",
"license": "MIT",
"author": "ion-design",
"repository": {
"type": "git",
"url": "https://github.com/ion-design/ditto.site.git",
"directory": "packages/db"
},
"bugs": {
"url": "https://github.com/ion-design/ditto.site/issues"
},
"homepage": "https://github.com/ion-design/ditto.site#readme",
"type": "module",
"exports": {
".": "./src/index.ts"
@@ -13,16 +25,16 @@
"typecheck": "tsc --noEmit"
},
"dependencies": {
"drizzle-orm": "^0.38.3",
"drizzle-orm": "^0.45.2",
"pg": "^8.13.1",
"pg-boss": "^10.1.5"
},
"devDependencies": {
"@cloner/test-utils": "*",
"@types/node": "22.10.5",
"@types/pg": "^8.11.10",
"drizzle-kit": "^0.30.1",
"drizzle-kit": "^0.31.10",
"tsx": "4.22.4",
"typescript": "5.7.3",
"@types/node": "22.10.5"
"typescript": "5.7.3"
}
}
+12
View File
@@ -2,6 +2,18 @@
"name": "@cloner/storage",
"version": "0.1.0",
"private": true,
"description": "Local and S3-compatible artifact storage for ditto.site clone results.",
"license": "MIT",
"author": "ion-design",
"repository": {
"type": "git",
"url": "https://github.com/ion-design/ditto.site.git",
"directory": "packages/storage"
},
"bugs": {
"url": "https://github.com/ion-design/ditto.site/issues"
},
"homepage": "https://github.com/ion-design/ditto.site#readme",
"type": "module",
"exports": {
".": "./src/index.ts"
+12
View File
@@ -2,6 +2,18 @@
"name": "@cloner/test-utils",
"version": "0.1.0",
"private": true,
"description": "Shared fixture server and integration-test helpers for ditto.site workspaces.",
"license": "MIT",
"author": "ion-design",
"repository": {
"type": "git",
"url": "https://github.com/ion-design/ditto.site.git",
"directory": "packages/test-utils"
},
"bugs": {
"url": "https://github.com/ion-design/ditto.site/issues"
},
"homepage": "https://github.com/ion-design/ditto.site#readme",
"type": "module",
"exports": {
".": "./src/index.ts"
+8 -3
View File
@@ -78,9 +78,14 @@ export function serveDir(rootDir: string): Promise<{ url: string; close: () => P
/** Whether a Playwright Chromium browser appears installed (browser tests skip if not). */
export function hasChromium(): boolean {
try {
const base = process.env.PLAYWRIGHT_BROWSERS_PATH || join(homedir(), ".cache", "ms-playwright");
if (!existsSync(base)) return false;
return readdirSync(base).some((d) => d.startsWith("chromium"));
const bases = process.env.PLAYWRIGHT_BROWSERS_PATH
? [process.env.PLAYWRIGHT_BROWSERS_PATH]
: [
join(homedir(), ".cache", "ms-playwright"),
join(homedir(), "Library", "Caches", "ms-playwright"),
...(process.env.LOCALAPPDATA ? [join(process.env.LOCALAPPDATA, "ms-playwright")] : []),
];
return bases.some((base) => existsSync(base) && readdirSync(base).some((d) => d.startsWith("chromium")));
} catch {
return false;
}
+12
View File
@@ -2,6 +2,18 @@
"name": "@cloner/worker",
"version": "0.1.0",
"private": true,
"description": "Queue worker for ditto.site clone generation, storage, and optional verification.",
"license": "MIT",
"author": "ion-design",
"repository": {
"type": "git",
"url": "https://github.com/ion-design/ditto.site.git",
"directory": "packages/worker"
},
"bugs": {
"url": "https://github.com/ion-design/ditto.site/issues"
},
"homepage": "https://github.com/ion-design/ditto.site#readme",
"type": "module",
"exports": {
".": "./src/index.ts"