twenty 2.58.0 → 2.60.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (140) hide show
  1. package/CONTRIBUTING.md +82 -54
  2. package/README.md +35 -22
  3. package/dist/app-template/.nvmrc +1 -1
  4. package/dist/app-template/example/files/README.md +20 -4
  5. package/dist/app-template/example/files/github/workflows/publish.yml +1 -1
  6. package/dist/app-template/example/files/src/default-role.ts +6 -4
  7. package/dist/app-template/yarn.lock +181 -118
  8. package/dist/app-worker.cjs +1 -1
  9. package/dist/chunks/{cli-version.constant-jomCqLLP.cjs → AssetDirectory-c_JEwMr2.cjs} +1 -1
  10. package/dist/chunks/application-source-globs-FUknjGdt.cjs +1 -0
  11. package/dist/chunks/{build-source-manifest-DcRIFlDb.cjs → build-source-manifest-CiNlHV98.cjs} +1 -1
  12. package/dist/chunks/build-source-snapshot-Dchjr_ga.cjs +898 -0
  13. package/dist/chunks/cli-version.constant-B200rijQ.cjs +1 -0
  14. package/dist/chunks/compile-application-translations-roDnPf1t.cjs +58 -0
  15. package/dist/chunks/create-metadata-client-DVQbIGNu.cjs +6 -0
  16. package/dist/chunks/create-pull-base-write-CX8xZhMz.cjs +1 -0
  17. package/dist/chunks/{create-rest-client-CMUss3u-.cjs → create-rest-client-HbzXSfhZ.cjs} +1 -1
  18. package/dist/chunks/extract-manifest-from-file-CaWVLmLU.cjs +1 -0
  19. package/dist/chunks/{extract-source-translations--J7rPcdh.cjs → extract-source-translations-CBveJ4xT.cjs} +1 -1
  20. package/dist/chunks/{fetch-metadata-inspection-LB3RA2cV.cjs → fetch-metadata-inspection-yvVdh4oY.cjs} +1 -1
  21. package/dist/chunks/{fetch-signed-in-identity-GVHuJKXy.cjs → fetch-signed-in-identity-B6fnxBHj.cjs} +1 -1
  22. package/dist/chunks/fetch-workspace-or-throw-C6tCV0YH.cjs +1 -0
  23. package/dist/chunks/{get-client-generation-skip-reason-CkpxXdRw.cjs → get-client-generation-skip-reason-CFgiU52t.cjs} +1 -1
  24. package/dist/chunks/get-mismatched-remote-url-D5jFYvVx.cjs +1 -0
  25. package/dist/chunks/global-flags.constant-Celofkx1.cjs +1 -0
  26. package/dist/chunks/{is-exported-manifest-DRPkDqYh.cjs → is-exported-manifest-C4lO285q.cjs} +1 -1
  27. package/dist/chunks/{is-valid-package-name-Bv-sKHlR.cjs → is-valid-package-name-zAWZPNrj.cjs} +1 -1
  28. package/dist/chunks/isRestorableApplicationSourcePath-Du_zM55R.cjs +1 -0
  29. package/dist/chunks/isValidUuid-D3NV1xmO.cjs +1 -0
  30. package/dist/chunks/{metadata-page.constant-Bt8myt0X.cjs → metadata-page.constant-D4-pGQWp.cjs} +1 -1
  31. package/dist/chunks/parse-app-export-BsxpQED7.cjs +1 -0
  32. package/dist/chunks/{parse-graphql-response-D3WfxVAu.cjs → parse-graphql-response-Cl8_fBgo.cjs} +1 -1
  33. package/dist/chunks/proxy-header-environment-variable.constant-CJyhJMve.cjs +1 -0
  34. package/dist/chunks/pull-minimum-sdk-version.constant-BTfcyhwh.cjs +6 -0
  35. package/dist/chunks/pull-source-CIsoJ2eR.cjs +1 -0
  36. package/dist/chunks/{read-app-identity-DyMNXRhZ.cjs → read-app-identity-Cny6sAGs.cjs} +1 -1
  37. package/dist/chunks/{read-application-identifier-hrv6xLTN.cjs → read-application-identifier-DcBW74TB.cjs} +1 -1
  38. package/dist/chunks/read-application-identity-BrtopaMa.cjs +1 -0
  39. package/dist/chunks/read-command-values-l5T9Lba4.cjs +1 -0
  40. package/dist/chunks/read-infer-deletion-option-D1HMBsfw.cjs +8 -0
  41. package/dist/chunks/{read-local-container-DsjjrgOn.cjs → read-local-container-Cs3cWspd.cjs} +1 -1
  42. package/dist/chunks/read-snapshot-file-Dxla2ete.cjs +1 -0
  43. package/dist/chunks/{read-source-identity-CXzcnYKk.cjs → read-source-identity-CnPDqB6X.cjs} +1 -1
  44. package/dist/chunks/record-pull-base-Dz4BldQf.cjs +1 -0
  45. package/dist/chunks/request-oauth-tokens-_Xwy2q9c.cjs +1 -0
  46. package/dist/chunks/resolve-command-target-QjBwHpMj.cjs +1 -0
  47. package/dist/chunks/{resolve-metadata-object-CN7eAeDR.cjs → resolve-metadata-object-7DhvIcEm.cjs} +1 -1
  48. package/dist/chunks/resolve-proxy-headers-DipR9jft.cjs +1 -0
  49. package/dist/chunks/resolve-request-url-CfvGDGkw.cjs +1 -0
  50. package/dist/chunks/{run-api-graphql-command-x0ynMacW.cjs → run-api-graphql-command-ELrIPdM5.cjs} +1 -1
  51. package/dist/chunks/{run-api-rest-command-p5A2Fb05.cjs → run-api-rest-command-COVnszcN.cjs} +1 -1
  52. package/dist/chunks/{run-app-add-command-oHIkbKe1.cjs → run-app-add-command-b9sm20rn.cjs} +2 -2
  53. package/dist/chunks/{run-app-apply-command-Ww_5FeZf.cjs → run-app-apply-command-CCsvdn3A.cjs} +2 -2
  54. package/dist/chunks/{run-app-build-command-DpgKL1XF.cjs → run-app-build-command-Daxe8O14.cjs} +1 -1
  55. package/dist/chunks/{run-app-dev-command-DVOvwZdx.cjs → run-app-dev-command-BPwltUcL.cjs} +2 -2
  56. package/dist/chunks/{run-app-exec-command-Cly1JhuE.cjs → run-app-exec-command-BMhrv7YU.cjs} +2 -2
  57. package/dist/chunks/{run-app-generate-client-command-CVwOI5-n.cjs → run-app-generate-client-command-Z-2bRkaH.cjs} +1 -1
  58. package/dist/chunks/{run-app-init-command-DdSdOmo5.cjs → run-app-init-command-B6npylwO.cjs} +2 -2
  59. package/dist/chunks/{run-app-install-command-zs9OY8uz.cjs → run-app-install-command-DqPQXj09.cjs} +1 -1
  60. package/dist/chunks/run-app-logs-command-CaLIVesh.cjs +8 -0
  61. package/dist/chunks/{run-app-operation-CBy4X1VK.cjs → run-app-operation-D_zIxvuw.cjs} +1 -1
  62. package/dist/chunks/{run-app-plan-command-Cuz9v8Db.cjs → run-app-plan-command-pc6mp7th.cjs} +1 -1
  63. package/dist/chunks/run-app-publish-command-CflX1x0o.cjs +1 -0
  64. package/dist/chunks/run-app-pull-command-PCMBNH6R.cjs +6 -0
  65. package/dist/chunks/{run-app-translations-extract-command-BZEJppmw.cjs → run-app-translations-extract-command-CGIFvpC1.cjs} +1 -1
  66. package/dist/chunks/{run-app-typecheck-command-BHFWyv_1.cjs → run-app-typecheck-command-DnCMdagB.cjs} +1 -1
  67. package/dist/chunks/{run-app-uninstall-command-DvBgm_4t.cjs → run-app-uninstall-command-DWXEgVKe.cjs} +1 -1
  68. package/dist/chunks/run-auth-login-command-DKCO9bot.cjs +1 -0
  69. package/dist/chunks/{run-auth-logout-command-BMpq04ml.cjs → run-auth-logout-command-hvi_HvpQ.cjs} +1 -1
  70. package/dist/chunks/{run-auth-status-command-2Xrg0AoZ.cjs → run-auth-status-command-0vh-ENNj.cjs} +1 -1
  71. package/dist/chunks/{run-cli-BoGVmb1j.cjs → run-cli-BG3itvCe.cjs} +1 -1
  72. package/dist/chunks/{run-commands-command-DZkaWdQm.cjs → run-commands-command-CJ7qNty3.cjs} +1 -1
  73. package/dist/chunks/run-data-export-command-DqyztEHe.cjs +3 -0
  74. package/dist/chunks/run-data-get-command-D7_BdNBa.cjs +1 -0
  75. package/dist/chunks/{run-data-list-command-CVubWAFh.cjs → run-data-list-command-ZIpyFE04.cjs} +1 -1
  76. package/dist/chunks/run-doctor-command-CgWSXl7H.cjs +2 -0
  77. package/dist/chunks/{run-local-logs-command-CkZln0BN.cjs → run-local-logs-command-COsSRk3f.cjs} +1 -1
  78. package/dist/chunks/{run-local-reset-command-B5UrKkAf.cjs → run-local-reset-command-m0x-EiA6.cjs} +1 -1
  79. package/dist/chunks/run-local-start-command-B8N5Jgjd.cjs +1 -0
  80. package/dist/chunks/{run-local-status-command-E3cpSfTu.cjs → run-local-status-command-BYxy0R9I.cjs} +1 -1
  81. package/dist/chunks/{run-local-stop-command-Cr3oAzQ9.cjs → run-local-stop-command-D66F73fW.cjs} +1 -1
  82. package/dist/chunks/{run-local-upgrade-command-Ch5AvQjt.cjs → run-local-upgrade-command-6P71bQw6.cjs} +1 -1
  83. package/dist/chunks/{run-metadata-field-describe-command-Bof9tzyG.cjs → run-metadata-field-describe-command-DZBqoC6c.cjs} +1 -1
  84. package/dist/chunks/{run-metadata-field-list-command-C2AxyLJH.cjs → run-metadata-field-list-command-3pXf6DzX.cjs} +1 -1
  85. package/dist/chunks/{run-metadata-object-describe-command-CEh8rVCs.cjs → run-metadata-object-describe-command-Dpmt4WVc.cjs} +1 -1
  86. package/dist/chunks/{run-metadata-object-list-command-4qWTuJlm.cjs → run-metadata-object-list-command-B2PTelCt.cjs} +1 -1
  87. package/dist/chunks/{run-open-command-BWRHlLfS.cjs → run-open-command-B4YhDwqh.cjs} +1 -1
  88. package/dist/chunks/{run-remote-remove-command-Dc0XJydM.cjs → run-remote-remove-command-DgSQvjeN.cjs} +1 -1
  89. package/dist/chunks/{run-remote-rename-command-3AzuENYT.cjs → run-remote-rename-command--37-GTRY.cjs} +1 -1
  90. package/dist/chunks/{run-remote-use-command-BKVP65QI.cjs → run-remote-use-command-B6obKSPB.cjs} +1 -1
  91. package/dist/chunks/{run-version-command-BZ_R0Tss.cjs → run-version-command-YPMJadrD.cjs} +1 -1
  92. package/dist/chunks/{sign-in-to-remote-again-DN6ov5o2.cjs → sign-in-to-remote-again-D9amgIOZ.cjs} +1 -1
  93. package/dist/chunks/{sign-in-with-browser-DXd6hkJk.cjs → sign-in-with-browser-TQANmPyb.cjs} +2 -2
  94. package/dist/chunks/standard-object-fields.constant-jQV_KO0f.cjs +1 -0
  95. package/dist/chunks/subscribe-graphql-w-Ar4hCj.cjs +2 -0
  96. package/dist/chunks/to-worker-output-diagnostics-w1hZPfn0.cjs +2 -0
  97. package/dist/chunks/{wait-for-local-environment-BmOFeICJ.cjs → wait-for-local-environment-zNEJcWA1.cjs} +1 -1
  98. package/dist/cli.cjs +1 -1
  99. package/docs/commands.md +878 -233
  100. package/package.json +3 -2
  101. package/src/app/README.md +15 -10
  102. package/src/app/add/README.md +75 -51
  103. package/src/app/bundles/README.md +63 -33
  104. package/src/app/client/README.md +23 -21
  105. package/src/app/dev/README.md +30 -16
  106. package/src/app/exec/README.md +61 -41
  107. package/src/app/function-logs/README.md +49 -32
  108. package/src/app/manifest/README.md +31 -25
  109. package/src/app/pull/README.md +207 -21
  110. package/src/app/source/README.md +67 -14
  111. package/src/app/typecheck/README.md +29 -24
  112. package/dist/chunks/FileFolder-BmCXp_bX.cjs +0 -1
  113. package/dist/chunks/build-source-snapshot-C0UVzVTo.cjs +0 -897
  114. package/dist/chunks/compile-application-translations-Da3xWXl-.cjs +0 -58
  115. package/dist/chunks/create-metadata-client-oO0QvH6j.cjs +0 -6
  116. package/dist/chunks/create-pull-base-write-CQHTbtQP.cjs +0 -1
  117. package/dist/chunks/extract-manifest-from-file-DPDIhnyg.cjs +0 -1
  118. package/dist/chunks/fetch-workspace-or-throw-CGlqJOIG.cjs +0 -1
  119. package/dist/chunks/global-flags.constant-DooTv_Uq.cjs +0 -1
  120. package/dist/chunks/list-application-source-files-jEau5Rie.cjs +0 -1
  121. package/dist/chunks/parse-app-export-CmFKsj2e.cjs +0 -1
  122. package/dist/chunks/pull-minimum-sdk-version.constant-0v8yv93F.cjs +0 -6
  123. package/dist/chunks/pull-source-C6LiDOqa.cjs +0 -1
  124. package/dist/chunks/read-application-identity-CyVawH0m.cjs +0 -1
  125. package/dist/chunks/read-command-values-rGaU2qHz.cjs +0 -1
  126. package/dist/chunks/read-infer-deletion-option-Br1FJCfZ.cjs +0 -8
  127. package/dist/chunks/read-snapshot-file-D-s1kuCP.cjs +0 -1
  128. package/dist/chunks/record-pull-base-BZ6YgdEp.cjs +0 -1
  129. package/dist/chunks/request-oauth-tokens-B4JHBmVU.cjs +0 -1
  130. package/dist/chunks/resolve-command-target-CwC9p_NB.cjs +0 -1
  131. package/dist/chunks/resolve-request-url-BzW185lE.cjs +0 -1
  132. package/dist/chunks/run-app-logs-command-CnW8I5a0.cjs +0 -9
  133. package/dist/chunks/run-app-publish-command-DACw_WFa.cjs +0 -1
  134. package/dist/chunks/run-app-pull-command-CNbC_iZs.cjs +0 -6
  135. package/dist/chunks/run-auth-login-command-DmnIxGG3.cjs +0 -1
  136. package/dist/chunks/run-data-get-command-BE6hUvWQ.cjs +0 -1
  137. package/dist/chunks/run-doctor-command-OCHUN5AA.cjs +0 -2
  138. package/dist/chunks/run-local-start-command-Cp8nzjc6.cjs +0 -1
  139. package/dist/chunks/standard-object-fields.constant-2yLND0Cg.cjs +0 -1
  140. package/dist/chunks/to-worker-output-diagnostics-DlISjOqp.cjs +0 -2
