Compare commits

...
Author SHA1 Message Date
Claude c0945642b0 refactor: remove unnecessary worker:dev target, run worker directly
The worker:dev target was identical to running the node command directly.
Simplify by inlining the command in the root start script.

https://claude.ai/code/session_01VR3gaNSd7hwewq173pn1AW
2026-03-31 15:57:08 +00:00
Claude b0ef4b1465 fix: run rimraf once in root start script instead of per-target
Restore the dist/ cleanup (needed to prevent stale file accumulation) but
run it once in the root start script before anything launches, rather than
having both the server start and worker build targets rimraf independently.

- Root start: rimraf packages/twenty-server/dist upfront, then concurrently
  launch server (no rimraf) + worker:dev (no build dependency)
- start:debug: keeps its own rimraf since it's run standalone

https://claude.ai/code/session_01VR3gaNSd7hwewq173pn1AW
2026-03-31 15:55:06 +00:00
Claude 487787a8fc fix: remove duplicate rimraf in dev start scripts to prevent worker from nuking server dist
The root `yarn start` runs the server (`nest start --watch`, which compiles
into dist/) and the worker concurrently. The worker target depended on `build`,
which ran `rimraf dist` — destroying the server's compiled output mid-run.

Changes:
- Remove `rimraf dist` from `start` and `start:debug` targets (nest start
  --watch does a full recompile on startup, making the clean unnecessary)
- Add `worker:dev` target without the `build` dependency, since in dev mode
  the server's watch compilation already populates dist/
- Update root start script to use `worker:dev`

The standalone `build` target retains its `rimraf dist` for production builds.

https://claude.ai/code/session_01VR3gaNSd7hwewq173pn1AW
2026-03-31 15:49:26 +00:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -192,7 +192,7 @@
"docs:generate": "tsx packages/twenty-docs/scripts/generate-docs-json.ts",
"docs:generate-navigation-template": "tsx packages/twenty-docs/scripts/generate-navigation-template.ts",
"docs:generate-paths": "tsx packages/twenty-docs/scripts/generate-documentation-paths.ts",
"start": "npx concurrently --kill-others 'npx nx run-many -t start -p twenty-server twenty-front' 'npx wait-on tcp:3000 && npx nx run twenty-server:worker'"
"start": "rimraf packages/twenty-server/dist && npx concurrently --kill-others 'npx nx run-many -t start -p twenty-server twenty-front' 'npx wait-on tcp:3000 && node packages/twenty-server/dist/queue-worker/queue-worker.js'"
},
"workspaces": {
"packages": [
+1 -1
View File
@@ -54,7 +54,7 @@
"dependsOn": ["^build"],
"options": {
"cwd": "packages/twenty-server",
"command": "rimraf dist && NODE_ENV=development nest start --watch"
"command": "NODE_ENV=development nest start --watch"
}
},
"start:ci": {