```ts
Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] LogicFunctionModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] ApplicationUpgradeModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkspaceModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] IteratorActionModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] DelayActionModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] RestApiCoreModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] RecordCRUDActionModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowTriggerModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] TimelineMessagingModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowVersionModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] UserModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowToolsModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] ApplicationOAuthModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] BillingWebhookModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AiAgentExecutionModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AiAgentActionModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] ToolProviderModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AiAgentMonitorModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowExecutorModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowRunnerModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] McpModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AiChatModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] WorkflowApiModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [InstanceLoader] AuthModule dependencies initialized
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [DatabaseConfigDriver] [INIT] Loading initial config variables from database
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [DatabaseConfigDriver] [INIT] Config variables loaded: 1 values found in DB, 83 falling to env vars/defaults
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [UpgradeCommandRegistryService] Registered 3 fast instance, 0 slow instance, and 14 workspace command(s) for 1.21.0
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [UpgradeCommandRegistryService] Registered 4 fast instance, 1 slow instance, and 3 workspace command(s) for 1.22.0
[Nest] 46347 - 04/10/2026, 3:37:43 PM LOG [GenerateInstanceCommandCommand] Generating fast instance command for version 1.22.0...
[Nest] 46347 - 04/10/2026, 3:37:43 PM WARN [GenerateInstanceCommandCommand] No changes in database schema were found - cannot generate a migration.
———————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————————
NX Successfully ran target database:migrate:generate for project twenty-server and 8 tasks it depends on (11s)
With additional flags:
--name=martmull
```
293 lines
9.5 KiB
JSON
293 lines
9.5 KiB
JSON
{
|
|
"name": "twenty-server",
|
|
"$schema": "../../node_modules/nx/schemas/project-schema.json",
|
|
"projectType": "application",
|
|
"tags": ["scope:backend"],
|
|
"targets": {
|
|
"build": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"parallel": false,
|
|
"commands": [
|
|
"rimraf dist",
|
|
"nest build --path ./tsconfig.build.json",
|
|
"mkdir -p dist/assets/twenty-client-sdk && cp ../twenty-client-sdk/package.json dist/assets/twenty-client-sdk/ && cp -r ../twenty-client-sdk/dist dist/assets/twenty-client-sdk/dist"
|
|
]
|
|
},
|
|
"dependsOn": ["^build"]
|
|
},
|
|
"test:integration": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"commands": [
|
|
"NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=12288 --import tsx/esm\" nx jest --config ./jest-integration.config.ts"
|
|
]
|
|
},
|
|
"parallel": false,
|
|
"configurations": {
|
|
"with-db-reset": {
|
|
"cwd": "packages/twenty-server",
|
|
"commands": [
|
|
"NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=12288 --import tsx/esm\" nx database:reset > reset-logs.log && NODE_ENV=test NODE_OPTIONS=\"--max-old-space-size=12288 --import tsx/esm\" nx jest --config ./jest-integration.config.ts"
|
|
]
|
|
}
|
|
}
|
|
},
|
|
"build:packageJson": {
|
|
"executor": "@nx/js:tsc",
|
|
"options": {
|
|
"main": "packages/twenty-server/dist/main.js",
|
|
"tsConfig": "packages/twenty-server/tsconfig.json",
|
|
"outputPath": "packages/twenty-server/dist",
|
|
"updateBuildableProjectDepsInPackageJson": true
|
|
}
|
|
},
|
|
"typecheck": {
|
|
"dependsOn": ["^build"]
|
|
},
|
|
"start": {
|
|
"executor": "nx:run-commands",
|
|
"cache": false,
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "rimraf dist && NODE_ENV=development nest start --watch"
|
|
}
|
|
},
|
|
"start:ci": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "NODE_ENV=development nest start"
|
|
}
|
|
},
|
|
"start:ci-if-needed": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "curl -f -s http://localhost:3000/healthz > /dev/null 2>&1 && echo '✅ Server already running' || (echo '🚀 Server not running, starting...' && nohup nest start &)"
|
|
}
|
|
},
|
|
"start:debug": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "rimraf dist && NODE_ENV=development nest start --watch --debug"
|
|
}
|
|
},
|
|
"reset:env": {
|
|
"executor": "nx:run-commands",
|
|
"inputs": ["{projectRoot}/.env.example"],
|
|
"outputs": ["{projectRoot}/.env"],
|
|
"cache": true,
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "cp .env.example .env"
|
|
}
|
|
},
|
|
"reset:env:e2e-testing-server": {
|
|
"executor": "nx:run-commands",
|
|
"inputs": ["{projectRoot}/.env.e2e-testing-server"],
|
|
"outputs": ["{projectRoot}/.env"],
|
|
"cache": true,
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "cp .env.e2e-testing-server .env"
|
|
}
|
|
},
|
|
"command": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "node dist/command/command.js"
|
|
}
|
|
},
|
|
"command-no-deps": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "node dist/command/command.js"
|
|
}
|
|
},
|
|
"worker": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "node dist/queue-worker/queue-worker.js"
|
|
}
|
|
},
|
|
"ts-node": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "ts-node"
|
|
}
|
|
},
|
|
"ts-node-no-deps": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "ts-node"
|
|
}
|
|
},
|
|
"ts-node-no-deps-transpile-only": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "ts-node --transpile-only"
|
|
}
|
|
},
|
|
"lint": {
|
|
"executor": "nx:run-commands",
|
|
"cache": true,
|
|
"dependsOn": ["twenty-oxlint-rules:build"],
|
|
"inputs": [
|
|
"{projectRoot}/src/**/*.{ts,tsx}",
|
|
"{projectRoot}/tsconfig*.json",
|
|
"{workspaceRoot}/tsconfig.base.json",
|
|
"{projectRoot}/.oxlintrc.json",
|
|
"{workspaceRoot}/packages/twenty-oxlint-rules/dist/oxlint-plugin.mjs"
|
|
],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "npx oxlint --type-aware -c .oxlintrc.json src/ && (prettier src/ --check --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint twenty-server --configuration=fix' && false))"
|
|
},
|
|
"configurations": {
|
|
"ci": {},
|
|
"fix": {
|
|
"command": "npx oxlint --type-aware --fix -c .oxlintrc.json src/ && prettier src/ --write --cache --cache-location ../../.cache/prettier/{projectRoot} --cache-strategy metadata"
|
|
}
|
|
}
|
|
},
|
|
"lint:diff-with-main": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware -c .oxlintrc.json $FILES && (prettier --check $FILES || (echo 'ERROR: Prettier formatting check failed! Fix with: npx nx lint:diff-with-main twenty-server --configuration=fix' && false)))"
|
|
},
|
|
"configurations": {
|
|
"fix": {
|
|
"command": "FILES=$(git diff --name-only --relative --diff-filter=d main...HEAD -- src/ | grep -E '\\.(ts|tsx)$'); [ -z \"$FILES\" ] && echo 'No changed files.' || (npx oxlint --type-aware --fix -c .oxlintrc.json $FILES && prettier --write $FILES)"
|
|
}
|
|
}
|
|
},
|
|
"test": {},
|
|
"test:debug": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "node --inspect-brk -r tsconfig-paths/register -r ts-node/register ../../node_modules/.bin/jest --runInBand"
|
|
}
|
|
},
|
|
"jest": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "jest"
|
|
}
|
|
},
|
|
"database:migrate": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "node dist/command/command.js run-instance-commands --force"
|
|
}
|
|
},
|
|
"database:init": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"commands": [
|
|
"node dist/database/scripts/setup-db.js",
|
|
"nx database:migrate -- --include-slow"
|
|
],
|
|
"parallel": false
|
|
}
|
|
},
|
|
"database:migrate:generate": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["build"],
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "node dist/command/command.js generate:instance-command"
|
|
}
|
|
},
|
|
"generate:integration-test": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"commands": [
|
|
"nx ts-node-no-deps -- ./test/integration/graphql/codegen/index.ts"
|
|
],
|
|
"parallel": false
|
|
}
|
|
},
|
|
"database:reset": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["build"],
|
|
"configurations": {
|
|
"no-seed": {
|
|
"cwd": "packages/twenty-server",
|
|
"commands": [
|
|
"node dist/database/scripts/truncate-db.js",
|
|
"nx database:init",
|
|
"nx command-no-deps -- cache:flush"
|
|
],
|
|
"parallel": false
|
|
},
|
|
"seed": {
|
|
"cwd": "packages/twenty-server",
|
|
"commands": [
|
|
"node dist/database/scripts/truncate-db.js",
|
|
"nx database:init",
|
|
"nx command-no-deps -- cache:flush",
|
|
"nx command-no-deps -- workspace:seed:dev"
|
|
],
|
|
"parallel": false
|
|
}
|
|
},
|
|
"defaultConfiguration": "seed"
|
|
},
|
|
"clickhouse:migrate": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "nx ts-node-no-deps-transpile-only -- src/database/clickHouse/migrations/run-migrations.ts"
|
|
}
|
|
},
|
|
"clickhouse:seed": {
|
|
"executor": "nx:run-commands",
|
|
"options": {
|
|
"cwd": "packages/twenty-server",
|
|
"command": "nx ts-node-no-deps-transpile-only -- src/database/clickHouse/seeds/run-seeds.ts"
|
|
}
|
|
},
|
|
"lingui:extract": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "lingui extract --overwrite --clean"
|
|
}
|
|
},
|
|
"lingui:compile": {
|
|
"executor": "nx:run-commands",
|
|
"dependsOn": ["^build"],
|
|
"options": {
|
|
"cwd": "{projectRoot}",
|
|
"command": "lingui compile --typescript"
|
|
}
|
|
}
|
|
}
|
|
}
|