package/CONTRIBUTING.md CHANGED
@@ -15,6 +15,8 @@ yarn nx lint twenty-cli
15
15
  yarn exec tsgo -p packages/twenty-cli/tsconfig.json --noEmit
16
16
  ```
17
17
 
18
+ ### Run tests
19
+
18
20
  Tests that use real applications or SDK parity references require the repository
19
21
  SDK to be built. Its Nx target builds its dependencies:
20
22
 
@@ -27,13 +29,16 @@ yarn exec vitest run --maxWorkers=2
27
29
  For a focused change, pass its test file or directory to `vitest run`. Command
28
30
  tests execute the public command runner with local HTTP fixtures. Worker tests
29
31
  exercise subprocess output, cancellation and snapshot lifetime. Parity suites
30
- compare generated source and artifacts against the SDK implementation;
31
- the SDK is a test reference, not a runtime tooling dependency.
32
+ compare generated source and artifacts against the SDK implementation; the SDK
33
+ is a test reference, not a runtime tooling dependency.
34
+
35
+ ### Avoid stale build results
32
36
 
33
- Rebuild `twenty-shared` with `--skip-nx-cache` after switching branches or changing
34
- shared exports. Generated `dist` directories are not tracked, and stale outputs
35
- can invalidate dependent test and typecheck results. Use the direct TypeScript
36
- command above when checking a fix rather than relying on an Nx cache hit.
37
+ Rebuild `twenty-shared` with `--skip-nx-cache` after switching branches or
38
+ changing shared exports. Generated `dist` directories are not tracked, and stale
39
+ outputs can invalidate dependent test and typecheck results. Use the direct
40
+ TypeScript command above when checking a fix rather than relying on an Nx cache
41
+ hit.
37
42
 
38
43
  No live workspace is required for the unit suite. Passing it does not establish
39
44
  live authorization, remote upload or server-version compatibility. Exercise
@@ -41,19 +46,19 @@ changed server workflows against a disposable workspace when appropriate.
41
46
 
42
47
  ## Package map
43
48
 
44
- | Location | Responsibility |
45
- | --- | --- |
46
- | `src/catalog` | Command definitions, topics and lazy handler loading |
47
- | `src/commands` | Command orchestration and user-visible results |
48
- | `src/program` | Argument parsing, target setup, interaction and command lifecycle |
49
- | `src/config`, `src/target`, `src/oauth` | Saved connections, target selection and authentication |
50
- | `src/transport` | HTTP/GraphQL requests, proxy routing, limits and cancellation |
51
- | `src/metadata`, `src/data` | Workspace metadata inspection and record reads |
52
- | `src/local` | Local development instance lifecycle, Docker subprocesses, image selection and readiness |
53
- | `src/doctor` | Read-only setup and connection diagnostics |
54
- | `src/app` | Project tooling and application lifecycle, see its [module map](src/app/README.md) |
55
- | `src/input`, `src/output` | Input parsing, human/JSON/NDJSON output and error contracts |
56
- | `app-template` | App source, configuration and CLI-based integration-test harness copied by `app init` |
49
+ | Location | Responsibility |
50
+ | --------------------------------------- | ---------------------------------------------------------------------------------------- |
51
+ | `src/catalog` | Command definitions, topics and lazy handler loading |
52
+ | `src/commands` | Command orchestration and user-visible results |
53
+ | `src/program` | Argument parsing, target setup, interaction and command lifecycle |
54
+ | `src/config`, `src/target`, `src/oauth` | Saved connections, target selection and authentication |
55
+ | `src/transport` | HTTP/GraphQL requests, proxy routing, limits and cancellation |
56
+ | `src/metadata`, `src/data` | Workspace metadata inspection and record reads |
57
+ | `src/local` | Local development instance lifecycle, Docker subprocesses, image selection and readiness |
58
+ | `src/doctor` | Read-only setup and connection diagnostics |
59
+ | `src/app` | Project tooling and application lifecycle, see its [module map](src/app/README.md) |
60
+ | `src/input`, `src/output` | Input parsing, human/JSON/NDJSON output and error contracts |
61
+ | `app-template` | App source, configuration and CLI-based integration-test harness copied by `app init` |
57
62
 
58
63
  Command definitions are the source for help and `twenty commands`. Keep handlers
59
64
  lazy so discovery does not load compiler or app code. Put a workflow's rules in
@@ -86,35 +91,45 @@ Changes must preserve these contracts:
86
91
  ## Packaging
87
92
 
88
93
  Vite builds the CLI, its worker and lazy chunks into `dist`. It also copies the
89
- CLI-owned `app-template` there. Chokidar,
90
- esbuild, tinyglobby and the CLI's TypeScript parser are runtime dependencies;
91
- other imported libraries are bundled. The parser is separate from the app's
92
- compiler used for typechecking.
94
+ CLI-owned `app-template` there. Chokidar, esbuild, tinyglobby and the CLI's
95
+ TypeScript parser are runtime dependencies; other imported libraries are
96
+ bundled. The parser is separate from the app's compiler used for typechecking.
93
97
 
94
98
  The archive includes the command reference, contributor guide and application
95
99
  module READMEs so their relative links also work outside a repository checkout.
96
100
  It does not include the CLI's TypeScript implementation or tests.
97
101
 
102
+ ### Verify an installed package
103
+
98
104
  For packaging changes, run the build and installation checks:
99
105
 
100
106
  ```bash
