twenty 2.51.1 → 2.53.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.
- package/README.md +4 -5
- package/dist/app-template/AGENTS.md +8 -18
- package/dist/app-template/README.md +1 -1
- package/dist/app-template/SETUP.md +18 -38
- package/dist/app-template/github/workflows/cd.yml +2 -0
- package/dist/app-template/github/workflows/publish.yml +4 -1
- package/dist/app-template/package.json +2 -2
- package/dist/app-template/src/__tests__/global-setup.ts +11 -14
- package/dist/app-template/src/__tests__/run-twenty.ts +12 -8
- package/dist/app-template/src/default-role.ts +2 -0
- package/dist/app-template/yarn.lock +111 -1478
- package/dist/app-worker.cjs +1 -1
- package/dist/chunks/AppLocales-CcZVcJIa-BjjIbbsZ.cjs +1 -0
- package/dist/chunks/api-url-protocols.constant-EEmR3Pmg.cjs +1 -0
- package/dist/chunks/application-BxIKWsoy.cjs +5 -0
- package/dist/chunks/assert-pull-paths-TFGZvzZO.cjs +1 -0
- package/dist/chunks/build--4zYt4wd.cjs +1 -0
- package/dist/chunks/{build-source-manifest-BmZlsY97.cjs → build-source-manifest-BIq-ByiX.cjs} +1 -1
- package/dist/chunks/{build-source-snapshot-BWbLS2F3.cjs → build-source-snapshot-d23K-Ikr.cjs} +16 -16
- package/dist/chunks/capitalize-DFPVt1IM-CF4z3TZK.cjs +1 -0
- package/dist/chunks/check-node-requirement-CnwHKQBp.cjs +1 -0
- package/dist/chunks/cli-error-CrUD8uMp.cjs +1 -0
- package/dist/chunks/cli-node-version-range.constant-D3XrqV07.cjs +1 -0
- package/dist/chunks/cli-version.constant-YNWQ9cC0.cjs +1 -0
- package/dist/chunks/collect-translatable-strings-rQ3M474u.cjs +1 -0
- package/dist/chunks/collect-watch-inputs-Dn6g1cNu.cjs +1 -0
- package/dist/chunks/compile-application-translations-Q8K18JOI.cjs +1 -0
- package/dist/chunks/{confirm-in-terminal-BxEM5lxE.cjs → confirm-in-terminal-D2e1lKUY.cjs} +1 -1
- package/dist/chunks/constants-Bod2d_GP-CQVvzM4m.cjs +55 -0
- package/dist/chunks/convert-to-label-CbLHl7Lv.cjs +1 -0
- package/dist/chunks/{create-app-not-installed-error-DY-iuPPx.cjs → create-app-not-installed-error-sN4TzjlV.cjs} +1 -1
- package/dist/chunks/{create-cancelled-error-DgrNfOv2.cjs → create-cancelled-error-BBhAY8fS.cjs} +1 -1
- package/dist/chunks/create-http-status-error-BMaFl1lt.cjs +1 -0
- package/dist/chunks/create-metadata-client-C_ezBBSL.cjs +6 -0
- package/dist/chunks/create-pull-base-write-CyAWuU4_.cjs +1 -0
- package/dist/chunks/{create-rest-client-PU2Uyfnb.cjs → create-rest-client-Cqmhix9V.cjs} +1 -1
- package/dist/chunks/{create-tooling-failure-B2FmNwR2.cjs → create-tooling-failure-0Foyei1R.cjs} +1 -1
- package/dist/chunks/extract-manifest-from-file-CiZT_2AN.cjs +1 -0
- package/dist/chunks/extract-source-translations-BqDJ4wJe.cjs +1 -0
- package/dist/chunks/{fetch-metadata-inspection-CeqzcB_x.cjs → fetch-metadata-inspection-FViKeZE2.cjs} +1 -1
- package/dist/chunks/fetch-signed-in-identity-DetIg3mY.cjs +1 -0
- package/dist/chunks/{fetch-workspace-id-CsvJDu8b.cjs → fetch-workspace-id-BjsaXgwT.cjs} +1 -1
- package/dist/chunks/{find-remote-D48r20g0.cjs → find-remote-TcvVyJpy.cjs} +1 -1
- package/dist/chunks/format-body-C7fmVDAZ.cjs +1 -0
- package/dist/chunks/format-data-value-CSmt_osQ.cjs +1 -0
- package/dist/chunks/{format-display-path-gEepVJDg.cjs → format-display-path-CZLIKwPT.cjs} +1 -1
- package/dist/chunks/format-metadata-fields-CIlW-vcz.cjs +2 -0
- package/dist/chunks/format-metadata-owner-boZrxwKt.cjs +1 -0
- package/dist/chunks/format-progress-line-Cj65-DU5.cjs +1 -0
- package/dist/chunks/fs-utils-DoSmCBu8.cjs +2 -0
- package/dist/chunks/generate-application-client-CApCs5PX.cjs +1 -0
- package/dist/chunks/get-client-generation-skip-reason-D9u3PsGX.cjs +1 -0
- package/dist/chunks/{get-credential-kind-JI9heHe2.cjs → get-credential-kind-qxy7oLdW.cjs} +1 -1
- package/dist/chunks/get-function-input-schema-GNk3NRLJ-DscBUsKy.cjs +1 -0
- package/dist/chunks/get-system-view-universal-identifier.util-C6XI2VGC-Dy2DReV-.cjs +1 -0
- package/dist/chunks/get-tooling-error-context-CZKTM7Q6.cjs +1 -0
- package/dist/chunks/global-flags.constant-DzvO9WzG.cjs +1 -0
- package/dist/chunks/has-error-code-DsJeqbZq.cjs +1 -0
- package/dist/chunks/is-access-token-expiring-hGgVV9T8.cjs +1 -0
- package/dist/chunks/{is-application-not-found-error-Cja7iQrL.cjs → is-application-not-found-error-DH5B4tzI.cjs} +1 -1
- package/dist/chunks/is-exported-manifest-CoOxJ1Ku.cjs +1 -0
- package/dist/chunks/{is-inside-directory-DHVCQE5C.cjs → is-inside-directory-CymDrDJC.cjs} +1 -1
- package/dist/chunks/{is-interaction-allowed-CF-ko1KI.cjs → is-interaction-allowed-BQLOG8RG.cjs} +1 -1
- package/dist/chunks/is-locale-catalog-D0wFrW8f.cjs +1 -0
- package/dist/chunks/{is-same-universal-identifier-BCBib3RP.cjs → is-same-universal-identifier-Bm_wb6Ez.cjs} +1 -1
- package/dist/chunks/is-supported-locale-C33Of85N.cjs +1 -0
- package/dist/chunks/isDefined-Dtu5EYqP-CJctgvfE.cjs +1 -0
- package/dist/chunks/locale-catalog-format-Dbn6JD4p.cjs +20 -0
- package/dist/chunks/metadata-BWVl-AS0.cjs +1 -0
- package/dist/chunks/{metadata-page.constant-CxWuBtP5.cjs → metadata-page.constant-7kxmFenL.cjs} +1 -1
- package/dist/chunks/parse-api-url-jHzjLWX1.cjs +1 -0
- package/dist/chunks/{parse-app-export-DFV_KqHM.cjs → parse-app-export-Ci1VgDGB.cjs} +1 -1
- package/dist/chunks/parse-extraction-locale-h0bmy8hf.cjs +1 -0
- package/dist/chunks/parse-graphql-response-8IMbTRp8.cjs +1 -0
- package/dist/chunks/{parse-json-input-CO-KP4XZ.cjs → parse-json-input-CJEnFJw_.cjs} +1 -1
- package/dist/chunks/{print-typescript-value-D5kLR9wo.cjs → print-typescript-value-ChOUZ7Mm.cjs} +1 -1
- package/dist/chunks/pull-minimum-sdk-version.constant-B-1PY5i8.cjs +5 -0
- package/dist/chunks/pull-source-DcvqGJro.cjs +1 -0
- package/dist/chunks/{read-app-identity-dWB3NG6p.cjs → read-app-identity-BbNKSUV5.cjs} +1 -1
- package/dist/chunks/read-application-identifier-BxzrxUSf.cjs +1 -0
- package/dist/chunks/read-application-identity-uq1DePso.cjs +1 -0
- package/dist/chunks/{read-command-values-uSJqBG_E.cjs → read-command-values-rGaU2qHz.cjs} +1 -1
- package/dist/chunks/read-config-BinH4NbQ.cjs +1 -0
- package/dist/chunks/read-infer-deletion-option-BFdfPWCc.cjs +8 -0
- package/dist/chunks/{read-input-value-Cxgh_r2g.cjs → read-input-value-CzJsE62r.cjs} +1 -1
- package/dist/chunks/read-json-object-ht56HC80.cjs +1 -0
- package/dist/chunks/read-snapshot-file-Dgc3WCDM.cjs +1 -0
- package/dist/chunks/{read-source-identity-BM-MsOjA.cjs → read-source-identity-DmwOw5xO.cjs} +1 -1
- package/dist/chunks/record-pull-base-lUZgKmne.cjs +1 -0
- package/dist/chunks/{record-typecheck-config-inputs-CmF0bbqm.cjs → record-typecheck-config-inputs-BxgLBZ_x.cjs} +1 -1
- package/dist/chunks/request-oauth-tokens-DCmkyPd1.cjs +1 -0
- package/dist/chunks/request-timeout-milliseconds.constant-BkZTOtpY.cjs +1 -0
- package/dist/chunks/{require-approval-D0FfoHhF.cjs → require-approval-BIgPOy_r.cjs} +1 -1
- package/dist/chunks/resolve-app-project-CMuYw_Z4.cjs +1 -0
- package/dist/chunks/resolve-command-target-BFHhx0DC.cjs +1 -0
- package/dist/chunks/resolve-inside-sdk-Ca2uRzQW.cjs +1 -0
- package/dist/chunks/{resolve-metadata-object-BSDYVuzQ.cjs → resolve-metadata-object-C3sDavWu.cjs} +1 -1
- package/dist/chunks/{resolve-project-typescript-vMtmufcP.cjs → resolve-project-typescript-D66veK53.cjs} +1 -1
- package/dist/chunks/resolve-request-url-BwELN2oQ.cjs +1 -0
- package/dist/chunks/resolve-source-sdk-Cfn4KCbU.cjs +1 -0
- package/dist/chunks/result-item-limit.constant-QX3teiuy.cjs +1 -0
- package/dist/chunks/rolldown-runtime-mLOUI7ql.cjs +1 -0
- package/dist/chunks/run-api-graphql-command-Byg29Kwt.cjs +1 -0
- package/dist/chunks/run-api-rest-command-BVxjuvu0.cjs +1 -0
- package/dist/chunks/run-app-add-command-BzKv_KQW.cjs +163 -0
- package/dist/chunks/run-app-apply-command-DwhPVSBM.cjs +2 -0
- package/dist/chunks/{run-app-build-command-DSGpIZBT.cjs → run-app-build-command-BeUcVmMK.cjs} +1 -1
- package/dist/chunks/run-app-dev-command-BcdQ_GFC.cjs +2 -0
- package/dist/chunks/run-app-exec-command-DNbhEfkC.cjs +3 -0
- package/dist/chunks/run-app-generate-client-command-DxN3fEA1.cjs +2 -0
- package/dist/chunks/run-app-init-command-b6UCdbdu.cjs +2 -0
- package/dist/chunks/run-app-install-command-Btc0jUCP.cjs +1 -0
- package/dist/chunks/run-app-logs-command-dfLruOJn.cjs +9 -0
- package/dist/chunks/run-app-operation-Or8xoNyS.cjs +1 -0
- package/dist/chunks/run-app-plan-command-4BoAWJL8.cjs +1 -0
- package/dist/chunks/run-app-publish-command-BSoeN498.cjs +3 -0
- package/dist/chunks/run-app-pull-command-_T-gRpRM.cjs +3 -0
- package/dist/chunks/{run-app-translations-extract-command-Ba66GX7e.cjs → run-app-translations-extract-command-BtKIasjA.cjs} +1 -1
- package/dist/chunks/{run-app-typecheck-command-MAxB7Yg3.cjs → run-app-typecheck-command-CpaU-SSu.cjs} +1 -1
- package/dist/chunks/{run-app-uninstall-command-BzYSsL5a.cjs → run-app-uninstall-command-BxFxIq7d.cjs} +1 -1
- package/dist/chunks/run-auth-login-command-B2mdQ2u2.cjs +1 -0
- package/dist/chunks/{run-auth-logout-command-iC22soKN.cjs → run-auth-logout-command-ChQscyV4.cjs} +1 -1
- package/dist/chunks/run-auth-status-command-kdN443Ay.cjs +1 -0
- package/dist/chunks/run-cli-BYGyQans.cjs +24 -0
- package/dist/chunks/run-commands-command-CZnZ6zyN.cjs +2 -0
- package/dist/chunks/{run-data-get-command-D7czgisf.cjs → run-data-get-command--GOFyb1w.cjs} +1 -1
- package/dist/chunks/run-data-list-command-By_8ux8l.cjs +1 -0
- package/dist/chunks/run-doctor-command-BSwxxXiE.cjs +2 -0
- package/dist/chunks/run-metadata-field-describe-command-Dyfd4C9K.cjs +3 -0
- package/dist/chunks/{run-metadata-field-list-command-CpIUXOmy.cjs → run-metadata-field-list-command-Cd7YnAki.cjs} +1 -1
- package/dist/chunks/{run-metadata-object-describe-command--cIPFkWW.cjs → run-metadata-object-describe-command-DJUVk4c3.cjs} +1 -1
- package/dist/chunks/{run-metadata-object-list-command-CQ1jcSJc.cjs → run-metadata-object-list-command-CYfHKqwb.cjs} +1 -1
- package/dist/chunks/run-open-command-smX2pJKi.cjs +1 -0
- package/dist/chunks/{run-remote-list-command-DV-Ruk98.cjs → run-remote-list-command-OotTwa0W.cjs} +1 -1
- package/dist/chunks/{run-remote-remove-command-C1JeH5mK.cjs → run-remote-remove-command-C43pSDK9.cjs} +1 -1
- package/dist/chunks/{run-remote-rename-command-CCVu4hEw.cjs → run-remote-rename-command-fphQG7fM.cjs} +1 -1
- package/dist/chunks/{run-remote-use-command-BvqWgEsP.cjs → run-remote-use-command-CpgiMu-K.cjs} +1 -1
- package/dist/chunks/{run-version-command-DdKb9JL0.cjs → run-version-command-BugTbUa0.cjs} +1 -1
- package/dist/chunks/select-target-CgDTzZ8p.cjs +1 -0
- package/dist/chunks/sign-in-to-remote-again-BmojAqdV.cjs +1 -0
- package/dist/chunks/sign-in-with-browser-1-CK0mOu.cjs +124 -0
- package/dist/chunks/to-cli-error-4pSpVaW9.cjs +1 -0
- package/dist/chunks/to-public-target-D00so1uO.cjs +1 -0
- package/dist/chunks/to-worker-output-diagnostics-BD6M8RST.cjs +2 -0
- package/dist/chunks/typecheck-application-CQG69ztM.cjs +2 -0
- package/dist/chunks/undici-BfHt0Tny.cjs +95 -0
- package/dist/chunks/{update-config-CnB7lDVC.cjs → update-config-BHs_Zv8h.cjs} +1 -1
- package/dist/chunks/utils-BMycM5SC-9TsAPfH8.cjs +11 -0
- package/dist/chunks/valid-DnUN-PQ0.cjs +1 -0
- package/dist/chunks/{validate-remote-name-w-qnr43w.cjs → validate-remote-name-ZWOgVe80.cjs} +1 -1
- package/dist/chunks/{with-phase-details-Dof8Ao9R.cjs → with-phase-details-CRqY0f3c.cjs} +1 -1
- package/dist/chunks/write-config-atomically-BHOlbOl_.cjs +1 -0
- package/dist/cli.cjs +1 -1
- package/docs/commands.md +13 -10
- package/package.json +5 -4
- package/src/app/manifest/README.md +10 -12
- package/src/app/pull/README.md +5 -1
- package/dist/chunks/application-DOWikeQt.cjs +0 -5
- package/dist/chunks/assert-pull-paths-BuQ1ZRvQ.cjs +0 -1
- package/dist/chunks/build-CX6FBrbu.cjs +0 -1
- package/dist/chunks/build-pull-entities-ShVsLh_s.cjs +0 -5
- package/dist/chunks/check-node-requirement-CGBKvEqH.cjs +0 -1
- package/dist/chunks/cli-error-CSsayo0u.cjs +0 -1
- package/dist/chunks/cli-node-version-range.constant-D7fE8edk.cjs +0 -1
- package/dist/chunks/cli-version.constant-DGQXQw_V.cjs +0 -1
- package/dist/chunks/collect-translatable-strings-DWRZN9zQ.cjs +0 -1
- package/dist/chunks/collect-watch-inputs-CS4oNP1F.cjs +0 -1
- package/dist/chunks/compile-application-translations-DS6jGOV4.cjs +0 -1
- package/dist/chunks/constants-D-caeNc5-9rDzSg5B.cjs +0 -23
- package/dist/chunks/convert-to-label-hx-g0Lvj.cjs +0 -1
- package/dist/chunks/create-http-status-error-E0DUDIUP.cjs +0 -1
- package/dist/chunks/create-metadata-client-9IF8ArjT.cjs +0 -6
- package/dist/chunks/create-pull-base-write-JW3ZTnaC.cjs +0 -1
- package/dist/chunks/extract-manifest-from-file-nrU-X7g7.cjs +0 -1
- package/dist/chunks/extract-source-translations-DeVUs6Xz.cjs +0 -1
- package/dist/chunks/fetch-signed-in-identity-B49Tf79K.cjs +0 -1
- package/dist/chunks/format-body-CyNgSGIx.cjs +0 -1
- package/dist/chunks/format-data-value-kug8Yjt2.cjs +0 -1
- package/dist/chunks/format-metadata-fields-BTukrGn9.cjs +0 -2
- package/dist/chunks/format-metadata-owner-CsQXOj_P.cjs +0 -1
- package/dist/chunks/format-progress-line-DhMnjGkz.cjs +0 -1
- package/dist/chunks/fs-utils-Bl1fQcaJ.cjs +0 -2
- package/dist/chunks/generate-application-client-B3Fen9_7.cjs +0 -1
- package/dist/chunks/get-app-plan-summary-C-CQdNrh.cjs +0 -8
- package/dist/chunks/get-client-generation-skip-reason-BVkBgZWQ.cjs +0 -1
- package/dist/chunks/get-function-input-schema-GNk3NRLJ-DTFC8CbW.cjs +0 -1
- package/dist/chunks/get-tooling-error-context-C69TBSej.cjs +0 -1
- package/dist/chunks/global-flags.constant-CRom3uiZ.cjs +0 -1
- package/dist/chunks/is-access-token-expiring-DT6D8bMy.cjs +0 -1
- package/dist/chunks/is-exported-manifest-DnQNK9XY.cjs +0 -1
- package/dist/chunks/is-locale-catalog-CUFLOiRx.cjs +0 -1
- package/dist/chunks/is-supported-locale-xFJcoWeE.cjs +0 -1
- package/dist/chunks/locale-catalog-format-CgKjHqcW.cjs +0 -20
- package/dist/chunks/metadata-DkXpEhJh.cjs +0 -1
- package/dist/chunks/parse-api-url-CFCz3xUA.cjs +0 -1
- package/dist/chunks/parse-extraction-locale-C7Gdd3Oa.cjs +0 -1
- package/dist/chunks/parse-graphql-response-BcKxw_s9.cjs +0 -1
- package/dist/chunks/pull-source-BKm8k5WI.cjs +0 -1
- package/dist/chunks/read-application-identifier-BlkRhC8j.cjs +0 -1
- package/dist/chunks/read-application-identity-DgEOK9zh.cjs +0 -1
- package/dist/chunks/read-config-Qwl4pAO8.cjs +0 -1
- package/dist/chunks/read-json-object-BXZs97qz.cjs +0 -1
- package/dist/chunks/read-snapshot-file-CxPJh0Bk.cjs +0 -1
- package/dist/chunks/record-pull-base-DwoMDnXm.cjs +0 -1
- package/dist/chunks/request-oauth-tokens-QdDt7j8i.cjs +0 -1
- package/dist/chunks/request-timeout-milliseconds.constant-DtyQHrll.cjs +0 -1
- package/dist/chunks/resolve-app-project-B0KRR-xp.cjs +0 -1
- package/dist/chunks/resolve-command-target-BWCnYRCn.cjs +0 -1
- package/dist/chunks/resolve-inside-sdk-DiEOTO12.cjs +0 -1
- package/dist/chunks/resolve-request-url-BvOe0vYd.cjs +0 -1
- package/dist/chunks/resolve-source-sdk-CU1wk4bl.cjs +0 -1
- package/dist/chunks/result-item-limit.constant-CDrOhiWD.cjs +0 -1
- package/dist/chunks/run-api-graphql-command-Df2FAGpA.cjs +0 -1
- package/dist/chunks/run-api-rest-command-2YvvMh8h.cjs +0 -1
- package/dist/chunks/run-app-add-command-wpCH-Lp9.cjs +0 -163
- package/dist/chunks/run-app-apply-command-CPocg1Xz.cjs +0 -2
- package/dist/chunks/run-app-dev-command-BOAYsAKr.cjs +0 -2
- package/dist/chunks/run-app-exec-command-Fwi80y3g.cjs +0 -3
- package/dist/chunks/run-app-generate-client-command-DidOpqNE.cjs +0 -2
- package/dist/chunks/run-app-init-command-DRFYqMMh.cjs +0 -2
- package/dist/chunks/run-app-install-command-DPt8PzUS.cjs +0 -1
- package/dist/chunks/run-app-logs-command-C-9ZyGau.cjs +0 -9
- package/dist/chunks/run-app-operation-Cw5M8v43.cjs +0 -1
- package/dist/chunks/run-app-plan-command-CT1SlcdX.cjs +0 -1
- package/dist/chunks/run-app-publish-command-DiIlqdTg.cjs +0 -3
- package/dist/chunks/run-app-pull-command-r_NjC_Rk.cjs +0 -3
- package/dist/chunks/run-auth-login-command-Cb3bITQj.cjs +0 -1
- package/dist/chunks/run-auth-status-command-C0rdb747.cjs +0 -1
- package/dist/chunks/run-cli-CuxXyb__.cjs +0 -23
- package/dist/chunks/run-commands-command-D0P3mHHz.cjs +0 -2
- package/dist/chunks/run-data-list-command-CUp_FN_I.cjs +0 -1
- package/dist/chunks/run-doctor-command-ClisEoI5.cjs +0 -2
- package/dist/chunks/run-metadata-field-describe-command-7xrRVRwr.cjs +0 -3
- package/dist/chunks/run-open-command-DLe3PYqB.cjs +0 -1
- package/dist/chunks/select-target-DZlm8j62.cjs +0 -1
- package/dist/chunks/sign-in-to-remote-again-WEIeFaAT.cjs +0 -1
- package/dist/chunks/sign-in-with-browser-BUvT_awm.cjs +0 -1
- package/dist/chunks/to-cli-error-BBYf_wqo.cjs +0 -1
- package/dist/chunks/to-public-target-bNT50le0.cjs +0 -1
- package/dist/chunks/to-worker-output-diagnostics-BzdY4Z2V.cjs +0 -2
- package/dist/chunks/typecheck-application-dVtzoMDg.cjs +0 -2
- package/dist/chunks/undici-D3mKdfwl.cjs +0 -95
- package/dist/chunks/utils-CvvLHbc4-CKDJ1YgX.cjs +0 -38
- package/dist/chunks/write-config-atomically-DkRUfbw0.cjs +0 -1
package/README.md
CHANGED
|
@@ -5,7 +5,8 @@ inspect metadata and records, send API requests, and develop applications.
|
|
|
5
5
|
|
|
6
6
|
## Install
|
|
7
7
|
|
|
8
|
-
The CLI needs Node.js 24.5 or later.
|
|
8
|
+
The CLI needs Node.js 24.5 or later. Building apps is officially supported on
|
|
9
|
+
Unix systems (macOS and Linux) only; on Windows, work inside WSL 2.
|
|
9
10
|
|
|
10
11
|
```bash
|
|
11
12
|
npm install -g twenty
|
|
@@ -52,8 +53,8 @@ app, uploads its build and synchronizes its metadata. Once registered, inspect
|
|
|
52
53
|
changes with `twenty app plan` before applying them. `app dev` watches inputs and
|
|
53
54
|
syncs successful builds.
|
|
54
55
|
|
|
55
|
-
Missing definitions imply remote deletions by default. Pass `--no-
|
|
56
|
-
preserve them. Object and field deletions require confirmation because they
|
|
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
|
|
57
58
|
also delete stored data. Pull can overwrite local edits; read its
|
|
58
59
|
[reconciliation rules](docs/commands.md#pull-an-app) before using it.
|
|
59
60
|
|
|
@@ -85,5 +86,3 @@ for supported SDK exports and compiler configuration.
|
|
|
85
86
|
|
|
86
87
|
Run `twenty commands` for the command inventory or `twenty <command> --help` for
|
|
87
88
|
its arguments and options.
|
|
88
|
-
|
|
89
|
-
Generated next-step commands use PowerShell on Windows and POSIX shell syntax on macOS/Linux.
|
|
@@ -63,23 +63,13 @@ Read the [front component guide](https://docs.twenty.com/developers/extend/apps/
|
|
|
63
63
|
|
|
64
64
|
## Best practice
|
|
65
65
|
|
|
66
|
-
It's highly recommended to create new app entities using `
|
|
66
|
+
It's highly recommended to create new app entities using `twenty app add`. These are the options:
|
|
67
67
|
|
|
68
|
-
| Entity type
|
|
69
|
-
|
|
|
70
|
-
| Object
|
|
71
|
-
| Field
|
|
72
|
-
| Logic function
|
|
73
|
-
| Front component
|
|
74
|
-
| Role | `yarn twenty dev:add role` | `src/roles/<name>.ts` |
|
|
75
|
-
| Skill | `yarn twenty dev:add skill` | `src/skills/<name>.ts` |
|
|
76
|
-
| Agent | `yarn twenty dev:add agent` | `src/agents/<name>.ts` |
|
|
77
|
-
| View | `yarn twenty dev:add view` | `src/views/<name>.ts` |
|
|
78
|
-
| Navigation menu item | `yarn twenty dev:add navigationMenuItem` | `src/navigation-menu-items/<name>.ts` |
|
|
79
|
-
| Page layout | `yarn twenty dev:add pageLayout` | `src/page-layouts/<name>.ts` |
|
|
80
|
-
| Page layout tab | `yarn twenty dev:add pageLayoutTab` | `src/page-layout-tabs/<name>.ts` |
|
|
81
|
-
| Command menu item | `yarn twenty dev:add commandMenuItem` | `src/command-menu-items/<name>.ts` |
|
|
82
|
-
| View field | `yarn twenty dev:add viewField` | `src/view-fields/<name>.ts` |
|
|
83
|
-
| Connection provider | `yarn twenty dev:add connectionProvider` | `src/connection-providers/<name>.ts` |
|
|
68
|
+
| Entity type | Command | Generated file |
|
|
69
|
+
| --------------- | -------------------------------- | --------------------------------- |
|
|
70
|
+
| Object | `twenty app add object` | `src/objects/<name>.ts` |
|
|
71
|
+
| Field | `twenty app add field` | `src/fields/<name>.ts` |
|
|
72
|
+
| Logic function | `twenty app add logic-function` | `src/logic-functions/<name>.ts` |
|
|
73
|
+
| Front component | `twenty app add front-component` | `src/front-components/<name>.tsx` |
|
|
84
74
|
|
|
85
|
-
|
|
75
|
+
These generators create the required UUID v4 identifiers. For roles, skills, agents, views, navigation items, layouts, commands, and connection providers, use the corresponding `twenty-sdk/define` export and generate UUID v4 identifiers.
|
|
@@ -30,5 +30,5 @@ Notable changes are documented in [CHANGELOG.md](CHANGELOG.md).
|
|
|
30
30
|
## Learn more
|
|
31
31
|
|
|
32
32
|
- [Twenty Apps documentation](https://docs.twenty.com/developers/extend/apps/getting-started/quick-start)
|
|
33
|
-
- [
|
|
33
|
+
- [Twenty CLI reference](https://docs.twenty.com/developers/extend/apps/operations/cli)
|
|
34
34
|
- [Discord](https://discord.gg/cx5n4Jzs57)
|
|
@@ -1,47 +1,27 @@
|
|
|
1
1
|
# Setup
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Use Node.js from `.nvmrc` and Yarn 4. Install the standalone CLI globally:
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
```bash
|
|
6
|
+
npm install -g twenty
|
|
7
|
+
yarn install
|
|
8
|
+
```
|
|
6
9
|
|
|
7
|
-
|
|
8
|
-
- Yarn 4
|
|
9
|
-
- Docker (to run the local Twenty server)
|
|
10
|
+
Connect to your existing Twenty workspace, or start a server using the [local-server guide](https://docs.twenty.com/developers/extend/apps/getting-started/local-server):
|
|
10
11
|
|
|
11
|
-
|
|
12
|
+
```bash
|
|
13
|
+
twenty auth login --url https://your-workspace.twenty.com --name dev
|
|
14
|
+
twenty app apply --create
|
|
15
|
+
twenty app dev
|
|
16
|
+
```
|
|
12
17
|
|
|
13
|
-
|
|
18
|
+
The first apply registers and installs your app. Dev watches and syncs later source changes. `twenty app init` does not authenticate, start containers, or install the app.
|
|
14
19
|
|
|
15
|
-
|
|
16
|
-
yarn install
|
|
17
|
-
```
|
|
20
|
+
## Validation
|
|
18
21
|
|
|
19
|
-
|
|
20
|
-
|
|
22
|
+
- `yarn lint`, lint the project.
|
|
23
|
+
- `yarn typecheck`, check source and test types.
|
|
24
|
+
- `yarn test:unit`, run unit tests.
|
|
25
|
+
- `yarn test`, run integration tests against a disposable workspace configured with `TWENTY_API_URL` and `TWENTY_API_KEY`.
|
|
21
26
|
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
```bash
|
|
25
|
-
yarn twenty docker:start
|
|
26
|
-
```
|
|
27
|
-
|
|
28
|
-
Check the server status at any time with `yarn twenty docker:status`.
|
|
29
|
-
|
|
30
|
-
3. Start the development server and sync your app:
|
|
31
|
-
|
|
32
|
-
```bash
|
|
33
|
-
yarn twenty dev
|
|
34
|
-
```
|
|
35
|
-
|
|
36
|
-
4. Open [http://localhost:2020](http://localhost:2020) and log in with the default development credentials: `tim@apple.dev` / `tim@apple.dev`.
|
|
37
|
-
|
|
38
|
-
## Verifying your setup
|
|
39
|
-
|
|
40
|
-
- `yarn lint` - Lint the project with oxlint
|
|
41
|
-
- `yarn typecheck` - Type-check the project
|
|
42
|
-
- `yarn test:unit` - Run unit tests
|
|
43
|
-
- `yarn test` - Run integration tests
|
|
44
|
-
|
|
45
|
-
## Troubleshooting
|
|
46
|
-
|
|
47
|
-
See the [troubleshooting guide](https://docs.twenty.com/developers/extend/apps/getting-started/troubleshooting) or ask on [Discord](https://discord.gg/cx5n4Jzs57).
|
|
27
|
+
Integration tests install and uninstall the app. Install the CLI globally or set `TWENTY_CLI` to a local executable path.
|
|
@@ -32,11 +32,13 @@ jobs:
|
|
|
32
32
|
- name: Deploy
|
|
33
33
|
uses: twentyhq/twenty/.github/actions/deploy-twenty-app@main
|
|
34
34
|
with:
|
|
35
|
+
cli-version: CLI-VERSION-TO-BE-GENERATED
|
|
35
36
|
api-url: ${{ env.TWENTY_DEPLOY_URL }}
|
|
36
37
|
api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }}
|
|
37
38
|
|
|
38
39
|
- name: Install
|
|
39
40
|
uses: twentyhq/twenty/.github/actions/install-twenty-app@main
|
|
40
41
|
with:
|
|
42
|
+
cli-version: CLI-VERSION-TO-BE-GENERATED
|
|
41
43
|
api-url: ${{ env.TWENTY_DEPLOY_URL }}
|
|
42
44
|
api-key: ${{ secrets.TWENTY_DEPLOY_API_KEY }}
|
|
@@ -41,6 +41,9 @@ jobs:
|
|
|
41
41
|
# Trusted publishing requires npm 11.5.1 or later.
|
|
42
42
|
run: npm install -g npm@latest
|
|
43
43
|
|
|
44
|
+
- name: Install Twenty CLI
|
|
45
|
+
run: npm install -g twenty@CLI-VERSION-TO-BE-GENERATED
|
|
46
|
+
|
|
44
47
|
- name: Install dependencies
|
|
45
48
|
run: yarn install --immutable
|
|
46
49
|
|
|
@@ -49,4 +52,4 @@ jobs:
|
|
|
49
52
|
# OIDC provenance for private repos
|
|
50
53
|
# env:
|
|
51
54
|
# TWENTY_APP_PUBLISH_DISABLE_PROVENANCE: 'true'
|
|
52
|
-
run:
|
|
55
|
+
run: twenty app publish
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"version": "0.1.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"engines": {
|
|
6
|
-
"node": "^24.5.0",
|
|
6
|
+
"node": "^24.5.0 || ^26.5.1",
|
|
7
7
|
"npm": "please-use-yarn",
|
|
8
8
|
"yarn": ">=4.0.2"
|
|
9
9
|
},
|
|
@@ -31,6 +31,6 @@
|
|
|
31
31
|
"twenty-ui": "TO-BE-GENERATED",
|
|
32
32
|
"typescript": "^5.9.3",
|
|
33
33
|
"vite-tsconfig-paths": "^4.2.1",
|
|
34
|
-
"vitest": "^4.
|
|
34
|
+
"vitest": "^4.1.12"
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -1,13 +1,12 @@
|
|
|
1
1
|
import { runTwenty } from './run-twenty';
|
|
2
2
|
|
|
3
|
-
function
|
|
3
|
+
function validateEnvironmentOrThrow(): { apiUrl: string; apiKey: string } {
|
|
4
4
|
const apiUrl = process.env.TWENTY_API_URL;
|
|
5
5
|
const apiKey = process.env.TWENTY_API_KEY;
|
|
6
6
|
|
|
7
7
|
if (!apiUrl || !apiKey) {
|
|
8
8
|
throw new Error(
|
|
9
9
|
'TWENTY_API_URL and TWENTY_API_KEY must be set.\n' +
|
|
10
|
-
'Start a local server: yarn twenty docker:start\n' +
|
|
11
10
|
'Or set them in vitest env config.',
|
|
12
11
|
);
|
|
13
12
|
}
|
|
@@ -15,17 +14,13 @@ function validateEnv(): { apiUrl: string; apiKey: string } {
|
|
|
15
14
|
return { apiUrl, apiKey };
|
|
16
15
|
}
|
|
17
16
|
|
|
18
|
-
async function
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
try {
|
|
22
|
-
response = await fetch(`${apiUrl}/healthz`);
|
|
23
|
-
} catch {
|
|
17
|
+
async function checkServerOrThrow(apiUrl: string) {
|
|
18
|
+
const response = await fetch(`${apiUrl}/healthz`).catch(() => {
|
|
24
19
|
throw new Error(
|
|
25
20
|
`Twenty server is not reachable at ${apiUrl}. ` +
|
|
26
21
|
'Make sure the server is running before executing integration tests.',
|
|
27
22
|
);
|
|
28
|
-
}
|
|
23
|
+
});
|
|
29
24
|
|
|
30
25
|
if (!response.ok) {
|
|
31
26
|
throw new Error(`Server at ${apiUrl} returned ${response.status}`);
|
|
@@ -33,10 +28,10 @@ async function checkServer(apiUrl: string) {
|
|
|
33
28
|
}
|
|
34
29
|
|
|
35
30
|
export async function setup() {
|
|
36
|
-
const { apiUrl } =
|
|
31
|
+
const { apiUrl } = validateEnvironmentOrThrow();
|
|
37
32
|
|
|
38
|
-
await
|
|
39
|
-
await
|
|
33
|
+
await checkServerOrThrow(apiUrl);
|
|
34
|
+
await teardown();
|
|
40
35
|
|
|
41
36
|
const result = await runTwenty(['app', 'apply', '--create']);
|
|
42
37
|
|
|
@@ -50,7 +45,9 @@ export async function setup() {
|
|
|
50
45
|
export async function teardown() {
|
|
51
46
|
const result = await runTwenty(['app', 'uninstall', '--yes']);
|
|
52
47
|
|
|
53
|
-
if (!result.ok) {
|
|
54
|
-
|
|
48
|
+
if (!result.ok && result.error.code !== 'APP_NOT_INSTALLED') {
|
|
49
|
+
throw new Error(
|
|
50
|
+
`App uninstall failed: ${result.error.code} ${result.error.message}`,
|
|
51
|
+
);
|
|
55
52
|
}
|
|
56
53
|
}
|
|
@@ -22,11 +22,11 @@ function withoutProjectBinaries(pathValue: string) {
|
|
|
22
22
|
.join(delimiter);
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
-
export function runTwenty(
|
|
25
|
+
export function runTwenty(cliArguments: string[]): Promise<TwentyCliResult> {
|
|
26
26
|
const executable = process.env.TWENTY_CLI ?? 'twenty';
|
|
27
27
|
|
|
28
28
|
return new Promise((resolve, reject) => {
|
|
29
|
-
const child = spawn(executable, [...
|
|
29
|
+
const child = spawn(executable, [...cliArguments, '--json'], {
|
|
30
30
|
env: {
|
|
31
31
|
...process.env,
|
|
32
32
|
PATH: withoutProjectBinaries(process.env.PATH ?? ''),
|
|
@@ -41,12 +41,16 @@ export function runTwenty(args: string[]): Promise<TwentyCliResult> {
|
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
child.on('error', (error: NodeJS.ErrnoException) => {
|
|
44
|
+
if (error.code !== 'ENOENT') {
|
|
45
|
+
reject(error);
|
|
46
|
+
|
|
47
|
+
return;
|
|
48
|
+
}
|
|
49
|
+
|
|
44
50
|
reject(
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
)
|
|
49
|
-
: error,
|
|
51
|
+
new Error(
|
|
52
|
+
`${executable} was not found. Install the Twenty CLI globally, or set TWENTY_CLI to its path.`,
|
|
53
|
+
),
|
|
50
54
|
);
|
|
51
55
|
});
|
|
52
56
|
|
|
@@ -56,7 +60,7 @@ export function runTwenty(args: string[]): Promise<TwentyCliResult> {
|
|
|
56
60
|
} catch {
|
|
57
61
|
reject(
|
|
58
62
|
new Error(
|
|
59
|
-
`${executable} ${
|
|
63
|
+
`${executable} ${cliArguments.join(' ')} exited with code ${exitCode} without a JSON result. ` +
|
|
60
64
|
'Check that it is the Twenty CLI (twenty --version), or set TWENTY_CLI to its path.',
|
|
61
65
|
),
|
|
62
66
|
);
|