## Add API client generation to SDK dev mode and refactor orchestrator into step-based pipeline ### Why The SDK dev mode lacked typed API client generation, forcing developers to work without auto-generated GraphQL types when building applications. Additionally, the orchestrator was a monolithic class that mixed watcher management, token handling, and sync logic — making it difficult to extend with new steps like client generation. ### How - **Refactored the orchestrator** into a step-based pipeline with dedicated classes: `CheckServer`, `EnsureValidTokens`, `ResolveApplication`, `BuildManifest`, `UploadFiles`, `GenerateApiClient`, `SyncApplication`, and `StartWatchers`. Each step has typed input/output/status, managed by a new `OrchestratorState` class. - **Added `GenerateApiClientOrchestratorStep`** that detects object/field schema changes and regenerates a typed GraphQL client (via `@genql/cli`) into `node_modules/twenty-sdk/generated` for seamless imports. - **Replaced `checkApplicationExist`** with `findOneApplication` on both server resolver and SDK API service, returning the entity data instead of a boolean. - **Added application token pair mutations** (`generateApplicationToken`, `renewApplicationToken`) to the API service, with the server now returning `ApplicationTokenPairDTO` containing both access and refresh tokens. - **Restructured the dev UI** into `dev/ui/components/` with dedicated panel, section, and event log components. - **Simplified `AppDevCommand`** from ~180 lines of watcher management down to ~40 lines that delegate entirely to the orchestrator.
28 lines
594 B
JSON
28 lines
594 B
JSON
{
|
|
"name": "mailchimp-synchronizer",
|
|
"version": "0.0.1",
|
|
"license": "MIT",
|
|
"engines": {
|
|
"node": "^24.5.0",
|
|
"npm": "please-use-yarn",
|
|
"yarn": ">=4.0.2"
|
|
},
|
|
"packageManager": "yarn@4.9.2",
|
|
"dependencies": {
|
|
"axios": "^1.13.2",
|
|
"twenty-sdk": "0.2.4"
|
|
},
|
|
"devDependencies": {
|
|
"@types/node": "^24.7.2"
|
|
},
|
|
"scripts": {
|
|
"auth": "twenty auth login",
|
|
"dev": "twenty app dev",
|
|
"sync": "twenty app sync",
|
|
"uninstall": "twenty app uninstall",
|
|
"logs": "twenty app logs",
|
|
"create-entity": "twenty app add",
|
|
"help": "twenty --help"
|
|
}
|
|
}
|