101
107
  yarn nx run twenty-cli:test:package
102
108
  ```
103
109
 
104
- This runs the binary declared in the workspace's `package.json` directly, packs
105
- the CLI, and installs the archive with only its production dependencies in a
106
- temporary directory outside the monorepo. It checks help, offline doctor, app initialization including the
107
- integration-test harness, and a compiler diagnostic from the installed worker. npm
108
- registry access is required for installation; the commands do not contact a
109
- Twenty workspace. Temporary files are removed afterward, and nothing is
110
- published. CI runs the same target for CLI and dependency changes.
110
+ The package checks:
111
+
112
+ 1. Run the binary declared in the workspace's `package.json`.
113
+ 2. Pack the CLI and install the archive with production dependencies only, in a
114
+ temporary directory outside the monorepo.
115
+ 3. Check help, offline doctor, app initialization (including the
116
+ integration-test harness), and a compiler diagnostic from the installed
117
+ worker.
118
+
119
+ Installation requires npm registry access. These commands do not contact a
120
+ Twenty workspace or publish anything. Temporary files are removed afterward. CI
121
+ runs the same target for CLI and dependency changes.
122
+
123
+ ### Verify app publishing
111
124
 
112
125
  The CLI CI job also runs `scripts/test-app-publish.mjs` after building the CLI
113
126
  and SDK. It starts a disposable Verdaccio registry with no upstream registries,
114
- publishes a fixture with real npm, downloads and inspects the tarball, and checks
115
- version rejection, incomplete packages and cleanup. On Linux CI the test runs
116
- inside a network namespace with only loopback enabled, so it cannot reach public
117
- npm. It uses temporary npm configuration and a local test token.
127
+ publishes a fixture with real npm, downloads and inspects the tarball, and
128
+ checks version rejection, incomplete packages and cleanup.
129
+
130
+ On Linux CI the test runs inside a network namespace with only loopback enabled,
131
+ so it cannot reach public npm. It uses temporary npm configuration and a local
132
+ test token.
118
133
 
119
134
  ## Releases
120
135
 
@@ -123,39 +138,50 @@ require a CLI release; skip versions when the CLI has no changes worth shipping.
123
138
  When publishing, aim to align the CLI version with the corresponding Twenty
124
139
  server, SDK and UI version.
125
140
 
141
+ ### Release tags
142
+
126
143
  Publishing is independent through the `cli/` tag family: `cli/v2.46.0` publishes
127
144
  only `twenty@2.46.0`. The tag version must match
128
145
  `packages/twenty-cli/package.json`. Bumping the package version alone does not
129
146
  publish the CLI.
130
147
 
148
+ ### Choose the release commit
149
+
131
150
  `app init` pins `twenty-client-sdk`, `twenty-sdk` and `twenty-ui` to the
132
- `twenty-sdk` version of the commit the CLI was built from. `main` moves
133
- to the next, unpublished SDK version right after each SDK release:
151
+ `twenty-sdk` version of the commit the CLI was built from. `main` moves to the
152
+ next, unpublished SDK version right after each SDK release:
134
153
 
135
- 1. Start from the matching `sdk/vA.B.C` release commit. If a CLI version bump
136
- is still needed, make it on a branch from that commit.
154
+ 1. Start from the matching `sdk/vA.B.C` release commit. If a CLI version bump is
155
+ still needed, make it on a branch from that commit.
137
156
  2. Once the SDK, client SDK and UI packages at `A.B.C` are on npm, tag the
138
157
  prepared commit `cli/vA.B.C`.
139
158
  3. Run the `Publish npm packages` workflow in `twenty-infra` with that tag as
140
159
  its `ref`. Creating the tag alone does not publish the package.
141
160
 
161
+ ### Prepublish checks
162
+
142
163
  `yarn npm publish` first runs `scripts/prepublish.mjs`, which needs a fresh
143
164
  build and npm registry access. It checks the build first, and fails when the
144
165
  executable, worker, lazy chunks or templates are missing, when `dist` was built
145
166
  for another version, when one of its CLI runs fails or times out, or when
146
- `app init` would pin versions that are not on npm. An unreachable registry is
147
- reported separately from a missing version. The check does not read tags: it
148
- confirms that the pinned versions are published. Selecting the matching SDK
149
- release remains a release step.
167
+ `app init` would pin versions that are not on npm.
168
+
169
+ An unreachable registry is reported separately from a missing version. The check
170
+ does not read tags: it confirms that the pinned versions are published.
171
+ Selecting the matching SDK release remains a release step.
172
+
173
+ ### Template lockfile
150
174
 
151
175
  Once the check passes, the script resolves the built app template's
152
176
  dependencies, with the versions that `app init` pinned during the check, using
153
- the repository's Yarn against the public registry, under a 3-day minimum
154
- release age that exempts the pinned Twenty packages. It then writes
155
- `dist/app-template/yarn.lock`. Apps created with `app init` then install exact,
156
- integrity-checked versions, including for people who enforce a minimum release
157
- age. The lockfile keeps the template's placeholder name, and the first
158
- `yarn install` renames that root entry.
177
+ the repository's Yarn against the public registry, under a 3-day minimum release
178
+ age that exempts the pinned Twenty packages. It then writes
179
+ `dist/app-template/yarn.lock`.
180
+
181
+ Apps created with `app init` then install exact, integrity-checked versions,
182
+ including for people who enforce a minimum release age. The lockfile keeps the
183
+ template's placeholder name, and the first `yarn install` renames that root
184
+ entry.
159
185
 
160
186
  The tests of both steps run with `twenty-cli:test:package`. To run the script
161
187
  before tagging:
@@ -171,9 +197,11 @@ node packages/twenty-cli/scripts/prepublish.mjs
171
197
  `app-template/example/files/` and `example/scripts.json` onto it; `app pull`
172
198
  uses only the shared scaffold before writing the exported definitions.
173
199
 
174
- `app-template/example/files/src/__tests__` supplies the integration-test setup for CLI-created apps.
175
- It deploys the app before tests and uninstalls it afterward by invoking the
176
- installed CLI with `--json`. Apps invoke the executable rather than import the
177
- CLI as a library or add it as a dependency. See the
178
- [template contract](docs/commands.md#create-an-app) for executable selection and
179
- the [compiler requirements](src/app/typecheck/README.md) for project setup.
200
+ `app-template/example/files/src/__tests__` supplies the integration-test setup
201
+ for CLI-created apps. It deploys the app before tests and uninstalls it
202
+ afterward by invoking the installed CLI with `--json`. Apps invoke the
203
+ executable rather than import the CLI as a library or add it as a dependency.
204
+
205
+ See the [template contract](docs/commands.md#create-an-app) for executable
206
+ selection and the [compiler requirements](src/app/typecheck/README.md) for
207
+ project setup.
package/README.md CHANGED
@@ -1,7 +1,8 @@
1
1
  # Twenty CLI
2
2
 
3
- Work with [Twenty](https://twenty.com) from your terminal: connect to workspaces,
4
- inspect metadata and records, send API requests, and develop applications.
3
+ Work with [Twenty](https://twenty.com) from your terminal: connect to
4
+ workspaces, inspect metadata and records, send API requests, and develop
5
+ applications.
5
6
 
6
7
  ## Install
7
8
 
@@ -47,21 +48,31 @@ twenty app apply --create
47
48
  twenty app dev
48
49
  ```
