twenty 2.51.3 → 2.54.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CONTRIBUTING.md +5 -1
- package/README.md +4 -5
- package/dist/app-template/{AGENTS.md → example/files/AGENTS.md} +8 -18
- package/dist/app-template/{README.md → example/files/README.md} +1 -1
- package/dist/app-template/example/files/SETUP.md +27 -0
- package/dist/app-template/{github → example/files/github}/workflows/cd.yml +2 -0
- package/dist/app-template/{github → example/files/github}/workflows/publish.yml +4 -1
- package/dist/app-template/{src → example/files/src}/__tests__/global-setup.ts +11 -14
- package/dist/app-template/{src → example/files/src}/__tests__/run-twenty.ts +12 -8
- package/dist/app-template/{src → example/files/src}/default-role.ts +2 -0
- package/dist/app-template/example/scripts.json +6 -0
- package/dist/app-template/package.json +3 -6
- package/dist/app-template/yarn.lock +46 -1413
- 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-pYRHxplP.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-DPsTlw7Z.cjs} +1 -1
- package/dist/chunks/build-source-snapshot-BMjdktTk.cjs +865 -0
- 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-M53Gu1CK.cjs +1 -0
- package/dist/chunks/collect-translatable-strings-BWzloBoB.cjs +1 -0
- package/dist/chunks/collect-watch-inputs-Dn6g1cNu.cjs +1 -0
- package/dist/chunks/compile-application-translations-DB-cG9Im.cjs +1 -0
- package/dist/chunks/{confirm-in-terminal-BxEM5lxE.cjs → confirm-in-terminal-D2e1lKUY.cjs} +1 -1
- package/dist/chunks/constants-Cbb71hpl-CrSqydxj.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-CSxveq4d.cjs +1 -0
- package/dist/chunks/create-metadata-client-CJRFQ20Z.cjs +6 -0
- package/dist/chunks/create-pull-base-write-BAapBdLz.cjs +1 -0
- package/dist/chunks/{create-rest-client-PU2Uyfnb.cjs → create-rest-client-eb80-tts.cjs} +1 -1
- package/dist/chunks/{create-tooling-failure-B2FmNwR2.cjs → create-tooling-failure-0Foyei1R.cjs} +1 -1
- package/dist/chunks/execa-CAd0sJ7f.cjs +3 -0
- package/dist/chunks/extract-manifest-from-file-CEK5X5YP.cjs +1 -0
- package/dist/chunks/extract-source-translations-BKXfzm51.cjs +1 -0
- package/dist/chunks/{fetch-metadata-inspection-CeqzcB_x.cjs → fetch-metadata-inspection-IuAwjjQT.cjs} +1 -1
- package/dist/chunks/fetch-signed-in-identity-BFxRufRI.cjs +1 -0
- package/dist/chunks/fetch-workspace-or-throw-CgPc8IBL.cjs +1 -0
- 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-Cln0Hv7L.cjs +1 -0
- package/dist/chunks/{format-display-path-gEepVJDg.cjs → format-display-path-CZLIKwPT.cjs} +1 -1
- package/dist/chunks/format-metadata-fields-BltFjIsO.cjs +2 -0
- package/dist/chunks/format-metadata-owner-DpOc_B3P.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-CL8nm0q9.cjs +1 -0
- package/dist/chunks/get-client-generation-skip-reason-BJFlVAos.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-C31V-2Dl-Cm-ouuA6.cjs +1 -0
- package/dist/chunks/get-tooling-error-context-CZKTM7Q6.cjs +1 -0
- package/dist/chunks/global-flags.constant-MWMrKAud.cjs +1 -0
- package/dist/chunks/has-error-code-DsJeqbZq.cjs +1 -0
- package/dist/chunks/is-access-token-expiring-B3WtsewG.cjs +1 -0
- package/dist/chunks/{is-application-not-found-error-Cja7iQrL.cjs → is-application-not-found-error-BC7jyU0p.cjs} +1 -1
- package/dist/chunks/is-exported-manifest-D8cwSas4.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/is-valid-package-name-Ij_K6iEL.cjs +1 -0
- package/dist/chunks/isDefined-Dtu5EYqP-CJctgvfE.cjs +1 -0
- package/dist/chunks/locale-catalog-format-C_5EGBEn.cjs +20 -0
- package/dist/chunks/metadata-CY9y5wYc.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-CpZxFIlO.cjs +1 -0
- package/dist/chunks/parse-extraction-locale-h0bmy8hf.cjs +1 -0
- package/dist/chunks/parse-graphql-response-Di8aFmnF.cjs +1 -0
- package/dist/chunks/{parse-json-input-CO-KP4XZ.cjs → parse-json-input-kEwLo8mG.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-JDRwzl32.cjs +5 -0
- package/dist/chunks/pull-source-CpAYRk5s.cjs +1 -0
- package/dist/chunks/{read-app-identity-Da5yI23t.cjs → read-app-identity-CJZThpUC.cjs} +1 -1
- package/dist/chunks/read-application-identifier-D6YPuiA7.cjs +1 -0
- package/dist/chunks/read-application-identity-CWSIB1Jd.cjs +1 -0
- package/dist/chunks/{read-command-values-uSJqBG_E.cjs → read-command-values-rGaU2qHz.cjs} +1 -1
- package/dist/chunks/read-config-9Dv5cmvw.cjs +1 -0
- package/dist/chunks/read-infer-deletion-option-DtCw0TsU.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-BlyNzzdk.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-BQ_YGISo.cjs} +1 -1
- package/dist/chunks/record-pull-base-BIlU7Fj1.cjs +1 -0
- package/dist/chunks/{record-typecheck-config-inputs-CmF0bbqm.cjs → record-typecheck-config-inputs-BGVirGsR.cjs} +1 -1
- package/dist/chunks/request-oauth-tokens-BkL-WsAM.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-DP27LYGR.cjs +1 -0
- package/dist/chunks/resolve-command-target-C4r6LuWk.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-BOAxXiKm.cjs} +1 -1
- package/dist/chunks/resolve-request-url-BwELN2oQ.cjs +1 -0
- package/dist/chunks/resolve-source-sdk-CyvER2l1.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-D-Pu9EdU.cjs +1 -0
- package/dist/chunks/run-api-rest-command-BuDANSQa.cjs +1 -0
- package/dist/chunks/run-app-add-command-C0b2LVQN.cjs +163 -0
- package/dist/chunks/run-app-apply-command-BnfxBO7o.cjs +2 -0
- package/dist/chunks/{run-app-build-command-DA7o-ebo.cjs → run-app-build-command-tAj7RilT.cjs} +1 -1
- package/dist/chunks/run-app-dev-command-BnSJIUgg.cjs +2 -0
- package/dist/chunks/run-app-exec-command-BPlfFt9-.cjs +3 -0
- package/dist/chunks/run-app-generate-client-command-7t5Hs10P.cjs +2 -0
- package/dist/chunks/run-app-init-command-BTUiHdOH.cjs +2 -0
- package/dist/chunks/run-app-install-command-DOzp9bOL.cjs +1 -0
- package/dist/chunks/run-app-logs-command-CQDO_gce.cjs +9 -0
- package/dist/chunks/run-app-operation-BmlaxoZF.cjs +1 -0
- package/dist/chunks/run-app-plan-command-1cb1TuM6.cjs +1 -0
- package/dist/chunks/run-app-publish-command-BPosULCY.cjs +1 -0
- package/dist/chunks/run-app-pull-command-BWbRZPTj.cjs +6 -0
- package/dist/chunks/{run-app-translations-extract-command-DrUZkCUW.cjs → run-app-translations-extract-command-LUAa7jb9.cjs} +1 -1
- package/dist/chunks/{run-app-typecheck-command-CQe2CTGd.cjs → run-app-typecheck-command-3ZJqbU8D.cjs} +1 -1
- package/dist/chunks/{run-app-uninstall-command--RFHGXiH.cjs → run-app-uninstall-command-BK-JAeo2.cjs} +1 -1
- package/dist/chunks/run-auth-login-command-CN6Xqgpx.cjs +1 -0
- package/dist/chunks/{run-auth-logout-command-iC22soKN.cjs → run-auth-logout-command-Dw6CLfIY.cjs} +1 -1
- package/dist/chunks/run-auth-status-command-CXRrXjvh.cjs +1 -0
- package/dist/chunks/run-cli-BbuvDae1.cjs +24 -0
- package/dist/chunks/run-commands-command-BrwpnI-3.cjs +2 -0
- package/dist/chunks/{run-data-get-command-D7czgisf.cjs → run-data-get-command-BD7i13MO.cjs} +1 -1
- package/dist/chunks/run-data-list-command-tcCgbeZj.cjs +1 -0
- package/dist/chunks/run-doctor-command-DmZ3dKc7.cjs +2 -0
- package/dist/chunks/run-metadata-field-describe-command-BX5_s1m0.cjs +3 -0
- package/dist/chunks/{run-metadata-field-list-command-CpIUXOmy.cjs → run-metadata-field-list-command-BVFDiJv2.cjs} +1 -1
- package/dist/chunks/{run-metadata-object-describe-command--cIPFkWW.cjs → run-metadata-object-describe-command-CWYI0V42.cjs} +1 -1
- package/dist/chunks/{run-metadata-object-list-command-CQ1jcSJc.cjs → run-metadata-object-list-command-Y3yebZrT.cjs} +1 -1
- package/dist/chunks/run-open-command-BUEQSKSk.cjs +1 -0
- package/dist/chunks/{run-remote-list-command-DV-Ruk98.cjs → run-remote-list-command-BExGjyKO.cjs} +1 -1
- package/dist/chunks/{run-remote-remove-command-C1JeH5mK.cjs → run-remote-remove-command-D2thQnCU.cjs} +1 -1
- package/dist/chunks/{run-remote-rename-command-CCVu4hEw.cjs → run-remote-rename-command-DI0Adm5U.cjs} +1 -1
- package/dist/chunks/{run-remote-use-command-BvqWgEsP.cjs → run-remote-use-command-CXnu5zDY.cjs} +1 -1
- package/dist/chunks/{run-version-command-D4R17bRL.cjs → run-version-command-BxhaecEo.cjs} +1 -1
- package/dist/chunks/select-target-CJ2FyoVQ.cjs +1 -0
- package/dist/chunks/sign-in-to-remote-again-CwXAgGif.cjs +1 -0
- package/dist/chunks/sign-in-with-browser-DdjoPq5d.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-Hj6aQiK9.cjs +2 -0
- package/dist/chunks/typecheck-application-nkgv6qiA.cjs +2 -0
- package/dist/chunks/undici-BfHt0Tny.cjs +95 -0
- package/dist/chunks/{update-config-CnB7lDVC.cjs → update-config-XYMqGokt.cjs} +1 -1
- package/dist/chunks/utils-RCpFyoX5-DF7Gq1IH.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-BxCEc8_P.cjs +1 -0
- package/dist/cli.cjs +1 -1
- package/docs/commands.md +19 -12
- package/package.json +5 -5
- package/src/app/bundles/README.md +3 -2
- package/src/app/manifest/README.md +10 -12
- package/src/app/pull/README.md +9 -2
- package/dist/app-template/SETUP.md +0 -47
- 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/build-source-snapshot-lbc2Pb7D.cjs +0 -865
- 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/fetch-workspace-id-CsvJDu8b.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-app-export-DFV_KqHM.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
- /package/dist/app-template/{CHANGELOG.md → example/files/CHANGELOG.md} +0 -0
- /package/dist/app-template/{github → example/files/github}/workflows/ci.yml +0 -0
- /package/dist/app-template/{locales → example/files/locales}/en.json +0 -0
- /package/dist/app-template/{public → example/files/public}/logo.svg +0 -0
- /package/dist/app-template/{src → example/files/src}/__tests__/application-config.test.ts +0 -0
- /package/dist/app-template/{src → example/files/src}/__tests__/schema.integration-test.ts +0 -0
- /package/dist/app-template/{src → example/files/src}/application-config.ts +0 -0
- /package/dist/app-template/{src → example/files/src}/constants/universal-identifiers.ts +0 -0
- /package/dist/app-template/{src → example/files/src}/front-components/main-page.tsx +0 -0
- /package/dist/app-template/{src → example/files/src}/logic-functions/health-check.ts +0 -0
- /package/dist/app-template/{src → example/files/src}/navigation-menu-items/main-page.navigation-menu-item.ts +0 -0
- /package/dist/app-template/{src → example/files/src}/page-layouts/main-page.page-layout.ts +0 -0
- /package/dist/app-template/{tsconfig.spec.json → example/files/tsconfig.spec.json} +0 -0
- /package/dist/app-template/{vitest.config.ts → example/files/vitest.config.ts} +0 -0
- /package/dist/app-template/{vitest.unit.config.ts → example/files/vitest.unit.config.ts} +0 -0
package/dist/app-worker.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=require("./chunks/build
|
|
1
|
+
const e=require("./chunks/build--4zYt4wd.cjs"),t=require("./chunks/isDefined-Dtu5EYqP-CJctgvfE.cjs"),n=require("./chunks/constants-Cbb71hpl-CrSqydxj.cjs");var r=e.t(),i=5e3,a=new AbortController,o,s=e=>{if(n.i(e)){if(e.type===`cancel`||e.type===`release`)return{type:e.type};if(e.type===`readSourceIdentity`||e.type===`buildManifest`||e.type===`typecheckSource`)return(0,r.isNonEmptyString)(e.appPath)?{type:e.type,appPath:e.appPath}:void 0;if(e.type===`bundleSnapshot`)return(0,r.isNonEmptyString)(e.appPath)?{type:`bundleSnapshot`,collectWatchInputs:e.collectWatchInputs===!0,appPath:e.appPath,holdSnapshot:e.holdSnapshot===!0}:void 0;if(e.type===`pull`)return!(0,r.isNonEmptyString)(e.appPath)||!n.i(e.target)||!(0,r.isNonEmptyString)(e.target.apiUrl)||!(0,r.isNonEmptyString)(e.target.workspaceId)||!n.i(e.applicationExport)||!n.i(e.applicationExport.application)||!(0,r.isNonEmptyString)(e.applicationExport.application.universalIdentifier)?void 0:{type:`pull`,appPath:e.appPath,target:{apiUrl:e.target.apiUrl,workspaceId:e.target.workspaceId},applicationExport:e.applicationExport};if(e.type===`extractTranslations`)return(0,r.isNonEmptyString)(e.appPath)&&(!t.t(e.locale)||(0,r.isString)(e.locale))?{type:`extractTranslations`,appPath:e.appPath,locale:e.locale??void 0}:void 0;if(e.type===`generateSourceClient`)return(0,r.isNonEmptyString)(e.appPath)&&(0,r.isString)(e.schema)?{type:`generateSourceClient`,appPath:e.appPath,schema:e.schema}:void 0}},c=e=>{process.connected||process.exit(1),process.send?.(e,void 0,{},()=>process.exit(0))},l=async()=>{if(!t.t(o))return null;let{snapshotApi:e,buildId:n}=o;return o=void 0,e.releaseSourceSnapshot({buildId:n})},u=()=>{l().then(()=>process.exit(1),()=>process.exit(1))},d=e=>{if(!process.connected){u();return}process.send?.(e)},f=e=>{if(!(!n.i(e)||e.success!==!0||!n.i(e.data)))return(0,r.isNonEmptyString)(e.data.buildId)?e.data.buildId:void 0},p=async({snapshotApi:e,appPath:n,holdSnapshot:r})=>{let i=a.signal,s=await e.buildSourceSnapshot({appPath:n,signal:i}),c=f(s);return t.t(c)?r?(o={snapshotApi:e,buildId:c},{type:`result`,result:s,isSnapshotHeld:!0}):{type:`result`,result:s,release:await e.releaseSourceSnapshot({buildId:c}),isSnapshotHeld:!1}:{type:`result`,result:s,isSnapshotHeld:!1}},m=e=>({type:`failure`,message:e instanceof Error?e.message:String(e),...e instanceof Error&&`code`in e&&(0,r.isString)(e.code)?{code:e.code}:{},...e instanceof Error&&`hint`in e&&(0,r.isString)(e.hint)?{hint:e.hint}:{},...e instanceof Error&&`details`in e&&n.i(e.details)?{details:e.details}:{}});process.on(`SIGINT`,()=>void 0),process.on(`disconnect`,()=>{a.abort(),setTimeout(()=>process.exit(1),i),t.t(o)&&u()}),process.on(`message`,e=>{let n=s(e);if(!t.t(n)){c({type:`failure`,message:`The app worker received a request it cannot read.`});return}if(n.type===`cancel`){a.abort();return}if(n.type===`release`){l().then(e=>c({type:`released`,release:e}),e=>c(m(e)));return}if(n.type===`pull`){Promise.resolve().then(()=>require("./chunks/pull-source-CpAYRk5s.cjs")).then(async({pullSource:e})=>{c({type:`result`,result:await e({...n,signal:a.signal}),isSnapshotHeld:!1})}).catch(e=>c(m(e)));return}if(n.type===`bundleSnapshot`){Promise.resolve().then(()=>require("./chunks/build-source-snapshot-BMjdktTk.cjs")).then(async({buildSourceSnapshot:e,releaseSourceSnapshot:t})=>{let r=()=>p({snapshotApi:{buildSourceSnapshot:e,releaseSourceSnapshot:t},appPath:n.appPath,holdSnapshot:n.holdSnapshot});if(!n.collectWatchInputs)return r();let{collectWatchInputs:i}=await Promise.resolve().then(()=>require("./chunks/collect-watch-inputs-Dn6g1cNu.cjs")).then(e=>e.t),{recordTypecheckConfigInputs:a}=await Promise.resolve().then(()=>require("./chunks/record-typecheck-config-inputs-BGVirGsR.cjs")),o=await i(async()=>(await a(n.appPath),r()));return{...o.result,watchInputs:o.watchInputs}}).then(e=>e.type===`result`&&e.isSnapshotHeld?d(e):c(e),e=>c(m(e)));return}if(n.type===`typecheckSource`){Promise.resolve().then(()=>require("./chunks/typecheck-application-nkgv6qiA.cjs")).then(e=>e.n).then(async({typecheckApplication:e})=>{c({type:`result`,result:await e({appPath:n.appPath,signal:a.signal}),isSnapshotHeld:!1})}).catch(e=>c(m(e)));return}if(n.type===`extractTranslations`){Promise.resolve().then(()=>require("./chunks/extract-source-translations-BKXfzm51.cjs")).then(async({extractSourceTranslations:e})=>{c({type:`result`,result:await e({appPath:n.appPath,locale:n.locale,signal:a.signal}),isSnapshotHeld:!1})}).catch(e=>c(m(e)));return}if(n.type===`buildManifest`){Promise.resolve().then(()=>require("./chunks/build-source-manifest-DPsTlw7Z.cjs")).then(async({buildSourceManifest:e})=>{c({type:`result`,result:await e({appPath:n.appPath,signal:a.signal}),isSnapshotHeld:!1})}).catch(e=>c(m(e)));return}if(n.type===`readSourceIdentity`){Promise.resolve().then(()=>require("./chunks/read-source-identity-BQ_YGISo.cjs")).then(async({readSourceIdentity:e})=>{c({type:`result`,result:await e({appPath:n.appPath,signal:a.signal}),isSnapshotHeld:!1})}).catch(e=>c(m(e)));return}if(n.type===`generateSourceClient`){Promise.resolve().then(()=>require("./chunks/generate-application-client-CL8nm0q9.cjs")).then(async({generateApplicationClient:e})=>{c({type:`result`,result:await e({appPath:n.appPath,schema:n.schema,signal:a.signal}),isSnapshotHeld:!1})}).catch(e=>c(m(e)));return}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e={en:`en`,"pseudo-en":`pseudo-en`,"af-ZA":`af-ZA`,"ar-SA":`ar-SA`,"ca-ES":`ca-ES`,"cs-CZ":`cs-CZ`,"da-DK":`da-DK`,"de-DE":`de-DE`,"el-GR":`el-GR`,"es-ES":`es-ES`,"fa-IR":`fa-IR`,"fi-FI":`fi-FI`,"fr-FR":`fr-FR`,"he-IL":`he-IL`,"hu-HU":`hu-HU`,"hy-AM":`hy-AM`,"it-IT":`it-IT`,"ja-JP":`ja-JP`,"ko-KR":`ko-KR`,"nl-NL":`nl-NL`,"no-NO":`no-NO`,"pl-PL":`pl-PL`,"pt-BR":`pt-BR`,"pt-PT":`pt-PT`,"ro-RO":`ro-RO`,"ru-RU":`ru-RU`,"sr-Cyrl":`sr-Cyrl`,"sr-Latn":`sr-Latn`,"sv-SE":`sv-SE`,"tr-TR":`tr-TR`,"uk-UA":`uk-UA`,"uz-UZ":`uz-UZ`,"vi-VN":`vi-VN`,"zh-CN":`zh-CN`,"zh-TW":`zh-TW`};Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
var e=[`http:`,`https:`];Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return e}});
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
const e=require("./build--4zYt4wd.cjs"),t=require("./utils-RCpFyoX5-DF7Gq1IH.cjs"),n=require("./isDefined-Dtu5EYqP-CJctgvfE.cjs"),r=require("./constants-Cbb71hpl-CrSqydxj.cjs"),i=require("./get-system-view-universal-identifier.util-C31V-2Dl-Cm-ouuA6.cjs");var a={invalid_type:`invalid_type`,too_big:`too_big`,too_small:`too_small`,invalid_format:`invalid_format`,not_multiple_of:`not_multiple_of`,unrecognized_keys:`unrecognized_keys`,invalid_union:`invalid_union`,invalid_key:`invalid_key`,invalid_element:`invalid_element`,invalid_value:`invalid_value`,custom:`custom`},o;o||={};function s(e){if(!i.p(e))throw TypeError(`Invalid UUID`);return parseInt(e.slice(14,15),16)}function c(e){return e instanceof Boolean||typeof e==`boolean`}function l(e){return e instanceof String||typeof e==`string`}function u(e){return e!=null&&(typeof e==`object`||typeof e==`function`)&&!Array.isArray(e)}function d(e){return e instanceof Uint8Array||ArrayBuffer.isView(e)&&e.constructor.name===`Uint8Array`}function f(e,...t){if(!d(e))throw Error(`Uint8Array expected`);if(t.length>0&&!t.includes(e.length))throw Error(`Uint8Array expected of length `+t+`, got length=`+e.length)}function p(e,t=!0){if(e.destroyed)throw Error(`Hash instance has been destroyed`);if(t&&e.finished)throw Error(`Hash#digest() has already been called`)}function m(e,t){f(e);let n=t.outputLen;if(e.length<n)throw Error(`digestInto() expects output buffer of length at least `+n)}function h(...e){for(let t=0;t<e.length;t++)e[t].fill(0)}function g(e){return new DataView(e.buffer,e.byteOffset,e.byteLength)}function _(e,t){return e<<32-t|e>>>t}var ee=typeof Uint8Array.from([]).toHex==`function`&&typeof Uint8Array.fromHex==`function`,te=Array.from({length:256},(e,t)=>t.toString(16).padStart(2,`0`));function ne(e){if(f(e),ee)return e.toHex();let t=``;for(let n=0;n<e.length;n++)t+=te[e[n]];return t}function v(e){if(typeof e!=`string`)throw Error(`string expected`);return new Uint8Array(new TextEncoder().encode(e))}function y(e){return typeof e==`string`&&(e=v(e)),f(e),e}var re=class{};function b(e){let t=t=>e().update(y(t)).digest(),n=e();return t.outputLen=n.outputLen,t.blockLen=n.blockLen,t.create=()=>e(),t}function ie(e,t,n,r){if(typeof e.setBigUint64==`function`)return e.setBigUint64(t,n,r);let i=BigInt(32),a=BigInt(4294967295),o=Number(n>>i&a),s=Number(n&a),c=r?4:0,l=r?0:4;e.setUint32(t+c,o,r),e.setUint32(t+l,s,r)}function ae(e,t,n){return e&t^~e&n}function oe(e,t,n){return e&t^e&n^t&n}var x=class extends re{constructor(e,t,n,r){super(),this.finished=!1,this.length=0,this.pos=0,this.destroyed=!1,this.blockLen=e,this.outputLen=t,this.padOffset=n,this.isLE=r,this.buffer=new Uint8Array(e),this.view=g(this.buffer)}update(e){p(this),e=y(e),f(e);let{view:t,buffer:n,blockLen:r}=this,i=e.length;for(let a=0;a<i;){let o=Math.min(r-this.pos,i-a);if(o===r){let t=g(e);for(;r<=i-a;a+=r)this.process(t,a);continue}n.set(e.subarray(a,a+o),this.pos),this.pos+=o,a+=o,this.pos===r&&(this.process(t,0),this.pos=0)}return this.length+=e.length,this.roundClean(),this}digestInto(e){p(this),m(e,this),this.finished=!0;let{buffer:t,view:n,blockLen:r,isLE:i}=this,{pos:a}=this;t[a++]=128,h(this.buffer.subarray(a)),this.padOffset>r-a&&(this.process(n,0),a=0);for(let e=a;e<r;e++)t[e]=0;ie(n,r-8,BigInt(this.length*8),i),this.process(n,0);let o=g(e),s=this.outputLen;if(s%4)throw Error(`_sha2: outputLen should be aligned to 32bit`);let c=s/4,l=this.get();if(c>l.length)throw Error(`_sha2: outputLen bigger than state`);for(let e=0;e<c;e++)o.setUint32(4*e,l[e],i)}digest(){let{buffer:e,outputLen:t}=this;this.digestInto(e);let n=e.slice(0,t);return this.destroy(),n}_cloneInto(e){e||=new this.constructor,e.set(...this.get());let{blockLen:t,buffer:n,length:r,finished:i,destroyed:a,pos:o}=this;return e.destroyed=a,e.finished=i,e.length=r,e.pos=o,r%t&&e.buffer.set(n),e}clone(){return this._cloneInto()}},S=Uint32Array.from([1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225]),C=Uint32Array.from([1779033703,4089235720,3144134277,2227873595,1013904242,4271175723,2773480762,1595750129,1359893119,2917565137,2600822924,725511199,528734635,4215389547,1541459225,327033209]),w=BigInt(2**32-1),se=BigInt(32);function ce(e,t=!1){return t?{h:Number(e&w),l:Number(e>>se&w)}:{h:Number(e>>se&w)|0,l:Number(e&w)|0}}function le(e,t=!1){let n=e.length,r=new Uint32Array(n),i=new Uint32Array(n);for(let a=0;a<n;a++){let{h:n,l:o}=ce(e[a],t);[r[a],i[a]]=[n,o]}return[r,i]}var ue=(e,t,n)=>e>>>n,de=(e,t,n)=>e<<32-n|t>>>n,T=(e,t,n)=>e>>>n|t<<32-n,E=(e,t,n)=>e<<32-n|t>>>n,D=(e,t,n)=>e<<64-n|t>>>n-32,O=(e,t,n)=>e>>>n-32|t<<64-n;function k(e,t,n,r){let i=(t>>>0)+(r>>>0);return{h:e+n+(i/2**32|0)|0,l:i|0}}var fe=(e,t,n)=>(e>>>0)+(t>>>0)+(n>>>0),pe=(e,t,n,r)=>t+n+r+(e/2**32|0)|0,me=(e,t,n,r)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0),he=(e,t,n,r,i)=>t+n+r+i+(e/2**32|0)|0,ge=(e,t,n,r,i)=>(e>>>0)+(t>>>0)+(n>>>0)+(r>>>0)+(i>>>0),_e=(e,t,n,r,i,a)=>t+n+r+i+a+(e/2**32|0)|0,ve=Uint32Array.from([1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298]),A=new Uint32Array(64),ye=class extends x{constructor(e=32){super(64,e,8,!1),this.A=S[0]|0,this.B=S[1]|0,this.C=S[2]|0,this.D=S[3]|0,this.E=S[4]|0,this.F=S[5]|0,this.G=S[6]|0,this.H=S[7]|0}get(){let{A:e,B:t,C:n,D:r,E:i,F:a,G:o,H:s}=this;return[e,t,n,r,i,a,o,s]}set(e,t,n,r,i,a,o,s){this.A=e|0,this.B=t|0,this.C=n|0,this.D=r|0,this.E=i|0,this.F=a|0,this.G=o|0,this.H=s|0}process(e,t){for(let n=0;n<16;n++,t+=4)A[n]=e.getUint32(t,!1);for(let e=16;e<64;e++){let t=A[e-15],n=A[e-2],r=_(t,7)^_(t,18)^t>>>3;A[e]=(_(n,17)^_(n,19)^n>>>10)+A[e-7]+r+A[e-16]|0}let{A:n,B:r,C:i,D:a,E:o,F:s,G:c,H:l}=this;for(let e=0;e<64;e++){let t=_(o,6)^_(o,11)^_(o,25),u=l+t+ae(o,s,c)+ve[e]+A[e]|0,d=(_(n,2)^_(n,13)^_(n,22))+oe(n,r,i)|0;l=c,c=s,s=o,o=a+u|0,a=i,i=r,r=n,n=u+d|0}n=n+this.A|0,r=r+this.B|0,i=i+this.C|0,a=a+this.D|0,o=o+this.E|0,s=s+this.F|0,c=c+this.G|0,l=l+this.H|0,this.set(n,r,i,a,o,s,c,l)}roundClean(){h(A)}destroy(){this.set(0,0,0,0,0,0,0,0),h(this.buffer)}},be=le(`0x428a2f98d728ae22.0x7137449123ef65cd.0xb5c0fbcfec4d3b2f.0xe9b5dba58189dbbc.0x3956c25bf348b538.0x59f111f1b605d019.0x923f82a4af194f9b.0xab1c5ed5da6d8118.0xd807aa98a3030242.0x12835b0145706fbe.0x243185be4ee4b28c.0x550c7dc3d5ffb4e2.0x72be5d74f27b896f.0x80deb1fe3b1696b1.0x9bdc06a725c71235.0xc19bf174cf692694.0xe49b69c19ef14ad2.0xefbe4786384f25e3.0x0fc19dc68b8cd5b5.0x240ca1cc77ac9c65.0x2de92c6f592b0275.0x4a7484aa6ea6e483.0x5cb0a9dcbd41fbd4.0x76f988da831153b5.0x983e5152ee66dfab.0xa831c66d2db43210.0xb00327c898fb213f.0xbf597fc7beef0ee4.0xc6e00bf33da88fc2.0xd5a79147930aa725.0x06ca6351e003826f.0x142929670a0e6e70.0x27b70a8546d22ffc.0x2e1b21385c26c926.0x4d2c6dfc5ac42aed.0x53380d139d95b3df.0x650a73548baf63de.0x766a0abb3c77b2a8.0x81c2c92e47edaee6.0x92722c851482353b.0xa2bfe8a14cf10364.0xa81a664bbc423001.0xc24b8b70d0f89791.0xc76c51a30654be30.0xd192e819d6ef5218.0xd69906245565a910.0xf40e35855771202a.0x106aa07032bbd1b8.0x19a4c116b8d2d0c8.0x1e376c085141ab53.0x2748774cdf8eeb99.0x34b0bcb5e19b48a8.0x391c0cb3c5c95a63.0x4ed8aa4ae3418acb.0x5b9cca4f7763e373.0x682e6ff3d6b2b8a3.0x748f82ee5defb2fc.0x78a5636f43172f60.0x84c87814a1f0ab72.0x8cc702081a6439ec.0x90befffa23631e28.0xa4506cebde82bde9.0xbef9a3f7b2c67915.0xc67178f2e372532b.0xca273eceea26619c.0xd186b8c721c0c207.0xeada7dd6cde0eb1e.0xf57d4f7fee6ed178.0x06f067aa72176fba.0x0a637dc5a2c898a6.0x113f9804bef90dae.0x1b710b35131c471b.0x28db77f523047d84.0x32caab7b40c72493.0x3c9ebe0a15c9bebc.0x431d67c49c100d4c.0x4cc5d4becb3e42b6.0x597f299cfc657e2a.0x5fcb6fab3ad6faec.0x6c44198c4a475817`.split(`.`).map(e=>BigInt(e))),xe=be[0],Se=be[1],j=new Uint32Array(80),M=new Uint32Array(80),Ce=class extends x{constructor(e=64){super(128,e,16,!1),this.Ah=C[0]|0,this.Al=C[1]|0,this.Bh=C[2]|0,this.Bl=C[3]|0,this.Ch=C[4]|0,this.Cl=C[5]|0,this.Dh=C[6]|0,this.Dl=C[7]|0,this.Eh=C[8]|0,this.El=C[9]|0,this.Fh=C[10]|0,this.Fl=C[11]|0,this.Gh=C[12]|0,this.Gl=C[13]|0,this.Hh=C[14]|0,this.Hl=C[15]|0}get(){let{Ah:e,Al:t,Bh:n,Bl:r,Ch:i,Cl:a,Dh:o,Dl:s,Eh:c,El:l,Fh:u,Fl:d,Gh:f,Gl:p,Hh:m,Hl:h}=this;return[e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h]}set(e,t,n,r,i,a,o,s,c,l,u,d,f,p,m,h){this.Ah=e|0,this.Al=t|0,this.Bh=n|0,this.Bl=r|0,this.Ch=i|0,this.Cl=a|0,this.Dh=o|0,this.Dl=s|0,this.Eh=c|0,this.El=l|0,this.Fh=u|0,this.Fl=d|0,this.Gh=f|0,this.Gl=p|0,this.Hh=m|0,this.Hl=h|0}process(e,t){for(let n=0;n<16;n++,t+=4)j[n]=e.getUint32(t),M[n]=e.getUint32(t+=4);for(let e=16;e<80;e++){let t=j[e-15]|0,n=M[e-15]|0,r=T(t,n,1)^T(t,n,8)^ue(t,n,7),i=E(t,n,1)^E(t,n,8)^de(t,n,7),a=j[e-2]|0,o=M[e-2]|0,s=T(a,o,19)^D(a,o,61)^ue(a,o,6),c=me(i,E(a,o,19)^O(a,o,61)^de(a,o,6),M[e-7],M[e-16]);j[e]=he(c,r,s,j[e-7],j[e-16])|0,M[e]=c|0}let{Ah:n,Al:r,Bh:i,Bl:a,Ch:o,Cl:s,Dh:c,Dl:l,Eh:u,El:d,Fh:f,Fl:p,Gh:m,Gl:h,Hh:g,Hl:_}=this;for(let e=0;e<80;e++){let t=T(u,d,14)^T(u,d,18)^D(u,d,41),ee=E(u,d,14)^E(u,d,18)^O(u,d,41),te=u&f^~u&m,ne=d&p^~d&h,v=ge(_,ee,ne,Se[e],M[e]),y=_e(v,g,t,te,xe[e],j[e]),re=v|0,b=T(n,r,28)^D(n,r,34)^D(n,r,39),ie=E(n,r,28)^O(n,r,34)^O(n,r,39),ae=n&i^n&o^i&o,oe=r&a^r&s^a&s;g=m|0,_=h|0,m=f|0,h=p|0,f=u|0,p=d|0,{h:u,l:d}=k(c|0,l|0,y|0,re|0),c=o|0,l=s|0,o=i|0,s=a|0,i=n|0,a=r|0;let x=fe(re,ie,oe);n=pe(x,y,b,ae),r=x|0}({h:n,l:r}=k(this.Ah|0,this.Al|0,n|0,r|0)),{h:i,l:a}=k(this.Bh|0,this.Bl|0,i|0,a|0),{h:o,l:s}=k(this.Ch|0,this.Cl|0,o|0,s|0),{h:c,l}=k(this.Dh|0,this.Dl|0,c|0,l|0),{h:u,l:d}=k(this.Eh|0,this.El|0,u|0,d|0),{h:f,l:p}=k(this.Fh|0,this.Fl|0,f|0,p|0),{h:m,l:h}=k(this.Gh|0,this.Gl|0,m|0,h|0),{h:g,l:_}=k(this.Hh|0,this.Hl|0,g|0,_|0),this.set(n,r,i,a,o,s,c,l,u,d,f,p,m,h,g,_)}roundClean(){h(j,M)}destroy(){h(this.buffer),this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)}},we=b(()=>new ye),Te=b(()=>new Ce),Ee=[`choice`,`score`,`boolean`],De=/^[a-zA-Z0-9_.-]{1,64}$/,Oe=e=>De.test(e),N=e.t(),ke=`trigger`,Ae=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},je=/{{([^{}]+)}}/g;function*Me(e){if((0,N.isString)(e)){for(let[,t]of e.matchAll(je))n.t(t)&&(yield t);return}if((0,N.isObject)(e))for(let t of Object.values(e))yield*Me(t)}var Ne=e=>[...Me(e)],Pe=(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]},Fe=e=>{if(!n.t(e)||!u(e)||Array.isArray(e))return!1;let t=Object.values(e);return t.length!==0&&t.every(e=>n.t(e)&&u(e)&&c(e.isLeaf))},Ie=(e,t=[])=>{let n=[];if(!(0,N.isObject)(e))return n;for(let[r,i]of Object.entries(e)){if(!(0,N.isObject)(i))continue;let e=[...t,r];n.push(e.join(`.`)),!i.isLeaf&&(0,N.isObject)(i.value)&&n.push(...Ie(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.t(i))return;if(!(0,N.isObject)(r))return{validPrefix:t.slice(0,e),failedSegment:i,availableKeys:[]};let a=r[i];if(!n.t(a))return{validPrefix:t.slice(0,e),failedSegment:i,availableKeys:Object.keys(r)};if(a.isLeaf){let r=t[e+1];return n.t(r)?{validPrefix:t.slice(0,e+1),failedSegment:r,availableKeys:[]}:void 0}r=a.value}},P={found:!1},F=e=>r.i(e)&&c(e.isLeaf),I=e=>r.i(e)&&e._outputSchemaType===`RECORD`&&r.i(e.fields),Re=e=>r.i(e)&&!(`_outputSchemaType`in e)&&F(e.first)&&e.first.isLeaf===!1&&I(e.first.value)&&F(e.totalCount),L=e=>({found:!0,type:l(e.type)?e.type:void 0,label:l(e.label)?e.label:void 0}),ze=(e,t)=>t.length===0?L(e):R(e.value,t),Be=(e,t)=>{for(let n=1;n<=t.length;n++){let r=e[t.slice(0,n).join(`.`)];if(F(r))return ze(r,t.slice(n))}return P},Ve=(e,t)=>{let[n,...r]=t;if(n===`first`)return r.length===0?L(e.first):R(e.first.value,r);if(n===`all`||n===`totalCount`){let t=e[n];return r.length===0&&F(t)?L(t):P}return P},He=(e,t)=>{let[i,...a]=t;if(!n.t(i))return P;let o=e[i];return F(o)?ze(o,a):n.t(o)?a.length===0?{found:!0}:r.i(o)?He(o,a):P:P},R=(e,t)=>t.length===0||!r.i(e)?P:I(e)?Be(e.fields,t):Re(e)?Ve(e,t):He(e,t),Ue=({schema:e,propertyPath:t})=>R(e,t),z=e=>{let t=[];for(let[i,a]of Object.entries(e))if(F(a)){if(t.push(i),a.isLeaf)continue;let e=a.value;if(I(e))for(let n of z(e.fields))t.push(`${i}.${n}`);else if(r.i(e))for(let n of z(e))t.push(`${i}.${n}`)}else if(n.t(a)&&(t.push(i),r.i(a)))for(let e of z(a))t.push(`${i}.${e}`);return t},B=e=>{if(!r.i(e))return[];if(I(e))return z(e.fields);if(Re(e)){let t=[];if(F(e.first)){t.push(`first`);for(let n of B(e.first.value))t.push(`first.${n}`)}return n.t(e.all)&&t.push(`all`),t.push(`totalCount`),t}return z(e)},We=3,Ge=e=>r.i(e)?e._outputSchemaType===`RECORD`||Object.values(e).some(e=>r.i(e)&&Ge(e.value)):!1,V=(e,t)=>t.map(t=>({candidate:t,distance:Pe(e,t)})).filter(({candidate:e,distance:t})=>t<=Math.ceil(e.length/2)).sort((e,t)=>e.distance-t.distance).slice(0,We).map(({candidate:e})=>e),Ke=({schema:e,propertyPath:t,referencedStepId:r})=>{if(!Fe(e)||Ge(e)){let n=B(e);return V(t.join(`.`),n).map(e=>[r,e].join(`.`))}let i=Le({schema:e,propertyPath:t});if(!n.t(i))return[];let a=V(i.failedSegment,i.availableKeys).map(e=>[r,...i.validPrefix,e].join(`.`));if((0,N.isNonEmptyArray)(a))return a;let o=Ie(e);return V(t.join(`.`),o).map(e=>[r,e].join(`.`))},qe=({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=Ne(o.settings?.input),c=t.ancestorsByStepId.get(o.id)??new Set;for(let t of s){let s=Ae(t),l=s[0];if(!n.t(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===ke;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(...Je({step:o,variable:t,pathSegments:s,referencedStepId:l,isTriggerReference:u,trigger:e.trigger,stepsById:r}))}}return i},Je=({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.t(l)&&(0,N.isObject)(l)&&!Array.isArray(l)&&Object.keys(l).length===0;if(!n.t(l)||u)return[];if(!Ue({schema:l,propertyPath:c}).found){let r=Ke({schema:l,propertyPath:c,referencedStepId:i}),a=Xe(l,i),o=(0,N.isNonEmptyArray)(r)?`Did you mean "{{${r[0]}}}"?${r.length>1?` Other options: ${r.slice(1).map(e=>`{{${e}}}`).join(`, `)}.`:``}`:(0,N.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.t(o)?{hint:o}:{},...(0,N.isNonEmptyArray)(r)?{suggestions:r}:{},...(0,N.isNonEmptyArray)(a)?{availablePaths:a}:{}}]}return[]},Ye=20,Xe=(e,t)=>B(e).slice(0,Ye).map(e=>`${t}.${e}`),Ze=r.tt({type:r.Z(`object`),properties:r.rt(r.at(),r.tt({type:r.H([`string`,`number`,`boolean`]),description:r.at().optional()})).refine(e=>Object.keys(e).every(Oe),{message:`Output field names can only contain letters, numbers, underscores, dots or hyphens (max 64 characters)`}),required:r.G(r.at()).optional(),additionalProperties:r.Z(!1).optional()}),Qe=r.q(`type`,[r.tt({type:r.Z(`text`)}),r.tt({type:r.Z(`json`),schema:Ze})]),$e=[1e3,5e3,15e3],H=r.tt({input:r.Q({}).describe(`Input data for the workflow action. Structure depends on the action type.`),outputSchema:r.Q({}).describe(`Schema defining the output data structure. This data can be referenced in subsequent steps using {{stepId.fieldName}}.`),errorHandlingOptions:r.tt({retryOnFailure:r.tt({value:r.nt(e=>typeof e==`boolean`?Number(e):e,r.et().int().min(0).max($e.length).describe(`How many times to retry the action if it fails, between 0 and ${$e.length}. 0 disables retries.`))}),continueOnFailure:r.tt({value:r.K().describe(`Whether to continue to the next step if this action fails.`)})})}),et={expectedOutputSchema:r.Q({}).optional().describe(`A sample output value declared by the user for steps whose output structure is only known at runtime.`)},tt=H.extend({input:r.tt({url:r.at(),method:r.H([`GET`,`POST`,`PUT`,`PATCH`,`DELETE`]),headers:r.rt(r.at(),r.at()).optional(),body:r.rt(r.at(),r.st([r.at(),r.et(),r.K(),r.U(),r.G(r.st([r.at(),r.et(),r.K(),r.U()]))])).or(r.at()).optional()}),...et}),nt=/^[a-zA-Z0-9_-]{1,64}$/,rt=r.tt({id:r.lt().describe(`Stable identifier for this criterion row.`),name:r.at().describe(`Option name for a choice question, or the label of one score level.`),description:r.at().optional().describe(`What the model should understand this option to mean.`)}),it=r.tt({id:r.lt().describe(`Stable identifier for this question row.`),name:r.at().regex(nt,`Answer name must be empty or contain 1 to 64 characters using only letters, digits, underscores and dashes`).or(r.Z(``)).describe(`Answer key for this question, made of letters, digits, underscores and dashes. Downstream steps read {{stepId.answers.<name>}}.`),type:r.H(Ee).describe(`choice picks one option, score grades an ordered rubric, boolean estimates the probability that a statement holds.`),instructions:r.at().describe(`What the model should decide about the shared state.`),criteria:r.G(rt).describe(`Options for a choice question, or ordered levels (lowest first) for a score question. Empty for boolean.`)}),at=H.extend({input:r.tt({state:r.at().describe(`The shared state every question is asked about. Supports variables.`),questions:r.G(it)})}),ot=H.extend({input:r.tt({items:r.st([r.G(r.st([r.at(),r.et(),r.K(),r.U(),r.rt(r.at(),r.W()),r.W()])),r.at()]).optional(),initialLoopStepIds:r.G(r.at()).optional(),shouldContinueOnIterationFailure:r.K().optional()})}),st=H.extend({input:r.tt({delayType:r.H([`SCHEDULED_DATE`,`DURATION`]),scheduledDateTime:r.at().nullable().optional(),duration:r.tt({days:r.st([r.et().min(0),r.at()]).optional(),hours:r.st([r.et().min(0),r.at()]).optional(),minutes:r.st([r.et().min(0),r.at()]).optional(),seconds:r.st([r.et().min(0),r.at()]).optional()}).optional()})}),ct=H.extend({input:r.tt({eventName:r.at().describe(`Event to wait for, in format objectName.action (e.g., "company.updated", "task.created", "person.deleted").`),recordId:r.at().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:r.G(r.at()).nullable().optional().describe(`For update events, only resume when one of these fields changed.`),timeout:r.tt({days:r.st([r.et().min(0),r.at()]).optional(),hours:r.st([r.et().min(0),r.at()]).optional(),minutes:r.st([r.et().min(0),r.at()]).optional()}).nullable().optional().describe(`Stop waiting after this duration. The step then succeeds with hasTimedOut set to true.`)})}),lt=H.extend({input:r.tt({})}),U=r.rt(r.at(),r.W()).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}}"}}`),ut=H.extend({input:r.tt({objectName:r.at().describe(`The name of the object to create a record in. Must be lowercase (e.g., "person", "company", "task").`),objectRecord:U.describe(`The record data to create.`)})}),dt=H.extend({input:r.tt({objectName:r.at(),objectRecord:U,objectRecordId:r.at(),fieldsToUpdate:r.G(r.at())})}),ft=H.extend({input:r.tt({objectName:r.at(),objectRecord:U})}),pt=H.extend({input:r.tt({objectName:r.at(),objectRecordId:r.at()})}),mt=r.tt({id:r.at(),logicalOperator:r.H(r.L),parentRecordFilterGroupId:r.at().nullable().optional(),positionInRecordFilterGroup:r.et().nullable().optional()}),ht=r.tt({id:r.at().optional(),fieldMetadataId:r.at(),operand:r.H(r.h),value:r.at().nullable().optional(),recordFilterGroupId:r.at().nullable().optional(),positionInRecordFilterGroup:r.et().nullable().optional(),subFieldName:r.at().nullable().optional(),relationTargetFieldMetadataId:r.at().nullable().optional()}),W=r.at().regex(/^{{[^{}]+}}$/,`Expected a workflow variable reference like {{stepId.path}}`),gt=H.extend({input:r.tt({objectName:r.at(),limit:r.st([r.et(),W]).optional(),offset:r.st([r.et().int().nonnegative(),W]).optional(),filter:r.tt({recordFilterGroups:r.G(mt).optional(),recordFilters:r.G(ht).optional()}).optional(),orderBy:r.tt({recordSorts:r.G(r.W()).optional(),gqlOperationOrderBy:r.G(r.rt(r.at(),r.W())).optional()}).optional()})}),_t=r.tt({id:r.at(),name:r.at(),label:r.at(),type:r.st([r.Z(r.I.TEXT),r.Z(r.I.NUMBER),r.Z(r.I.DATE),r.Z(r.I.SELECT),r.Z(r.I.MULTI_SELECT),r.Z(`RECORD`)]),placeholder:r.at().optional(),settings:r.rt(r.at(),r.W()).optional(),value:r.W().optional()}),vt=H.extend({input:r.G(_t),instructions:r.at().optional()}),G=r.tt({id:r.at(),logicalOperator:r.H(r.g),parentStepFilterGroupId:r.at().optional(),positionInStepFilterGroup:r.et().optional()}),K=r.tt({id:r.at(),type:r.at(),stepOutputKey:r.at(),operand:r.H(r.h).or(r.H(r.S)),value:r.at(),stepFilterGroupId:r.at(),positionInStepFilterGroup:r.et().optional(),fieldMetadataId:r.at().optional(),compositeFieldSubFieldName:r.at().optional(),isFullRecord:r.K().optional()}),yt=H.extend({input:r.tt({stepFilterGroups:r.G(G),stepFilters:r.G(K)})}),bt=r.tt({id:r.at(),nextStepIds:r.G(r.at()),filterGroupId:r.at().optional()}),xt=H.extend({input:r.tt({stepFilterGroups:r.G(G),stepFilters:r.G(K),branches:r.G(bt)})}),St=r.tt({id:r.at().refine(e=>t.u(e)),name:r.at(),size:r.et(),type:r.at(),createdAt:r.at()}),Ct=r.G(r.st([St,W.describe(`A workflow variable reference resolving to files`)])).optional().default([]),wt=H.extend({input:r.tt({connectedAccountId:r.at(),fromHandle:r.at().trim().optional(),recipients:r.tt({to:r.at().optional().default(``),cc:r.at().optional().default(``),bcc:r.at().optional().default(``)}),subject:r.at().optional(),body:r.at().optional().describe(`The email body as a serialized email document: JSON.stringify of {"type":"doc","attrs":{"schemaVersion":1},"content":[...]} with paragraph, heading, bulletList, orderedList, image, button, divider and html blocks. Use {{stepId.field}} for variables. To send a complete HTML email verbatim, including HTML produced by an earlier step such as {{stepId.html}}, make the body a single htmlDocument block ({"type":"htmlDocument","attrs":{"html":"..."}}): it is sent without the email layout and its variables are inserted as raw HTML, while an html block is embedded in the layout with escaped variables. HTML or plain text strings are rejected.`),files:Ct,inReplyTo:r.at().trim().optional()})}),Tt=H.extend({input:r.tt({connectedAccountId:r.at(),title:r.at(),description:r.at().optional(),location:r.at().optional(),startsAt:r.at(),endsAt:r.at(),isFullDay:r.K(),timeZone:r.at().optional(),attendees:r.at().optional().default(``),sendInvitations:r.K(),addConferencing:r.K()})}),Et=r.H([`RANDOM`,`ROUND_ROBIN`,`LOAD_BALANCED`]);H.extend({input:r.tt({objectName:r.at(),strategy:Et,recordIds:r.G(r.at()),loadBalance:r.tt({objectNameSingular:r.at(),fieldName:r.at()}).optional()}).superRefine((e,t)=>{e.strategy===`LOAD_BALANCED`&&!n.t(e.loadBalance)&&t.addIssue({code:a.custom,path:[`loadBalance`],message:`loadBalance is required when strategy is LOAD_BALANCED`})})});var Dt=r.tt({name:r.at().optional().describe(`Human-readable name for the trigger. Optional but recommended for clarity.`),type:r.H([`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:r.tt({x:r.et(),y:r.et()}).optional().nullable().describe(`Position coordinates for the trigger in the workflow diagram. Use (0, 0) for the trigger step.`),nextStepIds:r.G(r.at()).optional().nullable().describe(`Array of step IDs that the trigger connects to. These are the first steps in the workflow.`)}),Ot=Dt.extend({type:r.Z(`CRON`),settings:r.q(`type`,[r.tt({type:r.Z(`DAYS`),schedule:r.tt({day:r.et().min(1),hour:r.et().min(0).max(23),minute:r.et().min(0).max(59)}),outputSchema:r.Q({})}),r.tt({type:r.Z(`HOURS`),schedule:r.tt({hour:r.et().min(1),minute:r.et().min(0).max(59)}),outputSchema:r.Q({})}),r.tt({type:r.Z(`MINUTES`),schedule:r.tt({minute:r.et().min(1).max(60)}),outputSchema:r.Q({})}),r.tt({type:r.Z(`CUSTOM`),pattern:r.at(),outputSchema:r.Q({})})])}),kt=Dt.extend({type:r.Z(`WEBHOOK`),settings:r.q(`httpMethod`,[r.tt({outputSchema:r.Q({}),httpMethod:r.Z(`GET`),authentication:r.Z(`API_KEY`).nullable()}),r.tt({outputSchema:r.Q({}),expectedOutputSchema:r.Q({}).optional(),httpMethod:r.Z(`POST`),expectedBody:r.Q({}),authentication:r.Z(`API_KEY`).nullable()})])}),q=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}({}),At=e=>{let t=e.settings?.input;return e.type===q.IF_ELSE&&(0,N.isObject)(t)&&`branches`in t&&Array.isArray(t.branches)},jt=e=>{let t=e.settings?.input;return e.type===q.ITERATOR&&(0,N.isObject)(t)&&`initialLoopStepIds`in t&&(0,N.isNonEmptyArray)(t.initialLoopStepIds)},Mt=e=>{let t=e.settings?.input;if(n.t(t)&&(0,N.isObject)(t))return t},Nt=e=>{let t=new Set(e.nextStepIds??[]);if(At(e))for(let n of e.settings.input.branches??[])for(let e of n?.nextStepIds??[])t.add(e);if(jt(e))for(let n of e.settings.input.initialLoopStepIds??[])t.add(n);return[...t]},Pt=({trigger:e,steps:t})=>{let r=new Map,i=n.t(e?.nextStepIds)?e.nextStepIds.filter(n.t):[];r.set(ke,i);for(let e of t??[])r.set(e.id,Nt(e));let a=new Set,o=[ke];for(;o.length>0;){let e=o.shift();if(!(!n.t(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:Ft(r)}},Ft=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},It=({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.t(d)||a.has(f))return;i.add(e),jt(d)&&(d.settings.input.initialLoopStepIds??[]).forEach(t=>s(t,[...c,e],e));let p=d.type===q.ITERATOR?d.nextStepIds??[]:t.childrenByStepId.get(e)??[];n.t(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},Lt=({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.t);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(...Rt(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},Rt=e=>{let t=[],r=Mt(e);if(e.type===q.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.t).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.t(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===q.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},J=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(J).filter(e=>e!==J.OK&&e!==J.UNKNOWN),r.I.TEXT,r.I.ARRAY,r.I.BOOLEAN,r.I.DATE,r.I.DATE_TIME,r.I.NUMBER,r.I.NUMERIC,r.I.RAW_JSON,r.I.RICH_TEXT,r.I.SELECT,r.I.MULTI_SELECT;var zt=`dependencies/yarn.lock`,Bt=`public`,Vt=`front-component-shared-dependencies.mjs`;r.E.RECORD_PAGE,r.E.DASHBOARD;var Ht={js:`import { createRequire as __createRequire } from 'module';
|
|
5
|
+
const require = __createRequire(import.meta.url);`},Ut=`.twenty/output`,Wt=({applicationUniversalIdentifier:e,roleUniversalIdentifier:t,fieldUniversalIdentifier:n})=>i.u({entityNamespace:`fieldPermission`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),Gt=({applicationUniversalIdentifier:e,roleUniversalIdentifier:t,objectUniversalIdentifier:n})=>i.u({entityNamespace:`objectPermission`,value:`${t}:${n}`,applicationUniversalIdentifier:e}),Kt=({objectMetadataApplicationUniversalIdentifier:e,objectUniversalIdentifier:t})=>i.t({applicationUniversalIdentifier:e,objectUniversalIdentifier:t,name:r.E.RECORD_FORM}),qt=({pageLayoutTabManifest:e,pageLayoutType:i})=>{let a=e.layoutMode??(i===r.E.STANDALONE_PAGE?r.R.VERTICAL_LIST:r.R.GRID),o=e.widgets??[],s=[];if(!Object.values(r.R).some(e=>e===a))return{status:`fail`,errors:[`Page layout tab "${e.title}" defines unsupported layoutMode "${a}". Expected GRID, VERTICAL_LIST or CANVAS.`]};for(let t of o){let i=[t.heightBehavior,r.i(t.position)&&`heightBehavior`in t.position?t.position.heightBehavior:void 0].filter(n.t);i.length>0&&a!==r.R.VERTICAL_LIST&&s.push(`Page layout widget "${t.title}" defines heightBehavior, but its parent tab "${e.title}" uses ${a}. heightBehavior is only supported for VERTICAL_LIST tabs.`);for(let e of i)Object.values(r.b).some(t=>t===e)||s.push(`Page layout widget "${t.title}" defines unsupported heightBehavior "${e}". Expected FIT_CONTENT or TAB_VIEWPORT.`)}if(s.length>0)return{status:`fail`,errors:s};let c={...e,layoutMode:a,widgets:o.map(({heightBehavior:e,position:i,gridPosition:o,...s},c)=>{if(n.t(i))return{...s,position:i.layoutMode===r.R.VERTICAL_LIST&&n.t(e)?{...i,heightBehavior:e}:i};if(n.t(o))return{...s,position:{layoutMode:r.R.GRID,...o}};switch(a){case r.R.GRID:return{...s,position:{layoutMode:a,row:0,column:0,rowSpan:r.s.default.h,columnSpan:r.s.default.w}};case r.R.VERTICAL_LIST:return{...s,position:{layoutMode:a,index:c,...n.t(e)?{heightBehavior:e}:{}}};case r.R.CANVAS:return{...s,position:{layoutMode:a}};default:return t.t(a)}})};for(let e of c.widgets)e.position.layoutMode!==a&&s.push(`Page layout widget "${e.title}" uses a ${e.position.layoutMode} position, but its parent tab "${c.title}" uses ${a}.`);if(a===r.R.VERTICAL_LIST){let e=c.widgets.filter(({type:e,position:n})=>n.layoutMode===r.R.VERTICAL_LIST&&t.i({widgetType:e,heightBehavior:n.heightBehavior})===r.b.TAB_VIEWPORT);e.length>1&&s.push(`Page layout tab "${c.title}" can contain only one TAB_VIEWPORT widget.`);let i=e.length===1?e[0]:void 0;n.t(i)&&c.widgets.some(e=>e!==i&&e.position.layoutMode===r.R.VERTICAL_LIST&&i.position.layoutMode===r.R.VERTICAL_LIST&&e.position.index>=i.position.index)&&s.push(`Page layout tab "${c.title}" must place its TAB_VIEWPORT widget last.`)}return s.length>0?{status:`fail`,errors:s}:{status:`success`,pageLayoutTab:c}},Y=[`canReadObjectRecords`,`canUpdateObjectRecords`,`canSoftDeleteObjectRecords`,`canDestroyObjectRecords`],Jt=e=>ne(Te(v(e))).slice(0,32),Yt=e=>Jt(JSON.stringify(JSON.parse(e))),X={canReadObjectRecords:`canReadAllObjectRecords`,canUpdateObjectRecords:`canUpdateAllObjectRecords`,canSoftDeleteObjectRecords:`canSoftDeleteAllObjectRecords`,canDestroyObjectRecords:`canDestroyAllObjectRecords`},Xt=({role:e,objectUniversalIdentifier:t})=>{let n=e.objectPermissions?.find(e=>e.objectUniversalIdentifier===t);return{canReadObjectRecords:n?.canReadObjectRecords??e[X.canReadObjectRecords]??!1,canUpdateObjectRecords:n?.canUpdateObjectRecords??e[X.canUpdateObjectRecords]??!1,canSoftDeleteObjectRecords:n?.canSoftDeleteObjectRecords??e[X.canSoftDeleteObjectRecords]??!1,canDestroyObjectRecords:n?.canDestroyObjectRecords??e[X.canDestroyObjectRecords]??!1}},Zt=e=>JSON.stringify(e,(e,t)=>r.i(t)?Object.fromEntries(Object.entries(t).sort(([e],[t])=>e.localeCompare(t))):t),Qt=({groupsByUniversalIdentifier:e,predicateGroupUniversalIdentifier:t})=>{let r=[],i=new Set,a=t;for(;n.t(a)&&!i.has(a);){i.add(a);let t=e.get(a);if(!n.t(t))break;r.push(t.logicalOperator),a=t.parentPredicateGroupUniversalIdentifier}return r},$t=({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=>Zt({fieldUniversalIdentifier:e.fieldUniversalIdentifier,subFieldName:e.subFieldName??null,operand:e.operand,value:e.value??null,workspaceMemberFieldUniversalIdentifier:e.workspaceMemberFieldUniversalIdentifier??null,workspaceMemberSubFieldName:e.workspaceMemberSubFieldName??null,groupOperatorPath:Qt({groupsByUniversalIdentifier:n,predicateGroupUniversalIdentifier:e.predicateGroupUniversalIdentifier})})).sort()},en=r.n.map(e=>r.r[e]),tn=({roleSignature:e,supersetSignature:t})=>e.length===t.length&&e.every((e,n)=>e===t[n]),nn=({role:e,superset:t})=>[...Y.filter(n=>{let r=X[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`}]:[]],rn=({role:e,superset:t,toolPermissionFlagUniversalIdentifiers:n})=>{let r=new Set([...en,...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}))},an=({role:e,superset:t})=>[...new Set([...[...e.objectPermissions??[],...t.objectPermissions??[]].map(e=>e.objectUniversalIdentifier),...(t.rowLevelPermissionPredicates??[]).map(e=>e.objectUniversalIdentifier)])].flatMap(n=>{let r=Xt({role:e,objectUniversalIdentifier:n}),i=Xt({role:t,objectUniversalIdentifier:n}),a=Y.filter(e=>r[e]&&!i[e]).map(e=>({type:`OBJECT_RECORDS`,objectUniversalIdentifier:n,action:e})),o=Y.some(e=>r[e]),s=$t({role:t,objectUniversalIdentifier:n}),c=$t({role:e,objectUniversalIdentifier:n});return o&&s.length>0&&!tn({roleSignature:c,supersetSignature:s})?[...a,{type:`ROW_LEVEL_RESTRICTION`,objectUniversalIdentifier:n}]:a}),on=({role:e,superset:t})=>(t.fieldPermissions??[]).flatMap(t=>{let{objectUniversalIdentifier:n,fieldUniversalIdentifier:r}=t,i=Xt({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`}]:[]]}),sn=({role:e,superset:t,toolPermissionFlagUniversalIdentifiers:n})=>[...nn({role:e,superset:t}),...rn({role:e,superset:t,toolPermissionFlagUniversalIdentifiers:n}),...an({role:e,superset:t}),...on({role:e,superset:t})],cn=e=>i.p(e)&&s(e)>=4,ln=r.tt({x:r.et(),y:r.et()}),un={universalIdentifier:r.lt(),name:r.at().min(1),nextStepIds:r.G(r.lt()),position:ln.nullable().optional(),outputSchema:r.rt(r.at(),r.ct()).optional(),expectedOutputSchema:r.rt(r.at(),r.ct()).optional(),errorHandlingOptions:H.shape.errorHandlingOptions.optional()},Z=(e,t)=>r.it({...un,type:r.Z(e),input:t}),dn=r.Q({fieldMetadataUniversalIdentifier:r.lt(),fieldMetadataId:r.$().optional()}),fn=K.omit({fieldMetadataId:!0}).extend({fieldMetadataUniversalIdentifier:r.lt().optional()}).strict(),pn=ht.omit({fieldMetadataId:!0,relationTargetFieldMetadataId:!0}).extend({fieldMetadataUniversalIdentifier:r.lt()}).strict(),Q={objectUniversalIdentifier:r.lt()},mn={connectedAccountId:r.at().optional(),connectedAccountHandle:r.at().trim().min(1).optional()},hn=(e,t)=>{n.t(e.connectedAccountId)===n.t(e.connectedAccountHandle)&&t.addIssue({code:`custom`,path:[`connectedAccountHandle`],message:`Set exactly one of connectedAccountId and connectedAccountHandle`})},gn=wt.shape.input.extend(mn).superRefine(hn),_n=[r.it({...un,type:r.Z(`LOGIC_FUNCTION`),logicFunctionUniversalIdentifier:r.lt(),input:r.rt(r.at(),r.ct())}),Z(`HTTP_REQUEST`,tt.shape.input),Z(`CLASSIFY`,at.shape.input),Z(`ITERATOR`,ot.shape.input),Z(`DELAY`,st.shape.input),Z(`WAIT_FOR_EVENT`,ct.shape.input),Z(`EMPTY`,lt.shape.input),Z(`CREATE_RECORD`,ut.shape.input.omit({objectName:!0}).extend(Q).strict()),Z(`UPDATE_RECORD`,dt.shape.input.omit({objectName:!0}).extend(Q).strict()),Z(`UPSERT_RECORD`,ft.shape.input.omit({objectName:!0}).extend(Q).strict()),Z(`DELETE_RECORD`,pt.shape.input.omit({objectName:!0}).extend(Q).strict()),Z(`FIND_RECORDS`,gt.shape.input.omit({objectName:!0,filter:!0,orderBy:!0}).extend({...Q,filter:r.it({recordFilterGroups:r.G(mt).optional(),recordFilters:r.G(pn).optional()}).optional(),orderBy:r.it({recordSorts:r.G(dn.extend({direction:r.H([`ASC`,`DESC`]),subFieldName:r.at().nullable().optional()})).optional()}).optional()}).strict()),Z(`PICK_RECORD`,r.it({...Q,strategy:Et,recordIds:r.G(r.at()),loadBalance:r.it({objectUniversalIdentifier:r.lt(),fieldUniversalIdentifier:r.lt()}).optional()}).superRefine((e,t)=>{e.strategy===`LOAD_BALANCED`&&!n.t(e.loadBalance)&&t.addIssue({code:`custom`,path:[`loadBalance`],message:`loadBalance is required when strategy is LOAD_BALANCED`})})),Z(`FILTER`,yt.shape.input.extend({stepFilters:r.G(fn)})),Z(`IF_ELSE`,xt.shape.input.extend({stepFilters:r.G(fn)})),Z(`FORM`,r.G(vt.shape.input.element.extend({settings:r.rt(r.at(),r.ct()).optional()}).superRefine((e,t)=>{e.type===`RECORD`&&!r.lt().safeParse(e.settings?.objectUniversalIdentifier).success&&t.addIssue({code:`custom`,path:[`settings`,`objectUniversalIdentifier`],message:`Record picker fields require an object universal identifier`}),(e.type===`SELECT`||e.type===`MULTI_SELECT`)&&!r.lt().safeParse(e.settings?.selectedFieldUniversalIdentifier).success&&t.addIssue({code:`custom`,path:[`settings`,`selectedFieldUniversalIdentifier`],message:`Select fields require the universal identifier of the field whose options they offer`})}))),Z(`SEND_EMAIL`,gn),Z(`DRAFT_EMAIL`,gn),Z(`CREATE_CALENDAR_EVENT`,Tt.shape.input.extend(mn).superRefine(hn)),Z(`AI_AGENT`,r.it({agentUniversalIdentifier:r.lt(),prompt:r.at(),responseFormat:Qe.optional()}))],vn=_n.map(e=>e.shape.type.value),yn=r.q(`type`,_n,{error:e=>e.code===`invalid_union`?`Unsupported step type. Application workflows support: ${vn.join(`, `)}`:void 0}),bn=[`updated`,`upserted`],xn=r.q(`type`,[r.it({type:r.Z(`GLOBAL`)}),r.it({type:r.Z(`SINGLE_RECORD`),objectUniversalIdentifier:r.lt()}),r.it({type:r.Z(`BULK_RECORDS`),objectUniversalIdentifier:r.lt()})]),[Sn,Cn,wn,Tn]=Ot.shape.settings.options,En=r.q(`type`,[Sn.omit({outputSchema:!0}).extend({schedule:Sn.shape.schedule.strict()}).strict(),Cn.omit({outputSchema:!0}).extend({schedule:Cn.shape.schedule.strict()}).strict(),wn.omit({outputSchema:!0}).extend({schedule:wn.shape.schedule.strict()}).strict(),Tn.omit({outputSchema:!0}).strict()]),[Dn,On]=kt.shape.settings.options,kn=r.q(`httpMethod`,[Dn.omit({outputSchema:!0,authentication:!0}).strict(),On.omit({outputSchema:!0,expectedOutputSchema:!0,authentication:!0}).strict()]),$={universalIdentifier:r.lt().optional(),name:r.at().min(1).optional(),nextStepIds:r.G(r.lt()).min(1),position:ln.nullable().optional(),outputSchema:r.rt(r.at(),r.ct()).optional()},An=[r.it({...$,type:r.Z(`MANUAL`),settings:r.it({availability:xn.optional(),icon:r.at().optional(),isPinned:r.K().optional()}).superRefine((e,t)=>{!n.t(e.availability)&&(n.t(e.icon)||n.t(e.isPinned))&&t.addIssue({code:`custom`,path:[`availability`],message:`Set an availability for the icon and pin to show in the command menu`})}).optional()}),r.it({...$,type:r.Z(`CRON`),settings:En}),r.it({...$,type:r.Z(`DATABASE_EVENT`),settings:r.it({objectUniversalIdentifier:r.lt(),action:r.H([`created`,`updated`,`deleted`,`upserted`]),fieldUniversalIdentifiers:r.G(r.lt()).optional(),filter:r.it({stepFilterGroups:r.G(G),stepFilters:r.G(fn.extend({operand:r.H(r.h)}))}).optional()}).superRefine((e,r)=>{if(t.n(e.fieldUniversalIdentifiers)&&!bn.includes(e.action)&&r.addIssue({code:`custom`,path:[`fieldUniversalIdentifiers`],message:`Watched fields only apply to ${bn.join(` and `)} events`}),!n.t(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.t(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.t(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`})})})}),r.it({...$,type:r.Z(`WEBHOOK`),settings:kn})],jn=An.map(e=>e.shape.type.value),Mn=r.q(`type`,An,{error:e=>e.code===`invalid_union`?`Unsupported trigger type. Application workflows support: ${jn.join(`, `)}`:void 0});r.it({universalIdentifier:r.lt(),name:r.at().min(1),isSystem:r.K().optional(),version:r.it({trigger:Mn,steps:r.G(yn).min(1)})}).superRefine((e,t)=>{let{steps:r,trigger:i}=e.version,a=[e.universalIdentifier,i.universalIdentifier,...r.map(e=>e.universalIdentifier)].filter(n.t);new Set(a).size!==a.length&&t.addIssue({code:`custom`,message:`Workflow, trigger and steps must have distinct universal identifiers`});let o={trigger:{type:i.type,nextStepIds:i.nextStepIds},steps:r.map(e=>({...e,id:e.universalIdentifier,settings:{input:e.input}}))},s=Pt(o);for(let e of[...Lt({workflow:o,graph:s}),...It({workflow:o,graph:s}),...qe({workflow:o,graph:s,stepsById:new Map(o.steps.map(e=>[e.id,e]))})])e.severity===`error`&&t.addIssue({code:`custom`,message:e.message})}),Object.defineProperty(exports,"a",{enumerable:!0,get:function(){return Ut}}),Object.defineProperty(exports,"c",{enumerable:!0,get:function(){return Ht}}),Object.defineProperty(exports,"d",{enumerable:!0,get:function(){return Vt}}),Object.defineProperty(exports,"f",{enumerable:!0,get:function(){return qt}}),Object.defineProperty(exports,"h",{enumerable:!0,get:function(){return v}}),Object.defineProperty(exports,"i",{enumerable:!0,get:function(){return sn}}),Object.defineProperty(exports,"l",{enumerable:!0,get:function(){return Jt}}),Object.defineProperty(exports,"m",{enumerable:!0,get:function(){return we}}),Object.defineProperty(exports,"n",{enumerable:!0,get:function(){return Wt}}),Object.defineProperty(exports,"o",{enumerable:!0,get:function(){return Yt}}),Object.defineProperty(exports,"p",{enumerable:!0,get:function(){return cn}}),Object.defineProperty(exports,"r",{enumerable:!0,get:function(){return Kt}}),Object.defineProperty(exports,"s",{enumerable:!0,get:function(){return zt}}),Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return Gt}}),Object.defineProperty(exports,"u",{enumerable:!0,get:function(){return Bt}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./has-error-code-DsJeqbZq.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.t(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}});
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
const e=require("./rolldown-runtime-mLOUI7ql.cjs");var t=e.t((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`})),n=e.t((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})),r=e.t((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 r=t(),i=n();e.isObjectOrNull=e=>typeof e==`object`,e.isNonEmptyArray=e=>i.isArray(e)&&e.length>0,e.isNonEmptyString=e=>r.isString(e)&&e.length>0,e.isNumberOrNaN=e=>typeof e==`number`,e.isInteger=e=>r.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})),i=e.t((e=>{var i=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]})),a=e&&e.__setModuleDefault||(Object.create?(function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}):function(e,t){e.default=t}),o=e&&e.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(e!=null)for(var n in e)n!=="default"&&Object.prototype.hasOwnProperty.call(e,n)&&i(t,e,n);return a(t,e),t},s=e&&e.__exportStar||function(e,t){for(var n in e)n!=="default"&&!Object.prototype.hasOwnProperty.call(t,n)&&i(t,e,n)};Object.defineProperty(e,"__esModule",{value:!0}),e.structural=e.primitives=e.convenience=void 0,e.convenience=o(r()),s(r(),e),e.primitives=o(t()),s(t(),e),e.structural=o(n()),s(n(),e)}));Object.defineProperty(exports,"t",{enumerable:!0,get:function(){return i}});
|
package/dist/chunks/{build-source-manifest-Gw2TI8Xe.cjs → build-source-manifest-DPsTlw7Z.cjs}
RENAMED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const e=require("./cli-error-
|
|
1
|
+
const e=require("./cli-error-CrUD8uMp.cjs"),t=require("./get-tooling-error-context-CZKTM7Q6.cjs"),n=require("./compile-application-translations-DB-cG9Im.cjs"),r=require("./resolve-source-sdk-CyvER2l1.cjs");let i=require("esbuild");var a=async({appPath:a,signal:o})=>{let s=[],c=e=>{s.push({severity:`warning`,code:`BUILD_WARNING`,message:e})};try{o.throwIfAborted(),await r.t({appPath:a});let e=await n.r(a);if(o.throwIfAborted(),!e.success)return{success:!1,error:{code:`MANIFEST_BUILD_FAILED`,message:e.errors.join(`
|
|
2
2
|
`)},diagnostics:e.errors.map(e=>({severity:`error`,code:`MANIFEST_BUILD_FAILED`,message:e}))};e.warnings.forEach(c);let t=await n.t({appPath:a,onWarning:c});return o.throwIfAborted(),{success:!0,data:{manifest:{...e.manifest,translations:t},filePaths:e.filePaths},diagnostics:s}}catch(n){return{success:!1,error:{code:o.aborted?`CANCELLED`:n instanceof e.t?n.code:`MANIFEST_BUILD_FAILED`,message:n instanceof Error?n.message:String(n),...t.t(n)},diagnostics:s}}finally{await(0,i.stop)()}};exports.buildSourceManifest=a;
|