6e259d3ded
## Summary - `twenty-shared` is private and never published to npm, so SDK consumers couldn't resolve type imports like `from 'twenty-shared/types'` in the generated `.d.ts` files - Replace `vite.config.sdk.ts` with `rollup-plugin-dts` which compiles `src/sdk/index.ts` directly into a self-contained `dist/sdk/index.d.ts` with all `twenty-shared` types inlined - The JS output from `vite.config.sdk.ts` (`dist/sdk/*.js`) was unused — the main export already maps to `dist/index.mjs` from the node Vite config ## Changes - **Deleted** `vite.config.sdk.ts` — its preserved-module JS output wasn't referenced by any `package.json` export - **Added** `rollup.config.dts.mjs` — uses `rollup-plugin-dts` to compile SDK types from source with `twenty-shared` inlined (~850ms) - **Updated** `project.json` — build/dev/build:sdk targets now use rollup instead of the removed vite config - **Updated** `tsconfig.json` — removed `vite.config.sdk.ts` from include ## Test plan - [ ] Run `npx nx build twenty-sdk` and verify `dist/sdk/index.d.ts` contains no `twenty-shared` references - [ ] Verify `dist/index.mjs` and `dist/index.cjs` are still produced correctly - [ ] Verify CLI (`dist/cli.cjs`) still works - [ ] Verify `npx nx build:sdk twenty-sdk` works standalone Made with [Cursor](https://cursor.com)
60 lines
1.3 KiB
JSON
60 lines
1.3 KiB
JSON
{
|
|
"name": "create-twenty-app",
|
|
"version": "1.22.0-canary.4",
|
|
"description": "Command-line interface to create Twenty application",
|
|
"main": "dist/cli.cjs",
|
|
"bin": "dist/cli.cjs",
|
|
"files": [
|
|
"dist",
|
|
"README.md",
|
|
"package.json"
|
|
],
|
|
"scripts": {
|
|
"build": "npx rimraf dist && npx vite build"
|
|
},
|
|
"keywords": [
|
|
"twenty",
|
|
"cli",
|
|
"crm",
|
|
"application",
|
|
"development"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/cli.d.ts",
|
|
"import": "./dist/cli.mjs",
|
|
"require": "./dist/cli.cjs"
|
|
}
|
|
},
|
|
"license": "AGPL-3.0",
|
|
"dependencies": {
|
|
"@genql/cli": "^3.0.3",
|
|
"chalk": "^5.3.0",
|
|
"commander": "^12.0.0",
|
|
"fs-extra": "^11.2.0",
|
|
"inquirer": "^10.0.0",
|
|
"lodash.camelcase": "^4.3.0",
|
|
"lodash.kebabcase": "^4.1.1",
|
|
"lodash.startcase": "^4.4.0",
|
|
"twenty-sdk": "workspace:*",
|
|
"uuid": "^13.0.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/fs-extra": "^11.0.0",
|
|
"@types/inquirer": "^9.0.0",
|
|
"@types/lodash.camelcase": "^4.3.7",
|
|
"@types/lodash.kebabcase": "^4.1.7",
|
|
"@types/lodash.startcase": "^4",
|
|
"@types/node": "^20.0.0",
|
|
"twenty-shared": "workspace:*",
|
|
"typescript": "^5.9.2",
|
|
"vite": "^7.0.0",
|
|
"vite-plugin-dts": "^4.5.4",
|
|
"vite-tsconfig-paths": "^4.2.1"
|
|
},
|
|
"engines": {
|
|
"node": "^24.5.0",
|
|
"yarn": "^4.0.2"
|
|
}
|
|
}
|