@fluidgrids/fe-sdk 0.0.0-stage → 2026.1203.7
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 +564 -2
- package/dist/ActivityOptionsFields-C2u-hY2U.js +142 -0
- package/dist/AiStudioPage-B_hNTj-_.js +1137 -0
- package/dist/ApprovalInboxPage-ClITra3n.js +1312 -0
- package/dist/ChoiceSelect-LkK-uS9J.js +65 -0
- package/dist/ConfirmActionDialog-DHWTDRbp.js +31 -0
- package/dist/ConnectionFormDialog-C0kDgcrZ.js +153 -0
- package/dist/CreateFluidgridsTagDocument-Dtp9KPLJ.js +1055 -0
- package/dist/DataSinkDashboardPage-b4ezeqa6.js +278 -0
- package/dist/DataTablesPage-C1d9YGHz.js +5575 -0
- package/dist/DateTimeField-B1qR4ruo.js +51 -0
- package/dist/Disclosure-BNKij7-v.js +45 -0
- package/dist/ElementLibraryPage-8jNO6YmE.js +2256 -0
- package/dist/ElementLibrarySequenceDocument-B-W8SPzn.js +3979 -0
- package/dist/EnsureThemeProvider-BvlNjAd0.js +24 -0
- package/dist/EntityTagBadge-1OlP6p0c.js +25 -0
- package/dist/EntityTagPicker-BBrU5cE0.js +137 -0
- package/dist/ExecuteStepDocument-B4j1mdRT.js +189 -0
- package/dist/ExecutionDetailDocument-D6QuM-kp.js +875 -0
- package/dist/ExecutionDetailPage-D4CBtFdo.js +12217 -0
- package/dist/ExecutionDetailPage-DvQ667OE.d.ts +10 -0
- package/dist/ExecutionStatusBadge-BsDVor9t.js +221 -0
- package/dist/ExecutionsListDocument-Dan7ZiqB.js +459 -0
- package/dist/ExecutionsListPage-B3XT8ITL.js +4307 -0
- package/dist/FailureTriagePanel-DOJMaJ0n.js +1285 -0
- package/dist/FileDownloadUrlDocument-CVOYKcL5.js +92 -0
- package/dist/FluidGridsDocsLink-bX0Hnhxr.js +66 -0
- package/dist/FluidGridsMark-CE2blT7K.js +74 -0
- package/dist/HeldLoadRegion-BtTxbvOW.js +34 -0
- package/dist/HistoryPage-BLoRpJ1R.d.ts +6 -0
- package/dist/HistoryPage-BSBISXoj.js +2835 -0
- package/dist/Icon-BtQ0HXLh.js +160 -0
- package/dist/InsightsPage-D7ybj8N9.js +11245 -0
- package/dist/IsolationSetting-vy911E8b.js +1153 -0
- package/dist/LibraryParts-DOeNgR8A.js +413 -0
- package/dist/ManagedAiPolicyAuthority-BxwJ3ptd.js +40 -0
- package/dist/ManagedAiPolicyAuthority-DM3t3wNr.d.ts +18 -0
- package/dist/ManagedAiPolicyAuthorityContext-CNkxIOZ1.js +10 -0
- package/dist/McpTriggerServers-BCPCAOWB.js +459 -0
- package/dist/MissingNodesInstallModal-rO_SEDrC.js +224 -0
- package/dist/NavigationV2Provider-DCDt35eG.js +17 -0
- package/dist/NodeSchemaIntrospectionDocument-C1vAIcHd.js +95 -0
- package/dist/NodesPage-DEbnz9iU.d.ts +6 -0
- package/dist/NodesPage-O7KeeKtd.js +653 -0
- package/dist/OfflineIcon-TwMKYWjA.js +207 -0
- package/dist/OpenTemplateAsCodeButton-BhWJWIF3.js +94 -0
- package/dist/PaidTemplateConfirm-_G3ag6S4.js +28 -0
- package/dist/PublishCustomNodeAction-CIySbK4c.js +134 -0
- package/dist/RecordTaskDialog-BkpCDvhR.js +2078 -0
- package/dist/RunActionsMenu-DodOgIQm.js +59 -0
- package/dist/RunnerStatusPill-C1v967iq.js +24 -0
- package/dist/RunnersPage-dB0RSdY_.js +1929 -0
- package/dist/SandboxRuntimeExhaustedNotice-BFOIF93C.js +120 -0
- package/dist/SchedulesPage-DPWr1yvf.js +1607 -0
- package/dist/SearchBox-BGtYjvfs.js +49 -0
- package/dist/SequenceEditor-CFiHeHkR.js +497 -0
- package/dist/SettingsPage-0CQBNPZV.js +8695 -0
- package/dist/StewardPages-DAJhepen.js +47 -0
- package/dist/StewardRunImportPanel-Kva2DO0u.js +2844 -0
- package/dist/StoreTemplateCardCompact-CHn5kP7A.js +2166 -0
- package/dist/TagFilterSelect-CyA8QrS7.js +42 -0
- package/dist/TaskQueuesPage-DdnDCyat.js +3571 -0
- package/dist/TechnicalDetails-B0Oi4aZw.js +19 -0
- package/dist/TemplateConfigurationModal-CdvCYJLM.js +332 -0
- package/dist/TemplateDetailPanel-CbiKciuB.js +222 -0
- package/dist/TemplatePreview-cx7-NOeG.js +868 -0
- package/dist/TemplatesPage-BG3H-6v6.d.ts +10 -0
- package/dist/TemplatesPage-BVQpGYIV.js +3251 -0
- package/dist/TerminateExecutionDocument-B_HKNVrN.js +581 -0
- package/dist/TranslationBridge-Bd4aJKMs.d.ts +11 -0
- package/dist/TranslationBridge-Da-TPgQm.js +68 -0
- package/dist/TriggerWorkflowDocument-D9Km2Vv2.js +460 -0
- package/dist/UiSequencePickerSequenceDocument-BSYnSDV7.js +607 -0
- package/dist/UiStepScreenshot-Qh4QMyUp.js +146 -0
- package/dist/UsageTimeSeriesDocument-DcInx9-z.js +177 -0
- package/dist/VariablesPage-ChfGuW22.js +2243 -0
- package/dist/VersionDiffDialog-Bd2AeUwf.js +1702 -0
- package/dist/VersionLifecycleBar-BBeWVtz-.js +143 -0
- package/dist/WebhookDeliveriesPage-D66bua0j.js +1563 -0
- package/dist/WorkflowBuilder-B6wQD1TK.js +539 -0
- package/dist/WorkflowBuilder-DR4ku8Tr.js +1611 -0
- package/dist/WorkflowDefinitionDocument-DZLbTPUZ.js +321 -0
- package/dist/WorkflowEmbed-BXfFGy0i.js +708 -0
- package/dist/WorkflowEmbed-Cbqe1s1z.d.ts +6 -0
- package/dist/WorkflowPinnedDataDocument-BODT5omd.js +782 -0
- package/dist/WorkflowProposalCard-BruukdeF.js +96 -0
- package/dist/WorkflowProposalDocument-BdUbsrd0.js +620 -0
- package/dist/WorkflowSearchRedirect-C7zJ2MKH.js +40 -0
- package/dist/WorkflowSettingsDrawer-MVU1BKfY.d.ts +18 -0
- package/dist/WorkflowSettingsDrawer-gazs97WR.js +196 -0
- package/dist/WorkflowShareDialog-e8jJtLjU.js +469 -0
- package/dist/WorkflowVersionsDocument-DRVOp8Uj.js +3213 -0
- package/dist/WorkflowsList--hR2_8gf.js +4593 -0
- package/dist/WorkflowsList-CcNDQge5.d.ts +6 -0
- package/dist/WorkflowsListPageDocument-CnzcQm_o.js +934 -0
- package/dist/addonCatalog-CbZS4deh.js +58 -0
- package/dist/addonCatalog-sjlonAmR.d.ts +15 -0
- package/dist/addons.d.ts +3 -0
- package/dist/addons.js +4 -0
- package/dist/agent-form-Bfvm32j1.js +83 -0
- package/dist/agent-tools.d.ts +3 -0
- package/dist/agent-tools.js +5 -0
- package/dist/agentTools-CyL7DLOF.js +320 -0
- package/dist/ai-usage-BrxDgvdR.js +240 -0
- package/dist/aiCreditsBridge-BuE92tKo.js +49 -0
- package/dist/api-BKq-nIOZ.js +2286 -0
- package/dist/api-Ol7I8NxE.js +8289 -0
- package/dist/apollo-type-policies.d.ts +11 -0
- package/dist/apollo-type-policies.js +64 -0
- package/dist/askAboutBridge-ByYsQams.js +106 -0
- package/dist/askQuestions-Cmx7VnMm.js +742 -0
- package/dist/assert-rules-lfYEMc99.js +318 -0
- package/dist/assistant.d.ts +94 -0
- package/dist/assistant.js +99 -0
- package/dist/attach-node-helpers-HDKQOtrD.js +32 -0
- package/dist/badge-CXfPhoMH.js +26 -0
- package/dist/basil.generated-BK-EHbwN.js +10 -0
- package/dist/browser-steps-DMpS5TyB.js +533 -0
- package/dist/builderTimings-pvGnK1m-.js +510 -0
- package/dist/button-DG7y_FVJ.js +48 -0
- package/dist/canvasNoteTools-BxuP_AYO.js +137 -0
- package/dist/card-Bomy_1UG.js +44 -0
- package/dist/catalogGrid-BOrfMgi-.js +41 -0
- package/dist/channel-CPyQ1NR1.js +212 -0
- package/dist/chips-CvNrYJZa.js +27 -0
- package/dist/client-holder-C0M5Cfwl.js +68 -0
- package/dist/cn-QqidFIgr.js +10 -0
- package/dist/code-editor-diagnostics-Zr0cIcx1.js +46 -0
- package/dist/code-editor-field-x_JrY8KR.js +113 -0
- package/dist/codec-client-DPuD6mw7.js +515 -0
- package/dist/conditionBuilder-DwfEF0Q-.js +1144 -0
- package/dist/config-DO68jw5k.js +322 -0
- package/dist/constants-DgbVc24O.d.ts +296 -0
- package/dist/constants-DlRnHBfQ.js +217 -0
- package/dist/convert-browser-action-pfecelF7.js +347 -0
- package/dist/convert-dialog-B_o22NiJ.js +382 -0
- package/dist/create-workflow-first-Azg3JUdX.js +120 -0
- package/dist/definition-canvas-Bsda-rDT.js +31 -0
- package/dist/dialog-BVd152GS.js +94 -0
- package/dist/durable-nodes-BXyYCLxT.js +91 -0
- package/dist/duration-CDb7-mT_.js +33 -0
- package/dist/edge-mapper-wEAdGVU2.js +4477 -0
- package/dist/element-library-DkSlg_VE.js +727 -0
- package/dist/entities-I_0kio3q.js +38 -0
- package/dist/error-advice-QLr5NCm7.js +65 -0
- package/dist/errors-ClKb5sEt.js +188 -0
- package/dist/executions.d.ts +3 -0
- package/dist/executions.js +5 -0
- package/dist/feature-flags-B2qetXKd.js +385 -0
- package/dist/field-label-DPZRmE_B.js +153 -0
- package/dist/firstWorkflow-C_h0KMB2.js +133 -0
- package/dist/flags.d.ts +3 -0
- package/dist/flags.js +4 -0
- package/dist/flow-builder-DIvLOhz0.js +28038 -0
- package/dist/flow-store-holder-CUN7Terz.js +52 -0
- package/dist/fluent.generated-CA_e6-4l.js +14 -0
- package/dist/fluidgridsEvents-bbEQbwU6.js +175 -0
- package/dist/fluidgridsTheme-DUhvOgoy.js +297 -0
- package/dist/global-client-BQPuFrFa.js +433 -0
- package/dist/global-operations-BG6YgxrM.js +136 -0
- package/dist/graphql-types-UTYtujY9.js +21358 -0
- package/dist/history.d.ts +3 -0
- package/dist/history.js +4 -0
- package/dist/index-AoJAa5vU.d.ts +164958 -0
- package/dist/index-DEMT3iAM.d.ts +120 -0
- package/dist/index-ROZzNGyY.d.ts +76 -0
- package/dist/index.d.ts +20 -0
- package/dist/index.js +8123 -0
- package/dist/ion.generated-mbajjcAg.js +10 -0
- package/dist/label-Lzb8ZXf_.js +29 -0
- package/dist/labels-rXd9gYQz.js +1236 -0
- package/dist/liveCanvas-D5ytXDp8.js +103 -0
- package/dist/logos.generated-X6_0kjVR.js +21 -0
- package/dist/logs-panel-Cw0DkG0l.js +468 -0
- package/dist/lucide.generated-B6NVd3GT.js +29 -0
- package/dist/marksStore-a9oIMMot.js +175 -0
- package/dist/mcp-trigger-D0nRdvq5.js +307 -0
- package/dist/mdi.generated-D1BV74d6.js +292 -0
- package/dist/menus-CU3hDGYl.js +160 -0
- package/dist/mynaui.generated-DMWr5cXz.js +66 -0
- package/dist/navigation-v2.d.ts +3 -0
- package/dist/navigation-v2.js +5 -0
- package/dist/node-detail-view-Cgm5H1P-.js +1372 -0
- package/dist/node-editor-tab-body-CZ0fVuVP.js +187 -0
- package/dist/node-operation-selection-CdV3KI_V.js +3534 -0
- package/dist/node-registry-refresh-s3okf83X.js +27 -0
- package/dist/node-role-TMbnkmeP.js +132 -0
- package/dist/node-type-icon-BZa8n4iG.js +33 -0
- package/dist/nodes.d.ts +3 -0
- package/dist/nodes.js +4 -0
- package/dist/notesKey-5EaREBGA.js +12 -0
- package/dist/observability.d.ts +3 -0
- package/dist/observability.js +5 -0
- package/dist/offset-pages-zghoClB3.js +55 -0
- package/dist/operations-BBmT9ToP.js +663 -0
- package/dist/operations-WxRJWeqO.js +3133 -0
- package/dist/output-files-Ba8bu5lv.js +196 -0
- package/dist/page-operation-DrWuhd6Y.js +129 -0
- package/dist/page-twins.d.ts +13 -0
- package/dist/page-twins.js +186 -0
- package/dist/pageControlSpecs-DZJ9K37m.js +134 -0
- package/dist/pageControlsBridge-0pX9s-3k.js +54 -0
- package/dist/pageControlsBridge-DAuT3w7L.d.ts +36 -0
- package/dist/panels-PfBBAToE.js +346 -0
- package/dist/parts-B7fBcw-B.js +346 -0
- package/dist/popover-Dms9Vz3j.js +3389 -0
- package/dist/preloadable-lazy-Pp47mqQ9.js +65 -0
- package/dist/proactive.d.ts +66 -0
- package/dist/proactive.js +237 -0
- package/dist/quick-config-panel-DFd77xho.js +451 -0
- package/dist/quota-DeA_CJ2e.js +175 -0
- package/dist/quota.d.ts +3 -0
- package/dist/quota.js +4 -0
- package/dist/read-only-context-Dt9N9SIG.js +18 -0
- package/dist/relative-time-Dxt8ZIIu.js +55 -0
- package/dist/results-CwK_yDxK.js +325 -0
- package/dist/rolldown-runtime-hDbaFkMy.js +18 -0
- package/dist/route-data.d.ts +12 -0
- package/dist/route-data.js +69 -0
- package/dist/route-match-C-0_EnAt.d.ts +5 -0
- package/dist/route-match-DMkUICYV.js +41 -0
- package/dist/route-preload-C4DlGoCd.js +120 -0
- package/dist/run-display-UjLAoYqQ.js +81 -0
- package/dist/run-history-arGiHzGU.js +285 -0
- package/dist/run-list-links-DJn4Mf1T.js +98 -0
- package/dist/run-mode-USmM0-Uo.js +82 -0
- package/dist/run-parity-CWXqEJqM.js +144 -0
- package/dist/runsQuota-B6SyTbne.js +100 -0
- package/dist/runsQuota-DsniKiSg.d.ts +20 -0
- package/dist/safe-expression-Cw7-SCsm.js +1251 -0
- package/dist/save-status-store-C7nEYpfb.js +631 -0
- package/dist/schedule-panel-B4GYXzXQ.js +13774 -0
- package/dist/schedule-rules-ggVKRkBH.js +358 -0
- package/dist/secrets-Re_wSiE3.js +153 -0
- package/dist/settings.d.ts +4 -0
- package/dist/settings.js +6 -0
- package/dist/shared-DAWGGMSM.js +177 -0
- package/dist/sidebar-node-editor-6eSSgCzc.js +178 -0
- package/dist/solar.generated-CGYuUQAC.js +10 -0
- package/dist/stableTabbedDialog-BBhrfXGe.js +20 -0
- package/dist/start-url-CT6Yz96K.js +24 -0
- package/dist/status-CessxGpm.js +55 -0
- package/dist/store-icon-OctYp5zP.js +155 -0
- package/dist/styles-WGmTnZ2n.js +26 -0
- package/dist/styles.css +139 -0
- package/dist/svg-spinners.generated-CIPT7IhM.js +10 -0
- package/dist/template-code-CzN6JWNV.js +191 -0
- package/dist/template-graph-DLF9dygU.js +20 -0
- package/dist/template-preview-DcIIKOOL.js +32 -0
- package/dist/template-price-CdUHZRMF.js +40 -0
- package/dist/templates.d.ts +3 -0
- package/dist/templates.js +5 -0
- package/dist/theme-provider-CntfC4_i.js +23 -0
- package/dist/transient-DgZfhDfN.js +57 -0
- package/dist/typed-calls-C5tO03wq.js +26 -0
- package/dist/ui-script-By74Guk3.js +1094 -0
- package/dist/ui-script-editor-CqPu2bCN.js +2447 -0
- package/dist/ui-step-fix-8uM2_Hft.js +67 -0
- package/dist/ui-step-fix-store-CcO1FdRx.js +19 -0
- package/dist/ui-step-run-context-o7bLE6KP.js +46 -0
- package/dist/ui-target-editor-D2JhB_lD.js +673 -0
- package/dist/uiMarkTools-CSznnO1i.js +1054 -0
- package/dist/upgradePrompt-BAFBKKW5.js +72 -0
- package/dist/use-bare-node-registry-O6mKJO_n.js +11498 -0
- package/dist/use-browser-available-hj8wc3Kb.js +241 -0
- package/dist/use-edge-mapper-schemas-Bonofxow.js +496 -0
- package/dist/use-extension-bridge-B9ZreOkQ.js +608 -0
- package/dist/use-mobile-BTqCUjzS.js +27 -0
- package/dist/use-sdk-query-C697xZVv.js +116 -0
- package/dist/use-workflow-code-editor-CFoRFrZ5.js +753 -0
- package/dist/useActionParam-B2tU2BlY.js +85 -0
- package/dist/useAgentTokenStream-Bko_J0d0.js +4217 -0
- package/dist/useBrowserClients-3v95-gSh.js +103 -0
- package/dist/useCodeWorkflowInsights-w0tz9Ap_.js +600 -0
- package/dist/useConnections-DsgEJs05.js +439 -0
- package/dist/useDebouncedValue-BFekcv6n.js +18 -0
- package/dist/useDurableParity-8fnMZmBc.js +1787 -0
- package/dist/useEntityTags-D0spL6Ut.js +460 -0
- package/dist/useExecutions-2u5nGJJk.js +681 -0
- package/dist/useFluidGridsAnalytics-VM8lAi2x.js +238 -0
- package/dist/useGlobalStoreClient-BTdhkA2I.js +24 -0
- package/dist/useHumanRequests-zlYDp3l1.js +221 -0
- package/dist/useNavigationV2-C2WeqN7d.js +29 -0
- package/dist/useNavigationV2-DANUmg12.d.ts +9 -0
- package/dist/useObservability-BRlQ0tOA.js +285 -0
- package/dist/useRequestedProposal-B7uPXfZB.js +51 -0
- package/dist/useRunHistory-CXCMUPyf.js +2759 -0
- package/dist/useRunLive-D0JvVZT2.js +1060 -0
- package/dist/useRunnerList-Dbi59i1K.js +446 -0
- package/dist/useRunners-URUc5quU.js +173 -0
- package/dist/useRunsPage-DG656UCK.js +2709 -0
- package/dist/useVariables-BIelxcWr.js +463 -0
- package/dist/useVersionHistoryData-CTjqVw7l.js +292 -0
- package/dist/useWorkflowCodeExport-pqxyLHD1.js +522 -0
- package/dist/useWorkflowListExport-hcZNvTaB.js +232 -0
- package/dist/useWorkflowOrganization-CpBbOrs7.js +1772 -0
- package/dist/useWorkflowProposal-BH0VdNMA.js +3280 -0
- package/dist/useWorkflows-Cvg-Z_IE.js +1606 -0
- package/dist/utils-fvBb5qOD.js +89 -0
- package/dist/webhook-deliveries-AvQujaZy.js +99 -0
- package/dist/workflow-builder-CJygVkVv.d.ts +2 -0
- package/dist/workflow-builder.d.ts +3 -0
- package/dist/workflow-builder.js +8 -0
- package/dist/workflow-code-transfer-Bsy0JKAZ.js +323 -0
- package/dist/workflow-embed.d.ts +3 -0
- package/dist/workflow-embed.js +4 -0
- package/dist/workflow-git-sync--K9ZsPDC.js +263 -0
- package/dist/workflow-host.d.ts +6 -0
- package/dist/workflow-host.js +11 -0
- package/dist/workflow-pages-D-7ByLTB.d.ts +68 -0
- package/dist/workflow-pages.d.ts +3 -0
- package/dist/workflow-pages.js +115 -0
- package/dist/workflow-preview-canvas-CO8yzdE3.js +848 -0
- package/dist/workflow-preview.d.ts +65 -0
- package/dist/workflow-preview.js +4 -0
- package/dist/workflow-route.d.ts +33 -0
- package/dist/workflow-route.js +4 -0
- package/dist/workflow-save-state-D0l-DkLf.js +767 -0
- package/dist/workflow-transfer-CQnQC-ke.js +104 -0
- package/dist/workflowRouteData-BkfVOc-O.js +169 -0
- package/dist/workflows-list.d.ts +10 -0
- package/dist/workflows-list.js +5 -0
- package/package.json +320 -4
|
@@ -0,0 +1,767 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { t as describeOperationError } from "./errors-ClKb5sEt.js";
|
|
3
|
+
import { t as ENGLISH_FALLBACK_TRANSLATOR } from "./TranslationBridge-Da-TPgQm.js";
|
|
4
|
+
import { c as errorCodesOf, l as findQuotaRefusal, s as collectExtensions } from "./quota-DeA_CJ2e.js";
|
|
5
|
+
|
|
6
|
+
// src/generated/documents/wspace/RunFromNodeDocument.ts
|
|
7
|
+
const RunFromNodeDocument = {
|
|
8
|
+
"kind": "Document",
|
|
9
|
+
"definitions": [{
|
|
10
|
+
"kind": "OperationDefinition",
|
|
11
|
+
"operation": "mutation",
|
|
12
|
+
"name": {
|
|
13
|
+
"kind": "Name",
|
|
14
|
+
"value": "RunFromNode"
|
|
15
|
+
},
|
|
16
|
+
"variableDefinitions": [{
|
|
17
|
+
"kind": "VariableDefinition",
|
|
18
|
+
"variable": {
|
|
19
|
+
"kind": "Variable",
|
|
20
|
+
"name": {
|
|
21
|
+
"kind": "Name",
|
|
22
|
+
"value": "input"
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
"type": {
|
|
26
|
+
"kind": "NonNullType",
|
|
27
|
+
"type": {
|
|
28
|
+
"kind": "NamedType",
|
|
29
|
+
"name": {
|
|
30
|
+
"kind": "Name",
|
|
31
|
+
"value": "RunFromNodeInput"
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"directives": []
|
|
36
|
+
}],
|
|
37
|
+
"directives": [],
|
|
38
|
+
"selectionSet": {
|
|
39
|
+
"kind": "SelectionSet",
|
|
40
|
+
"selections": [{
|
|
41
|
+
"kind": "Field",
|
|
42
|
+
"name": {
|
|
43
|
+
"kind": "Name",
|
|
44
|
+
"value": "runFromNode"
|
|
45
|
+
},
|
|
46
|
+
"arguments": [{
|
|
47
|
+
"kind": "Argument",
|
|
48
|
+
"name": {
|
|
49
|
+
"kind": "Name",
|
|
50
|
+
"value": "input"
|
|
51
|
+
},
|
|
52
|
+
"value": {
|
|
53
|
+
"kind": "Variable",
|
|
54
|
+
"name": {
|
|
55
|
+
"kind": "Name",
|
|
56
|
+
"value": "input"
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
}],
|
|
60
|
+
"directives": [],
|
|
61
|
+
"selectionSet": {
|
|
62
|
+
"kind": "SelectionSet",
|
|
63
|
+
"selections": [
|
|
64
|
+
{
|
|
65
|
+
"kind": "Field",
|
|
66
|
+
"name": {
|
|
67
|
+
"kind": "Name",
|
|
68
|
+
"value": "runId"
|
|
69
|
+
},
|
|
70
|
+
"arguments": [],
|
|
71
|
+
"directives": []
|
|
72
|
+
},
|
|
73
|
+
{
|
|
74
|
+
"kind": "Field",
|
|
75
|
+
"name": {
|
|
76
|
+
"kind": "Name",
|
|
77
|
+
"value": "workflowKey"
|
|
78
|
+
},
|
|
79
|
+
"arguments": [],
|
|
80
|
+
"directives": []
|
|
81
|
+
},
|
|
82
|
+
{
|
|
83
|
+
"kind": "Field",
|
|
84
|
+
"name": {
|
|
85
|
+
"kind": "Name",
|
|
86
|
+
"value": "version"
|
|
87
|
+
},
|
|
88
|
+
"arguments": [],
|
|
89
|
+
"directives": []
|
|
90
|
+
},
|
|
91
|
+
{
|
|
92
|
+
"kind": "Field",
|
|
93
|
+
"name": {
|
|
94
|
+
"kind": "Name",
|
|
95
|
+
"value": "triggerNodeId"
|
|
96
|
+
},
|
|
97
|
+
"arguments": [],
|
|
98
|
+
"directives": []
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
"kind": "Field",
|
|
102
|
+
"name": {
|
|
103
|
+
"kind": "Name",
|
|
104
|
+
"value": "status"
|
|
105
|
+
},
|
|
106
|
+
"arguments": [],
|
|
107
|
+
"directives": []
|
|
108
|
+
}
|
|
109
|
+
]
|
|
110
|
+
}
|
|
111
|
+
}]
|
|
112
|
+
}
|
|
113
|
+
}]
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
// src/generated/documents/wspace/EventRegistrationsDocument.ts
|
|
117
|
+
const EventRegistrationsDocument = {
|
|
118
|
+
"kind": "Document",
|
|
119
|
+
"definitions": [{
|
|
120
|
+
"kind": "OperationDefinition",
|
|
121
|
+
"operation": "query",
|
|
122
|
+
"name": {
|
|
123
|
+
"kind": "Name",
|
|
124
|
+
"value": "EventRegistrations"
|
|
125
|
+
},
|
|
126
|
+
"variableDefinitions": [{
|
|
127
|
+
"kind": "VariableDefinition",
|
|
128
|
+
"variable": {
|
|
129
|
+
"kind": "Variable",
|
|
130
|
+
"name": {
|
|
131
|
+
"kind": "Name",
|
|
132
|
+
"value": "workflowKey"
|
|
133
|
+
}
|
|
134
|
+
},
|
|
135
|
+
"type": {
|
|
136
|
+
"kind": "NamedType",
|
|
137
|
+
"name": {
|
|
138
|
+
"kind": "Name",
|
|
139
|
+
"value": "String"
|
|
140
|
+
}
|
|
141
|
+
},
|
|
142
|
+
"directives": []
|
|
143
|
+
}, {
|
|
144
|
+
"kind": "VariableDefinition",
|
|
145
|
+
"variable": {
|
|
146
|
+
"kind": "Variable",
|
|
147
|
+
"name": {
|
|
148
|
+
"kind": "Name",
|
|
149
|
+
"value": "status"
|
|
150
|
+
}
|
|
151
|
+
},
|
|
152
|
+
"type": {
|
|
153
|
+
"kind": "NamedType",
|
|
154
|
+
"name": {
|
|
155
|
+
"kind": "Name",
|
|
156
|
+
"value": "EventStatus"
|
|
157
|
+
}
|
|
158
|
+
},
|
|
159
|
+
"directives": []
|
|
160
|
+
}],
|
|
161
|
+
"directives": [],
|
|
162
|
+
"selectionSet": {
|
|
163
|
+
"kind": "SelectionSet",
|
|
164
|
+
"selections": [{
|
|
165
|
+
"kind": "Field",
|
|
166
|
+
"name": {
|
|
167
|
+
"kind": "Name",
|
|
168
|
+
"value": "eventRegistrations"
|
|
169
|
+
},
|
|
170
|
+
"arguments": [{
|
|
171
|
+
"kind": "Argument",
|
|
172
|
+
"name": {
|
|
173
|
+
"kind": "Name",
|
|
174
|
+
"value": "workflowKey"
|
|
175
|
+
},
|
|
176
|
+
"value": {
|
|
177
|
+
"kind": "Variable",
|
|
178
|
+
"name": {
|
|
179
|
+
"kind": "Name",
|
|
180
|
+
"value": "workflowKey"
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
}, {
|
|
184
|
+
"kind": "Argument",
|
|
185
|
+
"name": {
|
|
186
|
+
"kind": "Name",
|
|
187
|
+
"value": "status"
|
|
188
|
+
},
|
|
189
|
+
"value": {
|
|
190
|
+
"kind": "Variable",
|
|
191
|
+
"name": {
|
|
192
|
+
"kind": "Name",
|
|
193
|
+
"value": "status"
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}],
|
|
197
|
+
"directives": [],
|
|
198
|
+
"selectionSet": {
|
|
199
|
+
"kind": "SelectionSet",
|
|
200
|
+
"selections": [
|
|
201
|
+
{
|
|
202
|
+
"kind": "Field",
|
|
203
|
+
"name": {
|
|
204
|
+
"kind": "Name",
|
|
205
|
+
"value": "id"
|
|
206
|
+
},
|
|
207
|
+
"arguments": [],
|
|
208
|
+
"directives": []
|
|
209
|
+
},
|
|
210
|
+
{
|
|
211
|
+
"kind": "Field",
|
|
212
|
+
"name": {
|
|
213
|
+
"kind": "Name",
|
|
214
|
+
"value": "triggerNodeId"
|
|
215
|
+
},
|
|
216
|
+
"arguments": [],
|
|
217
|
+
"directives": []
|
|
218
|
+
},
|
|
219
|
+
{
|
|
220
|
+
"kind": "Field",
|
|
221
|
+
"name": {
|
|
222
|
+
"kind": "Name",
|
|
223
|
+
"value": "eventSource"
|
|
224
|
+
},
|
|
225
|
+
"arguments": [],
|
|
226
|
+
"directives": []
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
"kind": "Field",
|
|
230
|
+
"name": {
|
|
231
|
+
"kind": "Name",
|
|
232
|
+
"value": "eventType"
|
|
233
|
+
},
|
|
234
|
+
"arguments": [],
|
|
235
|
+
"directives": []
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
"kind": "Field",
|
|
239
|
+
"name": {
|
|
240
|
+
"kind": "Name",
|
|
241
|
+
"value": "isActive"
|
|
242
|
+
},
|
|
243
|
+
"arguments": [],
|
|
244
|
+
"directives": []
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"kind": "Field",
|
|
248
|
+
"name": {
|
|
249
|
+
"kind": "Name",
|
|
250
|
+
"value": "status"
|
|
251
|
+
},
|
|
252
|
+
"arguments": [],
|
|
253
|
+
"directives": []
|
|
254
|
+
},
|
|
255
|
+
{
|
|
256
|
+
"kind": "Field",
|
|
257
|
+
"name": {
|
|
258
|
+
"kind": "Name",
|
|
259
|
+
"value": "webhookToken"
|
|
260
|
+
},
|
|
261
|
+
"arguments": [],
|
|
262
|
+
"directives": []
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"kind": "Field",
|
|
266
|
+
"name": {
|
|
267
|
+
"kind": "Name",
|
|
268
|
+
"value": "webhookUrl"
|
|
269
|
+
},
|
|
270
|
+
"arguments": [],
|
|
271
|
+
"directives": []
|
|
272
|
+
},
|
|
273
|
+
{
|
|
274
|
+
"kind": "Field",
|
|
275
|
+
"name": {
|
|
276
|
+
"kind": "Name",
|
|
277
|
+
"value": "formUrl"
|
|
278
|
+
},
|
|
279
|
+
"arguments": [],
|
|
280
|
+
"directives": []
|
|
281
|
+
},
|
|
282
|
+
{
|
|
283
|
+
"kind": "Field",
|
|
284
|
+
"name": {
|
|
285
|
+
"kind": "Name",
|
|
286
|
+
"value": "totalTriggers"
|
|
287
|
+
},
|
|
288
|
+
"arguments": [],
|
|
289
|
+
"directives": []
|
|
290
|
+
},
|
|
291
|
+
{
|
|
292
|
+
"kind": "Field",
|
|
293
|
+
"name": {
|
|
294
|
+
"kind": "Name",
|
|
295
|
+
"value": "lastTriggeredAt"
|
|
296
|
+
},
|
|
297
|
+
"arguments": [],
|
|
298
|
+
"directives": []
|
|
299
|
+
},
|
|
300
|
+
{
|
|
301
|
+
"kind": "Field",
|
|
302
|
+
"name": {
|
|
303
|
+
"kind": "Name",
|
|
304
|
+
"value": "handshakeSecretCaptured"
|
|
305
|
+
},
|
|
306
|
+
"arguments": [],
|
|
307
|
+
"directives": []
|
|
308
|
+
},
|
|
309
|
+
{
|
|
310
|
+
"kind": "Field",
|
|
311
|
+
"name": {
|
|
312
|
+
"kind": "Name",
|
|
313
|
+
"value": "subscriptionState"
|
|
314
|
+
},
|
|
315
|
+
"arguments": [],
|
|
316
|
+
"directives": [],
|
|
317
|
+
"selectionSet": {
|
|
318
|
+
"kind": "SelectionSet",
|
|
319
|
+
"selections": [
|
|
320
|
+
{
|
|
321
|
+
"kind": "Field",
|
|
322
|
+
"name": {
|
|
323
|
+
"kind": "Name",
|
|
324
|
+
"value": "status"
|
|
325
|
+
},
|
|
326
|
+
"arguments": [],
|
|
327
|
+
"directives": []
|
|
328
|
+
},
|
|
329
|
+
{
|
|
330
|
+
"kind": "Field",
|
|
331
|
+
"name": {
|
|
332
|
+
"kind": "Name",
|
|
333
|
+
"value": "attempts"
|
|
334
|
+
},
|
|
335
|
+
"arguments": [],
|
|
336
|
+
"directives": []
|
|
337
|
+
},
|
|
338
|
+
{
|
|
339
|
+
"kind": "Field",
|
|
340
|
+
"name": {
|
|
341
|
+
"kind": "Name",
|
|
342
|
+
"value": "lastAttemptAt"
|
|
343
|
+
},
|
|
344
|
+
"arguments": [],
|
|
345
|
+
"directives": []
|
|
346
|
+
},
|
|
347
|
+
{
|
|
348
|
+
"kind": "Field",
|
|
349
|
+
"name": {
|
|
350
|
+
"kind": "Name",
|
|
351
|
+
"value": "nextAttemptAt"
|
|
352
|
+
},
|
|
353
|
+
"arguments": [],
|
|
354
|
+
"directives": []
|
|
355
|
+
},
|
|
356
|
+
{
|
|
357
|
+
"kind": "Field",
|
|
358
|
+
"name": {
|
|
359
|
+
"kind": "Name",
|
|
360
|
+
"value": "expiresAt"
|
|
361
|
+
},
|
|
362
|
+
"arguments": [],
|
|
363
|
+
"directives": []
|
|
364
|
+
},
|
|
365
|
+
{
|
|
366
|
+
"kind": "Field",
|
|
367
|
+
"name": {
|
|
368
|
+
"kind": "Name",
|
|
369
|
+
"value": "message"
|
|
370
|
+
},
|
|
371
|
+
"arguments": [],
|
|
372
|
+
"directives": []
|
|
373
|
+
}
|
|
374
|
+
]
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
]
|
|
378
|
+
}
|
|
379
|
+
}]
|
|
380
|
+
}
|
|
381
|
+
}]
|
|
382
|
+
};
|
|
383
|
+
|
|
384
|
+
// src/modules/isolation/utils/errors.ts
|
|
385
|
+
/**
|
|
386
|
+
* The refusals of an isolation change, as inline messages (BOFF-16856, spec 17 §6.5, §15.1).
|
|
387
|
+
*
|
|
388
|
+
* - `ISOLATION_BELOW_MINIMUM`: a definition save set a level weaker than the workspace minimum.
|
|
389
|
+
* - `ISOLATION_LOCKED`: a definition save changed a level while the workspace policy is locked and
|
|
390
|
+
* the caller may not delete workflows.
|
|
391
|
+
* - `FEATURE_DISABLED` (policy saves only): the levels are not available to the workspace.
|
|
392
|
+
* - `BAD_USER_INPUT` with `field: "minimumLevel"` (policy saves only): a minimum stronger than the
|
|
393
|
+
* default.
|
|
394
|
+
*
|
|
395
|
+
* Other errors return null, so callers keep their usual message.
|
|
396
|
+
*/
|
|
397
|
+
/** The message for a definition save the service refused for isolation, or null. */
|
|
398
|
+
function isolationSaveErrorMessage(error, tr) {
|
|
399
|
+
const codes = errorCodesOf(error);
|
|
400
|
+
if (codes.includes("ISOLATION_BELOW_MINIMUM")) return tr("fluidgrids.isolation.errors.belowMinimum", "An isolation level in this workflow is weaker than the workspace minimum. Choose a stronger level, or ask a workspace admin to change the minimum.");
|
|
401
|
+
if (codes.includes("ISOLATION_LOCKED")) return tr("fluidgrids.isolation.errors.locked", "The workspace's isolation policy is locked. Only people who can delete workflows can change isolation levels.");
|
|
402
|
+
return null;
|
|
403
|
+
}
|
|
404
|
+
/** The message for a refused workspace policy save, or null for any other error. */
|
|
405
|
+
function isolationPolicyErrorMessage(error, tr) {
|
|
406
|
+
if (errorCodesOf(error).includes("FEATURE_DISABLED")) return tr("fluidgrids.isolation.errors.unavailable", "Isolation levels are not available for this workspace yet.");
|
|
407
|
+
if (collectExtensions(error).some((extensions) => extensions.code === "BAD_USER_INPUT" && extensions.field === "minimumLevel")) return tr("fluidgrids.isolation.errors.minimumAboveDefault", "The minimum cannot be stronger than the default. Raise the default first.");
|
|
408
|
+
return isolationSaveErrorMessage(error, tr);
|
|
409
|
+
}
|
|
410
|
+
/**
|
|
411
|
+
* The description of a failed execution-settings save: the isolation refusal in plain words, else
|
|
412
|
+
* the error's own message.
|
|
413
|
+
*/
|
|
414
|
+
function executionSaveErrorText(error, tr) {
|
|
415
|
+
return isolationSaveErrorMessage(error, tr) ?? (error instanceof Error ? error.message : void 0);
|
|
416
|
+
}
|
|
417
|
+
|
|
418
|
+
// src/builder/lib/workflow-save-state.ts
|
|
419
|
+
/**
|
|
420
|
+
* Pure pieces of builder autosave (BOFF-9724): what counts as an unsaved
|
|
421
|
+
* change, how saves queue, which failures are worth retrying, and whether a
|
|
422
|
+
* workflow may be saved without being asked.
|
|
423
|
+
*
|
|
424
|
+
* Kept free of React and the store so they run under `bun test` with no DOM.
|
|
425
|
+
*/
|
|
426
|
+
/**
|
|
427
|
+
* Fields React Flow (or the canvas) writes on its own: selection, drag and
|
|
428
|
+
* resize flags, and the measured size. None of them is an edit, so a click
|
|
429
|
+
* or the first render after loading must not mark the workflow unsaved.
|
|
430
|
+
*/
|
|
431
|
+
const VOLATILE_NODE_KEYS = /* @__PURE__ */ new Set([
|
|
432
|
+
"selected",
|
|
433
|
+
"dragging",
|
|
434
|
+
"resizing",
|
|
435
|
+
"measured",
|
|
436
|
+
"positionAbsolute"
|
|
437
|
+
]);
|
|
438
|
+
/**
|
|
439
|
+
* `hidden` is "Hide connections", a way of looking at the canvas (BOFF-18043):
|
|
440
|
+
* toggling it saved the workflow as if it had been edited.
|
|
441
|
+
*/
|
|
442
|
+
const VOLATILE_EDGE_KEYS = /* @__PURE__ */ new Set(["selected", "hidden"]);
|
|
443
|
+
/**
|
|
444
|
+
* An edge as the fingerprint reads it. An edge gets an empty `conditions`
|
|
445
|
+
* list from the canvas when it is first drawn (custom-deletable-edge.tsx), and
|
|
446
|
+
* that can be well after the load, when its steps are measured late; an empty
|
|
447
|
+
* list and no list save the same thing, so neither counts as a change.
|
|
448
|
+
*/
|
|
449
|
+
function fingerprintEdge(edge) {
|
|
450
|
+
const stable = withoutKeys(edge, VOLATILE_EDGE_KEYS);
|
|
451
|
+
const { conditions } = stable;
|
|
452
|
+
return Array.isArray(conditions) && conditions.length === 0 ? withoutKeys(stable, /* @__PURE__ */ new Set(["conditions"])) : stable;
|
|
453
|
+
}
|
|
454
|
+
function withoutKeys(value, keys) {
|
|
455
|
+
return Object.fromEntries(Object.entries(value).filter(([key]) => !keys.has(key)));
|
|
456
|
+
}
|
|
457
|
+
/** JSON with object keys sorted, so key order never changes the result. */
|
|
458
|
+
function stableStringify(value) {
|
|
459
|
+
return JSON.stringify(value, (_key, inner) => {
|
|
460
|
+
if (inner && typeof inner === "object" && !Array.isArray(inner)) return Object.fromEntries(Object.entries(inner).sort(([a], [b]) => a < b ? -1 : a > b ? 1 : 0));
|
|
461
|
+
return inner;
|
|
462
|
+
});
|
|
463
|
+
}
|
|
464
|
+
/** cyrb53: a fast 53-bit string hash, so a fingerprint stays small. */
|
|
465
|
+
function hash53(text) {
|
|
466
|
+
let h1 = 3735928559;
|
|
467
|
+
let h2 = 1103547991;
|
|
468
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
469
|
+
const ch = text.charCodeAt(i);
|
|
470
|
+
h1 = Math.imul(h1 ^ ch, 2654435761);
|
|
471
|
+
h2 = Math.imul(h2 ^ ch, 1597334677);
|
|
472
|
+
}
|
|
473
|
+
h1 = Math.imul(h1 ^ h1 >>> 16, 2246822507);
|
|
474
|
+
h1 ^= Math.imul(h2 ^ h2 >>> 13, 3266489909);
|
|
475
|
+
h2 = Math.imul(h2 ^ h2 >>> 16, 2246822507);
|
|
476
|
+
h2 ^= Math.imul(h1 ^ h1 >>> 13, 3266489909);
|
|
477
|
+
return (4294967296 * (2097151 & h2) + (h1 >>> 0)).toString(36);
|
|
478
|
+
}
|
|
479
|
+
/**
|
|
480
|
+
* A short fingerprint of what a save would write. Two workflows with the same
|
|
481
|
+
* fingerprint save the same definition; sticky notes count, since they live
|
|
482
|
+
* among the canvas nodes. A blank alias and no alias are the same thing.
|
|
483
|
+
*/
|
|
484
|
+
function workflowFingerprint(workflow) {
|
|
485
|
+
return hash53(stableStringify({
|
|
486
|
+
name: workflow.name ?? "",
|
|
487
|
+
alias: workflow.alias?.trim() ?? "",
|
|
488
|
+
nodes: workflow.nodes.map((n) => withoutKeys(n, VOLATILE_NODE_KEYS)),
|
|
489
|
+
edges: workflow.edges.map(fingerprintEdge)
|
|
490
|
+
}));
|
|
491
|
+
}
|
|
492
|
+
/**
|
|
493
|
+
* The build a version runs, from its stored `definitionJson.code.buildId`
|
|
494
|
+
* (spec code-first 01 §5), or undefined for a version that runs no code.
|
|
495
|
+
* Read the way the service reads it, so the builder and the service agree on
|
|
496
|
+
* which versions are immutable.
|
|
497
|
+
*/
|
|
498
|
+
function codeBuildIdOf(definitionJson) {
|
|
499
|
+
if (typeof definitionJson !== "object" || definitionJson === null || Array.isArray(definitionJson)) return;
|
|
500
|
+
const code = definitionJson.code;
|
|
501
|
+
if (typeof code !== "object" || code === null || Array.isArray(code)) return;
|
|
502
|
+
const buildId = code.buildId;
|
|
503
|
+
return typeof buildId === "string" && buildId !== "" ? buildId : void 0;
|
|
504
|
+
}
|
|
505
|
+
/**
|
|
506
|
+
* Whether a save writes the open version in place. Only a stored draft that
|
|
507
|
+
* runs no code is changed in place. A version that runs code is immutable
|
|
508
|
+
* (spec code-first 06 §1: the service refuses an in-place change with "create
|
|
509
|
+
* a new version"), and an active or archived version is kept as it was; both
|
|
510
|
+
* keep edits as a new draft version instead.
|
|
511
|
+
*/
|
|
512
|
+
function savesInPlace(workflow) {
|
|
513
|
+
return !!workflow.dbId && (!workflow.status || workflow.status === "DRAFT") && !workflow.codeBuildId;
|
|
514
|
+
}
|
|
515
|
+
/**
|
|
516
|
+
* Only a version that saves in place is saved without being asked. Any other
|
|
517
|
+
* save creates a new draft version and reopens the editor on it, so doing
|
|
518
|
+
* that on every edit would pile up versions and wipe undo history.
|
|
519
|
+
*/
|
|
520
|
+
function canAutosave(workflow) {
|
|
521
|
+
return savesInPlace(workflow);
|
|
522
|
+
}
|
|
523
|
+
/** Delays before each retry of a failed autosave; then it stops and says so. */
|
|
524
|
+
const AUTOSAVE_RETRY_DELAYS_MS = [
|
|
525
|
+
2e3,
|
|
526
|
+
5e3,
|
|
527
|
+
15e3
|
|
528
|
+
];
|
|
529
|
+
/** Quiet time after the last edit before an autosave starts. */
|
|
530
|
+
const AUTOSAVE_DEBOUNCE_MS = 2e3;
|
|
531
|
+
/**
|
|
532
|
+
* Error codes that mean "the same request will fail again": the input, the
|
|
533
|
+
* caller's rights or the workflow's state is wrong, not the network.
|
|
534
|
+
*/
|
|
535
|
+
const PERMANENT_ERROR_CODES = /* @__PURE__ */ new Set([
|
|
536
|
+
"BAD_USER_INPUT",
|
|
537
|
+
"GRAPHQL_VALIDATION_FAILED",
|
|
538
|
+
"GRAPHQL_PARSE_FAILED",
|
|
539
|
+
"UNAUTHENTICATED",
|
|
540
|
+
"FORBIDDEN",
|
|
541
|
+
"NOT_FOUND",
|
|
542
|
+
"FAILED_PRECONDITION",
|
|
543
|
+
"CONFLICT",
|
|
544
|
+
"ISOLATION_BELOW_MINIMUM",
|
|
545
|
+
"ISOLATION_LOCKED"
|
|
546
|
+
]);
|
|
547
|
+
function textOf(value) {
|
|
548
|
+
return typeof value === "string" && value.length > 0 ? value : null;
|
|
549
|
+
}
|
|
550
|
+
/** The conflict a refused save carries, or null when it was refused for another reason. */
|
|
551
|
+
function findSaveConflict(error) {
|
|
552
|
+
const extensions = collectExtensions(error).find((ext) => ext.code === "CONFLICT" && (ext.reason === "STALE_REVISION" || ext.reason === "EDIT_LEASE_HELD"));
|
|
553
|
+
if (!extensions) return null;
|
|
554
|
+
const revision = extensions.currentRevision;
|
|
555
|
+
return {
|
|
556
|
+
reason: extensions.reason,
|
|
557
|
+
currentRevision: typeof revision === "number" && Number.isFinite(revision) ? revision : null,
|
|
558
|
+
currentStatus: textOf(extensions.currentStatus),
|
|
559
|
+
updatedById: textOf(extensions.updatedById),
|
|
560
|
+
holderActorId: textOf(extensions.holderActorId)
|
|
561
|
+
};
|
|
562
|
+
}
|
|
563
|
+
/** Whether a failed save is worth retrying on its own. */
|
|
564
|
+
function classifySaveFailure(error) {
|
|
565
|
+
if (findQuotaRefusal(error)) return "quota";
|
|
566
|
+
if (findSaveConflict(error)) return "conflict";
|
|
567
|
+
if (errorCodesOf(error).some((code) => PERMANENT_ERROR_CODES.has(code))) return "permanent";
|
|
568
|
+
return "transient";
|
|
569
|
+
}
|
|
570
|
+
/**
|
|
571
|
+
* Read a failed save into what the editor shows about it.
|
|
572
|
+
*
|
|
573
|
+
* The message is the server's own: an Apollo 4 `ServerError` (the gateway's
|
|
574
|
+
* 429 quota refusal, any non-2xx GraphQL answer) only says "Response not
|
|
575
|
+
* successful: Received status code …", so the GraphQL error in its body is
|
|
576
|
+
* read instead (`describeOperationError`). The quota refusal and the conflict
|
|
577
|
+
* are looked up across the error and its `cause`, which is where
|
|
578
|
+
* `throwIfResultError` keeps the original.
|
|
579
|
+
*/
|
|
580
|
+
function saveFailureOf(error, tr = ENGLISH_FALLBACK_TRANSLATOR) {
|
|
581
|
+
const quota = findQuotaRefusal(error);
|
|
582
|
+
const conflict = findSaveConflict(error);
|
|
583
|
+
return {
|
|
584
|
+
message: isolationSaveErrorMessage(error, tr) ?? describeOperationError(error),
|
|
585
|
+
kind: classifySaveFailure(error),
|
|
586
|
+
...conflict ? { conflict } : {},
|
|
587
|
+
...quota ? { quota } : {}
|
|
588
|
+
};
|
|
589
|
+
}
|
|
590
|
+
/**
|
|
591
|
+
* Whether a failed save gets an error toast. A quota refusal is explained by
|
|
592
|
+
* the plan dialog and a conflict by the conflict dialog or the edit-lease
|
|
593
|
+
* banner; an autosave reports only in the header's save state.
|
|
594
|
+
*/
|
|
595
|
+
function toastsSaveFailure(failure, silent) {
|
|
596
|
+
return !silent && failure.kind !== "quota" && failure.kind !== "conflict";
|
|
597
|
+
}
|
|
598
|
+
function saveFailureActionOf(failure) {
|
|
599
|
+
if (failure.conflict?.reason === "STALE_REVISION") return "resolve";
|
|
600
|
+
if (failure.quota) return "view-plans";
|
|
601
|
+
if (failure.kind === "transient") return "retry";
|
|
602
|
+
return "none";
|
|
603
|
+
}
|
|
604
|
+
/**
|
|
605
|
+
* One save at a time for the whole editor. A save asked for while another is
|
|
606
|
+
* running waits its turn. Queued saves of the same workflow (`key`, the load
|
|
607
|
+
* generation it was taken from) collapse into one that runs with the newest
|
|
608
|
+
* request's task, and every caller that asked gets that save's result; saves
|
|
609
|
+
* of different workflows never collapse, so leaving one workflow and opening
|
|
610
|
+
* another still saves the first. Two clicks therefore never send two
|
|
611
|
+
* overlapping writes, and an edit made during a save is still saved.
|
|
612
|
+
*/
|
|
613
|
+
function createSaveQueue() {
|
|
614
|
+
let running = false;
|
|
615
|
+
const queued = [];
|
|
616
|
+
async function drain(task) {
|
|
617
|
+
running = true;
|
|
618
|
+
try {
|
|
619
|
+
return await task().catch(() => false);
|
|
620
|
+
} finally {
|
|
621
|
+
running = false;
|
|
622
|
+
const next = queued.shift();
|
|
623
|
+
if (next) drain(next.task).then((saved) => next.waiters.forEach((resolve) => resolve(saved)));
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
return {
|
|
627
|
+
run(task, key) {
|
|
628
|
+
if (!running) return drain(task);
|
|
629
|
+
return new Promise((resolve) => {
|
|
630
|
+
const last = queued[queued.length - 1];
|
|
631
|
+
if (last && last.key === key) {
|
|
632
|
+
last.task = task;
|
|
633
|
+
last.waiters.push(resolve);
|
|
634
|
+
} else queued.push({
|
|
635
|
+
key,
|
|
636
|
+
task,
|
|
637
|
+
waiters: [resolve]
|
|
638
|
+
});
|
|
639
|
+
});
|
|
640
|
+
},
|
|
641
|
+
get busy() {
|
|
642
|
+
return running;
|
|
643
|
+
}
|
|
644
|
+
};
|
|
645
|
+
}
|
|
646
|
+
/** Top-level `definitionJson` keys the builder writes on every save. */
|
|
647
|
+
const BUILDER_OWNED_DEFINITION_KEYS = [
|
|
648
|
+
"key",
|
|
649
|
+
"name",
|
|
650
|
+
"description",
|
|
651
|
+
"workflow_type",
|
|
652
|
+
"data",
|
|
653
|
+
"meta",
|
|
654
|
+
"tags"
|
|
655
|
+
];
|
|
656
|
+
function isPlainRecord(value) {
|
|
657
|
+
return typeof value === "object" && value !== null && !Array.isArray(value);
|
|
658
|
+
}
|
|
659
|
+
/**
|
|
660
|
+
* The `definitionJson` a save writes: what the builder owns (the canvas under
|
|
661
|
+
* `data`, plus key/name/meta/tags) laid over the stored definition, so
|
|
662
|
+
* everything else survives the save. That matters for `config`, where the
|
|
663
|
+
* Settings page keeps the timeout, error workflow, data saving and retention,
|
|
664
|
+
* and for any `data` field the canvas does not hold.
|
|
665
|
+
*/
|
|
666
|
+
function mergeDefinitionJson(existing, owned) {
|
|
667
|
+
const stored = isPlainRecord(existing) ? existing : {};
|
|
668
|
+
const kept = Object.fromEntries(Object.entries(stored).filter(([key]) => !BUILDER_OWNED_DEFINITION_KEYS.includes(key)));
|
|
669
|
+
const storedData = isPlainRecord(stored.data) ? stored.data : {};
|
|
670
|
+
return {
|
|
671
|
+
...kept,
|
|
672
|
+
...owned,
|
|
673
|
+
data: {
|
|
674
|
+
...storedData,
|
|
675
|
+
...owned.data
|
|
676
|
+
}
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
/** localStorage key of the per-browser "Auto-save drafts" preference. */
|
|
680
|
+
const AUTOSAVE_PREFERENCE_KEY = "fluidgrids.builder.autosaveDrafts";
|
|
681
|
+
/**
|
|
682
|
+
* Whether drafts save themselves. On unless the person turned it off; a
|
|
683
|
+
* storage that cannot be read (private window, blocked site data) keeps it on.
|
|
684
|
+
*/
|
|
685
|
+
function readAutosavePreference(storage) {
|
|
686
|
+
try {
|
|
687
|
+
return storage?.getItem(AUTOSAVE_PREFERENCE_KEY) !== "false";
|
|
688
|
+
} catch {
|
|
689
|
+
return true;
|
|
690
|
+
}
|
|
691
|
+
}
|
|
692
|
+
/** Remember the choice; false when it could not be stored. */
|
|
693
|
+
function writeAutosavePreference(storage, enabled) {
|
|
694
|
+
try {
|
|
695
|
+
if (!storage) return false;
|
|
696
|
+
storage.setItem(AUTOSAVE_PREFERENCE_KEY, enabled ? "true" : "false");
|
|
697
|
+
return true;
|
|
698
|
+
} catch {
|
|
699
|
+
return false;
|
|
700
|
+
}
|
|
701
|
+
}
|
|
702
|
+
/**
|
|
703
|
+
* Whether leaving the editor needs the person's say-so. A draft that can
|
|
704
|
+
* save itself is saved on the way out instead; anything else with unsaved
|
|
705
|
+
* changes (an active version, autosave off, an incomplete flow, a failed
|
|
706
|
+
* save) would lose them.
|
|
707
|
+
*/
|
|
708
|
+
function leaveNeedsConfirmation(state) {
|
|
709
|
+
return state.dirty && (!state.autosaveAllowed || state.incomplete || state.failed);
|
|
710
|
+
}
|
|
711
|
+
function runPreparationOf(state) {
|
|
712
|
+
if (!state.dirty) return "run";
|
|
713
|
+
return leaveNeedsConfirmation(state) ? "confirm" : "save-first";
|
|
714
|
+
}
|
|
715
|
+
/**
|
|
716
|
+
* The in-app path a link click goes to, or null when the click is not an
|
|
717
|
+
* in-app navigation away from the current page (another origin, a new tab,
|
|
718
|
+
* a download, the same page, or a modified click the browser handles).
|
|
719
|
+
*/
|
|
720
|
+
function inAppLeaveTarget(link, click, location) {
|
|
721
|
+
if (click.button !== 0 || click.modified) return null;
|
|
722
|
+
if (link.download) return null;
|
|
723
|
+
if (link.target && link.target !== "_self") return null;
|
|
724
|
+
let url;
|
|
725
|
+
try {
|
|
726
|
+
url = new URL(link.href, location.origin);
|
|
727
|
+
} catch {
|
|
728
|
+
return null;
|
|
729
|
+
}
|
|
730
|
+
if (url.origin !== location.origin) return null;
|
|
731
|
+
if (url.pathname === location.pathname) return null;
|
|
732
|
+
return `${url.pathname}${url.search}${url.hash}`;
|
|
733
|
+
}
|
|
734
|
+
/**
|
|
735
|
+
* The baseline with its settle window open again, after the node registry
|
|
736
|
+
* redrew the canvas (BOFF-11754). The canvas is drawn before every node type
|
|
737
|
+
* on it is registered: an installed store node read after the workflow
|
|
738
|
+
* arrived, or one installed from the missing-nodes dialog, swaps its card for
|
|
739
|
+
* the real one, which measures and normalises itself as right after a load.
|
|
740
|
+
* Until the person edits (`editRevision` unchanged since the load), that is
|
|
741
|
+
* the canvas settling, not unsaved work. Null keeps the baseline as it is: no
|
|
742
|
+
* baseline, one from another load, or one taken after a save or an edit.
|
|
743
|
+
*/
|
|
744
|
+
function resettledBaseline(baseline, current, now, settleMs) {
|
|
745
|
+
if (!baseline || baseline.generation !== current.generation) return null;
|
|
746
|
+
if (baseline.editRevision === void 0 || baseline.editRevision !== current.editRevision) return null;
|
|
747
|
+
return {
|
|
748
|
+
...baseline,
|
|
749
|
+
settleUntil: Math.max(baseline.settleUntil ?? 0, now + settleMs)
|
|
750
|
+
};
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Compare the canvas with the baseline (what was loaded or last saved).
|
|
754
|
+
*
|
|
755
|
+
* "settling": it differs, but only through changes the canvas made on its own
|
|
756
|
+
* right after the load (no edit since, and the settle window is still open),
|
|
757
|
+
* so the baseline should move instead. A baseline from another load
|
|
758
|
+
* generation says nothing about this canvas: "clean".
|
|
759
|
+
*/
|
|
760
|
+
function editStateOf(baseline, current, now) {
|
|
761
|
+
if (!baseline || baseline.generation !== current.generation) return "clean";
|
|
762
|
+
if (current.fingerprint === baseline.fingerprint) return "clean";
|
|
763
|
+
if (baseline.settleUntil !== void 0 && now < baseline.settleUntil && current.editRevision === baseline.editRevision) return "settling";
|
|
764
|
+
return "dirty";
|
|
765
|
+
}
|
|
766
|
+
|
|
767
|
+
export { isolationSaveErrorMessage as C, isolationPolicyErrorMessage as S, RunFromNodeDocument as T, savesInPlace as _, codeBuildIdOf as a, writeAutosavePreference as b, findSaveConflict as c, mergeDefinitionJson as d, readAutosavePreference as f, saveFailureOf as g, saveFailureActionOf as h, canAutosave as i, inAppLeaveTarget as l, runPreparationOf as m, AUTOSAVE_PREFERENCE_KEY as n, createSaveQueue as o, resettledBaseline as p, AUTOSAVE_RETRY_DELAYS_MS as r, editStateOf as s, AUTOSAVE_DEBOUNCE_MS as t, leaveNeedsConfirmation as u, toastsSaveFailure as v, EventRegistrationsDocument as w, executionSaveErrorText as x, workflowFingerprint as y };
|