49
50
 
50
- `app init` writes files without installing dependencies. `app build` checks the
51
- project locally. `app apply --create` registers and installs a new development
52
- app, uploads its build and synchronizes its metadata. Once registered, inspect
53
- changes with `twenty app plan` before applying them. `app dev` watches inputs and
54
- syncs successful builds.
51
+ | Command | What it does |
52
+ | -------------------- | ------------------------------------------------------------------------------------- |
53
+ | `app init` | Write project files without installing dependencies |
54
+ | `app build` | Check and build the project locally |
55
+ | `app apply --create` | Register and install a new development app, upload its build and synchronize metadata |
56
+ | `app plan` | Inspect changes before applying an already registered app |
57
+ | `app dev` | Watch inputs and sync successful builds |
55
58
 
56
- Missing definitions imply remote deletions by default. Pass `--no-prune` to
57
- preserve them. The workspace custom application only deletes them with `--prune`. Object and field deletions require confirmation because they
58
- also delete stored data. Pull can overwrite local edits; read its
59
- [reconciliation rules](docs/commands.md#pull-an-app) before using it.
59
+ ### Review changes before syncing
60
+
61
+ - Missing definitions imply remote deletions by default. Use `--no-prune` to
62
+ preserve them.
63
+ - The workspace custom application deletes missing definitions only with
64
+ `--prune`.
65
+ - Object and field deletions require confirmation because they also delete data.
66
+ - Pull can overwrite local edits. Read the
67
+ [reconciliation rules](docs/commands.md#local-changes-and-deletions) first.
68
+
69
+ ### Version and authentication requirements
60
70
 
61
71
  Apps created with `app init` declare the oldest Twenty version they support in
62
72
  `engines.twenty`. `app exec` runs functions as the signed-in user, so it needs a
63
- browser sign-in and Twenty 2.46 or later. With a browser sign-in, `app uninstall`
64
- also needs Twenty 2.46 or later; on earlier versions, use an API key for it.
73
+ browser sign-in and Twenty 2.46 or later. With a browser sign-in,
74
+ `app uninstall` also needs Twenty 2.46 or later; on earlier versions, use an API
75
+ key for it.
65
76
 
66
77
  ## CLI and app dependencies
67
78
 
@@ -71,18 +82,20 @@ checks, and `twenty-client-sdk` when they use a generated API client. Neither
71
82
  apps nor SDK packages need `twenty` in their dependencies or devDependencies. In
72
83
  CI, install a pinned version with `npm install -g twenty@<version>`.
73
84
 
74
- The CLI owns builds and filesystem operations. It uses the app's installed
75
- SDK authoring exports and TypeScript compiler. Configuration and project-reference
76
- errors fail builds. See [build requirements](docs/commands.md#build-and-check-an-app)
77
- for supported SDK exports and compiler configuration.
85
+ The CLI owns builds and filesystem operations. It uses the app's installed SDK
86
+ authoring exports and TypeScript compiler. Configuration and project-reference
87
+ errors fail builds. See
88
+ [build requirements](docs/commands.md#build-and-check-an-app) for supported SDK
89
+ exports and compiler configuration.
78
90
 
79
91
  ## Documentation
80
92
 
81
- - [Command reference](docs/commands.md), authentication, flags, output, permissions
82
- and recovery for each workflow.
83
- - [Contributing](CONTRIBUTING.md), building from source, package structure, tests
84
- and releases.
85
- - [Application tooling](src/app/README.md), module responsibilities and invariants.
93
+ - [Command reference](docs/commands.md), authentication, flags, output,
94
+ permissions and recovery for each workflow.
95
+ - [Contributing](CONTRIBUTING.md), building from source, package structure,
96
+ tests and releases.
97
+ - [Application tooling](src/app/README.md), module responsibilities and
98
+ invariants.
86
99
 
87
100
  Run `twenty commands` for the command inventory or `twenty <command> --help` for
88
101
  its arguments and options.
@@ -1 +1 @@
1
- 24.5.0
1
+ 26.13.1
@@ -16,12 +16,28 @@ Setup instructions live in [SETUP.md](SETUP.md).
16
16
 
17
17
  ## Publishing
18
18
 
19
- The `Publish` workflow (`.github/workflows/publish.yml`) publishes the app to npm with provenance using [npm trusted publishing](https://docs.npmjs.com/trusted-publishers). To publish:
19
+ The `Publish` workflow (`.github/workflows/publish.yml`) publishes to npm with
20
+ provenance using
21
+ [npm trusted publishing](https://docs.npmjs.com/trusted-publishers).
20
22
 
21
- 1. On npmjs.com register this repository as a trusted publisher of your package, pointing at the `publish.yml` workflow.
22
- 2. Bump the version in `package.json`, then push a version tag (e.g. `git tag v1.0.0 && git push --tags`) or run the workflow manually from the Actions tab.
23
+ ### One-time setup
23
24
 
24
- Publishing with provenance is also how you prove ownership when claiming your app in a Twenty marketplace.
25
+ On npmjs.com, register this repository as a trusted publisher for the package.
26
+ Select `publish.yml` as the workflow.
27
+
28
+ ### Release a version
29
+
30
+ 1. Bump the version in `package.json`.
31
+ 2. Push the matching version tag, or run `Publish` manually from the Actions
32
+ tab:
33
+
34
+ ```bash
35
+ git tag v1.0.0
36
+ git push origin v1.0.0
37
+ ```
38
+
39
+ Publishing with provenance is also how you prove ownership when claiming your
40
+ app in a Twenty marketplace.
25
41
 
26
42
  ## Changelog
27
43
 
@@ -34,7 +34,7 @@ jobs:
34
34
  - name: Setup Node.js
35
35
  uses: actions/setup-node@v4
36
36
  with:
37
- node-version: 24
37
+ node-version-file: '.nvmrc'
38
38
  registry-url: https://registry.npmjs.org
39
39
 
40
40
  - name: Update npm
@@ -9,10 +9,12 @@ export default defineApplicationRole({
9
9
  universalIdentifier: DEFAULT_ROLE_UNIVERSAL_IDENTIFIER,
10
10
  label: `${APP_DISPLAY_NAME} default function role`,
11
11
  description: `${APP_DISPLAY_NAME} default function role`,
12
- canReadAllObjectRecords: true,
13
- canUpdateAllObjectRecords: true,
14
- canSoftDeleteAllObjectRecords: true,
15
- canDestroyAllObjectRecords: false,
12
+ recordsPermissions: {
13
+ canReadAllRecords: true,
14
+ canUpdateAllRecords: true,
15
+ canSoftDeleteAllRecords: true,
16
+ canDestroyAllRecords: false,
17
+ },
16
18
  canBeAssignedToUsers: false,
17
19
  canBeAssignedToApiKeys: false,
18
20
  });