twenty 2.51.3 → 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 +35 -1402
- 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-Gw2TI8Xe.cjs → build-source-manifest-BIq-ByiX.cjs} +1 -1
- package/dist/chunks/{build-source-snapshot-lbc2Pb7D.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-Da5yI23t.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-DA7o-ebo.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-DrUZkCUW.cjs → run-app-translations-extract-command-BtKIasjA.cjs} +1 -1
- package/dist/chunks/{run-app-typecheck-command-CQe2CTGd.cjs → run-app-typecheck-command-CpaU-SSu.cjs} +1 -1
- package/dist/chunks/{run-app-uninstall-command--RFHGXiH.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-D4R17bRL.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-B_hf2E32.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-B92ETb2e.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-EiwJs83j.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-Bd-dYByR.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-C3qn6MSa.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-BNnltA8w.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-C0ojf2K6.cjs +0 -163
- package/dist/chunks/run-app-apply-command-DM_46_Gl.cjs +0 -2
- package/dist/chunks/run-app-dev-command-DkerkLC8.cjs +0 -2
- package/dist/chunks/run-app-exec-command-CpNraBBq.cjs +0 -3
- package/dist/chunks/run-app-generate-client-command-a5IQE60M.cjs +0 -2
- package/dist/chunks/run-app-init-command-ktxmLunJ.cjs +0 -2
- package/dist/chunks/run-app-install-command-AG25zpGx.cjs +0 -1
- package/dist/chunks/run-app-logs-command-Dd-OBwhF.cjs +0 -9
- package/dist/chunks/run-app-operation-BLlHL5Nk.cjs +0 -1
- package/dist/chunks/run-app-plan-command-7Bi90BQp.cjs +0 -1
- package/dist/chunks/run-app-publish-command-9zd_f_a3.cjs +0 -3
- package/dist/chunks/run-app-pull-command-CdArJFPT.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-CwAoqiMW.cjs +0 -23
- package/dist/chunks/run-commands-command-Dp-Xzn5x.cjs +0 -2
- package/dist/chunks/run-data-list-command-CUp_FN_I.cjs +0 -1
- package/dist/chunks/run-doctor-command-C-gOPvp9.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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-mLOUI7ql.cjs");var t=e.t(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),n=e.t(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),r=e.t(((e,t)=>{var n=`2.0.0`,r=256;t.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:r-6,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),i=e.t(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),a=e.t(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=r(),s=i();e=t.exports={};var c=e.re=[],l=e.safeRe=[],u=e.src=[],d=e.t={},f=0,p=`[a-zA-Z0-9-]`,m=[[`\\s`,1],[`\\d`,o],[p,a]],h=e=>{for(let[t,n]of m)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},g=(e,t,n)=>{let r=h(t),i=f++;s(e,i,t),d[e]=i,u[i]=t,c[i]=new RegExp(t,n?`g`:void 0),l[i]=new RegExp(r,n?`g`:void 0)};g(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),g(`NUMERICIDENTIFIERLOOSE`,`\\d+`),g(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${p}*`),g(`MAINVERSION`,`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),g(`MAINVERSIONLOOSE`,`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),g(`PRERELEASEIDENTIFIER`,`(?:${u[d.NUMERICIDENTIFIER]}|${u[d.NONNUMERICIDENTIFIER]})`),g(`PRERELEASEIDENTIFIERLOOSE`,`(?:${u[d.NUMERICIDENTIFIERLOOSE]}|${u[d.NONNUMERICIDENTIFIER]})`),g(`PRERELEASE`,`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),g(`PRERELEASELOOSE`,`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),g(`BUILDIDENTIFIER`,`${p}+`),g(`BUILD`,`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),g(`FULLPLAIN`,`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),g(`FULL`,`^${u[d.FULLPLAIN]}$`),g(`LOOSEPLAIN`,`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),g(`LOOSE`,`^${u[d.LOOSEPLAIN]}$`),g(`GTLT`,`((?:<|>)?=?)`),g(`XRANGEIDENTIFIERLOOSE`,`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g(`XRANGEIDENTIFIER`,`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),g(`XRANGEPLAIN`,`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),g(`XRANGEPLAINLOOSE`,`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),g(`XRANGE`,`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),g(`XRANGELOOSE`,`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),g(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),g(`COERCE`,`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),g(`COERCEFULL`,u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?(?:${u[d.BUILD]})?(?:$|[^\\d])`),g(`COERCERTL`,u[d.COERCE],!0),g(`COERCERTLFULL`,u[d.COERCEFULL],!0),g(`LONETILDE`,`(?:~>?)`),g(`TILDETRIM`,`(\\s*)${u[d.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,g(`TILDE`,`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),g(`TILDELOOSE`,`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),g(`LONECARET`,`(?:\\^)`),g(`CARETTRIM`,`(\\s*)${u[d.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,g(`CARET`,`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),g(`CARETLOOSE`,`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),g(`COMPARATORLOOSE`,`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),g(`COMPARATOR`,`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),g(`COMPARATORTRIM`,`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,g(`HYPHENRANGE`,`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),g(`HYPHENRANGELOOSE`,`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),g(`STAR`,`(<|>)?=?\\s*\\*`),g(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),g(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),o=e.t(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),s=e.t(((e,t)=>{var s=i(),{MAX_LENGTH:c,MAX_SAFE_INTEGER:l}=r(),{safeRe:u,t:d}=a(),f=n(),{compareIdentifiers:p}=o();t.exports=class e{constructor(t,n){if(n=f(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>c)throw TypeError(`version is longer than ${c} characters`);s(`SemVer`,t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=t.trim().match(n.loose?u[d.LOOSE]:u[d.FULL]);if(!r)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>l||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>l||this.patch<0)throw TypeError(`Invalid patch version`);r[4]?this.prerelease=r[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<l)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(s(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),p(this.major,t.major)||p(this.minor,t.minor)||p(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let e=this.prerelease[n],r=t.prerelease[n];if(s(`prerelease compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let e=this.build[n],r=t.build[n];if(s(`build compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}inc(e,t,n){switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),p(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),c=e.t(((e,t)=>{var n=s();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),l=e.t(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)===0})),u=e.t(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)!==0})),d=e.t(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)>0})),f=e.t(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)>=0})),p=e.t(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)<0})),m=e.t(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)<=0})),h=e.t(((e,t)=>{var n=l(),r=u(),i=d(),a=f(),o=p(),s=m();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),g=e.t(((e,t)=>{var r=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return r}constructor(t,n){if(n=o(n),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),d(`comparator`,t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===r?this.value=``:this.value=this.operator+this.semver.version,d(`comp`,this)}parse(e){let t=this.options.loose?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],n=e.match(t);if(!n)throw TypeError(`Invalid comparator: ${e}`);this.operator=n[1]===void 0?``:n[1],this.operator===`=`&&(this.operator=``),n[2]?this.semver=new f(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(d(`Comparator.test`,e,this.options.loose),this.semver===r||e===r)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return u(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``||new p(t.value,n).test(this.value):t.operator===``?t.value===``||new p(this.value,n).test(t.semver):(n=o(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||u(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||u(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var o=n(),{safeRe:c,t:l}=a(),u=h(),d=i(),f=s(),p=_()})),_=e.t(((e,o)=>{var c=/\s+/g;o.exports=class e{constructor(t,n){if(n=u(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof d)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().replace(c,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!S(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&C(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&b)|(this.options.loose&&x))+`:`+e,n=l.get(t);if(n)return n;let r=this.options.loose,i=r?m[h.HYPHENRANGELOOSE]:m[h.HYPHENRANGE];e=e.replace(i,F(this.options.includePrerelease)),f(`hyphen replace`,e),e=e.replace(m[h.COMPARATORTRIM],_),f(`comparator trim`,e),e=e.replace(m[h.TILDETRIM],v),f(`tilde trim`,e),e=e.replace(m[h.CARETTRIM],y),f(`caret trim`,e);let a=e.split(` `).map(e=>T(e,this.options)).join(` `).split(/\s+/).map(e=>P(e,this.options));r&&(a=a.filter(e=>(f(`loose invalid filter`,e,this.options),!!e.match(m[h.COMPARATORLOOSE])))),f(`range list`,a);let o=new Map,s=a.map(e=>new d(e,this.options));for(let e of s){if(S(e))return[e];o.set(e.value,e)}o.size>1&&o.has(``)&&o.delete(``);let c=[...o.values()];return l.set(t,c),c}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>w(e,n)&&t.set.some(t=>w(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new p(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(I(this.set[t],e,this.options))return!0;return!1}};var l=new(t()),u=n(),d=g(),f=i(),p=s(),{safeRe:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=a(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=r(),S=e=>e.value===`<0.0.0-0`,C=e=>e.value===``,w=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},T=(e,t)=>(f(`comp`,e,t),e=k(e,t),f(`caret`,e),e=D(e,t),f(`tildes`,e),e=j(e,t),f(`xrange`,e),e=N(e,t),f(`stars`,e),e),E=e=>!e||e.toLowerCase()===`x`||e===`*`,D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(` `),O=(e,t)=>{let n=t.loose?m[h.TILDELOOSE]:m[h.TILDE];return e.replace(n,(t,n,r,i,a)=>{f(`tilde`,e,t,n,r,i,a);let o;return E(n)?o=``:E(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:E(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(f(`replaceTilde pr`,a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,f(`tilde return`,o),o})},k=(e,t)=>e.trim().split(/\s+/).map(e=>A(e,t)).join(` `),A=(e,t)=>{f(`caret`,e,t);let n=t.loose?m[h.CARETLOOSE]:m[h.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{f(`caret`,e,t,n,i,a,o);let s;return E(n)?s=``:E(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(f(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(f(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),f(`caret return`,s),s})},j=(e,t)=>(f(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>M(e,t)).join(` `)),M=(e,t)=>{e=e.trim();let n=t.loose?m[h.XRANGELOOSE]:m[h.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{f(`xRange`,e,n,r,i,a,o,s);let c=E(i),l=c||E(a),u=l||E(o),d=u;return r===`=`&&d&&(r=``),s=t.includePrerelease?`-0`:``,c?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&d?(l&&(a=0),o=0,r===`>`?(r=`>=`,l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,l?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):l?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),f(`xRange return`,n),n})},N=(e,t)=>(f(`replaceStars`,e,t),e.trim().replace(m[h.STAR],``)),P=(e,t)=>(f(`replaceGTE0`,e,t),e.trim().replace(m[t.includePrerelease?h.GTE0PRE:h.GTE0],``)),F=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=E(r)?``:E(i)?`>=${r}.0.0${e?`-0`:``}`:E(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=E(l)?``:E(u)?`<${+l+1}.0.0-0`:E(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),I=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(f(e[n].semver),e[n].semver!==d.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),v=e.t(((e,t)=>{var n=_();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),y=e.t(((e,t)=>{var n=s(),r=g(),{ANY:i}=r,a=_(),o=v(),c=d(),l=p(),u=m(),h=f();t.exports=(e,t,s,d)=>{e=new n(e,d),t=new a(t,d);let f,p,m,g,_;switch(s){case`>`:f=c,p=u,m=l,g=`>`,_=`>=`;break;case`<`:f=l,p=h,m=c,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,f(e.semver,o.semver,d)?o=e:m(e.semver,s.semver,d)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&p(e,s.semver)||s.operator===_&&m(e,s.semver))return!1}return!0}})),b=e.t(((e,t)=>{var n=y();t.exports=(e,t,r)=>n(e,t,`<`,r)})),x=e.t(((e,t)=>{var n=_();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}}));Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return r}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./cli-error-
|
|
1
|
+
const e=require("./cli-error-CrUD8uMp.cjs");var t=/^[A-Za-z0-9][A-Za-z0-9._-]{0,62}$/,n=n=>{if(!t.test(n))throw new e.t({code:`INVALID_REMOTE_NAME`,exitCode:e.n.USAGE,message:`${n} is not a valid remote name.`,hint:`Use letters, digits, dots, dashes and underscores, starting with a letter or digit.`});return n};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./cli-error-
|
|
1
|
+
const e=require("./cli-error-CrUD8uMp.cjs");var t=({error:t,phase:n,outcome:r,completedPhases:i,hint:a})=>new e.t({cause:t,code:t.code,exitCode:t.exitCode,message:t.message,hint:t.hint??a,details:{...t.details,phase:n,outcome:r,completedPhases:[...i]}});Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return t}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./build--4zYt4wd.cjs"),t=require("./isDefined-Dtu5EYqP-CJctgvfE.cjs"),n=require("./constants-Bod2d_GP-CQVvzM4m.cjs"),r=require("./has-error-code-DsJeqbZq.cjs"),i=require("./cli-error-CrUD8uMp.cjs"),a=require("./request-timeout-milliseconds.constant-BkZTOtpY.cjs"),o=require("./config-file-mode.constant-DLBzKKUl.cjs");let s=require("node:crypto"),c=require("node:fs/promises"),l=require("node:path"),u=require("node:timers/promises");var d=e.t(),f={TIMEOUT_MILLISECONDS:2*a.t+5e3,RETRY_MILLISECONDS:50},p=async e=>{try{let t=JSON.parse(await(0,c.readFile)(e,`utf8`));return n.n(t)&&(0,d.isNumber)(t.pid)&&(0,d.isString)(t.token)?{pid:t.pid,token:t.token}:void 0}catch{return}},m=e=>{try{return process.kill(e,0),!0}catch(e){return r.t(e,`EPERM`)}},h=async e=>{let n=await p(e),r=t.t(n)&&!m(n.pid),a=t.t(n)?` (pid ${n.pid})`:``;return new i.t({code:`CONFIG_LOCKED`,message:r?`A twenty command (pid ${n.pid}) stopped without releasing ${e}.`:`Another twenty command${a} is changing ${(0,l.dirname)(e)}.`,hint:r?`Delete ${e} and try again.`:`Try again when it finishes. If no twenty command is running, delete ${e}.`,details:{lockPath:e,ownerPid:n?.pid??null}})},g=async(e,t)=>{try{let n=await(0,c.open)(e,`wx`,o.t.PRIVATE_FILE);return await n.writeFile(JSON.stringify({pid:process.pid,token:t})),await n.close(),!0}catch(e){if(r.t(e,`EEXIST`))return!1;throw e}},_=async({lockPath:e,token:n,signal:r})=>{let i=Date.now()+f.TIMEOUT_MILLISECONDS,a=await g(e,n);for(;!a;){r.throwIfAborted();let o=await p(e);if(t.t(o)&&!m(o.pid)||Date.now()>i)throw await h(e);await(0,u.setTimeout)(f.RETRY_MILLISECONDS,void 0,{signal:r}),a=await g(e,n)}},v=async(e,t)=>{(await p(e))?.token===t&&await(0,c.rm)(e,{force:!0})},y=async({configPath:e,signal:t,operation:n})=>{let r=`${e}.lock`,i=(0,s.randomUUID)();await(0,c.mkdir)((0,l.dirname)(e),{recursive:!0,mode:o.t.PRIVATE_DIRECTORY}),await _({lockPath:r,token:i,signal:t});try{return await n()}finally{await v(r,i)}},b=async(e,t)=>{let n=`${e}.${process.pid}.${(0,s.randomUUID)()}.tmp`,r=await(0,c.open)(n,`wx`,o.t.PRIVATE_FILE);try{await r.writeFile(`${JSON.stringify(t,null,2)}\n`),await r.sync(),await r.close(),await(0,c.rename)(n,e)}catch(e){throw await r.close().catch(()=>void 0),await(0,c.rm)(n,{force:!0}),e}};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return b}});
|
package/dist/cli.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
#!/usr/bin/env node
|
|
2
|
-
const e=require("./chunks/check-node-requirement-
|
|
2
|
+
const e=require("./chunks/check-node-requirement-CnwHKQBp.cjs"),t=require("./chunks/cli-node-version-range.constant-D3XrqV07.cjs");process.stdout.on(`error`,e=>{if(e.code!==`EPIPE`)throw e;process.exit()}),(async({args:n,nodeVersion:r,loadCli:i})=>{if(e.t({version:r,range:`>=24.5.0`})!==`satisfied`){process.stderr.write(`twenty requires Node.js ${t.t}; this is Node.js ${r}. Switch to a supported Node.js version, then try again.\n`),process.exitCode=1;return}await(await i()).runCli(n)})({args:process.argv.slice(2),nodeVersion:process.versions.node,loadCli:()=>Promise.resolve().then(()=>require("./chunks/run-cli-BYGyQans.cjs"))});
|
package/docs/commands.md
CHANGED
|
@@ -310,27 +310,29 @@ and inspect the changes before applying an app with a different tooling version.
|
|
|
310
310
|
|
|
311
311
|
```bash
|
|
312
312
|
twenty app plan --remote dev
|
|
313
|
-
twenty app plan --path ./apps/billing --no-
|
|
313
|
+
twenty app plan --path ./apps/billing --no-prune --json
|
|
314
|
+
twenty app plan --prune
|
|
314
315
|
```
|
|
315
316
|
|
|
316
317
|
`app plan` builds once with the CLI pipeline, releases the temporary snapshot, then requests the server's metadata preview with `dryRun: true`. It uses the usual connection selection and requires the server's `APPLICATIONS` permission. The server enforces authorization, ownership and manifest/version compatibility. No registration, installation, upload or metadata synchronization is performed, and planning never advances a pull base. The local build can generate app artifacts, just as `app build` does.
|
|
317
318
|
|
|
318
319
|
JSON marks plans with `plan: true`. A plan is not a saved approval: remote changes can alter what a later apply does. A missing owned application registration returns `PLAN_UNAVAILABLE` (exit 1). Register the app with `twenty app apply --create`, then plan again.
|
|
319
320
|
|
|
320
|
-
Entities missing from source are included as deletions by default
|
|
321
|
+
Entities missing from source are included as deletions by default, except for the workspace custom application, which keeps them unless you pass `--prune`. `--no-prune` passes `inferDeletionFromMissingEntities: false` to the preview and `--prune` passes `true`; without either the argument is omitted and the server decides. Servers released before `--prune` existed treat an omitted argument as `true`, so pass `--no-prune` to keep entities against them. The deprecated `--no-delete` still works as `--no-prune` with a `DEPRECATED_OPTION` warning; an explicit `--prune` or `--no-prune` takes precedence over it. Human output lists every action, identifies object/field deletions that would remove stored data, and shows the opt-out hint. JSON includes action details and counts. Application-variable values, including previous values in updates, are redacted from all plan actions regardless of their `isSecret` setting. A plan exceeding 10,000 actions or the transport's 16 MiB response limit fails instead of displaying an incomplete plan.
|
|
321
322
|
|
|
322
323
|
## Apply an app
|
|
323
324
|
|
|
324
325
|
```bash
|
|
325
326
|
twenty app apply --remote dev
|
|
326
327
|
twenty app apply --create --json
|
|
327
|
-
twenty app apply --no-
|
|
328
|
+
twenty app apply --no-prune
|
|
329
|
+
twenty app apply --prune
|
|
328
330
|
```
|
|
329
331
|
|
|
330
332
|
`app apply` builds the app once with the CLI pipeline and keeps that build's snapshot until it finishes, so the files it uploads are the ones it built. It then asks the workspace for a fresh plan, shows it, and applies it: it installs the development app if needed, uploads the snapshot files, synchronizes the manifest, and regenerates the app's typed API client. It needs the server's `APPLICATIONS` and `UPLOAD_FILE` permissions.
|
|
331
333
|
|
|
332
334
|
- **New apps.** An app without a registration needs `--create`, or a yes at the prompt in an interactive terminal. The CLI then registers the app (the server also requires `API_KEYS_AND_WEBHOOKS` for this), installs it, and plans its changes before uploading anything. Without approval it stops with `CREATE_REQUIRED` (exit 2). The registration's client secret is never requested.
|
|
333
|
-
- **Deletions.** Entities missing from source are deleted by default, as in `app plan`; `--no-
|
|
335
|
+
- **Deletions.** Entities missing from source are deleted by default (except in the workspace custom application), as in `app plan`; `--no-prune` keeps them, `--prune` deletes them in every app, and the choice is sent to both the plan and the sync. JSON reports `inferDeletionFromMissingEntities: null` when neither flag is passed. Object and field deletions permanently delete stored data, so they need `--yes` or a yes at the prompt. Otherwise the command stops with `CONFIRMATION_REQUIRED` (exit 2) before changing anything. `--yes` never changes which entities are deleted.
|
|
334
336
|
- **Uploads.** File bytes go straight to the upload URLs the server returns, without the CLI's credentials. Each file is checked against the build's size and SHA-256 before anything is uploaded.
|
|
335
337
|
- **Pull baseline.** After an acknowledged sync, the CLI fetches the workspace ID and fresh application export, then atomically records `.twenty/cli/pull-base.json`. This baseline lets `app pull` distinguish workspace changes from local edits. It is bound to the normalized API URL, workspace UUID and app UUID. JSON reports `pullBase: "recorded"`, `"failed"` or `"unsupported"`; only a recorded base adds `pullBase` to `completedPhases`. Invalid exports or file-write errors preserve the prior base, warn with `PULL_BASE_NOT_RECORDED`, and allow client generation to continue. A server without the export API reports `"unsupported"` without a warning on every apply. The export is recorded as the server sent it; collections it lacks are read as empty by pull. Cancellation before the base is committed exits 130 with `outcome: "applied"` and `phase: "pullBase"`.
|
|
336
338
|
- **Typed client.** After the sync, the CLI fetches the app's GraphQL schema from the workspace and calls the app's own `twenty-client-sdk/generate` to regenerate the client in the app's own `node_modules/twenty-client-sdk` (`clientGeneration: "generated"`). It is skipped with a `CLIENT_NOT_GENERATED` warning when the app has no `node_modules/twenty-client-sdk` of its own, as in a hoisted workspace. A symlinked client package is followed and its target rewritten, so don't apply two apps that share one client package at the same time.
|
|
@@ -342,8 +344,8 @@ Remote changes made between the plan and the sync can change what the sync does.
|
|
|
342
344
|
|
|
343
345
|
```bash
|
|
344
346
|
twenty app dev --remote dev
|
|
345
|
-
twenty app dev --create --no-
|
|
346
|
-
twenty app dev --path ./apps/billing --format ndjson --no-
|
|
347
|
+
twenty app dev --create --no-prune
|
|
348
|
+
twenty app dev --path ./apps/billing --format ndjson --no-prune
|
|
347
349
|
```
|
|
348
350
|
|
|
349
351
|
`app dev` builds and syncs once, then watches for edits. Each attempt uses the
|
|
@@ -368,7 +370,8 @@ snapshot was acknowledged by the workspace. This is eventual convergence after
|
|
|
368
370
|
edits settle, not an atomic checkout of files being edited concurrently.
|
|
369
371
|
|
|
370
372
|
Registration uses `--create` or a terminal confirmation. Deletion inference is
|
|
371
|
-
on by default, with `--no-
|
|
373
|
+
on by default except for the workspace custom application, with `--no-prune`
|
|
374
|
+
to keep missing entities and `--prune` to delete them in every app. Object and field
|
|
372
375
|
deletions require a terminal confirmation or `--yes`. Every revision requests a
|
|
373
376
|
fresh plan. An edit cancels a pending confirmation; approval for the
|
|
374
377
|
old revision cannot authorize the new one. A remote failure is reported with the
|
|
@@ -418,7 +421,7 @@ twenty app pull --universal-identifier <uuid> --verbose
|
|
|
418
421
|
|
|
419
422
|
`app pull` reads the app's definition and exports its workspace metadata into the existing project. It uses the selected connection and the server's `APPLICATIONS` permission; the server decides which apps this workspace can export. It does not register an app or change the workspace. When a project has no application definition, provide `--universal-identifier`. A project declaring a different app is refused before writing.
|
|
420
423
|
|
|
421
|
-
The project must have `twenty-sdk` installed, version `>=1.23.0`, with its public `twenty-sdk/define` and `twenty-sdk/front-component` exports. Pull also checks that the SDK provides the authoring APIs required by the generated files. Missing APIs fail with `SDK_SOURCE_UNSUPPORTED`; install a compatible version (2.
|
|
424
|
+
The project must have `twenty-sdk` installed, version `>=1.23.0`, with its public `twenty-sdk/define` and `twenty-sdk/front-component` exports. Pull also checks that the SDK provides the authoring APIs required by the generated files. Missing APIs fail with `SDK_SOURCE_UNSUPPORTED`; install a compatible version (2.50.0 or later). Pull does not require a project TypeScript compiler. Run `twenty app typecheck` afterwards to check the generated definitions against your installed SDK.
|
|
422
425
|
|
|
423
426
|
Pull compares workspace metadata and local definitions using a baseline saved
|
|
424
427
|
by apply or a previous pull in `.twenty/cli/pull-base.json`. The baseline belongs
|
|
@@ -432,7 +435,7 @@ failures restore the previous files and baseline.
|
|
|
432
435
|
|
|
433
436
|
Failures in reconciliation report `error.details.outcome`: `unchanged` after an acknowledged refusal, cancellation before writing or successful rollback; `unknown` if a worker stops without acknowledging completion or rollback fails; `pulled` if writes and baseline completed but temporary-file cleanup failed. An interrupted worker can leave files partially written; inspect the changes and retained `.twenty/cli/pull-backup-*` files before retrying. A failed rollback also reports `backupDirectory`. Ctrl+C exits 130 unless the worker acknowledges a completed commit, in which case pull returns its result.
|
|
434
437
|
|
|
435
|
-
The current export contains metadata and translations, not application source assets or dependency files. Logic-function/front-component code and unsupported metadata are not regenerated. An export with nonempty `files` is refused before writing. Package files, dependency pins and the installed generated client are left alone; pull never installs dependencies. Each export response is limited to 16 MiB. See the [pull implementation](../src/app/pull/README.md) for reconciliation and compatibility details.
|
|
438
|
+
The current export contains metadata and translations, not application source assets or dependency files. Workflows are written as `defineWorkflow` files in `src/workflows`; a workflow changed in the workflow builder, or one using steps or references an application cannot declare, is reported as a coverage gap and its local file is kept. The workspace Custom application is published from the builder too, so its workflows are written from their active version, and apply publishes a changed definition as a new version. Skills and agents are written as `defineSkill` and `defineAgent` files in `src/skills` and `src/agents`; one the server cannot reproduce from a definition, such as an agent on more than one role, is reported as a coverage gap and its local file is kept. Logic-function/front-component code and unsupported metadata are not regenerated. An export with nonempty `files` is refused before writing. Package files, dependency pins and the installed generated client are left alone; pull never installs dependencies. Each export response is limited to 16 MiB. See the [pull implementation](../src/app/pull/README.md) for reconciliation and compatibility details.
|
|
436
439
|
|
|
437
440
|
## Install a registered app
|
|
438
441
|
|
|
@@ -603,7 +606,7 @@ Builds and typechecks the app, packs that exact build, then publishes the packag
|
|
|
603
606
|
|
|
604
607
|
Install npm and authenticate with the intended registry first. npm runs from the app directory, so its project/user configuration and environment credentials apply. `--tag` sets the npm dist-tag. GitHub Actions jobs with OIDC request provenance automatically; set `TWENTY_APP_PUBLISH_DISABLE_PROVENANCE=true` to opt out, for example when publishing from a private source repository.
|
|
605
608
|
|
|
606
|
-
Packing and publishing skip npm lifecycle scripts because the CLI already built the app. npm's package-file selection still applies. If `package.json` has a `files` field, it must include `manifest.json` and the generated app files; the command rejects an incomplete package before publication. npm excludes the root `yarn.lock` from packages. Temporary packages and build snapshots are removed after completion or failure.
|
|
609
|
+
Packing and publishing skip npm lifecycle scripts because the CLI already built the app. npm's package-file selection still applies. If `package.json` has a `files` field, it must include `manifest.json` and the generated app files; the command rejects an incomplete package before publication. npm excludes the root `yarn.lock` from packages, so the CLI also packs it as `dependencies/yarn.lock`, where Twenty reads it at install. Temporary packages and build snapshots are removed after completion or failure.
|
|
607
610
|
|
|
608
611
|
Human mode displays npm output and supports interactive authentication when a terminal is available. JSON mode returns one CLI envelope and does not prompt; configure an automation token or npm’s `npm_config_otp` environment option before running it. Failed npm commands return `PUBLISH_FAILED` with the subprocess exit code and captured output. If publication is interrupted after sending the package, check the registry before retrying, since the version may already have been published.
|
|
609
612
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "twenty",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.53.0",
|
|
4
4
|
"description": "The Twenty command line.",
|
|
5
5
|
"homepage": "https://twenty.com",
|
|
6
6
|
"repository": {
|
|
@@ -35,12 +35,13 @@
|
|
|
35
35
|
"npm-pick-manifest": "^11.0.1",
|
|
36
36
|
"semver": "7.6.3",
|
|
37
37
|
"string-width": "^8.2.0",
|
|
38
|
-
"twenty-client-sdk": "2.
|
|
38
|
+
"twenty-client-sdk": "2.53.0",
|
|
39
39
|
"twenty-shared": "0.0.0",
|
|
40
|
-
"undici": "^7.
|
|
40
|
+
"undici": "^7.30.1",
|
|
41
41
|
"uuid": "^13.0.2",
|
|
42
42
|
"vite": "^8.0.0",
|
|
43
|
-
"
|
|
43
|
+
"vite-tsconfig-paths": "^4.2.1",
|
|
44
|
+
"vitest": "^4.1.12"
|
|
44
45
|
},
|
|
45
46
|
"dependencies": {
|
|
46
47
|
"chokidar": "^3.6.0",
|
|
@@ -57,18 +57,16 @@ From `packages/twenty-cli`, after building the repository SDK, shared and UI
|
|
|
57
57
|
packages:
|
|
58
58
|
|
|
59
59
|
```bash
|
|
60
|
-
node ../../node_modules/vitest/vitest.mjs run --config vitest.config.ts --maxWorkers=1 src/app/manifest/__tests__/manifest-
|
|
60
|
+
node ../../node_modules/vitest/vitest.mjs run --config vitest.config.ts --maxWorkers=1 src/app/manifest/__tests__/manifest-fixtures.spec.ts
|
|
61
61
|
```
|
|
62
62
|
|
|
63
|
-
The suite
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
`./cli` or their implementation files.
|
|
63
|
+
The suite compares manifests, entity file paths, errors and warnings against
|
|
64
|
+
checked-in expectations for every repository fixture and a freshly initialized
|
|
65
|
+
app. It exercises the production CLI worker using a copy of the real SDK's
|
|
66
|
+
authoring entry points without `./build`, `./cli` or their implementation files.
|
|
68
67
|
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
Unit tests cover individual validation and translation rules.
|
|
68
|
+
Comparisons remove only JSON-omitted `undefined` properties, matching the worker
|
|
69
|
+
IPC boundary; arrays and diagnostics are not reordered. Additional cases cover
|
|
70
|
+
invalid and duplicate identifiers, empty lockfiles, translations, source output
|
|
71
|
+
and credential filtering. Unit tests cover individual validation and translation
|
|
72
|
+
rules.
|
package/src/app/pull/README.md
CHANGED
|
@@ -23,6 +23,10 @@ See the [app tooling overview](../README.md) for package boundaries.
|
|
|
23
23
|
|
|
24
24
|
Translation string extraction uses the CLI's TypeScript parser. Traversal, static-string rules, whitespace normalization and deduplication are checked against the SDK reference by parity tests. It does not depend on ts-morph or load parser tooling for help and command discovery.
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
Workflows arrive in `manifest.workflows` and are written as `defineWorkflow` files. Their filter operands and form field types use SDK enums; filter group logical operators stay string literals, which every SDK with `defineWorkflow` accepts. A workflow the server cannot express as a definition is reported as `UNSUPPORTED` coverage, so its local file is kept.
|
|
27
|
+
|
|
28
|
+
Skills and agents arrive in `manifest.skills` and `manifest.agents` and are written as `defineSkill` and `defineAgent` files, with no enum bindings. The server exports one only when its definition reproduces the stored entity; otherwise it is reported as `UNSUPPORTED` coverage, so its local file is kept.
|
|
29
|
+
|
|
30
|
+
Pull accepts metadata exports with `files: []` and refuses nonempty source/dependency-file exports. It does not restore package files, generate the typed client or write logic-function/front-component source. Export responses have a 16 MiB cap. Pull does not modify the workspace. Because pull is partial, `app apply` of the workspace custom application only deletes entities missing from source with `--prune`.
|
|
27
31
|
|
|
28
32
|
Tests cover writers, planning and reconciliation. Command tests build the actual Vite worker, exercise an authoring-only SDK, local mock HTTP, credentials/output isolation, SDK export refusal and forced termination after the first destination write. The repository SDK tests cover canonical generated definitions, nested coverage, translation preservation, target mismatch, overwrite reporting and rollback.
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const e=require("./build-CX6FBrbu.cjs"),t=require("./utils-CvvLHbc4-CKDJ1YgX.cjs"),n=require("./constants-D-caeNc5-9rDzSg5B.cjs");function r(e){if(!n.gt(e))throw TypeError(`Invalid UUID`);let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,t&255,(t=parseInt(e.slice(9,13),16))>>>8,t&255,(t=parseInt(e.slice(14,18),16))>>>8,t&255,(t=parseInt(e.slice(19,23),16))>>>8,t&255,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255)}function i(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}var a=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,o=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function s(e,t,a,o,s,c){let l=typeof a==`string`?i(a):a,u=typeof o==`string`?r(o):o;if(typeof o==`string`&&(o=r(o)),o?.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);let d=new Uint8Array(16+l.length);if(d.set(u),d.set(l,u.length),d=t(d),d[6]=d[6]&15|e,d[8]=d[8]&63|128,s){if(c||=0,c<0||c+16>s.length)throw RangeError(`UUID byte range ${c}:${c+15} is out of buffer bounds`);for(let e=0;e<16;++e)s[c+e]=d[e];return s}return n.ht(d)}function c(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function l(e,t){return e<<t|e>>>32-t}function u(e){let t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520],r=new Uint8Array(e.length+1);r.set(e),r[e.length]=128,e=r;let i=e.length/4+2,a=Math.ceil(i/16),o=Array(a);for(let t=0;t<a;++t){let n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[t*64+r*4]<<24|e[t*64+r*4+1]<<16|e[t*64+r*4+2]<<8|e[t*64+r*4+3];o[t]=n}o[a-1][14]=(e.length-1)*8/2**32,o[a-1][14]=Math.floor(o[a-1][14]),o[a-1][15]=(e.length-1)*8&4294967295;for(let e=0;e<a;++e){let r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=l(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],a=n[1],s=n[2],u=n[3],d=n[4];for(let e=0;e<80;++e){let n=Math.floor(e/20),o=l(i,5)+c(n,a,s,u)+d+t[n]+r[e]>>>0;d=u,u=s,s=l(a,30)>>>0,a=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+a>>>0,n[2]=n[2]+s>>>0,n[3]=n[3]+u>>>0,n[4]=n[4]+d>>>0}return Uint8Array.of(n[0]>>24,n[0]>>16,n[0]>>8,n[0],n[1]>>24,n[1]>>16,n[1]>>8,n[1],n[2]>>24,n[2]>>16,n[2]>>8,n[2],n[3]>>24,n[3]>>16,n[3]>>8,n[3],n[4]>>24,n[4]>>16,n[4]>>8,n[4])}function d(e,t,n,r){return s(80,u,e,t,n,r)}d.DNS=a,d.URL=o;function f(e){if(!n.gt(e))throw TypeError(`Invalid UUID`);return parseInt(e.slice(14,15),16)}function p(e){return e instanceof Boolean||typeof e==`boolean`}function m(e){return e instanceof String||typeof e==`string`}function ee(e){return e!=null&&(typeof e==`object`||typeof e==`function`)&&!Array.isArray(e)}var te=[`choice`,`score`,`boolean`],ne=/^[a-zA-Z0-9_.-]{1,64}$/,re=e=>ne.test(e),h=e.t(),g=function(e){return e.CODE=`CODE`,e.LOGIC_FUNCTION=`LOGIC_FUNCTION`,e.SEND_EMAIL=`SEND_EMAIL`,e.SEND_CHAT_MESSAGE=`SEND_CHAT_MESSAGE`,e.DRAFT_EMAIL=`DRAFT_EMAIL`,e.CREATE_CALENDAR_EVENT=`CREATE_CALENDAR_EVENT`,e.CREATE_RECORD=`CREATE_RECORD`,e.UPDATE_RECORD=`UPDATE_RECORD`,e.DELETE_RECORD=`DELETE_RECORD`,e.UPSERT_RECORD=`UPSERT_RECORD`,e.FIND_RECORDS=`FIND_RECORDS`,e.PICK_RECORD=`PICK_RECORD`,e.FORM=`FORM`,e.FILTER=`FILTER`,e.IF_ELSE=`IF_ELSE`,e.HTTP_REQUEST=`HTTP_REQUEST`,e.AI_AGENT=`AI_AGENT`,e.CLASSIFY=`CLASSIFY`,e.ITERATOR=`ITERATOR`,e.EMPTY=`EMPTY`,e.DELAY=`DELAY`,e.WAIT_FOR_EVENT=`WAIT_FOR_EVENT`,e}({}),_=`trigger`,ie=e=>{let t=[],n=``,r=!1,i=0;for(;i<e.length;){let a=e[i];if(a===`[`&&!r){n.length>0&&(t.push(n),n=``),r=!0,i++;continue}if(a===`]`&&r){t.push(n),n=``,r=!1,i++,i<e.length&&e[i]===`.`&&i++;continue}if(a===`.`&&!r){n.length>0&&(t.push(n),n=``),i++;continue}n+=a,i++}return n.length>0&&t.push(n),t},ae=/{{([^{}]+)}}/g;function*v(e){if((0,h.isString)(e)){for(let[,t]of e.matchAll(ae))n.Ut(t)&&(yield t);return}if((0,h.isObject)(e))for(let t of Object.values(e))yield*v(t)}var oe=e=>[...v(e)],se=(e,t)=>{let n=e.length+1,r=t.length+1,i=Array.from({length:n},()=>Array(r).fill(0));for(let e=0;e<n;e++)i[e][0]=e;for(let e=0;e<r;e++)i[0][e]=e;for(let a=1;a<n;a++){let n=i[a-1],o=i[a];for(let i=1;i<r;i++){let r=e[a-1]===t[i-1]?0:1;o[i]=Math.min(n[i]+1,o[i-1]+1,n[i-1]+r)}}return i[e.length][t.length]},ce=e=>{if(!n.Ut(e)||!ee(e)||Array.isArray(e))return!1;let t=Object.values(e);return t.length===0?!1:t.every(e=>n.Ut(e)&&ee(e)&&p(e.isLeaf))},y=(e,t=[])=>{let n=[];if(!(0,h.isObject)(e))return n;for(let[r,i]of Object.entries(e)){if(!(0,h.isObject)(i))continue;let e=[...t,r];n.push(e.join(`.`)),!i.isLeaf&&(0,h.isObject)(i.value)&&n.push(...y(i.value,e))}return n},le=({schema:e,propertyPath:t})=>{let r=e;for(let e=0;e<t.length;e++){let i=t[e];if(!n.Ut(i))return;if(!(0,h.isObject)(r))return{validPrefix:t.slice(0,e),failedSegment:i,availableKeys:[]};let a=r[i];if(!n.Ut(a))return{validPrefix:t.slice(0,e),failedSegment:i,availableKeys:Object.keys(r)};if(a.isLeaf){let r=t[e+1];return n.Ut(r)?{validPrefix:t.slice(0,e+1),failedSegment:r,availableKeys:[]}:void 0}r=a.value}},b={found:!1},x=e=>n.u(e)&&p(e.isLeaf),S=e=>n.u(e)&&e._outputSchemaType===`RECORD`&&n.u(e.fields),C=e=>n.u(e)&&!(`_outputSchemaType`in e)&&x(e.first)&&e.first.isLeaf===!1&&S(e.first.value)&&x(e.totalCount),w=e=>({found:!0,type:m(e.type)?e.type:void 0,label:m(e.label)?e.label:void 0}),ue=(e,t)=>t.length===0?w(e):T(e.value,t),de=(e,t)=>{for(let n=1;n<=t.length;n++){let r=e[t.slice(0,n).join(`.`)];if(x(r))return ue(r,t.slice(n))}return b},fe=(e,t)=>{let[n,...r]=t;if(n===`first`)return r.length===0?w(e.first):T(e.first.value,r);if(n===`all`||n===`totalCount`){let t=e[n];return r.length===0&&x(t)?w(t):b}return b},pe=(e,t)=>{let[r,...i]=t;if(!n.Ut(r))return b;let a=e[r];return x(a)?ue(a,i):n.Ut(a)?i.length===0?{found:!0}:n.u(a)?pe(a,i):b:b},T=(e,t)=>t.length===0||!n.u(e)?b:S(e)?de(e.fields,t):C(e)?fe(e,t):pe(e,t),me=({schema:e,propertyPath:t})=>T(e,t),E=e=>{let t=[];for(let[r,i]of Object.entries(e))if(x(i)){if(t.push(r),i.isLeaf)continue;let e=i.value;if(S(e))for(let n of E(e.fields))t.push(`${r}.${n}`);else if(n.u(e))for(let n of E(e))t.push(`${r}.${n}`)}else if(n.Ut(i)&&(t.push(r),n.u(i)))for(let e of E(i))t.push(`${r}.${e}`);return t},D=e=>{if(!n.u(e))return[];if(S(e))return E(e.fields);if(C(e)){let t=[];if(x(e.first)){t.push(`first`);for(let n of D(e.first.value))t.push(`first.${n}`)}return n.Ut(e.all)&&t.push(`all`),t.push(`totalCount`),t}return E(e)},he=3,O=e=>n.u(e)?e._outputSchemaType===`RECORD`?!0:Object.values(e).some(e=>n.u(e)&&O(e.value)):!1,k=(e,t)=>t.map(t=>({candidate:t,distance:se(e,t)})).filter(({candidate:e,distance:t})=>t<=Math.ceil(e.length/2)).sort((e,t)=>e.distance-t.distance).slice(0,he).map(({candidate:e})=>e),ge=({schema:e,propertyPath:t,referencedStepId:r})=>{if(!ce(e)||O(e)){let n=D(e);return k(t.join(`.`),n).map(e=>[r,e].join(`.`))}let i=le({schema:e,propertyPath:t});if(!n.Ut(i))return[];let a=k(i.failedSegment,i.availableKeys).map(e=>[r,...i.validPrefix,e].join(`.`));if((0,h.isNonEmptyArray)(a))return a;let o=y(e);return k(t.join(`.`),o).map(e=>[r,e].join(`.`))},_e=({workflow:e,graph:t,stepsById:r})=>{let i=[],a=new Set(e.steps?.map(e=>e.id)??[]);for(let o of e.steps??[]){let s=oe(o.settings?.input),c=t.ancestorsByStepId.get(o.id)??new Set;for(let t of s){let s=ie(t),l=s[0];if(!n.Ut(l)){i.push({severity:`error`,code:`VARIABLE_INVALID_PATH`,message:`Step "${o.name??o.id}" has a variable "{{${t}}}" with an invalid path. Variable references must start with a step ID, e.g. "{{stepId.property}}".`,stepId:o.id,path:t});continue}let u=l===_;if(!u&&!a.has(l)){i.push({severity:`error`,code:`VARIABLE_UNKNOWN_STEP`,message:`Step "${o.name??o.id}" references variable "{{${t}}}" from an unknown step "${l}".`,stepId:o.id,path:t});continue}let d=l===o.id;if(!u&&!d&&!c.has(l)){let e=r.get(l)?.name??l;i.push({severity:`error`,code:`VARIABLE_NOT_UPSTREAM`,message:`Step "${o.name??o.id}" references variable "{{${t}}}" from step "${e}", which does not run before it. Ensure step "${e}" is an ancestor (connected via nextStepIds chain from the trigger, before this step).`,stepId:o.id,path:t});continue}i.push(...ve({step:o,variable:t,pathSegments:s,referencedStepId:l,isTriggerReference:u,trigger:e.trigger,stepsById:r}))}}return i},ve=({step:e,variable:t,pathSegments:r,referencedStepId:i,isTriggerReference:a,trigger:o,stepsById:s})=>{let c=r.slice(1);if(c.length===0)return[];let l=a?o?.settings?.outputSchema:s.get(i)?.settings?.outputSchema,u=n.Ut(l)&&(0,h.isObject)(l)&&!Array.isArray(l)&&Object.keys(l).length===0;if(!n.Ut(l)||u)return[];if(!me({schema:l,propertyPath:c}).found){let r=ge({schema:l,propertyPath:c,referencedStepId:i}),a=be(l,i),o=(0,h.isNonEmptyArray)(r)?`Did you mean "{{${r[0]}}}"?${r.length>1?` Other options: ${r.slice(1).map(e=>`{{${e}}}`).join(`, `)}.`:``}`:(0,h.isNonEmptyArray)(a)?`Available paths: ${a.map(e=>`{{${e}}}`).join(`, `)}.`:void 0;return[{severity:`error`,code:`VARIABLE_PATH_NOT_FOUND`,message:`Step "${e.name??e.id}" references variable "{{${t}}}" but the path "${c.join(`.`)}" was not found in the output of step "${i}".`,stepId:e.id,path:t,...n.Ut(o)?{hint:o}:{},...(0,h.isNonEmptyArray)(r)?{suggestions:r}:{},...(0,h.isNonEmptyArray)(a)?{availablePaths:a}:{}}]}return[]},ye=20,be=(e,t)=>D(e).slice(0,ye).map(e=>`${t}.${e}`),xe=n.Nt({type:n.kt(`object`),properties:n.Ft(n.Lt(),n.Nt({type:n.bt([`string`,`number`,`boolean`]),description:n.Lt().optional()})).refine(e=>Object.keys(e).every(re),{message:`Output field names can only contain letters, numbers, underscores, dots or hyphens (max 64 characters)`}),required:n.Ct(n.Lt()).optional(),additionalProperties:n.kt(!1).optional()}),Se=n.Tt(`type`,[n.Nt({type:n.kt(`text`)}),n.Nt({type:n.kt(`json`),schema:xe})]),A=[1e3,5e3,15e3],j=n.Nt({input:n.At({}).describe(`Input data for the workflow action. Structure depends on the action type.`),outputSchema:n.At({}).describe(`Schema defining the output data structure. This data can be referenced in subsequent steps using {{stepId.fieldName}}.`),errorHandlingOptions:n.Nt({retryOnFailure:n.Nt({value:n.Pt(e=>typeof e==`boolean`?Number(e):e,n.Mt().int().min(0).max(A.length).describe(`How many times to retry the action if it fails, between 0 and ${A.length}. 0 disables retries.`))}),continueOnFailure:n.Nt({value:n.wt().describe(`Whether to continue to the next step if this action fails.`)})})}),Ce={expectedOutputSchema:n.At({}).optional().describe(`A sample output value declared by the user for steps whose output structure is only known at runtime.`)},we=j.extend({input:n.Nt({url:n.Lt(),method:n.bt([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`]),headers:n.Ft(n.Lt(),n.Lt()).optional(),body:n.Ft(n.Lt(),n.Rt([n.Lt(),n.Mt(),n.wt(),n.xt(),n.Ct(n.Rt([n.Lt(),n.Mt(),n.wt(),n.xt()]))])).or(n.Lt()).optional()}),...Ce}),Te=/^[a-zA-Z0-9_-]{1,64}$/,Ee=n.Nt({id:n.Bt().describe(`Stable identifier for this criterion row.`),name:n.Lt().describe(`Option name for a choice question, or the label of one score level.`),description:n.Lt().optional().describe(`What the model should understand this option to mean.`)}),De=n.Nt({id:n.Bt().describe(`Stable identifier for this question row.`),name:n.Lt().regex(Te,`Answer name must be empty or contain 1 to 64 characters using only letters, digits, underscores and dashes`).or(n.kt(``)).describe(`Answer key for this question, made of letters, digits, underscores and dashes. Downstream steps read {{stepId.answers.<name>}}.`),type:n.bt(te).describe(`choice picks one option, score grades an ordered rubric, boolean estimates the probability that a statement holds.`),instructions:n.Lt().describe(`What the model should decide about the shared state.`),criteria:n.Ct(Ee).describe(`Options for a choice question, or ordered levels (lowest first) for a score question. Empty for boolean.`)}),Oe=j.extend({input:n.Nt({state:n.Lt().describe(`The shared state every question is asked about. Supports variables.`),questions:n.Ct(De)})}),ke=j.extend({input:n.Nt({items:n.Rt([n.Ct(n.Rt([n.Lt(),n.Mt(),n.wt(),n.xt(),n.Ft(n.Lt(),n.St()),n.St()])),n.Lt()]).optional(),initialLoopStepIds:n.Ct(n.Lt()).optional(),shouldContinueOnIterationFailure:n.wt().optional()})}),Ae=j.extend({input:n.Nt({delayType:n.bt([`SCHEDULED_DATE`,`DURATION`]),scheduledDateTime:n.Lt().nullable().optional(),duration:n.Nt({days:n.Rt([n.Mt().min(0),n.Lt()]).optional(),hours:n.Rt([n.Mt().min(0),n.Lt()]).optional(),minutes:n.Rt([n.Mt().min(0),n.Lt()]).optional(),seconds:n.Rt([n.Mt().min(0),n.Lt()]).optional()}).optional()})}),je=j.extend({input:n.Nt({eventName:n.Lt().describe(`Event to wait for, in format objectName.action (e.g., "company.updated", "task.created", "person.deleted").`),recordId:n.Lt().nullable().optional().describe(`Only resume for this record. Usually a variable such as {{trigger.properties.after.id}}. Leave empty to resume on any record.`),updatedFields:n.Ct(n.Lt()).nullable().optional().describe(`For update events, only resume when one of these fields changed.`),timeout:n.Nt({days:n.Rt([n.Mt().min(0),n.Lt()]).optional(),hours:n.Rt([n.Mt().min(0),n.Lt()]).optional(),minutes:n.Rt([n.Mt().min(0),n.Lt()]).optional()}).nullable().optional().describe(`Stop waiting after this duration. The step then succeeds with hasTimedOut set to true.`)})}),Me=j.extend({input:n.Nt({})}),M=n.Ft(n.Lt(),n.St()).describe(`Record data object. Use nested objects for relationships (e.g., "company": {"id": "{{reference}}"}). Common patterns:
|
|
2
|
-
- Person: {"name": {"firstName": "John", "lastName": "Doe"}, "emails": {"primaryEmail": "john@example.com"}, "company": {"id": "{{trigger.properties.after.id}}"}}
|
|
3
|
-
- Company: {"name": "Acme Corp", "domainName": {"primaryLinkUrl": "https://acme.com"}}
|
|
4
|
-
- Task: {"title": "Follow up", "status": "TODO", "assignee": {"id": "{{user.id}}"}}`),Ne=j.extend({input:n.Nt({objectName:n.Lt().describe(`The name of the object to create a record in. Must be lowercase (e.g., "person", "company", "task").`),objectRecord:M.describe(`The record data to create.`)})}),Pe=j.extend({input:n.Nt({objectName:n.Lt(),objectRecord:M,objectRecordId:n.Lt(),fieldsToUpdate:n.Ct(n.Lt())})}),Fe=j.extend({input:n.Nt({objectName:n.Lt(),objectRecord:M})}),Ie=j.extend({input:n.Nt({objectName:n.Lt(),objectRecordId:n.Lt()})}),N=n.Nt({id:n.Lt(),logicalOperator:n.bt(n.dt),parentRecordFilterGroupId:n.Lt().nullable().optional(),positionInRecordFilterGroup:n.Mt().nullable().optional()}),P=n.Nt({id:n.Lt().optional(),fieldMetadataId:n.Lt(),operand:n.bt(n.B),value:n.Lt().nullable().optional(),recordFilterGroupId:n.Lt().nullable().optional(),positionInRecordFilterGroup:n.Mt().nullable().optional(),subFieldName:n.Lt().nullable().optional(),relationTargetFieldMetadataId:n.Lt().nullable().optional()}),F=n.Lt().regex(/^{{[^{}]+}}$/,`Expected a workflow variable reference like {{stepId.path}}`),Le=j.extend({input:n.Nt({objectName:n.Lt(),limit:n.Rt([n.Mt(),F]).optional(),offset:n.Rt([n.Mt().int().nonnegative(),F]).optional(),filter:n.Nt({recordFilterGroups:n.Ct(N).optional(),recordFilters:n.Ct(P).optional()}).optional(),orderBy:n.Nt({recordSorts:n.Ct(n.St()).optional(),gqlOperationOrderBy:n.Ct(n.Ft(n.Lt(),n.St())).optional()}).optional()})}),Re=n.Nt({id:n.Lt(),name:n.Lt(),label:n.Lt(),type:n.Rt([n.kt(n.ct.TEXT),n.kt(n.ct.NUMBER),n.kt(n.ct.DATE),n.kt(n.ct.SELECT),n.kt(n.ct.MULTI_SELECT),n.kt(`RECORD`)]),placeholder:n.Lt().optional(),settings:n.Ft(n.Lt(),n.St()).optional(),value:n.St().optional()}),ze=j.extend({input:n.Ct(Re),instructions:n.Lt().optional()}),I=n.Nt({id:n.Lt(),logicalOperator:n.bt(n.V),parentStepFilterGroupId:n.Lt().optional(),positionInStepFilterGroup:n.Mt().optional()}),L=n.Nt({id:n.Lt(),type:n.Lt(),stepOutputKey:n.Lt(),operand:n.bt(n.B).or(n.bt(n.J)),value:n.Lt(),stepFilterGroupId:n.Lt(),positionInStepFilterGroup:n.Mt().optional(),fieldMetadataId:n.Lt().optional(),compositeFieldSubFieldName:n.Lt().optional()}),Be=j.extend({input:n.Nt({stepFilterGroups:n.Ct(I),stepFilters:n.Ct(L)})}),Ve=n.Nt({id:n.Lt(),nextStepIds:n.Ct(n.Lt()),filterGroupId:n.Lt().optional()}),He=j.extend({input:n.Nt({stepFilterGroups:n.Ct(I),stepFilters:n.Ct(L),branches:n.Ct(Ve)})}),R=n.bt([`RANDOM`,`ROUND_ROBIN`,`LOAD_BALANCED`]);j.extend({input:n.Nt({objectName:n.Lt(),strategy:R,recordIds:n.Ct(n.Lt()),loadBalance:n.Nt({objectNameSingular:n.Lt(),fieldName:n.Lt()}).optional()}).superRefine((e,t)=>{e.strategy===`LOAD_BALANCED`&&!n.Ut(e.loadBalance)&&t.addIssue({code:n.yt.custom,path:[`loadBalance`],message:`loadBalance is required when strategy is LOAD_BALANCED`})})});var z=n.Nt({name:n.Lt().optional().describe(`Human-readable name for the trigger. Optional but recommended for clarity.`),type:n.bt([`DATABASE_EVENT`,`MANUAL`,`CRON`,`WEBHOOK`]).describe(`Type of trigger. DATABASE_EVENT for record changes, MANUAL for user-initiated, CRON for scheduled, WEBHOOK for external calls.`),position:n.Nt({x:n.Mt(),y:n.Mt()}).optional().nullable().describe(`Position coordinates for the trigger in the workflow diagram. Use (0, 0) for the trigger step.`),nextStepIds:n.Ct(n.Lt()).optional().nullable().describe(`Array of step IDs that the trigger connects to. These are the first steps in the workflow.`)}),Ue=z.extend({type:n.kt(`CRON`),settings:n.Tt(`type`,[n.Nt({type:n.kt(`DAYS`),schedule:n.Nt({day:n.Mt().min(1),hour:n.Mt().min(0).max(23),minute:n.Mt().min(0).max(59)}),outputSchema:n.At({})}),n.Nt({type:n.kt(`HOURS`),schedule:n.Nt({hour:n.Mt().min(1),minute:n.Mt().min(0).max(59)}),outputSchema:n.At({})}),n.Nt({type:n.kt(`MINUTES`),schedule:n.Nt({minute:n.Mt().min(1).max(60)}),outputSchema:n.At({})}),n.Nt({type:n.kt(`CUSTOM`),pattern:n.Lt(),outputSchema:n.At({})})])}),We=z.extend({type:n.kt(`WEBHOOK`),settings:n.Tt(`httpMethod`,[n.Nt({outputSchema:n.At({}),httpMethod:n.kt(`GET`),authentication:n.kt(`API_KEY`).nullable()}),n.Nt({outputSchema:n.At({}),expectedOutputSchema:n.At({}).optional(),httpMethod:n.kt(`POST`),expectedBody:n.At({}),authentication:n.kt(`API_KEY`).nullable()})])}),Ge=e=>{let t=e.settings?.input;return e.type===g.IF_ELSE&&(0,h.isObject)(t)&&`branches`in t&&Array.isArray(t.branches)},B=e=>{let t=e.settings?.input;return e.type===g.ITERATOR&&(0,h.isObject)(t)&&`initialLoopStepIds`in t&&(0,h.isNonEmptyArray)(t.initialLoopStepIds)},Ke=e=>{let t=e.settings?.input;if(n.Ut(t)&&(0,h.isObject)(t))return t},qe=e=>{let t=new Set(e.nextStepIds??[]);if(Ge(e))for(let n of e.settings.input.branches??[])for(let e of n?.nextStepIds??[])t.add(e);if(B(e))for(let n of e.settings.input.initialLoopStepIds??[])t.add(n);return[...t]},Je=({trigger:e,steps:t})=>{let r=new Map,i=n.Ut(e?.nextStepIds)?e.nextStepIds.filter(n.Ut):[];r.set(_,i);for(let e of t??[])r.set(e.id,qe(e));let a=new Set,o=[_];for(;o.length>0;){let e=o.shift();if(!(!n.Ut(e)||a.has(e))){a.add(e);for(let t of r.get(e)??[])a.has(t)||o.push(t)}}return{childrenByStepId:r,reachableFromTrigger:a,ancestorsByStepId:Ye(r)}},Ye=e=>{let t=new Map;for(let[n,r]of e.entries())for(let e of r){let r=t.get(e)??new Set;r.add(n),t.set(e,r)}let n=new Map;for(let r of e.keys()){if(n.has(r))continue;let e=new Set,i=[...t.get(r)??[]];for(;i.length>0;){let n=i.shift();if(!e.has(n)){e.add(n);for(let r of t.get(n)??[])e.has(r)||i.push(r)}}n.set(r,e)}return n},Xe=({workflow:e,graph:t})=>{let r=[],i=new Set,a=new Set,o=new Map((e.steps??[]).map(e=>[e.id,e])),s=(e,c=[],l)=>{let u=c[c.length-1];if(i.has(e)){if(e!==l&&u===e)return;r.push({severity:`error`,code:`WORKFLOW_CYCLE`,stepId:e,message:`Workflow contains a cycle at step ${e}`});return}let d=o.get(e),f=`${e}:${c.join(`,`)}`;if(!n.Ut(d)||a.has(f))return;i.add(e),B(d)&&(d.settings.input.initialLoopStepIds??[]).forEach(t=>s(t,[...c,e],e));let p=d.type===g.ITERATOR?d.nextStepIds??[]:t.childrenByStepId.get(e)??[];n.Ut(u)&&p.length===0&&r.push({severity:`error`,code:`ITERATOR_MISSING_RETURN`,stepId:e,message:`Loop body step ${e} must return to iterator ${u}`}),p.forEach(t=>s(t,c,e)),i.delete(e),a.add(f)};return e.trigger?.nextStepIds?.forEach(e=>s(e)),r},Ze=({workflow:e,graph:r})=>{let i=[],a=e.steps??[],o=new Set(a.map(e=>e.id)),s=new Set;for(let e of a)s.has(e.id)&&i.push({severity:`error`,code:`DUPLICATE_STEP_ID`,message:`Duplicate step id "${e.id}". Every step id must be unique within the workflow.`,stepId:e.id}),s.add(e.id);let c=(e.trigger?.nextStepIds??[]).filter(n.Ut);t.n(a)&&c.length===0&&i.push({severity:`error`,code:`TRIGGER_HAS_NO_NEXT_STEP`,message:`The trigger is not connected to any step. The trigger must have a "nextStepIds" array pointing to the first step (e.g. nextStepIds: ["${a[0].id}"]). If you used edges, also set trigger.nextStepIds.`});for(let e of c)o.has(e)||i.push({severity:`error`,code:`DANGLING_REFERENCE`,message:`The trigger references a non-existent step "${e}".`});for(let e of a){for(let t of r.childrenByStepId.get(e.id)??[])o.has(t)||i.push({severity:`error`,code:`DANGLING_REFERENCE`,message:`Step "${e.name??e.id}" references a non-existent step "${t}".`,stepId:e.id});i.push(...Qe(e))}for(let e of a)r.reachableFromTrigger.has(e.id)||i.push({severity:`error`,code:`UNREACHABLE_STEP`,message:`Step "${e.name??e.id}" is not reachable from the trigger. Ensure a chain of nextStepIds connects the trigger to this step. Check that the preceding step includes this step's id ("${e.id}") in its nextStepIds array.`,stepId:e.id});return i},Qe=e=>{let t=[],r=Ke(e);if(e.type===g.IF_ELSE){let i=r?.branches,a=Array.isArray(i)?i:[];a.length<2&&t.push({severity:`warning`,code:`IF_ELSE_INSUFFICIENT_BRANCHES`,message:`If/Else step "${e.name??e.id}" should have at least two branches (a condition branch and an else branch).`,stepId:e.id});let o=r?.stepFilterGroups,s=new Set((Array.isArray(o)?o:[]).filter(n.Ut).map(e=>e.id));for(let r of a){let i=r?.nextStepIds;(!Array.isArray(i)||i.length===0)&&t.push({severity:`error`,code:`IF_ELSE_BRANCH_HAS_NO_NEXT_STEP`,message:`A branch of If/Else step "${e.name??e.id}" is not connected to any step.`,stepId:e.id}),n.Ut(r?.filterGroupId)&&!s.has(r.filterGroupId)&&t.push({severity:`error`,code:`INVALID_STEP_PARAMS`,message:`A branch of If/Else step "${e.name??e.id}" references filter group "${r.filterGroupId}", which does not exist.`,stepId:e.id})}}if(e.type===g.ITERATOR){let n=r,i=n?.items,a=typeof i==`string`&&i.length>0||Array.isArray(i)&&i.length>0,o=n?.initialLoopStepIds,s=Array.isArray(o)&&o.length>0;a&&!s&&t.push({severity:`error`,code:`ITERATOR_MISSING_LOOP_BODY`,message:`Iterator step "${e.name??e.id}" has items to iterate over but no steps inside the loop.`,stepId:e.id})}return t},$e=`20202020-64aa-4b6f-b003-9c74b97cee20`,V=({entityNamespace:e,value:t,applicationUniversalIdentifier:n})=>d(`${e}:${t}`,n),et=({applicationUniversalIdentifier:e,objectUniversalIdentifier:t,name:n})=>V({entityNamespace:`fieldMetadata`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),H=({applicationUniversalIdentifier:e,objectUniversalIdentifier:t,name:n})=>V({entityNamespace:`pageLayout`,value:t?`${t}:${n}`:n,applicationUniversalIdentifier:e}),tt=({objectMetadataApplicationUniversalIdentifier:e,pageLayoutUniversalIdentifier:t,title:n})=>V({entityNamespace:`pageLayoutTab`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),nt=({objectMetadataApplicationUniversalIdentifier:e,pageLayoutTabUniversalIdentifier:t,title:n})=>V({entityNamespace:`pageLayoutWidget`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),rt=({objectMetadataApplicationUniversalIdentifier:e,objectUniversalIdentifier:t})=>H({applicationUniversalIdentifier:e,objectUniversalIdentifier:t,name:n.Q.RECORD_PAGE}),it=({applicationUniversalIdentifier:e,objectUniversalIdentifier:t,relationTargetObjectUniversalIdentifier:n})=>V({entityNamespace:`fieldMetadata`,value:`${t}:systemRelation:${n}`,applicationUniversalIdentifier:e}),at=({objectMetadataApplicationUniversalIdentifier:e,viewUniversalIdentifier:t,name:n})=>V({entityNamespace:`viewFieldGroup`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),ot=({fieldMetadataApplicationUniversalIdentifier:e,viewUniversalIdentifier:t,fieldMetadataUniversalIdentifier:n})=>V({entityNamespace:`viewField`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),st={INDEX:`INDEX`,FIELDS_WIDGET:`FIELDS_WIDGET`},ct=({objectMetadataApplicationUniversalIdentifier:e,objectUniversalIdentifier:t,viewKey:n})=>V({entityNamespace:`view`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),U=function(e){return e.OK=`OK`,e.SUCCESS=`SUCCESS`,e.INFO=`INFO`,e.WARNING=`WARNING`,e.ERROR=`ERROR`,e.NEUTRAL=`NEUTRAL`,e.UNKNOWN=`UNKNOWN`,e}({});Object.values(U).filter(e=>e!==U.OK&&e!==U.UNKNOWN),n.ct.TEXT,n.ct.ARRAY,n.ct.BOOLEAN,n.ct.DATE,n.ct.DATE_TIME,n.ct.NUMBER,n.ct.NUMERIC,n.ct.RAW_JSON,n.ct.RICH_TEXT,n.ct.SELECT,n.ct.MULTI_SELECT,g.SEND_EMAIL,g.DRAFT_EMAIL,g.CREATE_CALENDAR_EVENT;var lt=`public`,ut=`front-component-shared-dependencies.mjs`,dt=`twenty:front-component-shared-dependencies`;n.Q.RECORD_PAGE,n.Q.DASHBOARD;var ft={js:`import { createRequire as __createRequire } from 'module';
|
|
5
|
-
const require = __createRequire(import.meta.url);`},pt=`.twenty/output`,mt=({applicationUniversalIdentifier:e,roleUniversalIdentifier:t,fieldUniversalIdentifier:n})=>V({entityNamespace:`fieldPermission`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),ht=({applicationUniversalIdentifier:e,roleUniversalIdentifier:t,objectUniversalIdentifier:n})=>V({entityNamespace:`objectPermission`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),gt=({objectMetadataApplicationUniversalIdentifier:e,objectUniversalIdentifier:t})=>H({applicationUniversalIdentifier:e,objectUniversalIdentifier:t,name:n.Q.RECORD_FORM}),_t=({pageLayoutTabManifest:e,pageLayoutType:r})=>{let i=e.layoutMode??(r===n.Q.STANDALONE_PAGE?n.ft.VERTICAL_LIST:n.ft.GRID),a=e.widgets??[],o=[];if(!Object.values(n.ft).some(e=>e===i))return{status:`fail`,errors:[`Page layout tab "${e.title}" defines unsupported layoutMode "${i}". Expected GRID, VERTICAL_LIST or CANVAS.`]};for(let t of a){let r=[t.heightBehavior,n.u(t.position)&&`heightBehavior`in t.position?t.position.heightBehavior:void 0].filter(n.Ut);r.length>0&&i!==n.ft.VERTICAL_LIST&&o.push(`Page layout widget "${t.title}" defines heightBehavior, but its parent tab "${e.title}" uses ${i}. heightBehavior is only supported for VERTICAL_LIST tabs.`);for(let e of r)Object.values(n.G).some(t=>t===e)||o.push(`Page layout widget "${t.title}" defines unsupported heightBehavior "${e}". Expected FIT_CONTENT or TAB_VIEWPORT.`)}if(o.length>0)return{status:`fail`,errors:o};let s={...e,layoutMode:i,widgets:a.map(({heightBehavior:e,position:r,gridPosition:a,...o},s)=>{if(n.Ut(r))return{...o,position:r.layoutMode===n.ft.VERTICAL_LIST&&n.Ut(e)?{...r,heightBehavior:e}:r};if(n.Ut(a))return{...o,position:{layoutMode:n.ft.GRID,...a}};switch(i){case n.ft.GRID:return{...o,position:{layoutMode:i,row:0,column:0,rowSpan:n.v.default.h,columnSpan:n.v.default.w}};case n.ft.VERTICAL_LIST:return{...o,position:{layoutMode:i,index:s,...n.Ut(e)?{heightBehavior:e}:{}}};case n.ft.CANVAS:return{...o,position:{layoutMode:i}};default:return t.t(i)}})};for(let e of s.widgets)e.position.layoutMode!==i&&o.push(`Page layout widget "${e.title}" uses a ${e.position.layoutMode} position, but its parent tab "${s.title}" uses ${i}.`);if(i===n.ft.VERTICAL_LIST){let e=s.widgets.filter(({type:e,position:r})=>r.layoutMode===n.ft.VERTICAL_LIST&&t.a({widgetType:e,heightBehavior:r.heightBehavior})===n.G.TAB_VIEWPORT);e.length>1&&o.push(`Page layout tab "${s.title}" can contain only one TAB_VIEWPORT widget.`);let r=e.length===1?e[0]:void 0;n.Ut(r)&&s.widgets.some(e=>e!==r&&e.position.layoutMode===n.ft.VERTICAL_LIST&&r.position.layoutMode===n.ft.VERTICAL_LIST&&e.position.index>=r.position.index)&&o.push(`Page layout tab "${s.title}" must place its TAB_VIEWPORT widget last.`)}return o.length>0?{status:`fail`,errors:o}:{status:`success`,pageLayoutTab:s}},W=[`canReadObjectRecords`,`canUpdateObjectRecords`,`canSoftDeleteObjectRecords`,`canDestroyObjectRecords`],G={canReadObjectRecords:`canReadAllObjectRecords`,canUpdateObjectRecords:`canUpdateAllObjectRecords`,canSoftDeleteObjectRecords:`canSoftDeleteAllObjectRecords`,canDestroyObjectRecords:`canDestroyAllObjectRecords`},K=({role:e,objectUniversalIdentifier:t})=>{let n=e.objectPermissions?.find(e=>e.objectUniversalIdentifier===t);return{canReadObjectRecords:n?.canReadObjectRecords??e[G.canReadObjectRecords]??!1,canUpdateObjectRecords:n?.canUpdateObjectRecords??e[G.canUpdateObjectRecords]??!1,canSoftDeleteObjectRecords:n?.canSoftDeleteObjectRecords??e[G.canSoftDeleteObjectRecords]??!1,canDestroyObjectRecords:n?.canDestroyObjectRecords??e[G.canDestroyObjectRecords]??!1}},vt=e=>JSON.stringify(e,(e,t)=>n.u(t)?Object.fromEntries(Object.entries(t).sort(([e],[t])=>e.localeCompare(t))):t),yt=({groupsByUniversalIdentifier:e,predicateGroupUniversalIdentifier:t})=>{let r=[],i=new Set,a=t;for(;n.Ut(a)&&!i.has(a);){i.add(a);let t=e.get(a);if(!n.Ut(t))break;r.push(t.logicalOperator),a=t.parentPredicateGroupUniversalIdentifier}return r},q=({role:e,objectUniversalIdentifier:t})=>{let n=new Map((e.rowLevelPermissionPredicateGroups??[]).map(e=>[e.universalIdentifier,e]));return(e.rowLevelPermissionPredicates??[]).filter(e=>e.objectUniversalIdentifier===t).map(e=>vt({fieldUniversalIdentifier:e.fieldUniversalIdentifier,subFieldName:e.subFieldName??null,operand:e.operand,value:e.value??null,workspaceMemberFieldUniversalIdentifier:e.workspaceMemberFieldUniversalIdentifier??null,workspaceMemberSubFieldName:e.workspaceMemberSubFieldName??null,groupOperatorPath:yt({groupsByUniversalIdentifier:n,predicateGroupUniversalIdentifier:e.predicateGroupUniversalIdentifier})})).sort()},bt=n.l.map(e=>n.S[e]),xt=({roleSignature:e,supersetSignature:t})=>e.length===t.length&&e.every((e,n)=>e===t[n]),St=({role:e,superset:t})=>[...W.filter(n=>{let r=G[n];return e[r]&&!t[r]}).map(e=>({type:`ALL_OBJECT_RECORDS`,action:e})),...e.canUpdateAllSettings&&!t.canUpdateAllSettings?[{type:`ALL_SETTINGS`}]:[],...e.canAccessAllTools&&!t.canAccessAllTools?[{type:`ALL_TOOLS`}]:[]],Ct=({role:e,superset:t,toolPermissionFlagUniversalIdentifiers:n})=>{let r=new Set([...bt,...n]),i=new Set(t.permissionFlagUniversalIdentifiers??[]);return[...new Set(e.permissionFlagUniversalIdentifiers??[])].filter(e=>!(r.has(e)?t.canAccessAllTools:t.canUpdateAllSettings)&&!i.has(e)).map(e=>({type:`PERMISSION_FLAG`,permissionFlagUniversalIdentifier:e}))},wt=({role:e,superset:t})=>[...new Set([...[...e.objectPermissions??[],...t.objectPermissions??[]].map(e=>e.objectUniversalIdentifier),...(t.rowLevelPermissionPredicates??[]).map(e=>e.objectUniversalIdentifier)])].flatMap(n=>{let r=K({role:e,objectUniversalIdentifier:n}),i=K({role:t,objectUniversalIdentifier:n}),a=W.filter(e=>r[e]&&!i[e]).map(e=>({type:`OBJECT_RECORDS`,objectUniversalIdentifier:n,action:e})),o=W.some(e=>r[e]),s=q({role:t,objectUniversalIdentifier:n}),c=q({role:e,objectUniversalIdentifier:n});return o&&s.length>0&&!xt({roleSignature:c,supersetSignature:s})?[...a,{type:`ROW_LEVEL_RESTRICTION`,objectUniversalIdentifier:n}]:a}),Tt=({role:e,superset:t})=>(t.fieldPermissions??[]).flatMap(t=>{let{objectUniversalIdentifier:n,fieldUniversalIdentifier:r}=t,i=K({role:e,objectUniversalIdentifier:n}),a=e.fieldPermissions?.find(e=>e.objectUniversalIdentifier===n&&e.fieldUniversalIdentifier===r),o=t.canReadFieldValue===!1&&i.canReadObjectRecords&&a?.canReadFieldValue!==!1,s=t.canUpdateFieldValue===!1&&i.canUpdateObjectRecords&&a?.canUpdateFieldValue!==!1;return[...o?[{type:`FIELD_VALUE`,objectUniversalIdentifier:n,fieldUniversalIdentifier:r,action:`canReadFieldValue`}]:[],...s?[{type:`FIELD_VALUE`,objectUniversalIdentifier:n,fieldUniversalIdentifier:r,action:`canUpdateFieldValue`}]:[]]}),Et=({role:e,superset:t,toolPermissionFlagUniversalIdentifiers:n})=>[...St({role:e,superset:t}),...Ct({role:e,superset:t,toolPermissionFlagUniversalIdentifiers:n}),...wt({role:e,superset:t}),...Tt({role:e,superset:t})],Dt=e=>n.gt(e)&&f(e)>=4,J={universalIdentifier:n.Bt(),name:n.Lt().min(1),nextStepIds:n.Ct(n.Bt()),position:n.Nt({x:n.Mt(),y:n.Mt()}).optional(),outputSchema:n.Ft(n.Lt(),n.zt()).optional(),expectedOutputSchema:n.Ft(n.Lt(),n.zt()).optional(),errorHandlingOptions:j.shape.errorHandlingOptions.optional()},Y=(e,t)=>n.It({...J,type:n.kt(e),input:t}),Ot=n.At({fieldMetadataUniversalIdentifier:n.Bt(),fieldMetadataId:n.jt().optional()}),X=L.omit({fieldMetadataId:!0}).extend({fieldMetadataUniversalIdentifier:n.Bt().optional()}).strict(),kt=P.omit({fieldMetadataId:!0,relationTargetFieldMetadataId:!0}).extend({fieldMetadataUniversalIdentifier:n.Bt()}).strict(),Z={objectUniversalIdentifier:n.Bt()},At=[n.It({...J,type:n.kt(`LOGIC_FUNCTION`),logicFunctionUniversalIdentifier:n.Bt(),input:n.Ft(n.Lt(),n.zt())}),Y(`HTTP_REQUEST`,we.shape.input),Y(`CLASSIFY`,Oe.shape.input),Y(`ITERATOR`,ke.shape.input),Y(`DELAY`,Ae.shape.input),Y(`WAIT_FOR_EVENT`,je.shape.input),Y(`EMPTY`,Me.shape.input),Y(`CREATE_RECORD`,Ne.shape.input.omit({objectName:!0}).extend(Z).strict()),Y(`UPDATE_RECORD`,Pe.shape.input.omit({objectName:!0}).extend(Z).strict()),Y(`UPSERT_RECORD`,Fe.shape.input.omit({objectName:!0}).extend(Z).strict()),Y(`DELETE_RECORD`,Ie.shape.input.omit({objectName:!0}).extend(Z).strict()),Y(`FIND_RECORDS`,Le.shape.input.omit({objectName:!0,filter:!0,orderBy:!0}).extend({...Z,filter:n.It({recordFilterGroups:n.Ct(N).optional(),recordFilters:n.Ct(kt).optional()}).optional(),orderBy:n.It({recordSorts:n.Ct(Ot.extend({direction:n.bt([`ASC`,`DESC`]),subFieldName:n.Lt().nullable().optional()})).optional()}).optional()}).strict()),Y(`PICK_RECORD`,n.It({...Z,strategy:R,recordIds:n.Ct(n.Lt()),loadBalance:n.It({objectUniversalIdentifier:n.Bt(),fieldUniversalIdentifier:n.Bt()}).optional()}).superRefine((e,t)=>{e.strategy===`LOAD_BALANCED`&&!n.Ut(e.loadBalance)&&t.addIssue({code:`custom`,path:[`loadBalance`],message:`loadBalance is required when strategy is LOAD_BALANCED`})})),Y(`FILTER`,Be.shape.input.extend({stepFilters:n.Ct(X)})),Y(`IF_ELSE`,He.shape.input.extend({stepFilters:n.Ct(X)})),Y(`FORM`,n.Ct(ze.shape.input.element.extend({settings:n.Ft(n.Lt(),n.zt()).optional()}).superRefine((e,t)=>{e.type===`RECORD`&&!n.Bt().safeParse(e.settings?.objectUniversalIdentifier).success&&t.addIssue({code:`custom`,path:[`settings`,`objectUniversalIdentifier`],message:`Record picker fields require an object universal identifier`})}))),Y(`AI_AGENT`,n.It({agentUniversalIdentifier:n.Bt(),prompt:n.Lt(),responseFormat:Se.optional()}))],jt=At.map(e=>e.shape.type.value),Mt=n.Tt(`type`,At,{error:e=>e.code===`invalid_union`?`Unsupported step type. Application workflows support: ${jt.join(`, `)}`:void 0}),Nt=[`updated`,`upserted`],Pt=n.Tt(`type`,[n.It({type:n.kt(`GLOBAL`)}),n.It({type:n.kt(`SINGLE_RECORD`),objectUniversalIdentifier:n.Bt()}),n.It({type:n.kt(`BULK_RECORDS`),objectUniversalIdentifier:n.Bt()})]),[Q,Ft,It,Lt]=Ue.shape.settings.options,Rt=n.Tt(`type`,[Q.omit({outputSchema:!0}).extend({schedule:Q.shape.schedule.strict()}).strict(),Ft.omit({outputSchema:!0}).extend({schedule:Ft.shape.schedule.strict()}).strict(),It.omit({outputSchema:!0}).extend({schedule:It.shape.schedule.strict()}).strict(),Lt.omit({outputSchema:!0}).strict()]),[zt,Bt]=We.shape.settings.options,Vt=n.Tt(`httpMethod`,[zt.omit({outputSchema:!0,authentication:!0}).strict(),Bt.omit({outputSchema:!0,expectedOutputSchema:!0,authentication:!0}).strict()]),$=[n.It({universalIdentifier:n.Bt(),type:n.kt(`MANUAL`),nextStepIds:n.Ct(n.Bt()).min(1),settings:n.It({availability:Pt.optional(),icon:n.Lt().optional(),isPinned:n.wt().optional()}).superRefine((e,t)=>{!n.Ut(e.availability)&&(n.Ut(e.icon)||n.Ut(e.isPinned))&&t.addIssue({code:`custom`,path:[`availability`],message:`Set an availability for the icon and pin to show in the command menu`})}).optional()}),n.It({universalIdentifier:n.Bt(),type:n.kt(`CRON`),nextStepIds:n.Ct(n.Bt()).min(1),settings:Rt}),n.It({universalIdentifier:n.Bt(),type:n.kt(`DATABASE_EVENT`),nextStepIds:n.Ct(n.Bt()).min(1),settings:n.It({objectUniversalIdentifier:n.Bt(),action:n.bt([`created`,`updated`,`deleted`,`upserted`]),fieldUniversalIdentifiers:n.Ct(n.Bt()).optional(),filter:n.It({stepFilterGroups:n.Ct(I),stepFilters:n.Ct(X.extend({operand:n.bt(n.B)}))}).optional()}).superRefine((e,r)=>{if(t.n(e.fieldUniversalIdentifiers)&&!Nt.includes(e.action)&&r.addIssue({code:`custom`,path:[`fieldUniversalIdentifiers`],message:`Watched fields only apply to ${Nt.join(` and `)} events`}),!n.Ut(e.filter))return;let i=new Map;e.filter.stepFilterGroups.forEach((e,t)=>{i.has(e.id)&&r.addIssue({code:`custom`,path:[`filter`,`stepFilterGroups`,t,`id`],message:`Filter group ${e.id} is declared more than once`}),i.set(e.id,e.parentStepFilterGroupId)}),e.filter.stepFilterGroups.forEach((e,t)=>{let a=e.parentStepFilterGroupId,o=[`filter`,`stepFilterGroups`,t,`parentStepFilterGroupId`];if(!n.Ut(a))return;if(!i.has(a)){r.addIssue({code:`custom`,path:o,message:`Filter group ${a} is not declared in stepFilterGroups`});return}let s=new Set([e.id]);for(let t=a;n.Ut(t);t=i.get(t)){if(s.has(t)){r.addIssue({code:`custom`,path:o,message:`Filter group ${e.id} is not reachable from a root group`});return}s.add(t)}}),e.filter.stepFilters.forEach((e,t)=>{i.has(e.stepFilterGroupId)||r.addIssue({code:`custom`,path:[`filter`,`stepFilters`,t,`stepFilterGroupId`],message:`Filter group ${e.stepFilterGroupId} is not declared in stepFilterGroups`})})})}),n.It({universalIdentifier:n.Bt(),type:n.kt(`WEBHOOK`),nextStepIds:n.Ct(n.Bt()).min(1),settings:Vt})],Ht=$.map(e=>e.shape.type.value),Ut=n.Tt(`type`,$,{error:e=>e.code===`invalid_union`?`Unsupported trigger type. Application workflows support: ${Ht.join(`, `)}`:void 0});n.It({universalIdentifier:n.Bt(),name:n.Lt().min(1),version:n.It({trigger:Ut,steps:n.Ct(Mt).min(1)})}).superRefine((e,t)=>{let{steps:n,trigger:r}=e.version,i=[e.universalIdentifier,r.universalIdentifier,...n.map(e=>e.universalIdentifier)];new Set(i).size!==i.length&&t.addIssue({code:`custom`,message:`Workflow, trigger and steps must have distinct universal identifiers`});let a={trigger:{type:r.type,nextStepIds:r.nextStepIds},steps:n.map(e=>({...e,id:e.universalIdentifier,settings:{input:e.input}}))},o=Je(a);for(let e of[...Ze({workflow:a,graph:o}),...Xe({workflow:a,graph:o}),..._e({workflow:a,graph:o,stepsById:new Map(a.steps.map(e=>[e.id,e]))})])e.severity===`error`&&t.addIssue({code:`custom`,message:e.message})}),Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Dt}}),Object.defineProperty(exports,"b",{enumerable:!0,get:function(){return nt}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return pt}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return ht}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return rt}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return it}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return et}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return ft}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Et}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return st}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return lt}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return mt}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return ot}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return _t}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return dt}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return gt}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return ut}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return tt}}),Object.defineProperty(exports,"x",{enumerable:!0,get:function(){return at}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return ct}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./cli-error-CSsayo0u.cjs");let t=require("node:fs/promises"),n=require("node:path");var r=class extends Error{},i=async({appPath:i,relativePaths:a})=>{for(let o of a){let a=(0,n.relative)(i,(0,n.resolve)(i,o));if(a.length===0||a===`..`||a.startsWith(`..${n.sep}`)||(0,n.isAbsolute)(a))throw new r(`Path leaves the application directory: ${o}`);let s=i;for(let i of a.split(n.sep)){s=(0,n.resolve)(s,i);try{if((await(0,t.lstat)(s)).isSymbolicLink())throw new r(`Cannot follow symbolic links: ${o}`)}catch(t){if(e.r(t,`ENOENT`))break;throw t}}}};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return r}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,t)=>()=>(t||(e((t={exports:{}}).exports,t),e=null),t.exports),s=(e,n)=>{let r={};for(var i in e)t(r,i,{get:e[i],enumerable:!0});return n||t(r,Symbol.toStringTag,{value:`Module`}),r},c=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},l=(n,r,a)=>(a=n==null?{}:e(i(n)),c(r||!n||!n.__esModule?t(a,`default`,{value:n,enumerable:!0}):a,n)),u=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isSymbol=e.isBigInt=e.isString=e.isNumber=e.isBoolean=e.isUndefined=void 0,e.isUndefined=e=>e===void 0,e.isBoolean=e=>typeof e==`boolean`,e.isNumber=e=>typeof e==`number`&&!Number.isNaN(e),e.isString=e=>typeof e==`string`,e.isBigInt=e=>typeof e==`bigint`,e.isSymbol=e=>typeof e==`symbol`})),d=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isDate=e.isWeakSet=e.isWeakMap=e.isSet=e.isMap=e.isArray=e.isObject=e.isFunction=e.isNull=void 0,e.isNull=e=>e===null,e.isFunction=e=>typeof e==`function`,e.isObject=t=>!e.isNull(t)&&typeof t==`object`,e.isArray=e=>Array.isArray(e),e.isMap=e=>e instanceof Map,e.isSet=e=>e instanceof Set,e.isWeakMap=e=>e instanceof WeakMap,e.isWeakSet=e=>e instanceof WeakSet,e.isDate=e=>e instanceof Date})),f=o((e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.isNegativeInteger=e.isNonNegativeInteger=e.isPositiveInteger=e.isInteger=e.isNumberOrNaN=e.isNonEmptyString=e.isNonEmptyArray=e.isObjectOrNull=void 0;var t=u(),n=d();e.isObjectOrNull=e=>typeof e==`object`,e.isNonEmptyArray=e=>n.isArray(e)&&e.length>0,e.isNonEmptyString=e=>t.isString(e)&&e.length>0,e.isNumberOrNaN=e=>typeof e==`number`,e.isInteger=e=>t.isNumber(e)&&Number.isInteger(e),e.isPositiveInteger=t=>e.isInteger(t)&&t>0,e.isNonNegativeInteger=t=>e.isInteger(t)&&t>=0,e.isNegativeInteger=t=>e.isInteger(t)&&t<0})),p=o((e=>{var t=e&&e.__createBinding||(Object.create?(function(e,t,n,r){r===void 0&&(r=n),Object.defineProperty(e,r,{enumerable:!0,get:function(){return t[n]}})}):(function(e,t,n,r){r===void 0&&(r=n),e[r]=t[n]})),n=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),r=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var r={};if(e!=null)for(var i in e)i!=="default"&&Object.prototype.hasOwnProperty.call(e,i)&&t(r,e,i);return n(r,e),r},i=e&&e.__exportStar||function(e,n){for(var r in e)r!=="default"&&!Object.prototype.hasOwnProperty.call(n,r)&&t(n,e,r)};Object.defineProperty(e,"__esModule",{value:!0}),e.structural=e.primitives=e.convenience=void 0,e.convenience=r(f()),i(f(),e),e.primitives=r(u()),i(u(),e),e.structural=r(d()),i(d(),e)}));Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return p}});
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
const e=require("./build-CX6FBrbu.cjs"),t=require("./constants-D-caeNc5-9rDzSg5B.cjs"),n=require("./application-DOWikeQt.cjs"),r=require("./metadata-DkXpEhJh.cjs"),i=require("./print-typescript-value-D5kLR9wo.cjs"),a=require("./kebab-case-D0usAzG-.cjs");var o=80,s=e=>[{path:[...e,`type`],symbol:`FieldType`,members:t.ct},{path:[...e,`writability`],symbol:`MetadataWritability`,members:t.at},{path:[...e,`universalSettings`,`relationType`],symbol:`RelationType`,members:t.nt},{path:[...e,`universalSettings`,`onDelete`],symbol:`OnDeleteAction`,members:t.W},{path:[...e,`universalSettings`,`dataType`],symbol:`NumberDataType`,members:t.pt},{path:[...e,`universalSettings`,`displayFormat`],symbol:`DateDisplayFormat`,members:t.P}],c=s([]),l=[{path:[`writability`],symbol:`MetadataWritability`,members:t.at},{path:[`openRecordIn`],symbol:`ObjectOpenRecordIn`,members:t.$},...s([`fields`,`[]`])],u=[{path:[`indexType`],symbol:`IndexType`,members:t.ot}],d=[{path:[`rowLevelPermissionPredicateGroups`,`[]`,`logicalOperator`],symbol:`RowLevelPermissionPredicateGroupLogicalOperator`,members:t.N},{path:[`rowLevelPermissionPredicates`,`[]`,`operand`],symbol:`RowLevelPermissionPredicateOperand`,members:t.tt},{path:[`permissionFlagUniversalIdentifiers`,`[]`],symbol:`SystemPermissionFlag`,members:t.S}],f=e=>({path:e,symbol:`AggregateOperations`,members:t.et}),p=[f([`aggregateOperation`])],m=[{path:[`type`],symbol:`ViewType`,members:t.st},{path:[`visibility`],symbol:`ViewVisibility`,members:t.H},{path:[`openRecordIn`],symbol:`ViewOpenRecordIn`,members:t.z},f([`kanbanAggregateOperation`]),{path:[`calendarLayout`],symbol:`ViewCalendarLayout`,members:t.F},f([`fields`,`[]`,`aggregateOperation`]),{path:[`filters`,`[]`,`operand`],symbol:`ViewFilterOperand`,members:t.B},{path:[`filterGroups`,`[]`,`logicalOperator`],symbol:`ViewFilterGroupLogicalOperator`,members:t.Y},{path:[`sorts`,`[]`,`direction`],symbol:`ViewSortDirection`,members:t.U}],h=e=>[{path:[...e,`type`],symbol:`WidgetType`,members:t.I},{path:[...e,`position`,`layoutMode`],symbol:`PageLayoutTabLayoutMode`,members:t.ft},f([...e,`configuration`,`aggregateOperation`]),...[`dateGranularity`,`primaryAxisDateGranularity`,`secondaryAxisGroupByDateGranularity`].map(n=>({path:[...e,`configuration`,n],symbol:`ObjectRecordGroupByDateGranularity`,members:t.X}))],g=e=>[{path:[...e,`layoutMode`],symbol:`PageLayoutTabLayoutMode`,members:t.ft},...h([...e,`widgets`,`[]`])],_=h([]),v=g([]),y=[{path:[`type`],symbol:`NavigationMenuItemType`,members:t.it}],b=[{path:[`type`],symbol:`PageLayoutType`,members:t.Q},...g([`tabs`,`[]`])],x=(e,t)=>e.length===t.length&&e.every((e,n)=>e===t[n]),S=({definer:e,config:n,enumBindings:r=[]})=>{let a=new Set,s=i.t({value:n,resolveEnumSymbol:({path:e,value:n})=>{let i=r.find(t=>x(t.path,e));if(!t.Ut(i))return;let o=Object.keys(i.members).find(e=>i.members[e]===n);if(t.Ut(o))return a.add(i.symbol),`${i.symbol}.${o}`}}),c=[e,...[...a].sort()],l=`import { ${c.join(`, `)} } from 'twenty-sdk/define';`;return{content:`${l.length<=o?l:`import {\n${c.map(e=>` ${e},`).join(`
|
|
2
|
-
`)}\n} from 'twenty-sdk/define';`}
|
|
3
|
-
|
|
4
|
-
export default ${e}(${s});
|
|
5
|
-
`,requiredSdkExports:c}},C=e.t(),w=80,T=new Map(Object.entries(r.i).flatMap(([e,t])=>Object.entries(t).map(([t,{universalIdentifier:n}])=>[n,{objectName:e,fieldName:t}]))),E=e=>(0,C.isNonEmptyString)(e)&&(0,C.isNonEmptyString)(a.t(e).replace(/-+/g,``)),D=e=>e.slice(0,w).replace(/-+$/g,``),O=({segments:e,universalIdentifier:n})=>{let r=D(e.filter(t.Ut).map(a.t).join(`-`).replace(/-{2,}/g,`-`).replace(/^-+|-+$/g,``));return(0,C.isNonEmptyString)(r)?r:n.slice(0,8)},k=({indexManifest:e,objectName:t,fieldLocationByUniversalIdentifier:n})=>O({segments:[t,...e.fields.map(({fieldUniversalIdentifier:e})=>n.get(e)?.fieldName??null)],universalIdentifier:e.universalIdentifier}),A=({viewFieldManifest:e,fieldLocationByUniversalIdentifier:n})=>{let r=n.get(e.fieldMetadataUniversalIdentifier)??T.get(e.fieldMetadataUniversalIdentifier);return O({segments:t.Ut(r)?[r.objectName,r.fieldName]:[],universalIdentifier:e.universalIdentifier})},j=`__typename`,M=e=>Array.isArray(e)?e.map(M):typeof e!=`object`||!e?e:Object.fromEntries(Object.entries(e).filter(([e])=>e!==j).map(([e,t])=>[e,M(t)])),N=new Set([`packageJsonChecksum`,`yarnLockChecksum`,`requiredServerVersionRange`,`aboutDescription`,`postInstallLogicFunction`,`preInstallLogicFunction`,`uninstallLogicFunction`,`healthCheckLogicFunction`,`settingsFrontComponent`,`settingsCustomTabFrontComponentUniversalIdentifier`,`frontComponentSharedDependencies`,`logoUrl`,`screenshots`]),P=`public/cover.generated.png`,F=e=>(e.roles??[]).some(({universalIdentifier:t})=>t===e.application.defaultRoleUniversalIdentifier),I=e=>{let t=Object.fromEntries(Object.entries(e.application).filter(([t])=>!N.has(t)&&!(t===`defaultRoleUniversalIdentifier`&&F(e)))),{galleryImages:n}=t;if(!Array.isArray(n)||n.length===0||n.every(e=>e===P)){let{galleryImages:e,...n}=t;return n}return t},L=({permissions:e,getDerivedUniversalIdentifier:t})=>e.map(({universalIdentifier:e,...n})=>e===t(n)?n:{universalIdentifier:e,...n}),R=({roleManifest:e,applicationUniversalIdentifier:r})=>{let{universalIdentifier:i,objectPermissions:a,fieldPermissions:o}=e;return{...e,...t.Ut(a)?{objectPermissions:L({permissions:a,getDerivedUniversalIdentifier:({objectUniversalIdentifier:e})=>n.d({applicationUniversalIdentifier:r,roleUniversalIdentifier:i,objectUniversalIdentifier:e})})}:{},...t.Ut(o)?{fieldPermissions:L({permissions:o,getDerivedUniversalIdentifier:({fieldUniversalIdentifier:e})=>n.o({applicationUniversalIdentifier:r,roleUniversalIdentifier:i,fieldUniversalIdentifier:e})})}:{}}},z=({objectName:e,fieldName:t,fieldUniversalIdentifier:n})=>O({segments:[e,t],universalIdentifier:n}),B=new Map(Object.entries(r.t).map(([e,t])=>[t,e])),V=({objectUniversalIdentifier:e,manifest:t})=>(t.objects??[]).find(t=>t.universalIdentifier===e)?.nameSingular??B.get(e)??null,H=new Map(Object.entries(r.r).map(([e,{universalIdentifier:t}])=>[t,e])),U=({pageLayoutUniversalIdentifier:e,manifest:r})=>{let i=r.pageLayouts?.find(t=>t.universalIdentifier===e);if(t.Ut(i))return i.name;let a=H.get(e);if(t.Ut(a))return a;let o=r.application.universalIdentifier;for(let t of r.objects??[]){let r={objectMetadataApplicationUniversalIdentifier:o,objectUniversalIdentifier:t.universalIdentifier};if(n.f(r)===e)return`${t.nameSingular}RecordPage`;if(n.t(r)===e)return`${t.nameSingular}RecordForm`}return null},W=({viewUniversalIdentifier:e,manifest:r})=>{let i=r.views?.find(t=>t.universalIdentifier===e);if(t.Ut(i))return i.name;let a=r.application.universalIdentifier;for(let t of r.objects??[])if(n.y({objectMetadataApplicationUniversalIdentifier:a,objectUniversalIdentifier:t.universalIdentifier,viewKey:n.m.INDEX})===e)return`${t.nameSingular}IndexView`;return null},G=({navigationMenuItemManifest:e,manifest:n})=>{let{type:r,name:i,targetObjectUniversalIdentifier:a,viewUniversalIdentifier:o,pageLayoutUniversalIdentifier:s}=e;return E(i)?i:r===t.it.OBJECT&&t.Ut(a)?V({objectUniversalIdentifier:a,manifest:n}):r===t.it.VIEW&&t.Ut(o)?W({viewUniversalIdentifier:o,manifest:n}):r===t.it.PAGE_LAYOUT&&t.Ut(s)?U({pageLayoutUniversalIdentifier:s,manifest:n}):null},K=({navigationMenuItemManifest:e,manifest:t})=>O({segments:[G({navigationMenuItemManifest:e,manifest:t})],universalIdentifier:e.universalIdentifier}),q=({folderUniversalIdentifier:e,manifest:t})=>{let n=t.navigationMenuItems?.find(t=>t.universalIdentifier===e)?.name;return E(n)?n:null},J=[`application`,`object`,`field`,`index`,`permissionFlag`,`role`,`view`,`viewField`,`pageLayout`,`pageLayoutTab`,`navigationMenuItem`,`pageLayoutWidget`],Y=(e,n=new Map)=>{let r=e.application.universalIdentifier,i=[],o=[];i.push({kind:`application`,universalIdentifier:r,definer:`defineApplication`,config:I(e),enumBindings:[],defaultFolder:`src`,fileSuffix:`.config.ts`,fileBaseName:`application`,parentName:null});let s=new Set,f=new Map,h=[...e.fields??[]];for(let t of e.objects??[]){let e=[];for(let r of t.fields??[])f.set(r.universalIdentifier,{objectName:t.nameSingular,fieldName:r.name}),n.get(r.universalIdentifier.toLowerCase())?.entityKey===`fields`?h.push({...r,objectUniversalIdentifier:t.universalIdentifier}):e.push(r);s.add(t.universalIdentifier),i.push({kind:`object`,universalIdentifier:t.universalIdentifier,definer:`defineObject`,config:{...t,fields:e},enumBindings:l,defaultFolder:`src/objects`,fileSuffix:`.object.ts`,fileBaseName:a.t(t.nameSingular),parentName:null})}for(let t of h){let n=V({objectUniversalIdentifier:t.objectUniversalIdentifier,manifest:e});f.set(t.universalIdentifier,{objectName:n,fieldName:t.name}),i.push({kind:`field`,universalIdentifier:t.universalIdentifier,definer:`defineField`,config:t,enumBindings:c,defaultFolder:`src/fields`,fileSuffix:`.field.ts`,fileBaseName:z({objectName:n,fieldName:t.name,fieldUniversalIdentifier:t.universalIdentifier}),parentName:n})}for(let t of e.indexes??[]){if(!s.has(t.objectUniversalIdentifier)){o.push({kind:`index`,universalIdentifier:t.universalIdentifier,reason:`its object is not part of the written source`});continue}let n=V({objectUniversalIdentifier:t.objectUniversalIdentifier,manifest:e});i.push({kind:`index`,universalIdentifier:t.universalIdentifier,definer:`defineIndex`,config:t,enumBindings:u,defaultFolder:`src/indexes`,fileSuffix:`.index.ts`,fileBaseName:k({indexManifest:t,objectName:n,fieldLocationByUniversalIdentifier:f}),parentName:n})}for(let t of e.permissionFlags??[])i.push({kind:`permissionFlag`,universalIdentifier:t.universalIdentifier,definer:`definePermissionFlag`,config:t,enumBindings:[],defaultFolder:`src/permission-flags`,fileSuffix:`.permission-flag.ts`,fileBaseName:O({segments:[t.key],universalIdentifier:t.universalIdentifier}),parentName:null});for(let t of e.roles??[])i.push({kind:`role`,universalIdentifier:t.universalIdentifier,definer:t.universalIdentifier===e.application.defaultRoleUniversalIdentifier?`defineApplicationRole`:`defineRole`,config:R({roleManifest:t,applicationUniversalIdentifier:r}),enumBindings:d,defaultFolder:`src/roles`,fileSuffix:`.role.ts`,fileBaseName:O({segments:[t.label],universalIdentifier:t.universalIdentifier}),parentName:null});for(let t of e.views??[])i.push({kind:`view`,universalIdentifier:t.universalIdentifier,definer:`defineView`,config:t,enumBindings:m,defaultFolder:`src/views`,fileSuffix:`.view.ts`,fileBaseName:O({segments:[t.name],universalIdentifier:t.universalIdentifier}),parentName:V({objectUniversalIdentifier:t.objectUniversalIdentifier,manifest:e})});for(let t of e.viewFields??[])i.push({kind:`viewField`,universalIdentifier:t.universalIdentifier,definer:`defineViewField`,config:t,enumBindings:p,defaultFolder:`src/view-fields`,fileSuffix:`.view-field.ts`,fileBaseName:A({viewFieldManifest:t,fieldLocationByUniversalIdentifier:f}),parentName:null});for(let n of e.pageLayouts??[])i.push({kind:`pageLayout`,universalIdentifier:n.universalIdentifier,definer:`definePageLayout`,config:M(n),enumBindings:b,defaultFolder:`src/page-layouts`,fileSuffix:`.page-layout.ts`,fileBaseName:O({segments:[n.name],universalIdentifier:n.universalIdentifier}),parentName:t.Ut(n.objectUniversalIdentifier)?V({objectUniversalIdentifier:n.objectUniversalIdentifier,manifest:e}):null});for(let n of e.pageLayoutTabs??[]){let{pageLayoutUniversalIdentifier:r}=n;if(!t.Ut(r)){o.push({kind:`pageLayoutTab`,universalIdentifier:n.universalIdentifier,reason:`it does not name the page layout it belongs to`});continue}i.push({kind:`pageLayoutTab`,universalIdentifier:n.universalIdentifier,definer:`definePageLayoutTab`,config:M(n),enumBindings:v,defaultFolder:`src/page-layout-tabs`,fileSuffix:`.page-layout-tab.ts`,fileBaseName:O({segments:[n.title],universalIdentifier:n.universalIdentifier}),parentName:U({pageLayoutUniversalIdentifier:r,manifest:e})})}for(let n of e.navigationMenuItems??[]){let{folderUniversalIdentifier:r}=n;i.push({kind:`navigationMenuItem`,universalIdentifier:n.universalIdentifier,definer:`defineNavigationMenuItem`,config:n,enumBindings:y,defaultFolder:`src/navigation-menu-items`,fileSuffix:`.navigation-menu-item.ts`,fileBaseName:K({navigationMenuItemManifest:n,manifest:e}),parentName:t.Ut(r)?q({folderUniversalIdentifier:r,manifest:e}):null})}for(let n of e.pageLayoutWidgets??[]){let{objectUniversalIdentifier:r}=n;i.push({kind:`pageLayoutWidget`,universalIdentifier:n.universalIdentifier,definer:`definePageLayoutWidget`,config:M(n),enumBindings:_,defaultFolder:`src/page-layout-widgets`,fileSuffix:`.page-layout-widget.ts`,fileBaseName:O({segments:[n.title],universalIdentifier:n.universalIdentifier}),parentName:t.Ut(r)?V({objectUniversalIdentifier:r,manifest:e}):null})}return{entities:i,skipped:o}};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return S}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Y}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return D}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return J}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./build-CX6FBrbu.cjs");var t=e.n(((e,t)=>{t.exports=class{constructor(){this.max=1e3,this.map=new Map}get(e){let t=this.map.get(e);if(t!==void 0)return this.map.delete(e),this.map.set(e,t),t}delete(e){return this.map.delete(e)}set(e,t){if(!this.delete(e)&&t!==void 0){if(this.map.size>=this.max){let e=this.map.keys().next().value;this.delete(e)}this.map.set(e,t)}return this}}})),n=e.n(((e,t)=>{var n=Object.freeze({loose:!0}),r=Object.freeze({});t.exports=e=>e?typeof e==`object`?e:n:r})),r=e.n(((e,t)=>{var n=`2.0.0`,r=256;t.exports={MAX_LENGTH:r,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:r-6,MAX_SAFE_INTEGER:2**53-1||9007199254740991,RELEASE_TYPES:[`major`,`premajor`,`minor`,`preminor`,`patch`,`prepatch`,`prerelease`],SEMVER_SPEC_VERSION:n,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}})),i=e.n(((e,t)=>{t.exports=typeof process==`object`&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...e)=>console.error(`SEMVER`,...e):()=>{}})),a=e.n(((e,t)=>{var{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:a,MAX_LENGTH:o}=r(),s=i();e=t.exports={};var c=e.re=[],l=e.safeRe=[],u=e.src=[],d=e.t={},f=0,p=`[a-zA-Z0-9-]`,m=[[`\\s`,1],[`\\d`,o],[p,a]],h=e=>{for(let[t,n]of m)e=e.split(`${t}*`).join(`${t}{0,${n}}`).split(`${t}+`).join(`${t}{1,${n}}`);return e},g=(e,t,n)=>{let r=h(t),i=f++;s(e,i,t),d[e]=i,u[i]=t,c[i]=new RegExp(t,n?`g`:void 0),l[i]=new RegExp(r,n?`g`:void 0)};g(`NUMERICIDENTIFIER`,`0|[1-9]\\d*`),g(`NUMERICIDENTIFIERLOOSE`,`\\d+`),g(`NONNUMERICIDENTIFIER`,`\\d*[a-zA-Z-]${p}*`),g(`MAINVERSION`,`(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})\\.(${u[d.NUMERICIDENTIFIER]})`),g(`MAINVERSIONLOOSE`,`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})\\.(${u[d.NUMERICIDENTIFIERLOOSE]})`),g(`PRERELEASEIDENTIFIER`,`(?:${u[d.NUMERICIDENTIFIER]}|${u[d.NONNUMERICIDENTIFIER]})`),g(`PRERELEASEIDENTIFIERLOOSE`,`(?:${u[d.NUMERICIDENTIFIERLOOSE]}|${u[d.NONNUMERICIDENTIFIER]})`),g(`PRERELEASE`,`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`),g(`PRERELEASELOOSE`,`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`),g(`BUILDIDENTIFIER`,`${p}+`),g(`BUILD`,`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`),g(`FULLPLAIN`,`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`),g(`FULL`,`^${u[d.FULLPLAIN]}$`),g(`LOOSEPLAIN`,`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`),g(`LOOSE`,`^${u[d.LOOSEPLAIN]}$`),g(`GTLT`,`((?:<|>)?=?)`),g(`XRANGEIDENTIFIERLOOSE`,`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),g(`XRANGEIDENTIFIER`,`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`),g(`XRANGEPLAIN`,`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:\\.(${u[d.XRANGEIDENTIFIER]})(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?)?)?`),g(`XRANGEPLAINLOOSE`,`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?)?)?`),g(`XRANGE`,`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`),g(`XRANGELOOSE`,`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`),g(`COERCEPLAIN`,`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),g(`COERCE`,`${u[d.COERCEPLAIN]}(?:$|[^\\d])`),g(`COERCEFULL`,u[d.COERCEPLAIN]+`(?:${u[d.PRERELEASE]})?(?:${u[d.BUILD]})?(?:$|[^\\d])`),g(`COERCERTL`,u[d.COERCE],!0),g(`COERCERTLFULL`,u[d.COERCEFULL],!0),g(`LONETILDE`,`(?:~>?)`),g(`TILDETRIM`,`(\\s*)${u[d.LONETILDE]}\\s+`,!0),e.tildeTrimReplace=`$1~`,g(`TILDE`,`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`),g(`TILDELOOSE`,`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`),g(`LONECARET`,`(?:\\^)`),g(`CARETTRIM`,`(\\s*)${u[d.LONECARET]}\\s+`,!0),e.caretTrimReplace=`$1^`,g(`CARET`,`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`),g(`CARETLOOSE`,`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`),g(`COMPARATORLOOSE`,`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`),g(`COMPARATOR`,`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`),g(`COMPARATORTRIM`,`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,!0),e.comparatorTrimReplace=`$1$2$3`,g(`HYPHENRANGE`,`^\\s*(${u[d.XRANGEPLAIN]})\\s+-\\s+(${u[d.XRANGEPLAIN]})\\s*$`),g(`HYPHENRANGELOOSE`,`^\\s*(${u[d.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[d.XRANGEPLAINLOOSE]})\\s*$`),g(`STAR`,`(<|>)?=?\\s*\\*`),g(`GTE0`,`^\\s*>=\\s*0\\.0\\.0\\s*$`),g(`GTE0PRE`,`^\\s*>=\\s*0\\.0\\.0-0\\s*$`)})),o=e.n(((e,t)=>{var n=/^[0-9]+$/,r=(e,t)=>{let r=n.test(e),i=n.test(t);return r&&i&&(e=+e,t=+t),e===t?0:r&&!i?-1:i&&!r?1:e<t?-1:1};t.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}})),s=e.n(((e,t)=>{var s=i(),{MAX_LENGTH:c,MAX_SAFE_INTEGER:l}=r(),{safeRe:u,t:d}=a(),f=n(),{compareIdentifiers:p}=o();t.exports=class e{constructor(t,n){if(n=f(n),t instanceof e){if(t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease)return t;t=t.version}else if(typeof t!=`string`)throw TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`);if(t.length>c)throw TypeError(`version is longer than ${c} characters`);s(`SemVer`,t,n),this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease;let r=t.trim().match(n.loose?u[d.LOOSE]:u[d.FULL]);if(!r)throw TypeError(`Invalid Version: ${t}`);if(this.raw=t,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>l||this.major<0)throw TypeError(`Invalid major version`);if(this.minor>l||this.minor<0)throw TypeError(`Invalid minor version`);if(this.patch>l||this.patch<0)throw TypeError(`Invalid patch version`);r[4]?this.prerelease=r[4].split(`.`).map(e=>{if(/^[0-9]+$/.test(e)){let t=+e;if(t>=0&&t<l)return t}return e}):this.prerelease=[],this.build=r[5]?r[5].split(`.`):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(`.`)}`),this.version}toString(){return this.version}compare(t){if(s(`SemVer.compare`,this.version,this.options,t),!(t instanceof e)){if(typeof t==`string`&&t===this.version)return 0;t=new e(t,this.options)}return t.version===this.version?0:this.compareMain(t)||this.comparePre(t)}compareMain(t){return t instanceof e||(t=new e(t,this.options)),p(this.major,t.major)||p(this.minor,t.minor)||p(this.patch,t.patch)}comparePre(t){if(t instanceof e||(t=new e(t,this.options)),this.prerelease.length&&!t.prerelease.length)return-1;if(!this.prerelease.length&&t.prerelease.length)return 1;if(!this.prerelease.length&&!t.prerelease.length)return 0;let n=0;do{let e=this.prerelease[n],r=t.prerelease[n];if(s(`prerelease compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}compareBuild(t){t instanceof e||(t=new e(t,this.options));let n=0;do{let e=this.build[n],r=t.build[n];if(s(`build compare`,n,e,r),e===void 0&&r===void 0)return 0;if(r===void 0)return 1;if(e===void 0)return-1;if(e===r)continue;return p(e,r)}while(++n)}inc(e,t,n){switch(e){case`premajor`:this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc(`pre`,t,n);break;case`preminor`:this.prerelease.length=0,this.patch=0,this.minor++,this.inc(`pre`,t,n);break;case`prepatch`:this.prerelease.length=0,this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`prerelease`:this.prerelease.length===0&&this.inc(`patch`,t,n),this.inc(`pre`,t,n);break;case`major`:(this.minor!==0||this.patch!==0||this.prerelease.length===0)&&this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case`minor`:(this.patch!==0||this.prerelease.length===0)&&this.minor++,this.patch=0,this.prerelease=[];break;case`patch`:this.prerelease.length===0&&this.patch++,this.prerelease=[];break;case`pre`:{let e=+!!Number(n);if(!t&&n===!1)throw Error(`invalid increment argument: identifier is empty`);if(this.prerelease.length===0)this.prerelease=[e];else{let r=this.prerelease.length;for(;--r>=0;)typeof this.prerelease[r]==`number`&&(this.prerelease[r]++,r=-2);if(r===-1){if(t===this.prerelease.join(`.`)&&n===!1)throw Error(`invalid increment argument: identifier already exists`);this.prerelease.push(e)}}if(t){let r=[t,e];n===!1&&(r=[t]),p(this.prerelease[0],t)===0?isNaN(this.prerelease[1])&&(this.prerelease=r):this.prerelease=r}break}default:throw Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(`.`)}`),this}}})),c=e.n(((e,t)=>{var n=s();t.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))})),l=e.n(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)===0})),u=e.n(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)!==0})),d=e.n(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)>0})),f=e.n(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)>=0})),p=e.n(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)<0})),m=e.n(((e,t)=>{var n=c();t.exports=(e,t,r)=>n(e,t,r)<=0})),h=e.n(((e,t)=>{var n=l(),r=u(),i=d(),a=f(),o=p(),s=m();t.exports=(e,t,c,l)=>{switch(t){case`===`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e===c;case`!==`:return typeof e==`object`&&(e=e.version),typeof c==`object`&&(c=c.version),e!==c;case``:case`=`:case`==`:return n(e,c,l);case`!=`:return r(e,c,l);case`>`:return i(e,c,l);case`>=`:return a(e,c,l);case`<`:return o(e,c,l);case`<=`:return s(e,c,l);default:throw TypeError(`Invalid operator: ${t}`)}}})),g=e.n(((e,t)=>{var r=Symbol(`SemVer ANY`);t.exports=class e{static get ANY(){return r}constructor(t,n){if(n=o(n),t instanceof e){if(t.loose===!!n.loose)return t;t=t.value}t=t.trim().split(/\s+/).join(` `),d(`comparator`,t,n),this.options=n,this.loose=!!n.loose,this.parse(t),this.semver===r?this.value=``:this.value=this.operator+this.semver.version,d(`comp`,this)}parse(e){let t=this.options.loose?c[l.COMPARATORLOOSE]:c[l.COMPARATOR],n=e.match(t);if(!n)throw TypeError(`Invalid comparator: ${e}`);this.operator=n[1]===void 0?``:n[1],this.operator===`=`&&(this.operator=``),n[2]?this.semver=new f(n[2],this.options.loose):this.semver=r}toString(){return this.value}test(e){if(d(`Comparator.test`,e,this.options.loose),this.semver===r||e===r)return!0;if(typeof e==`string`)try{e=new f(e,this.options)}catch{return!1}return u(e,this.operator,this.semver,this.options)}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Comparator is required`);return this.operator===``?this.value===``?!0:new p(t.value,n).test(this.value):t.operator===``?t.value===``?!0:new p(this.value,n).test(t.semver):(n=o(n),n.includePrerelease&&(this.value===`<0.0.0-0`||t.value===`<0.0.0-0`)||!n.includePrerelease&&(this.value.startsWith(`<0.0.0`)||t.value.startsWith(`<0.0.0`))?!1:!!(this.operator.startsWith(`>`)&&t.operator.startsWith(`>`)||this.operator.startsWith(`<`)&&t.operator.startsWith(`<`)||this.semver.version===t.semver.version&&this.operator.includes(`=`)&&t.operator.includes(`=`)||u(this.semver,`<`,t.semver,n)&&this.operator.startsWith(`>`)&&t.operator.startsWith(`<`)||u(this.semver,`>`,t.semver,n)&&this.operator.startsWith(`<`)&&t.operator.startsWith(`>`)))}};var o=n(),{safeRe:c,t:l}=a(),u=h(),d=i(),f=s(),p=_()})),_=e.n(((e,o)=>{var c=/\s+/g;o.exports=class e{constructor(t,n){if(n=u(n),t instanceof e)return t.loose===!!n.loose&&t.includePrerelease===!!n.includePrerelease?t:new e(t.raw,n);if(t instanceof d)return this.raw=t.value,this.set=[[t]],this.formatted=void 0,this;if(this.options=n,this.loose=!!n.loose,this.includePrerelease=!!n.includePrerelease,this.raw=t.trim().replace(c,` `),this.set=this.raw.split(`||`).map(e=>this.parseRange(e.trim())).filter(e=>e.length),!this.set.length)throw TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){let e=this.set[0];if(this.set=this.set.filter(e=>!S(e[0])),this.set.length===0)this.set=[e];else if(this.set.length>1){for(let e of this.set)if(e.length===1&&C(e[0])){this.set=[e];break}}}this.formatted=void 0}get range(){if(this.formatted===void 0){this.formatted=``;for(let e=0;e<this.set.length;e++){e>0&&(this.formatted+=`||`);let t=this.set[e];for(let e=0;e<t.length;e++)e>0&&(this.formatted+=` `),this.formatted+=t[e].toString().trim()}}return this.formatted}format(){return this.range}toString(){return this.range}parseRange(e){let t=((this.options.includePrerelease&&b)|(this.options.loose&&x))+`:`+e,n=l.get(t);if(n)return n;let r=this.options.loose,i=r?m[h.HYPHENRANGELOOSE]:m[h.HYPHENRANGE];e=e.replace(i,F(this.options.includePrerelease)),f(`hyphen replace`,e),e=e.replace(m[h.COMPARATORTRIM],_),f(`comparator trim`,e),e=e.replace(m[h.TILDETRIM],v),f(`tilde trim`,e),e=e.replace(m[h.CARETTRIM],y),f(`caret trim`,e);let a=e.split(` `).map(e=>T(e,this.options)).join(` `).split(/\s+/).map(e=>P(e,this.options));r&&(a=a.filter(e=>(f(`loose invalid filter`,e,this.options),!!e.match(m[h.COMPARATORLOOSE])))),f(`range list`,a);let o=new Map,s=a.map(e=>new d(e,this.options));for(let e of s){if(S(e))return[e];o.set(e.value,e)}o.size>1&&o.has(``)&&o.delete(``);let c=[...o.values()];return l.set(t,c),c}intersects(t,n){if(!(t instanceof e))throw TypeError(`a Range is required`);return this.set.some(e=>w(e,n)&&t.set.some(t=>w(t,n)&&e.every(e=>t.every(t=>e.intersects(t,n)))))}test(e){if(!e)return!1;if(typeof e==`string`)try{e=new p(e,this.options)}catch{return!1}for(let t=0;t<this.set.length;t++)if(I(this.set[t],e,this.options))return!0;return!1}};var l=new(t()),u=n(),d=g(),f=i(),p=s(),{safeRe:m,t:h,comparatorTrimReplace:_,tildeTrimReplace:v,caretTrimReplace:y}=a(),{FLAG_INCLUDE_PRERELEASE:b,FLAG_LOOSE:x}=r(),S=e=>e.value===`<0.0.0-0`,C=e=>e.value===``,w=(e,t)=>{let n=!0,r=e.slice(),i=r.pop();for(;n&&r.length;)n=r.every(e=>i.intersects(e,t)),i=r.pop();return n},T=(e,t)=>(f(`comp`,e,t),e=k(e,t),f(`caret`,e),e=D(e,t),f(`tildes`,e),e=j(e,t),f(`xrange`,e),e=N(e,t),f(`stars`,e),e),E=e=>!e||e.toLowerCase()===`x`||e===`*`,D=(e,t)=>e.trim().split(/\s+/).map(e=>O(e,t)).join(` `),O=(e,t)=>{let n=t.loose?m[h.TILDELOOSE]:m[h.TILDE];return e.replace(n,(t,n,r,i,a)=>{f(`tilde`,e,t,n,r,i,a);let o;return E(n)?o=``:E(r)?o=`>=${n}.0.0 <${+n+1}.0.0-0`:E(i)?o=`>=${n}.${r}.0 <${n}.${+r+1}.0-0`:a?(f(`replaceTilde pr`,a),o=`>=${n}.${r}.${i}-${a} <${n}.${+r+1}.0-0`):o=`>=${n}.${r}.${i} <${n}.${+r+1}.0-0`,f(`tilde return`,o),o})},k=(e,t)=>e.trim().split(/\s+/).map(e=>A(e,t)).join(` `),A=(e,t)=>{f(`caret`,e,t);let n=t.loose?m[h.CARETLOOSE]:m[h.CARET],r=t.includePrerelease?`-0`:``;return e.replace(n,(t,n,i,a,o)=>{f(`caret`,e,t,n,i,a,o);let s;return E(n)?s=``:E(i)?s=`>=${n}.0.0${r} <${+n+1}.0.0-0`:E(a)?s=n===`0`?`>=${n}.${i}.0${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.0${r} <${+n+1}.0.0-0`:o?(f(`replaceCaret pr`,o),s=n===`0`?i===`0`?`>=${n}.${i}.${a}-${o} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}-${o} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a}-${o} <${+n+1}.0.0-0`):(f(`no pr`),s=n===`0`?i===`0`?`>=${n}.${i}.${a}${r} <${n}.${i}.${+a+1}-0`:`>=${n}.${i}.${a}${r} <${n}.${+i+1}.0-0`:`>=${n}.${i}.${a} <${+n+1}.0.0-0`),f(`caret return`,s),s})},j=(e,t)=>(f(`replaceXRanges`,e,t),e.split(/\s+/).map(e=>M(e,t)).join(` `)),M=(e,t)=>{e=e.trim();let n=t.loose?m[h.XRANGELOOSE]:m[h.XRANGE];return e.replace(n,(n,r,i,a,o,s)=>{f(`xRange`,e,n,r,i,a,o,s);let c=E(i),l=c||E(a),u=l||E(o),d=u;return r===`=`&&d&&(r=``),s=t.includePrerelease?`-0`:``,c?n=r===`>`||r===`<`?`<0.0.0-0`:`*`:r&&d?(l&&(a=0),o=0,r===`>`?(r=`>=`,l?(i=+i+1,a=0,o=0):(a=+a+1,o=0)):r===`<=`&&(r=`<`,l?i=+i+1:a=+a+1),r===`<`&&(s=`-0`),n=`${r+i}.${a}.${o}${s}`):l?n=`>=${i}.0.0${s} <${+i+1}.0.0-0`:u&&(n=`>=${i}.${a}.0${s} <${i}.${+a+1}.0-0`),f(`xRange return`,n),n})},N=(e,t)=>(f(`replaceStars`,e,t),e.trim().replace(m[h.STAR],``)),P=(e,t)=>(f(`replaceGTE0`,e,t),e.trim().replace(m[t.includePrerelease?h.GTE0PRE:h.GTE0],``)),F=e=>(t,n,r,i,a,o,s,c,l,u,d,f)=>(n=E(r)?``:E(i)?`>=${r}.0.0${e?`-0`:``}`:E(a)?`>=${r}.${i}.0${e?`-0`:``}`:o?`>=${n}`:`>=${n}${e?`-0`:``}`,c=E(l)?``:E(u)?`<${+l+1}.0.0-0`:E(d)?`<${l}.${+u+1}.0-0`:f?`<=${l}.${u}.${d}-${f}`:e?`<${l}.${u}.${+d+1}-0`:`<=${c}`,`${n} ${c}`.trim()),I=(e,t,n)=>{for(let n=0;n<e.length;n++)if(!e[n].test(t))return!1;if(t.prerelease.length&&!n.includePrerelease){for(let n=0;n<e.length;n++)if(f(e[n].semver),e[n].semver!==d.ANY&&e[n].semver.prerelease.length>0){let r=e[n].semver;if(r.major===t.major&&r.minor===t.minor&&r.patch===t.patch)return!0}return!1}return!0}})),v=e.n(((e,t)=>{var n=_();t.exports=(e,t,r)=>{try{t=new n(t,r)}catch{return!1}return t.test(e)}})),y=e.n(((e,t)=>{var n=s(),r=g(),{ANY:i}=r,a=_(),o=v(),c=d(),l=p(),u=m(),h=f();t.exports=(e,t,s,d)=>{e=new n(e,d),t=new a(t,d);let f,p,m,g,_;switch(s){case`>`:f=c,p=u,m=l,g=`>`,_=`>=`;break;case`<`:f=l,p=h,m=c,g=`<`,_=`<=`;break;default:throw TypeError(`Must provide a hilo val of "<" or ">"`)}if(o(e,t,d))return!1;for(let n=0;n<t.set.length;++n){let a=t.set[n],o=null,s=null;if(a.forEach(e=>{e.semver===i&&(e=new r(`>=0.0.0`)),o||=e,s||=e,f(e.semver,o.semver,d)?o=e:m(e.semver,s.semver,d)&&(s=e)}),o.operator===g||o.operator===_||(!s.operator||s.operator===g)&&p(e,s.semver)||s.operator===_&&m(e,s.semver))return!1}return!0}})),b=e.n(((e,t)=>{var n=y();t.exports=(e,t,r)=>n(e,t,`<`,r)})),x=e.n(((e,t)=>{var n=_();t.exports=(e,t)=>{try{return new n(e,t).range||`*`}catch{return null}}})),S=e.t(),C=e.i(v()),w=e.i(b()),T=e.i(x()),E=({version:e,range:t})=>(0,S.isNull)((0,T.default)(t))?`invalid`:(0,C.default)(e,t)?`satisfied`:(0,w.default)(e,t)?`belowMinimum`:`outsideRange`;Object.defineProperty(exports,"_",{enumerable:!0,get:function(){return o}}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return h}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"g",{enumerable:!0,get:function(){return s}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return c}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return y}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return m}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return l}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return x}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return _}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return u}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return b}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return g}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return E}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"v",{enumerable:!0,get:function(){return a}}),Object.defineProperty(exports,"y",{enumerable:!0,get:function(){return r}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=(e,t)=>e instanceof Error&&`code`in e&&e.code===t,t={SUCCESS:0,FAILURE:1,USAGE:2,AUTHENTICATION:3,NOT_FOUND:4,PARTIAL_FAILURE:5,CONFLICT:6,CANCELLED:130},n=class extends Error{code;exitCode;hint;details;constructor({code:e,message:n,exitCode:r=t.FAILURE,hint:i,details:a,cause:o}){super(n,{cause:o}),this.name=`CliError`,this.code=e,this.exitCode=r,this.hint=i,this.details=a}};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return t}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return e}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return n}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`>=24.5.0`;Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
var e=`2.51.3`;Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./build-CX6FBrbu.cjs"),t=require("./locale-catalog-format-CgKjHqcW.cjs");let n=require("node:fs/promises"),r=require("typescript");r=e.i(r);var i=(e,t)=>t!==void 0&&t.length>0?`${t}${e}`:e,a=e=>e.replace(/\s+/g,` `).trim(),o=new Set([`t`,`msg`]),s=`Trans`,c=e=>{if(e!==void 0&&(r.isStringLiteral(e)||r.isNoSubstitutionTemplateLiteral(e)))return e.text},l=e=>{if(e===void 0)return;let t=c(e);if(t!==void 0)return{message:t};if(!r.isObjectLiteralExpression(e))return;let n=e.properties.find(e=>e.name!==void 0&&r.isIdentifier(e.name)&&e.name.text===`message`);if(n===void 0||!r.isPropertyAssignment(n))return;let i=c(n.initializer);if(i===void 0)return;let a=e.properties.find(e=>e.name!==void 0&&r.isIdentifier(e.name)&&e.name.text===`context`),o=a!==void 0&&r.isPropertyAssignment(a)?c(a.initializer):void 0;return o===void 0?{message:i}:{message:i,context:o}},u=(e,t)=>{let n=e.attributes.properties.find(e=>r.isJsxAttribute(e)&&e.name.getText()===t);if(n===void 0||!r.isJsxAttribute(n))return;let i=n.initializer;if(i!==void 0){if(r.isStringLiteral(i))return i.text;if(r.isJsxExpression(i))return c(i.expression)}},d=e=>{let t=e.children;if(t.some(e=>r.isJsxExpression(e)||r.isJsxElement(e)||r.isJsxSelfClosingElement(e)))return;let n=a(t.filter(e=>r.isJsxText(e)).map(e=>e.getText()).join(``));return n.length>0?n:void 0},f=e=>{let t=new Map;for(let n of e)t.set(i(n.message,n.context),n);return[...t.values()]},p=async e=>{if(e.length===0)return[];let t=[];for(let i=0;i<e.length;i++){let a;try{a=await(0,n.readFile)(e[i],`utf8`)}catch{continue}let c=r.createSourceFile(`front-component-${i}.tsx`,a,r.ScriptTarget.Latest,!0,r.ScriptKind.TSX),f=e=>{if(r.isCallExpression(e)){let n=e.expression;if(r.isIdentifier(n)&&o.has(n.text)){let n=l(e.arguments[0]);n!==void 0&&t.push(n)}return}if(r.isJsxSelfClosingElement(e)){if(e.tagName.getText()!==s)return;let n=u(e,`message`);if(n!==void 0&&n.length>0){let r=u(e,`context`);t.push(r===void 0?{message:n}:{message:n,context:r})}return}if(r.isJsxElement(e)){let n=e.openingElement;if(n.tagName.getText()!==s)return;let r=u(n,`message`)??d(e);if(r!==void 0&&r.length>0){let e=u(n,`context`);t.push(e===void 0?{message:r}:{message:r,context:e})}}},p=e=>{f(e),r.forEachChild(e,p)};r.forEachChild(c,p)}return f(t)},m={objectMetadata:`objects`,fieldMetadata:`fields`,view:`views`,pageLayout:`pageLayouts`,pageLayoutTab:`pageLayoutTabs`,pageLayoutWidget:`pageLayoutWidgets`,commandMenuItem:`commandMenuItems`,navigationMenuItem:`navigationMenuItems`,timelineActivityType:`timelineActivityTypes`,settingsMenuItem:`settingsMenuItems`},h=e=>{let n=new Map,r=(e,r)=>{if(!(typeof e!=`object`||!e))for(let i of t.i[r]){let a=e[i];if(typeof a!=`string`||a.length===0)continue;let o=t.r(r,i);n.set(JSON.stringify([o,a]),{message:a,context:o})}};for(let[t,n]of Object.entries(m)){let i=e[n];if(Array.isArray(i))for(let e of i)r(e,t)}for(let t of e.objects??[])for(let e of t.fields??[])r(e,`fieldMetadata`);for(let t of e.pageLayouts??[])for(let e of t.tabs??[]){r(e,`pageLayoutTab`);for(let t of e.widgets??[])r(t,`pageLayoutWidget`)}for(let t of e.pageLayoutTabs??[])for(let e of t.widgets??[])r(e,`pageLayoutWidget`);return[...n.values()]};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return i}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return h}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./build-CX6FBrbu.cjs"),t=require("./constants-D-caeNc5-9rDzSg5B.cjs"),n=require("./read-watch-input-stamp-BxeOb0vI.cjs");let r=require("node:async_hooks"),i=require("node:path"),a=require("node:fs");var o=e.r({collectWatchInputs:()=>c,getWatchInputPlugins:()=>p,recordWatchFile:()=>d,recordWatchProbe:()=>f}),s=new r.AsyncLocalStorage,c=async e=>{let t=new Map,n=new Map,r=await s.run({inputs:t,probes:n},e),a=new Set([...t.values()].filter(e=>e.kind===`file`&&e.stamp!==null).map(e=>(0,i.dirname)(e.path)));for(let[e,r]of n)a.has((0,i.dirname)(r.path))&&!t.has(e)&&t.set(e,r);return{result:r,watchInputs:[...t.values()]}},l=(e,t,r)=>{let o;try{o=(0,a.realpathSync)(t)}catch{o=(0,i.resolve)(t)}if(n.n(o))return;let s=`${r}:${o}`;if(!e.has(s)){let t={path:o,kind:r};e.set(s,{...t,stamp:n.t(t)})}return o},u=(e,t)=>{let n=(0,i.dirname)(t);for(;(0,i.dirname)(n)!==n;){try{if((0,a.statSync)(n).isDirectory()){l(e,n,`directory`);return}}catch{}n=(0,i.dirname)(n)}},d=e=>{let n=s.getStore();if(!t.Ut(n))return;let r=l(n.inputs,e,`file`);t.Ut(r)&&u(n.inputs,r)},f=e=>{let n=s.getStore();t.Ut(n)&&l(n.probes,e,`file`)},p=()=>{let e=s.getStore();if(!t.Ut(e))return[];let{inputs:n}=e;return[{name:`collect-watch-inputs`,setup:e=>{e.onLoad({filter:/.*/,namespace:`file`},({path:e})=>{let r=l(n,e,`file`);t.Ut(r)&&u(n,r)}),e.onResolve({filter:/^\./},({path:e,resolveDir:t})=>{t.length>0&&u(n,(0,i.resolve)(t,e))})}}]};Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return f}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return p}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return d}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return o}});
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const e=require("./build-CX6FBrbu.cjs"),t=require("./utils-CvvLHbc4-CKDJ1YgX.cjs"),n=require("./constants-D-caeNc5-9rDzSg5B.cjs"),r=require("./application-DOWikeQt.cjs"),i=require("./fs-utils-Bl1fQcaJ.cjs"),a=require("./list-application-source-files-jEau5Rie.cjs"),o=require("./extract-manifest-from-file-nrU-X7g7.cjs"),s=require("./metadata-DkXpEhJh.cjs"),c=require("./locale-catalog-format-CgKjHqcW.cjs"),l=require("./constants-Cf5-CwMu.cjs"),u=require("./is-supported-locale-xFJcoWeE.cjs");let d=require("node:fs/promises"),f=require("node:path"),p=require("node:fs"),m=require("tinyglobby"),h=require("typescript");h=e.i(h);let g=require("path");g=e.i(g);var _=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/i;function v(e){return typeof e==`string`&&_.test(e)}function y(e){if(!v(e))throw TypeError(`Invalid UUID`);let t;return Uint8Array.of((t=parseInt(e.slice(0,8),16))>>>24,t>>>16&255,t>>>8&255,t&255,(t=parseInt(e.slice(9,13),16))>>>8,t&255,(t=parseInt(e.slice(14,18),16))>>>8,t&255,(t=parseInt(e.slice(19,23),16))>>>8,t&255,(t=parseInt(e.slice(24,36),16))/1099511627776&255,t/4294967296&255,t>>>24&255,t>>>16&255,t>>>8&255,t&255)}var b=[];for(let e=0;e<256;++e)b.push((e+256).toString(16).slice(1));function ee(e,t=0){return(b[e[t+0]]+b[e[t+1]]+b[e[t+2]]+b[e[t+3]]+`-`+b[e[t+4]]+b[e[t+5]]+`-`+b[e[t+6]]+b[e[t+7]]+`-`+b[e[t+8]]+b[e[t+9]]+`-`+b[e[t+10]]+b[e[t+11]]+b[e[t+12]]+b[e[t+13]]+b[e[t+14]]+b[e[t+15]]).toLowerCase()}function te(e){e=unescape(encodeURIComponent(e));let t=new Uint8Array(e.length);for(let n=0;n<e.length;++n)t[n]=e.charCodeAt(n);return t}var ne=`6ba7b810-9dad-11d1-80b4-00c04fd430c8`,x=`6ba7b811-9dad-11d1-80b4-00c04fd430c8`;function S(e,t,n,r,i,a){let o=typeof n==`string`?te(n):n,s=typeof r==`string`?y(r):r;if(typeof r==`string`&&(r=y(r)),r?.length!==16)throw TypeError(`Namespace must be array-like (16 iterable integer values, 0-255)`);let c=new Uint8Array(16+o.length);if(c.set(s),c.set(o,s.length),c=t(c),c[6]=c[6]&15|e,c[8]=c[8]&63|128,i){if(a||=0,a<0||a+16>i.length)throw RangeError(`UUID byte range ${a}:${a+15} is out of buffer bounds`);for(let e=0;e<16;++e)i[a+e]=c[e];return i}return ee(c)}function re(e,t,n,r){switch(e){case 0:return t&n^~t&r;case 1:return t^n^r;case 2:return t&n^t&r^n&r;case 3:return t^n^r}}function C(e,t){return e<<t|e>>>32-t}function ie(e){let t=[1518500249,1859775393,2400959708,3395469782],n=[1732584193,4023233417,2562383102,271733878,3285377520],r=new Uint8Array(e.length+1);r.set(e),r[e.length]=128,e=r;let i=e.length/4+2,a=Math.ceil(i/16),o=Array(a);for(let t=0;t<a;++t){let n=new Uint32Array(16);for(let r=0;r<16;++r)n[r]=e[t*64+r*4]<<24|e[t*64+r*4+1]<<16|e[t*64+r*4+2]<<8|e[t*64+r*4+3];o[t]=n}o[a-1][14]=(e.length-1)*8/2**32,o[a-1][14]=Math.floor(o[a-1][14]),o[a-1][15]=(e.length-1)*8&4294967295;for(let e=0;e<a;++e){let r=new Uint32Array(80);for(let t=0;t<16;++t)r[t]=o[e][t];for(let e=16;e<80;++e)r[e]=C(r[e-3]^r[e-8]^r[e-14]^r[e-16],1);let i=n[0],a=n[1],s=n[2],c=n[3],l=n[4];for(let e=0;e<80;++e){let n=Math.floor(e/20),o=C(i,5)+re(n,a,s,c)+l+t[n]+r[e]>>>0;l=c,c=s,s=C(a,30)>>>0,a=i,i=o}n[0]=n[0]+i>>>0,n[1]=n[1]+a>>>0,n[2]=n[2]+s>>>0,n[3]=n[3]+c>>>0,n[4]=n[4]+l>>>0}return Uint8Array.of(n[0]>>24,n[0]>>16,n[0]>>8,n[0],n[1]>>24,n[1]>>16,n[1]>>8,n[1],n[2]>>24,n[2]>>16,n[2]>>8,n[2],n[3]>>24,n[3]>>16,n[3]>>8,n[3],n[4]>>24,n[4]>>16,n[4]>>8,n[4])}function w(e,t,n,r){return S(80,ie,e,t,n,r)}w.DNS=ne,w.URL=x;function ae(e){if(!v(e))throw TypeError(`Invalid UUID`);return parseInt(e.slice(14,15),16)}var T=`a80ff791-b940-4c47-a522-2bb478515415`,oe=e=>e.type!==n.ct.SELECT&&e.type!==n.ct.MULTI_SELECT||e.options===void 0||e.options===null?e:{...e,options:e.options.map(t=>({...t,id:t.id??w(`${t.label}-${e.universalIdentifier}`,T)}))},E=({fields:e,labelIdentifierFieldMetadataUniversalIdentifier:t})=>n.Ut(t)&&!e.some(e=>e.universalIdentifier===t),D=({objectConfig:e,applicationUniversalIdentifier:t})=>({name:`name`,label:`Name`,description:`Name`,icon:`IconAbc`,isNullable:!0,defaultValue:null,type:n.ct.TEXT,universalIdentifier:r.h({applicationUniversalIdentifier:t,objectUniversalIdentifier:e.universalIdentifier,name:`name`})}),O=({objectConfig:e,applicationUniversalIdentifier:t})=>{let n=(e.fields??[]).map(e=>e.name),r=[...e.fields??[]],i=D({objectConfig:e,applicationUniversalIdentifier:t}),a=E({fields:e.fields??[],labelIdentifierFieldMetadataUniversalIdentifier:e.labelIdentifierFieldMetadataUniversalIdentifier});return!n.includes(i.name)&&!a&&r.push(i),{objectFields:r}},se=({objectConfig:e,applicationUniversalIdentifier:t})=>{let{objectFields:n}=O({objectConfig:e,applicationUniversalIdentifier:t}),r=e.labelIdentifierFieldMetadataUniversalIdentifier??n.find(e=>e.name===`name`)?.universalIdentifier;return r?{objectManifest:{...e,fields:n.map(oe),labelIdentifierFieldMetadataUniversalIdentifier:r},errors:[]}:{objectManifest:null,errors:[`No label identifier field found for object ${e.nameSingular}. Please add a field with name "name" to your object.`]}},k=e.t(),A=e=>(e?.type===`record`||e?.type===`object`)&&(0,k.isNonEmptyString)(e.objectUniversalIdentifier),j=(e,t)=>{let n=(0,k.isNonEmptyString)(e)?t?.(e):void 0;return`Id of the ${(0,k.isNonEmptyString)(n)?n:`linked`} record`},M=(e,t)=>{if(A(e))return{type:`string`,description:j(e.objectUniversalIdentifier,t)};if(e.type===`records`)return{type:`array`,items:{type:`string`,description:j(e.objectUniversalIdentifier,t)}};let{objectUniversalIdentifier:r,multiline:i,label:a,items:o,properties:s,additionalProperties:c,...l}=e,u={...l};return n.Ut(o)&&(u.items=M(o,t)),n.Ut(s)&&(u.properties=Object.fromEntries(Object.entries(s).map(([e,n])=>[e,M(n,t)]))),n.Ut(c)&&(u.additionalProperties=(0,k.isObject)(c)?M(c,t):c),u},N={type:`object`,properties:{}},P=e=>{let t={type:`unknown`};switch(e.type){case`string`:t.type=`string`;break;case`number`:case`integer`:t.type=`number`;break;case`boolean`:t.type=`boolean`;break;case`array`:t.type=`array`,e.items&&(t.items=P(e.items));break;case`object`:t.type=`object`,e.properties&&(t.properties=Object.fromEntries(Object.entries(e.properties).map(([e,t])=>[e,P(t)])));break;case`record`:t.type=`record`;break;case`records`:t.type=`records`;break;default:t.type=`unknown`}return Array.isArray(e.enum)&&(t.enum=e.enum.filter(e=>typeof e==`string`)),e.multiline===!0&&(t.multiline=!0),(0,k.isNonEmptyString)(e.label)&&(t.label=e.label),(0,k.isNonEmptyString)(e.objectUniversalIdentifier)&&(t.objectUniversalIdentifier=e.objectUniversalIdentifier),t},F=e=>[P(e)];F({type:`object`,properties:{a:{type:`string`},b:{type:`number`}}});var I=async e=>{let{getFunctionInputSchema:t}=await Promise.resolve().then(()=>require("./get-function-input-schema-GNk3NRLJ-DTFC8CbW.cjs")),r=t(e)[0];return r?.type===`object`&&n.Ut(r.properties)?{type:`object`,properties:r.properties}:N},L=e=>!n.Ut(e)||e===null?`unknown`:typeof e==`string`?`string`:typeof e==`number`?`number`:typeof e==`boolean`?`boolean`:Array.isArray(e)?`array`:`unknown`,R=e=>e?Object.entries(e).reduce((e,[t,n])=>((0,k.isObject)(n)&&!Array.isArray(n)?e[t]={isLeaf:!1,type:`object`,label:t,value:R(n)}:e[t]={isLeaf:!0,value:n,type:L(n),label:t},e),{}):{},z=(e,t)=>e?`${e}.${t}`:t,B=(e,t,r=``)=>{let i=[];for(let[a,o]of Object.entries(t)){let t=z(r,a),s=e[a];if(!n.Ut(s)){i.push(`Missing key "${t}" in declared output schema.`);continue}if(o.isLeaf!==s.isLeaf){i.push(`Type mismatch at "${t}": expected ${o.isLeaf?o.type:`object`} but declared ${s.isLeaf?s.type:`object`}.`);continue}if(!o.isLeaf&&!s.isLeaf){i.push(...B(s.value,o.value,t));continue}o.isLeaf&&s.isLeaf&&o.type!==`unknown`&&s.type!==`unknown`&&o.type!==s.type&&i.push(`Type mismatch at "${t}": expected ${o.type} but declared ${s.type}.`)}return i},V=[`string`,`number`,`boolean`,`array`,`unknown`],H=e=>V.includes(e),U=(e,t)=>{let n=t.label??e;return t.type===`record`?{isLeaf:!0,type:`string`,label:n,value:null}:t.type===`records`?{isLeaf:!0,type:`array`,label:n,value:null}:t.type===`object`?{isLeaf:!1,type:`object`,label:n,value:(0,k.isObject)(t.properties)?W(t.properties):{}}:{isLeaf:!0,type:H(t.type)?t.type:`unknown`,label:n,value:null}},W=e=>Object.entries(e).reduce((e,[t,n])=>(e[t]=U(t,n),e),{}),ce=async({logicFunctionConfig:e,sourceCode:t,sourcePath:n})=>{let{handler:r,...i}=e,a=i.toolTriggerSettings&&!i.toolTriggerSettings.inputSchema||i.workflowActionTriggerSettings&&!i.workflowActionTriggerSettings.inputSchema?await I(t):null,o=i.toolTriggerSettings?{...i.toolTriggerSettings,inputSchema:i.toolTriggerSettings.inputSchema??a??void 0}:void 0,s=i.workflowActionTriggerSettings?{...i.workflowActionTriggerSettings,inputSchema:i.workflowActionTriggerSettings.inputSchema??(a?F(a):void 0)}:void 0;return{...i,...o?{toolTriggerSettings:o}:{},...s?{workflowActionTriggerSettings:s}:{},handlerName:`default.config.handler`,sourceHandlerPath:n,builtHandlerPath:n.replace(/\.tsx?$/,`.mjs`),builtHandlerChecksum:`[default-checksum]`}},le=({frontComponentConfig:e,sourcePath:t})=>{let{component:n,...r}=e;return{...r,componentName:n.name,sourceComponentPath:t,builtComponentPath:t.replace(/\.tsx?$/,`.mjs`),builtComponentChecksum:``,isHeadless:r.isHeadless??!1}},ue=({roleConfig:e,applicationUniversalIdentifier:t})=>({...e,objectPermissions:(e.objectPermissions??[]).map(n=>({...n,universalIdentifier:n.universalIdentifier??r.d({applicationUniversalIdentifier:t,roleUniversalIdentifier:e.universalIdentifier,objectUniversalIdentifier:n.objectUniversalIdentifier})})),fieldPermissions:(e.fieldPermissions??[]).map(n=>({...n,universalIdentifier:n.universalIdentifier??r.o({applicationUniversalIdentifier:t,roleUniversalIdentifier:e.universalIdentifier,fieldUniversalIdentifier:n.fieldUniversalIdentifier})})),rowLevelPermissionPredicateGroups:e.rowLevelPermissionPredicateGroups??[],rowLevelPermissionPredicates:e.rowLevelPermissionPredicates??[],permissionFlagUniversalIdentifiers:e.permissionFlagUniversalIdentifiers??[]}),G=e=>{let t=new Set(e);return t.has(`react`)&&t.add(`react/jsx-runtime`),[...t].sort()},K=[`twenty-client-sdk`,`twenty-sdk`],q=e=>{let t=[],n=new Set;for(let r of e){if(!(0,k.isNonEmptyString)(r)){t.push(`"frontComponentSharedDependencies" entries in package.json must be non-empty strings`);continue}if(r.startsWith(`.`)||g.default.posix.isAbsolute(r)||g.default.win32.isAbsolute(r)){t.push(`Shared dependency "${r}" must be a package specifier, not a relative or absolute path`);continue}if(r===`twenty:front-component-shared-dependencies`){t.push(`Shared dependency "${r}" is reserved and cannot be shared`);continue}if(K.some(e=>r===e||r.startsWith(`${e}/`))){t.push(`Shared dependency "${r}" is already served separately and cannot be shared`);continue}if(n.has(r)){t.push(`Shared dependency "${r}" is declared twice`);continue}n.add(r)}return t},de=async e=>{let t=g.default.join(e,`package.json`);if(!await i.i(t))return{errors:[]};let n=(await i.o(t)).frontComponentSharedDependencies;if(n===void 0)return{errors:[]};if(!Array.isArray(n))return{errors:[`"frontComponentSharedDependencies" in package.json must be an array of package specifiers`]};if(!(0,k.isNonEmptyArray)(n))return{errors:[]};let a=q(n);return(0,k.isNonEmptyArray)(a)?{errors:a}:{sharedDependencies:{dependencies:G(n),builtPath:r.u,builtChecksum:null},errors:[]}},J=`pageType.isInSidePanel.isDashboardPageLayoutInEditMode.isLayoutCustomizationModeEnabled.favoriteRecordIds.isSelectAll.hasAnySoftDeleteFilterOnView.numberOfSelectedRecords.objectPermissions.selectedRecords.featureFlags.targetObjectReadPermissions.targetObjectWritePermissions.canImpersonate.canAccessFullAdminPanel.objectMetadataItem.objectMetadataLabel.isDefined.isNonEmptyString.includes.every.everyDefined.everyEquals.some.someDefined.someEquals.none.noneDefined.noneEquals.someNonEmptyString.includesEvery`.split(`.`),Y=`conditionalAvailabilityExpression`,fe=[`twenty-sdk/define`,`twenty-sdk`],X=new Set(J),pe=(e,t)=>{let r=[];for(let i of e.statements){if(!h.default.isImportDeclaration(i)||!h.default.isStringLiteral(i.moduleSpecifier)||!fe.includes(i.moduleSpecifier.text))continue;let a=i.importClause;if(!n.Ut(a)||a.phaseModifier===h.default.SyntaxKind.TypeKeyword)continue;let o=a.namedBindings;if(n.Ut(o)){if(h.default.isNamespaceImport(o)){let n=t.getSymbolAtLocation(o.name),i=e=>{h.default.isImportDeclaration(e)||h.default.isTypeNode(e)||(h.default.isPropertyAccessExpression(e)&&h.default.isIdentifier(e.expression)&&t.getSymbolAtLocation(e.expression)===n&&X.has(e.name.text)&&r.push({importedName:e.name.text,node:e}),h.default.forEachChild(e,i))};i(e);continue}if(h.default.isNamedImports(o))for(let i of o.elements){if(i.isTypeOnly)continue;let a=(i.propertyName??i.name).text;if(X.has(a)){let o=t.getSymbolAtLocation(i.name),s,c=e=>{if(!(n.Ut(s)||h.default.isImportDeclaration(e)||h.default.isTypeNode(e))){if(h.default.isIdentifier(e)){let r=h.default.isShorthandPropertyAssignment(e.parent)?t.getShorthandAssignmentValueSymbol(e.parent):t.getSymbolAtLocation(e);n.Ut(o)&&r===o&&(s=e)}h.default.forEachChild(e,c)}};c(e),n.Ut(s)&&r.push({importedName:a,node:s})}}}}return r},me=e=>{let t=!1,n=e=>{if(!t){if((h.default.isPropertyAssignment(e)||h.default.isShorthandPropertyAssignment(e))&&(h.default.isIdentifier(e.name)||h.default.isStringLiteral(e.name))&&e.name.text===Y){t=!0;return}h.default.forEachChild(e,n)}};return n(e),t},he=(e,t)=>{if(!J.some(t=>e.includes(t)))return[];let n=h.default.createSourceFile(t,e,h.default.ScriptTarget.Latest,!0,t.endsWith(`.tsx`)?h.default.ScriptKind.TSX:h.default.ScriptKind.TS);if(me(n))return[];let r={noLib:!0,noResolve:!0},i=h.default.createCompilerHost(r);return i.getSourceFile=e=>e===n.fileName?n:void 0,pe(n,h.default.createProgram([n.fileName],r,i).getTypeChecker()).map(({importedName:e,node:r})=>{let{line:i,character:a}=n.getLineAndCharacterOfPosition(r.getStart(n));return`${t}:${i+1}:${a+1} - "${e}" is a conditional-availability expression variable from twenty-sdk but this file has no ${Y}. These variables can only be used inside a command's ${Y}, not at runtime.`})},Z={canReadObjectRecords:`read`,canUpdateObjectRecords:`update`,canSoftDeleteObjectRecords:`soft-delete`,canDestroyObjectRecords:`destroy`},ge=Object.fromEntries(Object.entries(n.S).map(([e,t])=>[t,e])),_e=Object.fromEntries(Object.entries(s.n).map(([e,{universalIdentifier:t}])=>[t,e])),ve=({grant:e,objects:t,permissionFlags:n})=>{let r=e=>t.find(t=>t.universalIdentifier===e)?.nameSingular??_e[e]??e;switch(e.type){case`ALL_OBJECT_RECORDS`:return`${Z[e.action]} all object records`;case`ALL_SETTINGS`:return`update all settings`;case`ALL_TOOLS`:return`access all tools`;case`PERMISSION_FLAG`:return`permission flag ${n.find(t=>t.universalIdentifier===e.permissionFlagUniversalIdentifier)?.key??ge[e.permissionFlagUniversalIdentifier]??e.permissionFlagUniversalIdentifier}`;case`OBJECT_RECORDS`:return`${Z[e.action]} ${r(e.objectUniversalIdentifier)} records`;case`FIELD_VALUE`:return`${e.action===`canReadFieldValue`?`read`:`update`} field ${e.fieldUniversalIdentifier} of ${r(e.objectUniversalIdentifier)}`;case`ROW_LEVEL_RESTRICTION`:return`${r(e.objectUniversalIdentifier)} records without the row-level restriction`}},ye=e=>e.map(e=>`"${e}"`).join(`, `),Q=({agents:e,defaultRoleUniversalIdentifier:t})=>{let r=new Map;for(let i of e)!n.Ut(i.roleUniversalIdentifier)||i.roleUniversalIdentifier===t||r.set(i.roleUniversalIdentifier,[...r.get(i.roleUniversalIdentifier)??[],i.name]);return r},be=({applicationRole:e,defaultRoleUniversalIdentifier:t})=>n.Ut(e)?[]:[`Application default role "${t}" is not defined by this application.`],$=({agentNamesByRoleUniversalIdentifier:e,roles:t})=>[...e].filter(([e])=>!t.some(t=>t.universalIdentifier===e)).map(([e,t])=>`Agent ${ye(t)} references role "${e}", which is not defined by this application.`),xe=({agentNamesByRoleUniversalIdentifier:e,applicationRole:t,roles:i,objects:a,permissionFlags:o})=>{let s=o.filter(e=>(e.permissionType??`tool`)===`tool`).map(e=>e.universalIdentifier);return[...e].flatMap(([e,c])=>{let l=i.find(t=>t.universalIdentifier===e);if(!n.Ut(l))return[];let u=r.l({role:l,superset:t,toolPermissionFlagUniversalIdentifiers:s});if(u.length===0)return[];let d=u.map(e=>ve({grant:e,objects:a,permissionFlags:o})).join(`, `);return[`Role "${l.label}" used by agent ${ye(c)} grants more than the application role "${t.label}": ${d}. The application role must cover every permission an agent role grants.`]})},Se=({agents:e,roles:t,objects:r,permissionFlags:i,defaultRoleUniversalIdentifier:a})=>{let o=t.find(e=>e.universalIdentifier===a),s=Q({agents:e,defaultRoleUniversalIdentifier:a});return[...be({applicationRole:o,defaultRoleUniversalIdentifier:a}),...$({agentNamesByRoleUniversalIdentifier:s,roles:t}),...n.Ut(o)?xe({agentNamesByRoleUniversalIdentifier:s,applicationRole:o,roles:t,objects:r,permissionFlags:i}):[]]},Ce=({views:e,objects:r,fields:i})=>{let a=[],o=new Map;for(let e of i)o.set(e.universalIdentifier,e);for(let e of r)for(let t of e.fields)o.set(t.universalIdentifier,t);for(let r of e)for(let e of r.filters??[]){let r=o.get(e.fieldMetadataUniversalIdentifier);if(!n.Ut(r))continue;let i=(r.type===n.ct.RELATION||r.type===n.ct.MORPH_RELATION)&&n.Ut(e.relationTargetFieldMetadataUniversalIdentifier)?o.get(e.relationTargetFieldMetadataUniversalIdentifier)?.type??r.type:r.type;if(!(i in t.r))continue;let s=t.o({filterType:i,subFieldName:e.subFieldName});s.includes(e.operand)||a.push(`Operand "${e.operand}" is not supported on field "${r.name}" (type "${i}"). Supported operands: ${s.join(`, `)}.`)}return a},we=e=>{try{let t=JSON.parse((0,p.readFileSync)((0,f.join)(e,`package.json`),`utf-8`)).engines?.twenty;return typeof t==`string`&&t.trim()!==``?t.trim():null}catch{return null}},Te=e=>a.t(e),Ee=async e=>(await(0,m.glob)([`${r.n}/**/*`],{cwd:e,absolute:!0,onlyFiles:!0})).sort(),De=async e=>{try{let t=await(0,d.readFile)((0,g.join)(e,`README.md`),`utf-8`);return t.trim().length>0?t:void 0}catch{return}},Oe=async e=>{let r=await Te(e),i=await De(e),a=[],s=[],c,l=[],u=[],f=[],p=[],m=[],h=[],_=[],v=[],y=[],b=[],ee=[],te=[],ne=[],x=[],S=[],re=[],C=[],ie=[],w=[],ae=[],T=[],E=[],D=[],O=[],k=[],A=[],j=[],M=[],N=[],P=[],F=[],I=[],L=[],R=[],z=[],B=[],V=[],H=[],U=[],W=[],G=[],K=[],q=[],J=[],Y=[],fe=[],X=[],pe=[],me=[],Z=[],ge=[];for(let i of r){let r=await(0,d.readFile)(i,`utf-8`),f=(0,g.relative)(e,i);a.push(...he(r,f));let _=o.r(r);if(!_)continue;let x=o.n[_];switch(x){case`application`:{let t=await o.t({appPath:e,filePath:i});c=t.config,a.push(...t.errors),s.push(...t.warnings??[]),P.push(f);break}case`objects`:{let t=await o.t({appPath:e,filePath:i});l.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),F.push(f);break}case`fields`:{let t=await o.t({appPath:e,filePath:i}),n=oe(t.config);p.push(n),a.push(...t.errors),s.push(...t.warnings??[]),I.push(f);break}case`permissionFlags`:{let t=await o.t({appPath:e,filePath:i});h.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),R.push(f);break}case`roles`:{let t=await o.t({appPath:e,filePath:i});u.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),z.push(f),_===`defineApplicationRole`&&N.push(t.config.universalIdentifier);break}case`skills`:{let t=await o.t({appPath:e,filePath:i});v.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),B.push(f);break}case`agents`:{let t=await o.t({appPath:e,filePath:i});y.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),V.push(f);break}case`workflows`:{let t=await o.t({appPath:e,filePath:i});b.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),H.push(f);break}case`connectionProviders`:{let t=await o.t({appPath:e,filePath:i});ee.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),U.push(f);break}case`logicFunctions`:{let t=await o.t({appPath:e,filePath:i});a.push(...t.errors),s.push(...t.warnings??[]),_===`definePreInstallLogicFunction`&&n.Ut(t.config.serverRouteTriggerSettings)&&a.push(`${f}: pre-install logic functions cannot define serverRouteTriggerSettings.`);let c=await ce({logicFunctionConfig:t.config,sourceCode:r,sourcePath:f});if(te.push(c),W.push(f),_===`definePostInstallLogicFunction`){let e=t.config;O.push({universalIdentifier:t.config.universalIdentifier,shouldRunOnVersionUpgrade:e.shouldRunOnVersionUpgrade??!1,shouldRunSynchronously:e.shouldRunSynchronously??!1})}if(_===`definePreInstallLogicFunction`){let e=t.config;k.push({universalIdentifier:t.config.universalIdentifier,shouldRunOnVersionUpgrade:e.shouldRunOnVersionUpgrade??!1})}_===`defineUninstallLogicFunction`&&A.push({universalIdentifier:t.config.universalIdentifier}),_===`defineHealthCheck`&&j.push({universalIdentifier:t.config.universalIdentifier});break}case`frontComponents`:{let t=await o.t({appPath:e,filePath:i});a.push(...t.errors),s.push(...t.warnings??[]);let n=le({frontComponentConfig:t.config,sourcePath:f});ne.push(n),G.push(f),_===`defineSettingsFrontComponent`&&M.push(t.config.universalIdentifier);break}case`views`:{let t=await o.t({appPath:e,filePath:i}),n={...t.config};S.push(n),a.push(...t.errors),s.push(...t.warnings??[]),q.push(f);break}case`viewFields`:{let t=await o.t({appPath:e,filePath:i});re.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),J.push(f);break}case`navigationMenuItems`:{let t=await o.t({appPath:e,filePath:i});C.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),Y.push(f);break}case`pageLayouts`:{let t=await o.t({appPath:e,filePath:i}),n={...t.config};ie.push(n),a.push(...t.errors),s.push(...t.warnings??[]),fe.push(f);break}case`indexes`:{let t=await o.t({appPath:e,filePath:i}),n={...t.config};m.push(n),a.push(...t.errors),s.push(...t.warnings??[]),L.push(f);break}case`pageLayoutTabs`:{let t=await o.t({appPath:e,filePath:i}),n={...t.config};w.push(n),a.push(...t.errors),s.push(...t.warnings??[]),X.push(f);break}case`pageLayoutWidgets`:{let t=await o.t({appPath:e,filePath:i});ae.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),pe.push(f);break}case`commandMenuItems`:{let t=await o.t({appPath:e,filePath:i});T.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),me.push(f);break}case`timelineActivityTypes`:{let t=await o.t({appPath:e,filePath:i});E.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),Z.push(f);break}case`settingsMenuItems`:{let t=await o.t({appPath:e,filePath:i});D.push(t.config),a.push(...t.errors),s.push(...t.warnings??[]),ge.push(f);break}default:t.t(x)}}let _e=await Ee(e);for(let t of _e){let n=(0,g.relative)(e,t);x.push({filePath:n,fileName:(0,g.basename)(t),fileType:(0,g.extname)(t).replace(/^\./,``),checksum:null}),K.push(n)}if(c||a.push(`Cannot build application, please export default defineApplication() to define an application`),c){for(let e of l){let{objectManifest:t,errors:n}=se({objectConfig:e,applicationUniversalIdentifier:c.universalIdentifier});a.push(...n),t&&f.push(t)}for(let e of u)_.push(ue({roleConfig:e,applicationUniversalIdentifier:c.universalIdentifier}))}O.length>1&&a.push(`Only one post install logic function is allowed per application`),k.length>1&&a.push(`Only one pre install logic function is allowed per application`),A.length>1&&a.push(`Only one uninstall logic function is allowed per application`),j.length>1&&a.push(`Only one health check is allowed per application`),M.length>1&&a.push(`Only one settings front component is allowed per application`),N.length>1&&a.push(`Only one defineApplicationRole is allowed per application`);let{sharedDependencies:ve,errors:ye}=await de(e);a.push(...ye);let Q=c?.defaultRoleUniversalIdentifier??(N.length===1?N[0]:void 0);c&&!Q&&a.push("Application must declare a default role: either pass `defaultRoleUniversalIdentifier` to defineApplication() or mark a role file with defineApplicationRole()"),a.push(...Ce({views:S,objects:f,fields:p})),n.Ut(c)&&n.Ut(Q)&&a.push(...Se({agents:y,roles:_,objects:f,permissionFlags:h,defaultRoleUniversalIdentifier:Q}));let be=c&&Q?(()=>{let{logoUrl:t,screenshots:r,...a}=c;return{...a,logo:c.logo,galleryImages:c.galleryImages??[],defaultRoleUniversalIdentifier:Q,aboutDescription:i,yarnLockChecksum:null,packageJsonChecksum:null,requiredServerVersionRange:we(e),...O.length>=1?{postInstallLogicFunction:O[0]}:{},...k.length>=1?{preInstallLogicFunction:k[0]}:{},...A.length>=1?{uninstallLogicFunction:A[0]}:{},...j.length>=1?{healthCheckLogicFunction:j[0]}:{},...M.length>=1?{settingsFrontComponent:{universalIdentifier:M[0]}}:{},...n.Ut(ve)?{frontComponentSharedDependencies:ve}:{}}})():void 0,$=(e,t)=>e.universalIdentifier.localeCompare(t.universalIdentifier);return{manifest:be?{application:be,objects:f.sort($),fields:p.sort($),indexes:m.sort($),permissionFlags:h.sort($),roles:_.sort($),skills:v.sort($),agents:y.sort($),workflows:b.sort($),connectionProviders:ee.sort($),logicFunctions:te.sort($),frontComponents:ne.sort($),publicAssets:x.sort((e,t)=>e.filePath.localeCompare(t.filePath)),views:S.sort($),viewFields:re.sort($),navigationMenuItems:C.sort($),pageLayouts:ie.sort($),pageLayoutTabs:w.sort($),pageLayoutWidgets:ae.sort($),commandMenuItems:T.sort($),timelineActivityTypes:E.sort($),settingsMenuItems:D.sort($)}:null,filePaths:{application:P,objects:F,fields:I,indexes:L,permissionFlags:R,roles:z,skills:B,agents:V,workflows:H,connectionProviders:U,logicFunctions:W,frontComponents:G,publicAssets:K,views:q,viewFields:J,navigationMenuItems:Y,pageLayouts:fe,pageLayoutTabs:X,pageLayoutWidgets:pe,commandMenuItems:me,timelineActivityTypes:Z,settingsMenuItems:ge},errors:a,warnings:s}},ke=[n.ct.RELATION,n.ct.MORPH_RELATION],Ae=e=>ke.includes(e.type),je=e=>{let t=new Set,n=new Set;for(let r of e)t.has(r)?n.add(r):t.add(r);return Array.from(n)},Me=({manifest:e,pageLayoutWidgets:t})=>{let r=new Set([e.application.settingsFrontComponent?.universalIdentifier,...e.settingsMenuItems.map(e=>e.frontComponentUniversalIdentifier),...e.commandMenuItems.map(e=>e.frontComponentUniversalIdentifier),...e.timelineActivityTypes.map(e=>e.frontComponentUniversalIdentifier),...t.map(({configuration:e})=>n.Ut(e)&&`frontComponentUniversalIdentifier`in e?e.frontComponentUniversalIdentifier:void 0)].filter(n.Ut));return e.frontComponents.filter(e=>!e.isHeadless&&!n.Ut(e.widgetAvailability)&&!r.has(e.universalIdentifier)).map(e=>`Front component "${e.name??e.componentName}" declares no widgetAvailability, so it is not offered in any widget picker. Set widgetAvailability to let users add it to record pages or dashboards.`)},Ne=e=>{let t=[],r=[...e.pageLayouts.flatMap(({tabs:e})=>e??[]),...e.pageLayoutTabs];for(let e of r){e.layoutMode===n.ft.CANVAS&&t.push(`Page layout tab "${e.title}" uses deprecated CANVAS. For a full-height widget, use VERTICAL_LIST and set the widget's heightBehavior to 'TAB_VIEWPORT'. Existing Canvas layouts remain supported and are not converted.`);for(let r of e.widgets??[])r.position?.layoutMode===n.ft.VERTICAL_LIST&&t.push(`Page layout widget "${r.title}" uses a deprecated vertical-list position. Order the widgets array by position.index, remove position, and move any position.heightBehavior to heightBehavior. Existing positions remain supported and keep their indices.`),`gridPosition`in r&&n.Ut(r.gridPosition)&&t.push(`Page layout widget "${r.title}" uses deprecated gridPosition. If position is already set, it takes precedence; remove the ignored gridPosition. Use position with layoutMode: 'GRID' and the same row, column, rowSpan and columnSpan only when position is absent. Existing gridPosition remains supported as a fallback.`)}return t},Pe=[`id`,`createdAt`,`createdBy`,`updatedAt`,`updatedBy`,`deletedAt`,`position`,`searchVector`],Fe=e=>e.objects.flatMap(t=>{let i=t.labelIdentifierFieldMetadataUniversalIdentifier?.toLowerCase();return n.Ut(i)?[...(t.fields??[]).map(e=>e.universalIdentifier.toLowerCase()),...e.fields.filter(e=>e.objectUniversalIdentifier.toLowerCase()===t.universalIdentifier.toLowerCase()).map(e=>e.universalIdentifier.toLowerCase()),...Pe.map(n=>r.h({applicationUniversalIdentifier:e.application.universalIdentifier,objectUniversalIdentifier:t.universalIdentifier,name:n}))].includes(i)?[]:[`Object "${t.nameSingular}" references label field ${i}, which is not declared in this app or a recognized generated field. Check the identifier; the server must resolve this reference before applying.`]:[]}),Ie=e=>{let i=[],a=je(e.timelineActivityTypes.map(e=>e.name)),o=new Set(e.frontComponents.map(e=>e.universalIdentifier));for(let e of a)i.push(`Timeline activity type name "${e}" is used more than once. Names must be unique within an application.`);for(let a of e.timelineActivityTypes){n.Ut(a.frontComponentUniversalIdentifier)&&!o.has(a.frontComponentUniversalIdentifier)&&i.push(`Timeline activity type "${a.name}" references front component "${a.frontComponentUniversalIdentifier}", which is not defined by this application.`);let s=a.emit,c=a.replacesTimelineActivityTypeUniversalIdentifier;if(!n.Ut(s)){n.Ut(c)&&i.push(`Timeline activity type "${a.name}" declares replacesTimelineActivityTypeUniversalIdentifier without an automatic emit contract.`);continue}let l=s.through,u=l?.triggerFieldUniversalIdentifiers,d=r.a(s.objectUniversalIdentifier);d||i.push(`Timeline activity type "${a.name}" references an invalid object universal identifier "${s.objectUniversalIdentifier}".`),(s.on===`linked`||s.on===`unlinked`)&&!n.Ut(l)&&i.push(`Timeline activity type "${a.name}" must declare emit.through for a ${s.on} event.`),n.Ut(u)&&(s.on!==`updated`||!t.n(u)||new Set(u).size!==u.length)&&i.push(`Timeline activity type "${a.name}" trigger fields must be a non-empty list of unique fields on an updated through event.`);let f=d?e.objects.find(e=>e.universalIdentifier===s.objectUniversalIdentifier):void 0;if(!n.Ut(f)){d&&!n.Ut(c)&&i.push(`Timeline activity type "${a.name}" targets object "${s.objectUniversalIdentifier}", which is not defined by this application. Types targeting another application's object must declare replacesTimelineActivityTypeUniversalIdentifier.`),n.Ut(c)&&!r.a(c)&&i.push(`Timeline activity type "${a.name}" references an invalid replacement universal identifier "${c}".`),n.Ut(l)&&!r.a(l.relationFieldUniversalIdentifier)&&i.push(`Timeline activity type "${a.name}" references an invalid through relation field universal identifier "${l.relationFieldUniversalIdentifier}".`);let e=u?.filter(e=>!r.a(e))??[];e.length>0&&i.push(`Timeline activity type "${a.name}" references invalid trigger field universal identifiers: ${e.join(`, `)}.`);continue}n.Ut(c)&&i.push(`Timeline activity type "${a.name}" targets an object defined by this application and must not replace another application's type.`);let p=[...f.fields,...e.fields.filter(e=>e.objectUniversalIdentifier===f.universalIdentifier)];if(!n.Ut(l))continue;let m=p.find(e=>e.universalIdentifier===l.relationFieldUniversalIdentifier);if(n.Ut(m)?Ae(m)&&n.Ut(m.universalSettings)&&(m.universalSettings.relationType===n.nt.MANY_TO_ONE||m.universalSettings.relationType===n.nt.ONE_TO_MANY&&(0,k.isNonEmptyString)(m.universalSettings.junctionTargetFieldUniversalIdentifier))||i.push(`Timeline activity type "${a.name}" must route through a MANY_TO_ONE relation or a junction-backed ONE_TO_MANY relation.`):i.push(`Timeline activity type "${a.name}" references relation field "${l.relationFieldUniversalIdentifier}", which is not defined on object "${f.nameSingular}".`),n.Ut(u)){let e=new Set(p.map(e=>e.universalIdentifier)),t=u.filter(t=>!e.has(t));t.length>0&&i.push(`Timeline activity type "${a.name}" references trigger fields that are not defined on object "${f.nameSingular}": ${t.join(`, `)}.`)}}return i},Le=[n.nt.MANY_TO_ONE,n.nt.ONE_TO_MANY],Re=`aggregateFieldMetadataId`,ze=e=>n.Ut(e)&&n.Z.some(t=>t===e.configurationType),Be=e=>{let t=[];if(!e)return[];for(let[n,r]of Object.entries(e))n===`universalIdentifier`&&typeof r==`string`&&t.push(r),!(n===`postInstallLogicFunction`||n===`preInstallLogicFunction`||n===`uninstallLogicFunction`||n===`healthCheckLogicFunction`||n===`identifyAccountLogicFunction`||n===`onConnectLogicFunction`||n===`onDisconnectLogicFunction`||n===`settingsFrontComponent`||n===`input`||n===`expectedBody`||n===`outputSchema`||n===`expectedOutputSchema`)&&typeof r==`object`&&t.push(...Be(r));return t},Ve=e=>{let t=[];for(let r of e){if(!Ae(r))continue;let e=r.universalSettings;if(!e?.relationType){t.push(`Relation field "${r.name}" is missing relationType. ${r.type} fields must declare a relationType (${Le.join(` or `)}) in universalSettings.`);continue}if(!Le.includes(e.relationType)){t.push(`Relation field "${r.name}" has invalid relationType "${e.relationType}". Expected ${Le.join(` or `)}.`);continue}e.relationType===n.nt.MANY_TO_ONE&&!e.joinColumnName&&t.push(`MANY_TO_ONE relation field "${r.name}" is missing joinColumnName. MANY_TO_ONE relations must declare a joinColumnName in universalSettings.`)}return t},He=e=>{let t=e.pageLayouts.flatMap(e=>e.tabs?.flatMap(e=>e.widgets??[])??[]),n=e.pageLayoutTabs.flatMap(e=>e.widgets??[]);return[...t,...n,...e.pageLayoutWidgets??[]]},Ue=e=>{let t=[];for(let n of e){let e=n.configuration;if(ze(e)&&!(0,k.isNonEmptyString)(e.aggregateFieldMetadataUniversalIdentifier)){let r=Re in e?` Reference the aggregate field with "aggregateFieldMetadataUniversalIdentifier" (not "${Re}").`:``;t.push(`Graph widget "${n.title}" is missing aggregateFieldMetadataUniversalIdentifier.${r}`)}}return t},We=({pageLayoutTab:e,pageLayoutType:t})=>{let n=r.r({pageLayoutTabManifest:e,pageLayoutType:t});return n.status===`fail`?n.errors:[]},Ge=e=>{let t=new Map(e.pageLayouts.map(e=>[e.universalIdentifier,e.type])),r=e.pageLayouts.flatMap(e=>(e.tabs??[]).flatMap(t=>We({pageLayoutTab:t,pageLayoutType:e.type}))),i=e.pageLayoutTabs.flatMap(e=>We({pageLayoutTab:e,pageLayoutType:n.Ut(e.pageLayoutUniversalIdentifier)?t.get(e.pageLayoutUniversalIdentifier):void 0}));return[...r,...i]},Ke=e=>{let t=[],n=new Set;for(let i of e){if(n.has(i))continue;if(n.add(i),!v(i)){t.push(`Universal identifier "${i}" is not a valid UUID.`);continue}let e=ae(i);r.a(i)||t.push(`Universal identifier "${i}" is UUID version ${e}. Only UUID version 4 or higher is allowed.`)}return t},qe=e=>{let t=[],r=He(e),i=[...Ne(e),...Fe(e),...Me({manifest:e,pageLayoutWidgets:r})],a=Be(e),o=je(a.map(e=>e.toLowerCase()));o.length>0&&t.push(`Duplicate universal identifiers: ${o.join(`, `)}`);let s=Ke(a);s.length>0&&t.push(`Invalid universal identifiers: ${s.join(`, `)}`);let c=[...e.fields,...e.objects.flatMap(e=>e.fields)];for(let e of c)if((e.type===n.ct.SELECT||e.type===n.ct.MULTI_SELECT||e.type===n.ct.RATING)&&n.Ut(e.options)){e.options.some(({id:e})=>n.Ut(e)&&!(0,k.isNonEmptyString)(e))&&t.push(`Field "${e.name}" has empty option IDs. Set distinct non-empty IDs on these options.`);let r=je(e.options.map(e=>e.id).filter(n.Ut).map(e=>e.toLowerCase()));r.length>0&&t.push(`Field "${e.name}" has duplicate option IDs: ${r.join(`, `)}. Set distinct explicit IDs on these options.`)}return t.push(...Ve(c)),t.push(...Ge(e)),t.push(...Ue(r)),t.push(...Ie(e)),{errors:t,warnings:i,isValid:t.length===0}},Je={"twenty-sdk":`"twenty-sdk" is listed under "dependencies" in package.json. It is a build-time only tool and should be moved to "devDependencies".`,"twenty-client-sdk":`"twenty-client-sdk" is listed under "dependencies" in package.json. It is provided at runtime by Twenty's injected SDK and should be moved to "devDependencies".`},Ye=async e=>{let t=g.default.join(e,`package.json`);if(!await i.i(t))return[];let r=await i.o(t);return[`dependencies`,`optionalDependencies`].flatMap(e=>Object.entries(Je).filter(([t])=>n.Ut(r[e]?.[t])).map(([,t])=>t.replace(`"dependencies"`,`"${e}"`)))},Xe=async e=>await i.i(e)&&(await(0,d.stat)(e)).size===0?[`yarn.lock is empty. Run "yarn install" to regenerate it before building.`]:[],Ze=e=>Xe(g.default.join(e,`yarn.lock`)),Qe=async e=>{let t=await Oe(e);if(t.errors.length>0||!t.manifest)return{success:!1,errors:t.errors.length>0?t.errors:[`Failed to build manifest.`]};let n=qe(t.manifest);if(!n.isValid)return{success:!1,errors:n.errors};let r=await Ze(e);if(r.length>0)return{success:!1,errors:r};let i=await Ye(e);return{success:!0,manifest:t.manifest,filePaths:t.filePaths,warnings:[...t.warnings,...n.warnings,...i]}},$e=({catalog:e,onCollision:t})=>{let r={},i=new Map;for(let{message:a,context:o,translation:s}of c.n(e)){if(s.length===0)continue;let e=n.Ut(o)?`${o} ${a}`:a,l=c.a(a,o),u=i.get(l);n.Ut(u)&&u!==e&&t?.({messageId:l,keptKey:e,droppedKey:u}),i.set(l,e),r[l]=s}return r},et=async({filePath:e,onWarning:t})=>{let r;try{r=await i.o(e)}catch{return t(`Skipping translation file "${g.default.basename(e)}": it is not valid JSON.`),null}return!n.Ut(r)||typeof r!=`object`||Array.isArray(r)?(t(`Skipping translation file "${g.default.basename(e)}": expected a JSON object.`),null):r},tt=async({appPath:e,onWarning:t})=>{let n=g.default.join(e,l.t);if(!await i.i(n))return{};let r={};for(let e of(await(0,d.readdir)(n)).filter(e=>e.endsWith(`.json`))){let i=g.default.basename(e,`.json`);if(i===`en`)continue;if(!u.t(i)){t(`Skipping compiled translation file "${e}": "${i}" is not a supported locale.`);continue}let a=await et({filePath:g.default.join(n,e),onWarning:t});if(a===null)continue;let o=Object.fromEntries(Object.entries(a).filter(e=>typeof e[1]==`string`&&e[1].length>0));Object.keys(o).length>0&&(r[i]=o)}return r},nt=async({appPath:e,onWarning:t=e=>console.warn(e)})=>{let n=g.default.join(e,l.n);if(!await i.i(n))return;let r=(await(0,d.readdir)(n)).filter(e=>e.endsWith(`.json`)),a={};for(let e of r){let r=g.default.basename(e,`.json`);if(r===`en`)continue;if(!u.t(r)){t(`Skipping translation file "${e}": "${r}" is not a supported locale.`);continue}let i=await et({filePath:g.default.join(n,e),onWarning:t});if(i===null)continue;let o=$e({catalog:i,onCollision:({messageId:n,keptKey:r,droppedKey:i})=>t(`Message id collision in "${e}": "${r}" and "${i}" share id "${n}". Keeping "${r}".`)});Object.keys(o).length>0&&(a[r]=o)}for(let[n,r]of Object.entries(await tt({appPath:e,onWarning:t})))a[n]={...r,...a[n]??{}};return a};Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return $e}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Qe}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return nt}});
|