aboutsummaryrefslogtreecommitdiffstats
path: root/apps/workers
diff options
context:
space:
mode:
Diffstat (limited to 'apps/workers')
-rw-r--r--apps/workers/package.json7
-rw-r--r--apps/workers/tsdown.config.ts21
2 files changed, 26 insertions, 2 deletions
diff --git a/apps/workers/package.json b/apps/workers/package.json
index 43e479c8..18cb2bf9 100644
--- a/apps/workers/package.json
+++ b/apps/workers/package.json
@@ -19,7 +19,7 @@
"http-proxy-agent": "^7.0.2",
"https-proxy-agent": "^7.0.6",
"jsdom": "^24.0.0",
- "liteque": "^0.4.1",
+ "liteque": "^0.5.0",
"metascraper": "^5.46.18",
"metascraper-amazon": "^5.46.18",
"metascraper-author": "5.46.18",
@@ -50,11 +50,14 @@
"devDependencies": {
"@karakeep/prettier-config": "workspace:^0.1.0",
"@types/jsdom": "^21.1.6",
- "@types/node-cron": "^3.0.11"
+ "@types/node-cron": "^3.0.11",
+ "tsdown": "^0.12.9"
},
"scripts": {
"start": "tsx watch index.ts",
"start:prod": "tsx index.ts",
+ "build": "tsdown",
+ "build:watch": "tsdown --watch",
"lint": "oxlint .",
"lint:fix": "oxlint . --fix",
"format": "prettier . --ignore-path ../../.prettierignore",
diff --git a/apps/workers/tsdown.config.ts b/apps/workers/tsdown.config.ts
new file mode 100644
index 00000000..0d8b31c0
--- /dev/null
+++ b/apps/workers/tsdown.config.ts
@@ -0,0 +1,21 @@
+import { defineConfig } from "tsdown";
+
+export default defineConfig({
+ entry: ["index.ts"],
+ format: ["esm"],
+ target: "node22",
+ outDir: "dist",
+ clean: true,
+ minify: false,
+ sourcemap: true,
+ platform: "node",
+ shims: true,
+ external: [
+ // Keep native binaries external (transitive deps of bundled workspace packages)
+ "better-sqlite3",
+ ],
+ noExternal: [
+ // Bundle workspace packages (since they're not published to npm)
+ /^@karakeep\//,
+ ],
+});