twenty 2.57.0 → 2.59.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/CONTRIBUTING.md +82 -54
- package/README.md +35 -22
- package/dist/app-template/.nvmrc +1 -1
- package/dist/app-template/example/files/README.md +20 -4
- package/dist/app-template/example/files/github/workflows/publish.yml +1 -1
- package/dist/app-template/example/files/src/default-role.ts +6 -4
- package/dist/app-template/yarn.lock +177 -114
- package/dist/app-worker.cjs +1 -1
- package/dist/chunks/{cli-version.constant-1uwk-lMz.cjs → AssetDirectory-c_JEwMr2.cjs} +1 -1
- package/dist/chunks/FileFolder-BmCXp_bX.cjs +1 -0
- package/dist/chunks/TwentyStandardApplicationUniversalIdentifier-Cm4vo0D3.cjs +1 -0
- package/dist/chunks/build-source-manifest-Ddwa8ath.cjs +2 -0
- package/dist/chunks/build-source-snapshot-CUsEVNsQ.cjs +898 -0
- package/dist/chunks/cli-version.constant-y_3mZ4gx.cjs +1 -0
- package/dist/chunks/code-step-file-suffix.constant-B6vqrfcU.cjs +1 -0
- package/dist/chunks/collect-translatable-strings-AWv41yIv.cjs +1 -0
- package/dist/chunks/collect-watch-inputs-DfWAkX1r.cjs +1 -0
- package/dist/chunks/compile-application-translations-C9UZQCAb.cjs +58 -0
- package/dist/chunks/convert-to-label-CI8cZyg_.cjs +1 -0
- package/dist/chunks/create-http-status-error-1VM7PoVZ.cjs +1 -0
- package/dist/chunks/create-metadata-client-FopHnDj0.cjs +6 -0
- package/dist/chunks/create-pull-base-write-CX8xZhMz.cjs +1 -0
- package/dist/chunks/create-rest-client-HbzXSfhZ.cjs +1 -0
- package/dist/chunks/extract-manifest-from-file-DPDIhnyg.cjs +1 -0
- package/dist/chunks/extract-source-translations-B-XmoSt7.cjs +1 -0
- package/dist/chunks/{fetch-metadata-inspection-Dqn8jToW.cjs → fetch-metadata-inspection-ooyNi2DN.cjs} +1 -1
- package/dist/chunks/{fetch-signed-in-identity-DCqCwASL.cjs → fetch-signed-in-identity-nCzWXunB.cjs} +1 -1
- package/dist/chunks/fetch-workspace-or-throw-DHoa_BYF.cjs +1 -0
- package/dist/chunks/format-body-DlJyFFVS.cjs +1 -0
- package/dist/chunks/format-data-value-D_1TNU-r.cjs +1 -0
- package/dist/chunks/format-metadata-fields-DmRandPR.cjs +2 -0
- package/dist/chunks/format-metadata-owner-ByoX2plp.cjs +1 -0
- package/dist/chunks/format-progress-line-BoU0vHbc.cjs +1 -0
- package/dist/chunks/formatBytes-CUW21d2t.cjs +1 -0
- package/dist/chunks/generate-application-client-Dlp_O7qk.cjs +1 -0
- package/dist/chunks/{get-client-generation-skip-reason-DZmeP0IC.cjs → get-client-generation-skip-reason-BZiAtHwa.cjs} +1 -1
- package/dist/chunks/get-field-universal-identifier.util-d1401qKf.cjs +1 -0
- package/dist/chunks/get-function-input-schema-ClPQURr8.cjs +1 -0
- package/dist/chunks/get-local-status-BbRv0a22.cjs +1 -0
- package/dist/chunks/global-flags.constant-DMHyA_PD.cjs +1 -0
- package/dist/chunks/is-access-token-expiring-BvJhEqtV.cjs +1 -0
- package/dist/chunks/is-application-not-found-error-CQ7k4hGU.cjs +1 -0
- package/dist/chunks/is-exported-manifest-C4lO285q.cjs +1 -0
- package/dist/chunks/is-locale-catalog-T4W5NhnW.cjs +1 -0
- package/dist/chunks/{AppLocales-CcZVcJIa-BjjIbbsZ.cjs → is-supported-locale-DUMI9QQ2.cjs} +1 -1
- package/dist/chunks/is-valid-package-name-Ds0DY5qP.cjs +1 -0
- package/dist/chunks/isNonEmptyArray-v52xg4Xj.cjs +1 -0
- package/dist/chunks/isPlainObject-fJEJm71P.cjs +1 -0
- package/dist/chunks/isValidUniversalIdentifier-DymFerYs.cjs +1 -0
- package/dist/chunks/isValidUuid-D3NV1xmO.cjs +1 -0
- package/dist/chunks/kebab-case-B3kq7ANN.cjs +1 -0
- package/dist/chunks/list-application-source-files-DcyU-HrX.cjs +1 -0
- package/dist/chunks/locale-catalog-format-BD4XDEnl.cjs +1 -0
- package/dist/chunks/{metadata-page.constant-qMNOJLjJ.cjs → metadata-page.constant-D4-pGQWp.cjs} +1 -1
- package/dist/chunks/parse-api-url-B5c0Gh_n.cjs +1 -0
- package/dist/chunks/parse-app-export-BC81wdmc.cjs +1 -0
- package/dist/chunks/parse-extraction-locale-B0apfizg.cjs +1 -0
- package/dist/chunks/parse-graphql-response-Cl8_fBgo.cjs +1 -0
- package/dist/chunks/parse-json-input-DxGKbeED.cjs +1 -0
- package/dist/chunks/print-typescript-value-BjYn0ZFT.cjs +3 -0
- package/dist/chunks/proxy-header-environment-variable.constant-CJyhJMve.cjs +1 -0
- package/dist/chunks/pull-minimum-sdk-version.constant-DUMi_IUD.cjs +6 -0
- package/dist/chunks/pull-source-CXQQf8Lw.cjs +1 -0
- package/dist/chunks/read-app-identity-Cny6sAGs.cjs +1 -0
- package/dist/chunks/read-application-identifier-C4U2JsfD.cjs +1 -0
- package/dist/chunks/read-application-identity-5sO-Mqb1.cjs +1 -0
- package/dist/chunks/read-bounded-body-BekYzK8S.cjs +1 -0
- package/dist/chunks/read-command-values-l5T9Lba4.cjs +1 -0
- package/dist/chunks/read-config-6GnzcpJm.cjs +1 -0
- package/dist/chunks/read-infer-deletion-option-Hv5V-A47.cjs +8 -0
- package/dist/chunks/read-json-object-BMftwGZ5.cjs +1 -0
- package/dist/chunks/read-local-container-Cs3cWspd.cjs +1 -0
- package/dist/chunks/read-snapshot-file-Dxla2ete.cjs +1 -0
- package/dist/chunks/{read-source-identity-CaErC5Qk.cjs → read-source-identity-CG9W0pSt.cjs} +1 -1
- package/dist/chunks/record-pull-base-8bIoAoiB.cjs +1 -0
- package/dist/chunks/{record-typecheck-config-inputs-BAruvIZV.cjs → record-typecheck-config-inputs-U2RUjjp9.cjs} +1 -1
- package/dist/chunks/request-oauth-tokens-_Xwy2q9c.cjs +1 -0
- package/dist/chunks/resolve-app-project-B4IjfcM-.cjs +1 -0
- package/dist/chunks/resolve-command-target-CLqjjxCT.cjs +1 -0
- package/dist/chunks/resolve-inside-sdk-DA7EQpf0.cjs +1 -0
- package/dist/chunks/resolve-metadata-object-7DhvIcEm.cjs +1 -0
- package/dist/chunks/resolve-project-typescript-DO4LrLr-.cjs +1 -0
- package/dist/chunks/resolve-proxy-headers-DipR9jft.cjs +1 -0
- package/dist/chunks/resolve-request-url-CfvGDGkw.cjs +1 -0
- package/dist/chunks/resolve-source-sdk-C4Hu045V.cjs +1 -0
- package/dist/chunks/run-api-graphql-command-ELrIPdM5.cjs +1 -0
- package/dist/chunks/run-api-rest-command-COVnszcN.cjs +1 -0
- package/dist/chunks/{run-app-add-command-qkKHuv9-.cjs → run-app-add-command-b9sm20rn.cjs} +20 -18
- package/dist/chunks/{run-app-apply-command-XNJHctjU.cjs → run-app-apply-command-CD7NOdiR.cjs} +2 -2
- package/dist/chunks/run-app-build-command-C8ubC2GH.cjs +2 -0
- package/dist/chunks/{run-app-dev-command-D6zVdTId.cjs → run-app-dev-command-D1JOfJv6.cjs} +2 -2
- package/dist/chunks/run-app-exec-command-cw4vPVHE.cjs +3 -0
- package/dist/chunks/run-app-generate-client-command-BVRFtPni.cjs +2 -0
- package/dist/chunks/{run-app-init-command-DcS8RfBK.cjs → run-app-init-command-DuxE1JhM.cjs} +2 -2
- package/dist/chunks/run-app-install-command-DlcUupwk.cjs +1 -0
- package/dist/chunks/run-app-logs-command-CaLIVesh.cjs +8 -0
- package/dist/chunks/run-app-operation-DKPh4r7b.cjs +1 -0
- package/dist/chunks/{run-app-plan-command-DcjgbzTy.cjs → run-app-plan-command-BGQ7vJZT.cjs} +1 -1
- package/dist/chunks/run-app-publish-command-BGNJVIBl.cjs +1 -0
- package/dist/chunks/run-app-pull-command-NbZ8fjhE.cjs +6 -0
- package/dist/chunks/run-app-translations-extract-command-CGIFvpC1.cjs +2 -0
- package/dist/chunks/{run-app-typecheck-command-D2Po43IB.cjs → run-app-typecheck-command-D0KV3hFS.cjs} +1 -1
- package/dist/chunks/{run-app-uninstall-command-DXyjeBwO.cjs → run-app-uninstall-command-CepQk4_4.cjs} +1 -1
- package/dist/chunks/run-auth-login-command-DpS1bUdL.cjs +1 -0
- package/dist/chunks/{run-auth-logout-command-ChrdwI-r.cjs → run-auth-logout-command-hvi_HvpQ.cjs} +1 -1
- package/dist/chunks/run-auth-status-command-Dr4YQuLn.cjs +1 -0
- package/dist/chunks/{run-cli-BoGzN25b.cjs → run-cli-oUabLHNz.cjs} +6 -6
- package/dist/chunks/run-commands-command-DYm9TuAx.cjs +2 -0
- package/dist/chunks/run-data-export-command-C4_7rc0v.cjs +3 -0
- package/dist/chunks/run-data-get-command-CcEYQ4xO.cjs +1 -0
- package/dist/chunks/run-data-list-command-D0K7HFD-.cjs +1 -0
- package/dist/chunks/run-doctor-command-fHf5vCGl.cjs +2 -0
- package/dist/chunks/run-local-logs-command-COsSRk3f.cjs +1 -0
- package/dist/chunks/run-local-reset-command-m0x-EiA6.cjs +2 -0
- package/dist/chunks/run-local-start-command-DsFS9_ew.cjs +1 -0
- package/dist/chunks/{run-local-status-command-ClvEgxcU.cjs → run-local-status-command-BYxy0R9I.cjs} +1 -1
- package/dist/chunks/run-local-stop-command-D66F73fW.cjs +1 -0
- package/dist/chunks/run-local-upgrade-command-6P71bQw6.cjs +1 -0
- package/dist/chunks/run-metadata-field-describe-command-nfKhj-m_.cjs +3 -0
- package/dist/chunks/{run-metadata-field-list-command-YCsoqOo1.cjs → run-metadata-field-list-command-CW2I6hmh.cjs} +1 -1
- package/dist/chunks/{run-metadata-object-describe-command-DpTobKR3.cjs → run-metadata-object-describe-command-WLxcOe4T.cjs} +1 -1
- package/dist/chunks/{run-metadata-object-list-command-BnSIIMDP.cjs → run-metadata-object-list-command-Q4pwAEwO.cjs} +1 -1
- package/dist/chunks/run-open-command-DPrz3N1e.cjs +1 -0
- package/dist/chunks/{run-remote-list-command-0f2QIf8C.cjs → run-remote-list-command-C2tZHRAT.cjs} +1 -1
- package/dist/chunks/{run-remote-remove-command-ClFB0Ub7.cjs → run-remote-remove-command-DgSQvjeN.cjs} +1 -1
- package/dist/chunks/{run-remote-rename-command-BVUcpZxq.cjs → run-remote-rename-command--37-GTRY.cjs} +1 -1
- package/dist/chunks/{run-remote-use-command-ByRTqnq5.cjs → run-remote-use-command-B6obKSPB.cjs} +1 -1
- package/dist/chunks/{run-version-command-_9OGraNf.cjs → run-version-command-BWTSv9_Y.cjs} +1 -1
- package/dist/chunks/select-target-Ck9mdMLQ.cjs +1 -0
- package/dist/chunks/sign-in-to-remote-again-DFQr-xvw.cjs +1 -0
- package/dist/chunks/sign-in-with-browser-TQANmPyb.cjs +124 -0
- package/dist/chunks/standard-object-fields.constant-C4AVX0t2.cjs +1 -0
- package/dist/chunks/subscribe-graphql-w-Ar4hCj.cjs +2 -0
- package/dist/chunks/to-public-target-BltDNpJN.cjs +1 -0
- package/dist/chunks/to-worker-output-diagnostics-w1hZPfn0.cjs +2 -0
- package/dist/chunks/{typecheck-application-BYPGp8lW.cjs → typecheck-application-8A504oUF.cjs} +1 -1
- package/dist/chunks/{update-config-ClCVH3C5.cjs → update-config-Bk0qgzgZ.cjs} +1 -1
- package/dist/chunks/wait-for-local-environment-zNEJcWA1.cjs +1 -0
- package/dist/chunks/write-config-atomically-B6XQJ6XK.cjs +1 -0
- package/dist/cli.cjs +1 -1
- package/docs/commands.md +875 -233
- package/package.json +3 -2
- package/src/app/README.md +15 -10
- package/src/app/add/README.md +75 -51
- package/src/app/bundles/README.md +56 -33
- package/src/app/client/README.md +23 -21
- package/src/app/dev/README.md +30 -16
- package/src/app/exec/README.md +61 -41
- package/src/app/function-logs/README.md +49 -32
- package/src/app/manifest/README.md +31 -25
- package/src/app/pull/README.md +191 -21
- package/src/app/source/README.md +67 -14
- package/src/app/typecheck/README.md +29 -24
- package/dist/chunks/application-T4xvzjbB.cjs +0 -5
- package/dist/chunks/build-source-manifest-tGYOCdor.cjs +0 -2
- package/dist/chunks/build-source-snapshot-CzwiB8HK.cjs +0 -26
- package/dist/chunks/collect-translatable-strings-BB6KpZT2.cjs +0 -1
- package/dist/chunks/collect-watch-inputs-Dn6g1cNu.cjs +0 -1
- package/dist/chunks/compile-application-translations-S-xuODkF.cjs +0 -870
- package/dist/chunks/constants-Bw_pUpSi-BsJPlw-e.cjs +0 -55
- package/dist/chunks/convert-to-label-CbLHl7Lv.cjs +0 -1
- package/dist/chunks/create-http-status-error-DBUhBnxP.cjs +0 -1
- package/dist/chunks/create-metadata-client-wHecaKNL.cjs +0 -6
- package/dist/chunks/create-pull-base-write-BZnZwrLk.cjs +0 -1
- package/dist/chunks/create-rest-client-B-kdRm7C.cjs +0 -1
- package/dist/chunks/extract-manifest-from-file-CNGCZF6o.cjs +0 -1
- package/dist/chunks/extract-source-translations-BHWNS2e9.cjs +0 -1
- package/dist/chunks/fetch-workspace-or-throw-CBKYiJI0.cjs +0 -1
- package/dist/chunks/format-body-C7fmVDAZ.cjs +0 -1
- package/dist/chunks/format-data-value-DuQjxLye.cjs +0 -1
- package/dist/chunks/format-metadata-fields-DPClLlzD.cjs +0 -2
- package/dist/chunks/format-metadata-owner-ffrpq9D6.cjs +0 -1
- package/dist/chunks/format-progress-line-Cj65-DU5.cjs +0 -1
- package/dist/chunks/generate-application-client-DjE_Tp0M.cjs +0 -1
- package/dist/chunks/get-function-input-schema-GNk3NRLJ-DscBUsKy.cjs +0 -1
- package/dist/chunks/get-local-status-D52rgA2e.cjs +0 -1
- package/dist/chunks/get-system-view-universal-identifier.util-DgYnPEO1-CKEQWit5.cjs +0 -1
- package/dist/chunks/global-flags.constant-C8Yu1rWc.cjs +0 -1
- package/dist/chunks/is-access-token-expiring-Cin0OQ-E.cjs +0 -1
- package/dist/chunks/is-application-not-found-error-BAsQDAoQ.cjs +0 -1
- package/dist/chunks/is-exported-manifest-COVWXnDs.cjs +0 -1
- package/dist/chunks/is-locale-catalog-D0wFrW8f.cjs +0 -1
- package/dist/chunks/is-supported-locale-C33Of85N.cjs +0 -1
- package/dist/chunks/is-valid-package-name-CfHS8_Lr.cjs +0 -1
- package/dist/chunks/kebab-case-D0usAzG-.cjs +0 -1
- package/dist/chunks/list-application-source-files-jEau5Rie.cjs +0 -1
- package/dist/chunks/locale-catalog-format-Cg9YplKA.cjs +0 -20
- package/dist/chunks/metadata-Db5EuDpT.cjs +0 -1
- package/dist/chunks/parse-api-url-jHzjLWX1.cjs +0 -1
- package/dist/chunks/parse-app-export-Dnu8mFrS.cjs +0 -1
- package/dist/chunks/parse-extraction-locale-h0bmy8hf.cjs +0 -1
- package/dist/chunks/parse-graphql-response-BSRJqolm.cjs +0 -1
- package/dist/chunks/parse-json-input-CN9Wyj73.cjs +0 -1
- package/dist/chunks/print-typescript-value-BsjFUceV.cjs +0 -3
- package/dist/chunks/pull-minimum-sdk-version.constant-BxmmUfee.cjs +0 -6
- package/dist/chunks/pull-source-BPng2lln.cjs +0 -1
- package/dist/chunks/read-app-identity-yX9-Ylxj.cjs +0 -1
- package/dist/chunks/read-application-identifier-DuI_jnU7.cjs +0 -1
- package/dist/chunks/read-application-identity-BFQ0oOna.cjs +0 -1
- package/dist/chunks/read-bounded-body-BHRu5J2Y.cjs +0 -1
- package/dist/chunks/read-command-values-rGaU2qHz.cjs +0 -1
- package/dist/chunks/read-config-DdGLulo-.cjs +0 -1
- package/dist/chunks/read-infer-deletion-option-uFunybak.cjs +0 -8
- package/dist/chunks/read-json-object-DcNHNB8I.cjs +0 -1
- package/dist/chunks/read-local-container-CPiVE1-D.cjs +0 -1
- package/dist/chunks/read-snapshot-file-BPLzlSH_.cjs +0 -1
- package/dist/chunks/record-pull-base-RQ2mlIWr.cjs +0 -1
- package/dist/chunks/request-oauth-tokens-Bp2eRh4F.cjs +0 -1
- package/dist/chunks/resolve-app-project-aqOLK3Gb.cjs +0 -1
- package/dist/chunks/resolve-command-target-D4gMeXgA.cjs +0 -1
- package/dist/chunks/resolve-inside-sdk-Ca2uRzQW.cjs +0 -1
- package/dist/chunks/resolve-metadata-object-xK90Ursp.cjs +0 -1
- package/dist/chunks/resolve-project-typescript-DkwXiCmt.cjs +0 -1
- package/dist/chunks/resolve-request-url-I1EOOumy.cjs +0 -1
- package/dist/chunks/resolve-source-sdk-CggXRBVx.cjs +0 -1
- package/dist/chunks/run-api-graphql-command-C3sJMP8H.cjs +0 -1
- package/dist/chunks/run-api-rest-command-DQOP-cn8.cjs +0 -1
- package/dist/chunks/run-app-build-command-CaInzuD2.cjs +0 -2
- package/dist/chunks/run-app-exec-command-DMHS9gpq.cjs +0 -3
- package/dist/chunks/run-app-generate-client-command-Ddq9lT40.cjs +0 -2
- package/dist/chunks/run-app-install-command-DUB3JTon.cjs +0 -1
- package/dist/chunks/run-app-logs-command-CQHxh_Dt.cjs +0 -9
- package/dist/chunks/run-app-operation-KdXiXPb6.cjs +0 -1
- package/dist/chunks/run-app-publish-command-DEV9zgL1.cjs +0 -1
- package/dist/chunks/run-app-pull-command-B-hxnqvY.cjs +0 -6
- package/dist/chunks/run-app-translations-extract-command-C0OfqFii.cjs +0 -2
- package/dist/chunks/run-auth-login-command-CVLvoJ7G.cjs +0 -1
- package/dist/chunks/run-auth-status-command-X0m6rzI-.cjs +0 -1
- package/dist/chunks/run-commands-command-hMdnwU8-.cjs +0 -2
- package/dist/chunks/run-data-get-command-DFE4NM2R.cjs +0 -1
- package/dist/chunks/run-data-list-command-BMEzitv6.cjs +0 -1
- package/dist/chunks/run-doctor-command-Bj2UR9ai.cjs +0 -2
- package/dist/chunks/run-local-logs-command-mUwB2XdV.cjs +0 -1
- package/dist/chunks/run-local-reset-command-WooW50PQ.cjs +0 -2
- package/dist/chunks/run-local-start-command-CiXP155w.cjs +0 -1
- package/dist/chunks/run-local-stop-command-BuV_YdJ7.cjs +0 -1
- package/dist/chunks/run-local-upgrade-command--O_EiVZc.cjs +0 -1
- package/dist/chunks/run-metadata-field-describe-command-iEw4KqIg.cjs +0 -3
- package/dist/chunks/run-open-command-DWLQ7z_P.cjs +0 -1
- package/dist/chunks/select-target-BHGEOc55.cjs +0 -1
- package/dist/chunks/sign-in-to-remote-again-DF27JFsz.cjs +0 -1
- package/dist/chunks/sign-in-with-browser-BNG4oa7e.cjs +0 -124
- package/dist/chunks/to-public-target-D00so1uO.cjs +0 -1
- package/dist/chunks/to-worker-output-diagnostics-WZlUWvcj.cjs +0 -2
- package/dist/chunks/utils-Ds_lD5Ag-DfSfzJJP.cjs +0 -11
- package/dist/chunks/wait-for-local-environment-CjCRJnhK.cjs +0 -1
- package/dist/chunks/write-config-atomically-CQdFdvWo.cjs +0 -1
- /package/dist/chunks/{capitalize-DFPVt1IM-CF4z3TZK.cjs → capitalize-CF4z3TZK.cjs} +0 -0
- /package/dist/chunks/{isDefined-Dtu5EYqP-CJctgvfE.cjs → isDefined-CJctgvfE.cjs} +0 -0
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
|
-
|
|
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
|
|
34
|
-
shared exports. Generated `dist` directories are not tracked, and stale
|
|
35
|
-
can invalidate dependent test and typecheck results. Use the direct
|
|
36
|
-
command above when checking a fix rather than relying on an Nx cache
|
|
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
|
|
45
|
-
|
|
|
46
|
-
| `src/catalog`
|
|
47
|
-
| `src/commands`
|
|
48
|
-
| `src/program`
|
|
49
|
-
| `src/config`, `src/target`, `src/oauth` | Saved connections, target selection and authentication
|
|
50
|
-
| `src/transport`
|
|
51
|
-
| `src/metadata`, `src/data`
|
|
52
|
-
| `src/local`
|
|
53
|
-
| `src/doctor`
|
|
54
|
-
| `src/app`
|
|
55
|
-
| `src/input`, `src/output`
|
|
56
|
-
| `app-template`
|
|
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
|
-
|
|
91
|
-
|
|
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
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
|
115
|
-
version rejection, incomplete packages and cleanup.
|
|
116
|
-
|
|
117
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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.
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
-
|
|
155
|
-
`dist/app-template/yarn.lock`.
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
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
|
|
175
|
-
It deploys the app before tests and uninstalls it
|
|
176
|
-
installed CLI with `--json`. Apps invoke the
|
|
177
|
-
CLI as a library or add it as a dependency.
|
|
178
|
-
|
|
179
|
-
the [
|
|
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
|
|
4
|
-
inspect metadata and records, send API requests, and develop
|
|
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
|
-
|
|
51
|
-
|
|
52
|
-
app
|
|
53
|
-
|
|
54
|
-
|
|
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
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
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,
|
|
64
|
-
also needs Twenty 2.46 or later; on earlier versions, use an API
|
|
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
|
-
|
|
76
|
-
errors fail builds. See
|
|
77
|
-
for supported SDK
|
|
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,
|
|
82
|
-
and recovery for each workflow.
|
|
83
|
-
- [Contributing](CONTRIBUTING.md), building from source, package structure,
|
|
84
|
-
and releases.
|
|
85
|
-
- [Application tooling](src/app/README.md), module responsibilities and
|
|
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.
|
package/dist/app-template/.nvmrc
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
|
@@ -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
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
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
|
});
|