## Add `frontComponent` entity type to SDK This PR adds a new `frontComponent` entity type at parity with `serverlessFunction`. Front components are React components that can be defined and bundled as part of Twenty applications. ### Changes #### New Entity Type - Added `FRONT_COMPONENT` to `SyncableEntity` enum - Front components use `*.front-component.tsx` file naming convention - CLI command `twenty app:add` now includes `front-component` as an option #### SDK Application Layer (`twenty-sdk`) - Added `defineFrontComponent()` function for defining front component configurations with validation - Added `FrontComponentConfig` type for component configuration - Added `getFrontComponentBaseFile()` template generator for scaffolding new front components - Added `loadFrontComponentModule()` to load front component modules and extract component metadata #### Shared Types (`twenty-shared`) - Added `FrontComponentManifest` type with `universalIdentifier`, `name`, `description`, `componentPath`, and `componentName` fields - Updated `ApplicationManifest` to include optional `frontComponents` array #### Manifest Build System - Updated `manifest-build.ts` to discover and load `*.front-component.tsx` files - Updated `manifest-validate.ts` to validate front components and check for duplicate IDs - Updated `manifest-display.ts` to display front component count in build summary - Updated `manifest-plugin.ts` to display front component entry points and watch `.tsx` files #### Template (`create-twenty-app`) - New applications now include a sample `hello-world.front-component.tsx` file #### Tests - Added unit tests for `defineFrontComponent()` - Added unit tests for `getFrontComponentBaseFile()`
81 lines
1.8 KiB
JSON
81 lines
1.8 KiB
JSON
{
|
|
"name": "twenty-sdk",
|
|
"version": "0.3.1",
|
|
"main": "dist/index.cjs",
|
|
"module": "dist/index.mjs",
|
|
"types": "dist/index.d.ts",
|
|
"bin": {
|
|
"twenty": "dist/cli.cjs"
|
|
},
|
|
"files": [
|
|
"dist"
|
|
],
|
|
"scripts": {
|
|
"build": "npx rimraf dist && npx vite build"
|
|
},
|
|
"keywords": [
|
|
"twenty",
|
|
"cli",
|
|
"sdk",
|
|
"crm",
|
|
"application",
|
|
"development"
|
|
],
|
|
"exports": {
|
|
".": {
|
|
"types": "./dist/index.d.ts",
|
|
"import": "./dist/index.mjs",
|
|
"require": "./dist/index.cjs"
|
|
}
|
|
},
|
|
"license": "AGPL-3.0",
|
|
"dependencies": {
|
|
"@genql/cli": "^3.0.3",
|
|
"@sniptt/guards": "^0.2.0",
|
|
"archiver": "^7.0.1",
|
|
"axios": "^1.6.0",
|
|
"chalk": "^5.3.0",
|
|
"chokidar": "^4.0.0",
|
|
"commander": "^12.0.0",
|
|
"dotenv": "^16.4.0",
|
|
"fast-glob": "^3.3.0",
|
|
"fs-extra": "^11.2.0",
|
|
"graphql": "^16.8.1",
|
|
"graphql-sse": "^2.5.4",
|
|
"inquirer": "^10.0.0",
|
|
"jiti": "^2.0.0",
|
|
"jsonc-parser": "^3.2.0",
|
|
"lodash.camelcase": "^4.3.0",
|
|
"lodash.capitalize": "^4.2.1",
|
|
"lodash.kebabcase": "^4.1.1",
|
|
"lodash.startcase": "^4.4.0",
|
|
"typescript": "^5.9.2",
|
|
"uuid": "^13.0.0",
|
|
"vite": "^7.0.0",
|
|
"vite-tsconfig-paths": "^4.2.1"
|
|
},
|
|
"devDependencies": {
|
|
"@types/archiver": "^6.0.0",
|
|
"@types/fs-extra": "^11.0.0",
|
|
"@types/inquirer": "^9.0.0",
|
|
"@types/jest": "^29.5.0",
|
|
"@types/lodash.camelcase": "^4.3.7",
|
|
"@types/lodash.capitalize": "^4",
|
|
"@types/lodash.kebabcase": "^4.1.7",
|
|
"@types/lodash.startcase": "^4",
|
|
"@types/node": "^24.0.0",
|
|
"@types/react": "^19.0.2",
|
|
"jest": "^29.5.0",
|
|
"tsx": "^4.7.0",
|
|
"vite-plugin-dts": "^4.5.4",
|
|
"wait-on": "^7.2.0"
|
|
},
|
|
"engines": {
|
|
"node": "^24.5.0",
|
|
"yarn": "^4.0.2"
|
|
},
|
|
"typesVersions": {
|
|
"*": {}
|
|
}
|
|
}
|