twenty/.github
Paul Rastoin 052aecccc7
Refactor dependency graph for SDK, client-sdk and create-app (#18963)
## Summary

### Externalize `twenty-client-sdk` from `twenty-sdk`

Previously, `twenty-client-sdk` was listed as a `devDependency` of
`twenty-sdk`, which caused Vite to bundle it inline into the dist
output. This meant end-user apps had two copies of `twenty-client-sdk`:
one hidden inside `twenty-sdk`'s bundle, and one installed explicitly in
their `node_modules`. These copies could drift apart since they weren't
guaranteed to be the same version.

**Change:** Moved `twenty-client-sdk` from `devDependencies` to
`dependencies` in `twenty-sdk/package.json`. Vite's `external` function
now recognizes it and keeps it as an external `require`/`import` in the
dist output. End users get a single deduplicated copy resolved by their
package manager.

### Externalize `twenty-sdk` from `create-twenty-app`

Similarly, `create-twenty-app` had `twenty-sdk` as a `devDependency`
(bundled inline). After refactoring `create-twenty-app` to
programmatically import operations from `twenty-sdk` (instead of
shelling out via `execSync`), it became a proper runtime dependency.

**Change:** Moved `twenty-sdk` from `devDependencies` to `dependencies`
in `create-twenty-app/package.json`.

### Switch E2E CI to `yarn npm publish`

The `workspace:*` protocol in `dependencies` is a Yarn-specific feature.
`npm publish` publishes it as-is (which breaks for consumers), while
`yarn npm publish` automatically replaces `workspace:*` with the
resolved version at publish time (e.g., `workspace:*` becomes `=1.2.3`).

**Change:** Replaced `npm publish` with `yarn npm publish` in
`.github/workflows/ci-create-app-e2e.yaml`.

### Replace `execSync` with programmatic SDK calls in
`create-twenty-app`

`create-twenty-app` was shelling out to `yarn twenty remote add` and
`yarn twenty server start` via `execSync`, which assumed the `twenty`
binary was already installed in the scaffolded app. This was fragile and
created an implicit circular dependency.

**Changes:**
- Replaced `execSync('yarn twenty remote add ...')` with a direct call
to `authLoginOAuth()` from `twenty-sdk/cli`
- Replaced `execSync('yarn twenty server start')` with a direct call to
`serverStart()` from `twenty-sdk/cli`
- Deleted the duplicated `setup-local-instance.ts` from
`create-twenty-app`

### Centralize `serverStart` as a dedicated operation

The Docker server start logic was previously inline in the `server
start` CLI command handler (`server.ts`), and `setup-local-instance.ts`
was shelling out to `yarn twenty server start` to invoke it -- meaning
`twenty-sdk` was calling itself via a child process.

**Changes:**
- Extracted the Docker container management logic into a new
`serverStart` operation (`cli/operations/server-start.ts`)
- Merged the detect-or-start flow from `setup-local-instance.ts` into
`serverStart` (detect across multiple ports, start Docker if needed,
poll for health)
- Deleted `setup-local-instance.ts` from `twenty-sdk`
- Added `onProgress` callback (consistent with other operations like
`appBuild`) instead of direct `console.log` calls
- Both the `server start` CLI command and `create-twenty-app` now call
`serverStart()` programmatically

related to https://github.com/twentyhq/twenty-infra/pull/525
2026-03-26 10:56:52 +00:00
..
actions Refactor twenty client sdk provisioning for logic function and front-component (#18544) 2026-03-24 18:10:25 +00:00
ISSUE_TEMPLATE Prepare field option dropdown for RecordField usage (#13935) 2025-08-18 10:34:12 +02:00
vale-styles Fix Vale CI and change vision (#4724) 2024-04-01 11:39:04 +02:00
workflows Refactor dependency graph for SDK, client-sdk and create-app (#18963) 2026-03-26 10:56:52 +00:00
CLA.md Remove CLA Assistant (#2479) 2023-11-13 16:09:59 +01:00
CODE_OF_CONDUCT.md add contibuting_example.md (#6998) 2024-09-12 12:31:34 +02:00
CONTRIBUTING.md Fix markdown link formatting in CONTRIBUTING.md (#16176) 2025-11-28 13:53:45 +01:00
crowdin-app.yml fix: add base_path to Crowdin configs for correct path resolution (#17196) 2026-01-16 16:54:40 +01:00
crowdin-docs.yml fix: add base_path to Crowdin configs for correct path resolution (#17196) 2026-01-16 16:54:40 +01:00
dependabot.yml Exclude community apps from Dependabot scanning (#17345) 2026-01-22 14:47:21 +01:00
release-drafter.yml feat(ci): add release drafter (#4970) 2024-04-15 20:09:06 +02:00
SECURITY.md changes as per vale warnings (#2353) 2023-11-07 11:39:29 +01:00
vale.ini chore: cleanup repository root structure (#17147) 2026-01-14 12:56:30 +00:00
verdaccio-config.yaml Refactor twenty client sdk provisioning for logic function and front-component (#18544) 2026-03-24 18:10:25 +00:00