@dxos/plugin-automation 0.8.4-main.8360d9e660 → 0.8.4-main.8baae0fced
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/LICENSE +102 -5
- package/README.md +1 -1
- package/dist/lib/neutral/AutomationPanel-GQCS4EPU.mjs +11 -0
- package/dist/lib/neutral/AutomationPlugin.mjs +10 -0
- package/dist/lib/{browser/cli/index.mjs → neutral/AutomationPlugin.node.mjs} +126 -130
- package/dist/lib/neutral/AutomationPlugin.node.mjs.map +7 -0
- package/dist/lib/neutral/AutomationPlugin.workerd.mjs +23 -0
- package/dist/lib/neutral/AutomationPlugin.workerd.mjs.map +7 -0
- package/dist/lib/neutral/AutomationSettings-F6AZQV74.mjs +31 -0
- package/dist/lib/neutral/AutomationSettings-F6AZQV74.mjs.map +7 -0
- package/dist/lib/neutral/FunctionsContainer-2ETGQQR2.mjs +38 -0
- package/dist/lib/neutral/FunctionsContainer-2ETGQQR2.mjs.map +7 -0
- package/dist/lib/{browser/chunk-75XLBFAG.mjs → neutral/FunctionsPanel-SVRKRUXZ.mjs} +22 -22
- package/dist/lib/neutral/FunctionsPanel-SVRKRUXZ.mjs.map +7 -0
- package/dist/lib/{browser/chunk-FUVAC5EC.mjs → neutral/FunctionsRegistry-7ITCFJCW.mjs} +24 -25
- package/dist/lib/neutral/FunctionsRegistry-7ITCFJCW.mjs.map +7 -0
- package/dist/lib/neutral/TriggerSettings-XCHIZPOR.mjs +9 -0
- package/dist/lib/neutral/app-graph-builder-4QOUKY5L.mjs +75 -0
- package/dist/lib/neutral/app-graph-builder-4QOUKY5L.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/index.mjs +15 -0
- package/dist/lib/neutral/capabilities/index.mjs.map +7 -0
- package/dist/lib/neutral/capabilities/node.mjs +13 -0
- package/dist/lib/neutral/capabilities/node.mjs.map +7 -0
- package/dist/lib/neutral/chunk-2JP77CMN.mjs +42 -0
- package/dist/lib/neutral/chunk-2JP77CMN.mjs.map +7 -0
- package/dist/lib/{browser/chunk-EL64ZPPN.mjs → neutral/chunk-4ETZEEYR.mjs} +7 -3
- package/dist/lib/neutral/chunk-4ETZEEYR.mjs.map +7 -0
- package/dist/lib/{browser/chunk-O23LHDEX.mjs → neutral/chunk-EIIPEUUP.mjs} +60 -26
- package/dist/lib/neutral/chunk-EIIPEUUP.mjs.map +7 -0
- package/dist/lib/neutral/chunk-HRUXURVS.mjs +12 -0
- package/dist/lib/neutral/chunk-HRUXURVS.mjs.map +7 -0
- package/dist/lib/neutral/chunk-J5LGTIGS.mjs +10 -0
- package/dist/lib/{browser/chunk-BWEKRPFJ.mjs → neutral/chunk-K3C5ZTZA.mjs} +29 -38
- package/dist/lib/neutral/chunk-K3C5ZTZA.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VCWVO3JE.mjs +8 -0
- package/dist/lib/neutral/chunk-VCWVO3JE.mjs.map +7 -0
- package/dist/lib/neutral/chunk-VRGWNUVV.mjs +36 -0
- package/dist/lib/neutral/chunk-VRGWNUVV.mjs.map +7 -0
- package/dist/lib/neutral/chunk-YA2ZTSOH.mjs +73 -0
- package/dist/lib/neutral/chunk-YA2ZTSOH.mjs.map +7 -0
- package/dist/lib/neutral/components/index.mjs +16 -0
- package/dist/lib/neutral/containers/index.mjs +13 -0
- package/dist/lib/neutral/containers/index.mjs.map +7 -0
- package/dist/lib/neutral/create-trigger-from-template-XAJWHKO2.mjs +68 -0
- package/dist/lib/neutral/create-trigger-from-template-XAJWHKO2.mjs.map +7 -0
- package/dist/lib/neutral/hooks/index.mjs +47 -0
- package/dist/lib/neutral/hooks/index.mjs.map +7 -0
- package/dist/lib/neutral/index.mjs +16 -0
- package/dist/lib/neutral/layer-specs-XLG75KLY.mjs +161 -0
- package/dist/lib/neutral/layer-specs-XLG75KLY.mjs.map +7 -0
- package/dist/lib/neutral/meta.json +1 -0
- package/dist/lib/neutral/meta.mjs +8 -0
- package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs +13 -0
- package/dist/lib/neutral/operation-handler-YXGYH5W5.mjs.map +7 -0
- package/dist/lib/neutral/operations/index.mjs +8 -0
- package/dist/lib/neutral/plugin.mjs +16 -0
- package/dist/lib/neutral/plugin.mjs.map +7 -0
- package/dist/lib/neutral/react-surface-3OGMAMKV.mjs +57 -0
- package/dist/lib/neutral/react-surface-3OGMAMKV.mjs.map +7 -0
- package/dist/lib/neutral/testing.mjs +8 -0
- package/dist/lib/neutral/translations.mjs +47 -0
- package/dist/lib/neutral/translations.mjs.map +7 -0
- package/dist/lib/neutral/types/index.mjs +12 -0
- package/dist/types/src/AutomationPlugin.d.ts +1 -0
- package/dist/types/src/AutomationPlugin.d.ts.map +1 -1
- package/dist/types/src/{cli/plugin.d.ts → AutomationPlugin.node.d.ts} +2 -1
- package/dist/types/src/AutomationPlugin.node.d.ts.map +1 -0
- package/dist/types/src/AutomationPlugin.test.d.ts +2 -0
- package/dist/types/src/AutomationPlugin.test.d.ts.map +1 -0
- package/dist/types/src/AutomationPlugin.workerd.d.ts +4 -0
- package/dist/types/src/AutomationPlugin.workerd.d.ts.map +1 -0
- package/dist/types/src/capabilities/app-graph-builder.d.ts.map +1 -0
- package/dist/types/src/capabilities/index.d.ts +6 -4
- package/dist/types/src/capabilities/index.d.ts.map +1 -1
- package/dist/types/src/capabilities/layer-specs.d.ts +5 -0
- package/dist/types/src/capabilities/layer-specs.d.ts.map +1 -0
- package/dist/types/src/capabilities/node.d.ts +6 -0
- package/dist/types/src/capabilities/node.d.ts.map +1 -0
- package/dist/types/src/capabilities/operation-handler.d.ts +6 -0
- package/dist/types/src/capabilities/operation-handler.d.ts.map +1 -0
- package/dist/types/src/capabilities/react-surface.d.ts.map +1 -0
- package/dist/types/src/commands/index.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/create/index.d.ts +6 -6
- package/dist/types/src/commands/trigger/create/index.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/create/queue.d.ts +1 -1
- package/dist/types/src/commands/trigger/create/queue.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/create/subscription.d.ts +1 -1
- package/dist/types/src/commands/trigger/create/subscription.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/create/timer.d.ts +1 -1
- package/dist/types/src/commands/trigger/create/timer.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/index.d.ts +7 -7
- package/dist/types/src/commands/trigger/index.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/list.d.ts +1 -1
- package/dist/types/src/commands/trigger/list.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/options.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/remove.d.ts +1 -1
- package/dist/types/src/commands/trigger/remove.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/update/index.d.ts +5 -5
- package/dist/types/src/commands/trigger/update/index.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/queue.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/subscription.d.ts.map +1 -0
- package/dist/types/src/commands/trigger/update/timer.d.ts.map +1 -0
- package/dist/types/src/{cli/commands → commands}/trigger/util.d.ts +4 -4
- package/dist/types/src/commands/trigger/util.d.ts.map +1 -0
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts +32 -32
- package/dist/types/src/components/AutomationPanel/AutomationPanel.stories.d.ts.map +1 -1
- package/dist/types/src/components/AutomationPanel/index.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/FunctionsPanel.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsPanel/index.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsRegistry/FunctionsRegistry.d.ts.map +1 -1
- package/dist/types/src/components/FunctionsRegistry/index.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts +6 -6
- package/dist/types/src/components/TriggerEditor/FunctionInputEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts +4 -4
- package/dist/types/src/components/TriggerEditor/SpecSelector.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.d.ts.map +1 -1
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts +95 -93
- package/dist/types/src/components/TriggerEditor/TriggerEditor.stories.d.ts.map +1 -1
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts +3 -1
- package/dist/types/src/containers/AutomationSettings/AutomationSettings.d.ts.map +1 -1
- package/dist/types/src/containers/AutomationSettings/index.d.ts +1 -2
- package/dist/types/src/containers/AutomationSettings/index.d.ts.map +1 -1
- package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts +2 -4
- package/dist/types/src/containers/FunctionsContainer/FunctionsContainer.d.ts.map +1 -1
- package/dist/types/src/containers/FunctionsContainer/index.d.ts +1 -2
- package/dist/types/src/containers/FunctionsContainer/index.d.ts.map +1 -1
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts +3 -3
- package/dist/types/src/containers/TriggerSettings/TriggerSettings.d.ts.map +1 -1
- package/dist/types/src/hooks/index.d.ts +0 -1
- package/dist/types/src/hooks/index.d.ts.map +1 -1
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts +1 -1
- package/dist/types/src/hooks/useTriggerRuntimeControls.d.ts.map +1 -1
- package/dist/types/src/index.d.ts +0 -3
- package/dist/types/src/index.d.ts.map +1 -1
- package/dist/types/src/meta.d.ts.map +1 -1
- package/dist/types/src/operations/create-trigger-from-template.d.ts +5 -0
- package/dist/types/src/operations/create-trigger-from-template.d.ts.map +1 -0
- package/dist/types/src/operations/index.d.ts +3 -0
- package/dist/types/src/operations/index.d.ts.map +1 -0
- package/dist/types/src/plugin.d.ts +4 -0
- package/dist/types/src/plugin.d.ts.map +1 -0
- package/dist/types/src/testing/test-functions.d.ts +78 -76
- package/dist/types/src/testing/test-functions.d.ts.map +1 -1
- package/dist/types/src/testing.d.ts +2 -0
- package/dist/types/src/testing.d.ts.map +1 -0
- package/dist/types/src/translations.d.ts +32 -33
- package/dist/types/src/translations.d.ts.map +1 -1
- package/dist/types/src/types/AutomationOperation.d.ts +19 -0
- package/dist/types/src/types/AutomationOperation.d.ts.map +1 -0
- package/dist/types/src/types/index.d.ts +1 -2
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +7 -28
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/tsconfig.tsbuildinfo +1 -1
- package/package.json +125 -68
- package/src/AutomationPlugin.node.ts +28 -0
- package/src/AutomationPlugin.test.ts +27 -0
- package/src/AutomationPlugin.tsx +12 -11
- package/src/AutomationPlugin.workerd.ts +18 -0
- package/src/capabilities/app-graph-builder.ts +66 -0
- package/src/capabilities/index.ts +10 -4
- package/src/capabilities/layer-specs.ts +231 -0
- package/src/capabilities/node.ts +13 -0
- package/src/capabilities/operation-handler.ts +16 -0
- package/src/capabilities/{react-surface/react-surface.tsx → react-surface.tsx} +17 -15
- package/src/{cli/commands → commands}/trigger/create/queue.ts +7 -10
- package/src/{cli/commands → commands}/trigger/create/subscription.ts +8 -11
- package/src/{cli/commands → commands}/trigger/create/timer.ts +4 -7
- package/src/{cli/commands → commands}/trigger/list.ts +7 -4
- package/src/{cli/commands → commands}/trigger/remove.ts +2 -3
- package/src/{cli/commands → commands}/trigger/update/queue.ts +19 -20
- package/src/{cli/commands → commands}/trigger/update/subscription.ts +15 -15
- package/src/{cli/commands → commands}/trigger/update/timer.ts +16 -16
- package/src/{cli/commands → commands}/trigger/util.ts +25 -17
- package/src/components/AutomationPanel/AutomationPanel.stories.tsx +12 -5
- package/src/components/AutomationPanel/AutomationPanel.tsx +89 -47
- package/src/components/FunctionsPanel/FunctionsPanel.tsx +33 -25
- package/src/components/FunctionsRegistry/FunctionsRegistry.tsx +32 -23
- package/src/components/TriggerEditor/FunctionInputEditor.tsx +4 -4
- package/src/components/TriggerEditor/SpecSelector.tsx +17 -13
- package/src/components/TriggerEditor/TriggerEditor.stories.tsx +19 -13
- package/src/components/TriggerEditor/TriggerEditor.tsx +13 -17
- package/src/containers/AutomationSettings/AutomationSettings.tsx +11 -7
- package/src/containers/AutomationSettings/index.ts +1 -3
- package/src/containers/FunctionsContainer/FunctionsContainer.tsx +11 -11
- package/src/containers/FunctionsContainer/index.ts +1 -3
- package/src/containers/TriggerSettings/TriggerSettings.tsx +32 -10
- package/src/hooks/index.ts +1 -1
- package/src/hooks/useTriggerRuntimeControls.ts +13 -8
- package/src/index.ts +0 -4
- package/src/meta.ts +3 -1
- package/src/operations/create-trigger-from-template.ts +71 -0
- package/src/operations/index.ts +7 -0
- package/src/plugin.ts +11 -0
- package/src/testing/test-functions.ts +6 -3
- package/src/testing.ts +7 -0
- package/src/translations.ts +38 -39
- package/src/types/AutomationOperation.ts +30 -0
- package/src/types/index.ts +2 -2
- package/src/types/schema.ts +2 -23
- package/dist/lib/browser/AutomationPanel-IGLIQY2N.mjs +0 -11
- package/dist/lib/browser/AutomationSettings-XGJGVBDD.mjs +0 -37
- package/dist/lib/browser/AutomationSettings-XGJGVBDD.mjs.map +0 -7
- package/dist/lib/browser/FunctionsContainer-R4ZMYSFJ.mjs +0 -43
- package/dist/lib/browser/FunctionsContainer-R4ZMYSFJ.mjs.map +0 -7
- package/dist/lib/browser/FunctionsPanel-NMA4RYJL.mjs +0 -10
- package/dist/lib/browser/FunctionsRegistry-TMKAEG5E.mjs +0 -10
- package/dist/lib/browser/TriggerSettings-GW5OEM2G.mjs +0 -11
- package/dist/lib/browser/app-graph-builder-74ILZP25.mjs +0 -83
- package/dist/lib/browser/app-graph-builder-74ILZP25.mjs.map +0 -7
- package/dist/lib/browser/chunk-5WMYSXEH.mjs +0 -83
- package/dist/lib/browser/chunk-5WMYSXEH.mjs.map +0 -7
- package/dist/lib/browser/chunk-75XLBFAG.mjs.map +0 -7
- package/dist/lib/browser/chunk-BWEKRPFJ.mjs.map +0 -7
- package/dist/lib/browser/chunk-EL64ZPPN.mjs.map +0 -7
- package/dist/lib/browser/chunk-FUVAC5EC.mjs.map +0 -7
- package/dist/lib/browser/chunk-LHJEQVX5.mjs +0 -8
- package/dist/lib/browser/chunk-LHJEQVX5.mjs.map +0 -7
- package/dist/lib/browser/chunk-O23LHDEX.mjs.map +0 -7
- package/dist/lib/browser/chunk-PUYY7B5F.mjs +0 -31
- package/dist/lib/browser/chunk-PUYY7B5F.mjs.map +0 -7
- package/dist/lib/browser/chunk-ZBEMNWNY.mjs +0 -93
- package/dist/lib/browser/chunk-ZBEMNWNY.mjs.map +0 -7
- package/dist/lib/browser/cli/index.mjs.map +0 -7
- package/dist/lib/browser/compute-runtime-I3I2BIRE.mjs +0 -130
- package/dist/lib/browser/compute-runtime-I3I2BIRE.mjs.map +0 -7
- package/dist/lib/browser/hooks/index.mjs +0 -13
- package/dist/lib/browser/index.mjs +0 -123
- package/dist/lib/browser/index.mjs.map +0 -7
- package/dist/lib/browser/meta.json +0 -1
- package/dist/lib/browser/operation-resolver-NGN4BEWN.mjs +0 -84
- package/dist/lib/browser/operation-resolver-NGN4BEWN.mjs.map +0 -7
- package/dist/lib/browser/react-surface-SXDIM3RM.mjs +0 -65
- package/dist/lib/browser/react-surface-SXDIM3RM.mjs.map +0 -7
- package/dist/lib/browser/types/index.mjs +0 -14
- package/dist/lib/node-esm/AutomationPanel-O2BCQA7P.mjs +0 -12
- package/dist/lib/node-esm/AutomationSettings-W52ZO2XI.mjs +0 -38
- package/dist/lib/node-esm/AutomationSettings-W52ZO2XI.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsContainer-GYRPQZM7.mjs +0 -44
- package/dist/lib/node-esm/FunctionsContainer-GYRPQZM7.mjs.map +0 -7
- package/dist/lib/node-esm/FunctionsPanel-DCXXLSVP.mjs +0 -11
- package/dist/lib/node-esm/FunctionsRegistry-7WCHC64E.mjs +0 -11
- package/dist/lib/node-esm/FunctionsRegistry-7WCHC64E.mjs.map +0 -7
- package/dist/lib/node-esm/TriggerSettings-2GKFPECW.mjs +0 -12
- package/dist/lib/node-esm/TriggerSettings-2GKFPECW.mjs.map +0 -7
- package/dist/lib/node-esm/app-graph-builder-VDXPOWCH.mjs +0 -84
- package/dist/lib/node-esm/app-graph-builder-VDXPOWCH.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-6JVB3IHW.mjs +0 -97
- package/dist/lib/node-esm/chunk-6JVB3IHW.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-BNWZ2NNI.mjs +0 -32
- package/dist/lib/node-esm/chunk-BNWZ2NNI.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-FPXVLTEY.mjs +0 -270
- package/dist/lib/node-esm/chunk-FPXVLTEY.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-K7T2MVB7.mjs +0 -98
- package/dist/lib/node-esm/chunk-K7T2MVB7.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-Q5JSKD6Z.mjs +0 -295
- package/dist/lib/node-esm/chunk-Q5JSKD6Z.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-V3VUE2NR.mjs +0 -10
- package/dist/lib/node-esm/chunk-V3VUE2NR.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-WC5AT7B3.mjs +0 -19
- package/dist/lib/node-esm/chunk-WC5AT7B3.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XCFO2IXT.mjs +0 -84
- package/dist/lib/node-esm/chunk-XCFO2IXT.mjs.map +0 -7
- package/dist/lib/node-esm/chunk-XQO3HK62.mjs +0 -94
- package/dist/lib/node-esm/chunk-XQO3HK62.mjs.map +0 -7
- package/dist/lib/node-esm/cli/index.mjs +0 -1116
- package/dist/lib/node-esm/cli/index.mjs.map +0 -7
- package/dist/lib/node-esm/compute-runtime-7HCSIYFG.mjs +0 -131
- package/dist/lib/node-esm/compute-runtime-7HCSIYFG.mjs.map +0 -7
- package/dist/lib/node-esm/hooks/index.mjs +0 -14
- package/dist/lib/node-esm/index.mjs +0 -124
- package/dist/lib/node-esm/index.mjs.map +0 -7
- package/dist/lib/node-esm/meta.json +0 -1
- package/dist/lib/node-esm/operation-resolver-ANGACQZG.mjs +0 -85
- package/dist/lib/node-esm/operation-resolver-ANGACQZG.mjs.map +0 -7
- package/dist/lib/node-esm/react-surface-QVLVDEVW.mjs +0 -66
- package/dist/lib/node-esm/react-surface-QVLVDEVW.mjs.map +0 -7
- package/dist/lib/node-esm/types/index.mjs +0 -15
- package/dist/types/src/capabilities/app-graph-builder/app-graph-builder.d.ts.map +0 -1
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts +0 -3
- package/dist/types/src/capabilities/app-graph-builder/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts +0 -6
- package/dist/types/src/capabilities/compute-runtime/compute-runtime.d.ts.map +0 -1
- package/dist/types/src/capabilities/compute-runtime/index.d.ts +0 -3
- package/dist/types/src/capabilities/compute-runtime/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/index.d.ts +0 -3
- package/dist/types/src/capabilities/operation-resolver/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts +0 -5
- package/dist/types/src/capabilities/operation-resolver/operation-resolver.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/index.d.ts +0 -3
- package/dist/types/src/capabilities/react-surface/index.d.ts.map +0 -1
- package/dist/types/src/capabilities/react-surface/react-surface.d.ts.map +0 -1
- package/dist/types/src/cli/commands/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/create/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/create/queue.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/create/subscription.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/create/timer.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/list.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/options.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/remove.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/update/index.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/update/queue.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/update/subscription.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/update/timer.d.ts.map +0 -1
- package/dist/types/src/cli/commands/trigger/util.d.ts.map +0 -1
- package/dist/types/src/cli/index.d.ts +0 -2
- package/dist/types/src/cli/index.d.ts.map +0 -1
- package/dist/types/src/cli/plugin.d.ts.map +0 -1
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts +0 -12
- package/dist/types/src/hooks/useComputeRuntimeCallback.d.ts.map +0 -1
- package/dist/types/src/types/capabilities.d.ts +0 -23
- package/dist/types/src/types/capabilities.d.ts.map +0 -1
- package/dist/types/src/types/events.d.ts +0 -5
- package/dist/types/src/types/events.d.ts.map +0 -1
- package/src/capabilities/app-graph-builder/app-graph-builder.ts +0 -73
- package/src/capabilities/app-graph-builder/index.ts +0 -7
- package/src/capabilities/compute-runtime/compute-runtime.ts +0 -155
- package/src/capabilities/compute-runtime/index.ts +0 -7
- package/src/capabilities/operation-resolver/index.ts +0 -7
- package/src/capabilities/operation-resolver/operation-resolver.ts +0 -80
- package/src/capabilities/react-surface/index.ts +0 -7
- package/src/cli/index.ts +0 -5
- package/src/cli/plugin.ts +0 -24
- package/src/hooks/useComputeRuntimeCallback.ts +0 -67
- package/src/types/capabilities.ts +0 -45
- package/src/types/events.ts +0 -11
- /package/dist/lib/{browser/AutomationPanel-IGLIQY2N.mjs.map → neutral/AutomationPanel-GQCS4EPU.mjs.map} +0 -0
- /package/dist/lib/{browser/FunctionsPanel-NMA4RYJL.mjs.map → neutral/AutomationPlugin.mjs.map} +0 -0
- /package/dist/lib/{browser/FunctionsRegistry-TMKAEG5E.mjs.map → neutral/TriggerSettings-XCHIZPOR.mjs.map} +0 -0
- /package/dist/lib/{browser/TriggerSettings-GW5OEM2G.mjs.map → neutral/chunk-J5LGTIGS.mjs.map} +0 -0
- /package/dist/lib/{browser/hooks → neutral/components}/index.mjs.map +0 -0
- /package/dist/lib/{browser/types → neutral}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/AutomationPanel-O2BCQA7P.mjs.map → neutral/meta.mjs.map} +0 -0
- /package/dist/lib/{node-esm/hooks → neutral/operations}/index.mjs.map +0 -0
- /package/dist/lib/{node-esm/FunctionsPanel-DCXXLSVP.mjs.map → neutral/testing.mjs.map} +0 -0
- /package/dist/lib/{node-esm → neutral}/types/index.mjs.map +0 -0
- /package/dist/types/src/capabilities/{app-graph-builder/app-graph-builder.d.ts → app-graph-builder.d.ts} +0 -0
- /package/dist/types/src/capabilities/{react-surface/react-surface.d.ts → react-surface.d.ts} +0 -0
- /package/dist/types/src/{cli/commands → commands}/index.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/trigger/options.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/trigger/update/queue.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/trigger/update/subscription.d.ts +0 -0
- /package/dist/types/src/{cli/commands → commands}/trigger/update/timer.d.ts +0 -0
- /package/src/{cli/commands → commands}/index.ts +0 -0
- /package/src/{cli/commands → commands}/trigger/create/index.ts +0 -0
- /package/src/{cli/commands → commands}/trigger/index.ts +0 -0
- /package/src/{cli/commands → commands}/trigger/options.ts +0 -0
- /package/src/{cli/commands → commands}/trigger/update/index.ts +0 -0
|
@@ -1,25 +1,20 @@
|
|
|
1
|
-
import
|
|
2
|
-
ComputeRuntime
|
|
3
|
-
} from "../chunk-LHJEQVX5.mjs";
|
|
4
|
-
import {
|
|
5
|
-
AutomationEvents
|
|
6
|
-
} from "../chunk-5WMYSXEH.mjs";
|
|
7
|
-
import {
|
|
8
|
-
meta
|
|
9
|
-
} from "../chunk-EL64ZPPN.mjs";
|
|
1
|
+
import "./chunk-J5LGTIGS.mjs";
|
|
10
2
|
|
|
11
|
-
// src/
|
|
12
|
-
import { Plugin } from "@dxos/app-framework";
|
|
3
|
+
// src/AutomationPlugin.node.ts
|
|
4
|
+
import { ActivationEvents, Plugin } from "@dxos/app-framework";
|
|
13
5
|
import { AppPlugin } from "@dxos/app-toolkit";
|
|
14
|
-
import {
|
|
6
|
+
import { Operation as Operation8, Trace, Trigger as Trigger10 } from "@dxos/compute";
|
|
7
|
+
import { ClientEvents } from "@dxos/plugin-client";
|
|
8
|
+
import { AppGraphBuilder, LayerSpecs, OperationHandler } from "#capabilities";
|
|
9
|
+
import { meta } from "#meta";
|
|
15
10
|
|
|
16
|
-
// src/
|
|
11
|
+
// src/commands/trigger/index.ts
|
|
17
12
|
import * as Command11 from "@effect/cli/Command";
|
|
18
13
|
|
|
19
|
-
// src/
|
|
14
|
+
// src/commands/trigger/create/index.ts
|
|
20
15
|
import * as Command4 from "@effect/cli/Command";
|
|
21
16
|
|
|
22
|
-
// src/
|
|
17
|
+
// src/commands/trigger/create/queue.ts
|
|
23
18
|
import * as Command from "@effect/cli/Command";
|
|
24
19
|
import * as Options2 from "@effect/cli/Options";
|
|
25
20
|
import * as Prompt2 from "@effect/cli/Prompt";
|
|
@@ -30,10 +25,10 @@ import * as Option2 from "effect/Option";
|
|
|
30
25
|
import { CommandConfig } from "@dxos/cli-util";
|
|
31
26
|
import { flushAndSync, print, spaceLayer, withTypes } from "@dxos/cli-util";
|
|
32
27
|
import { Common } from "@dxos/cli-util";
|
|
28
|
+
import { Operation as Operation2, Trigger as Trigger2 } from "@dxos/compute";
|
|
33
29
|
import { Database as Database2, Filter as Filter2, JsonSchema, Ref as Ref2 } from "@dxos/echo";
|
|
34
|
-
import { Function as Function2, Trigger as Trigger2 } from "@dxos/functions";
|
|
35
30
|
|
|
36
|
-
// src/
|
|
31
|
+
// src/commands/trigger/options.ts
|
|
37
32
|
import * as Options from "@effect/cli/Options";
|
|
38
33
|
import * as Schema from "effect/Schema";
|
|
39
34
|
import { DXN } from "@dxos/keys";
|
|
@@ -54,7 +49,7 @@ var DXNSchema = Schema.String.pipe(Schema.transform(Schema.instanceOf(DXN), {
|
|
|
54
49
|
}));
|
|
55
50
|
var Queue = Options.text("queue").pipe(Options.withDescription("The DXN of the queue for the queue trigger."), Options.withSchema(DXNSchema));
|
|
56
51
|
|
|
57
|
-
// src/
|
|
52
|
+
// src/commands/trigger/util.ts
|
|
58
53
|
import * as Prompt from "@effect/cli/Prompt";
|
|
59
54
|
import * as Ansi from "@effect/printer-ansi/Ansi";
|
|
60
55
|
import * as Console from "effect/Console";
|
|
@@ -63,9 +58,9 @@ import * as Match from "effect/Match";
|
|
|
63
58
|
import * as Option from "effect/Option";
|
|
64
59
|
import * as SchemaAST from "effect/SchemaAST";
|
|
65
60
|
import { FormBuilder } from "@dxos/cli-util";
|
|
66
|
-
import {
|
|
61
|
+
import { Operation, Trigger } from "@dxos/compute";
|
|
62
|
+
import { Annotation, Database, Entity, Feed, Filter, Obj, Query, Ref, Type } from "@dxos/echo";
|
|
67
63
|
import { getProperties } from "@dxos/effect";
|
|
68
|
-
import { Function, Trigger } from "@dxos/functions";
|
|
69
64
|
import { FeedAnnotation } from "@dxos/schema";
|
|
70
65
|
var getTriggerRemoteStatus = (trigger2, remoteCronIds) => {
|
|
71
66
|
if (trigger2.spec?.kind !== "timer") {
|
|
@@ -77,7 +72,7 @@ var printTrigger = Effect.fn(function* (trigger2, remoteStatus) {
|
|
|
77
72
|
const fn6 = trigger2.function && (yield* Database.load(trigger2.function));
|
|
78
73
|
return FormBuilder.make({
|
|
79
74
|
title: trigger2.id
|
|
80
|
-
}).pipe(FormBuilder.set("status", trigger2.enabled ? "enabled" : "disabled", trigger2.enabled ? Ansi.green : Ansi.blackBright), FormBuilder.option("kind", Option.fromNullable(trigger2.spec?.kind)), FormBuilder.option("remote", Option.fromNullable(remoteStatus), Match.type().pipe(Match.withReturnType(), Match.when("available", () => Ansi.green), Match.when("not available", () => Ansi.yellow), Match.when("n/a", () => Ansi.blackBright), Match.exhaustive)), FormBuilder.when(fn6, FormBuilder.nest("function", FormBuilder.make().pipe(FormBuilder.set("key", fn6.key), FormBuilder.set("dxn", fn6.
|
|
75
|
+
}).pipe(FormBuilder.set("status", trigger2.enabled ? "enabled" : "disabled", trigger2.enabled ? Ansi.green : Ansi.blackBright), FormBuilder.option("kind", Option.fromNullable(trigger2.spec?.kind)), FormBuilder.option("remote", Option.fromNullable(remoteStatus), Match.type().pipe(Match.withReturnType(), Match.when("available", () => Ansi.green), Match.when("not available", () => Ansi.yellow), Match.when("n/a", () => Ansi.blackBright), Match.exhaustive)), FormBuilder.when(fn6, FormBuilder.nest("function", FormBuilder.make().pipe(FormBuilder.set("key", Obj.getMeta(fn6).key), FormBuilder.set("dxn", Obj.getDXN(fn6).toString())))), FormBuilder.nestedOption("spec", Option.fromNullable(trigger2.spec).pipe(Option.map(printSpec))), FormBuilder.build);
|
|
81
76
|
});
|
|
82
77
|
var printSpec = (spec) => {
|
|
83
78
|
switch (spec.kind) {
|
|
@@ -229,7 +224,7 @@ var promptForSchemaInput = Effect.fn(function* (schema, defaults) {
|
|
|
229
224
|
return inputObj;
|
|
230
225
|
});
|
|
231
226
|
var selectFunction = Effect.fn(function* () {
|
|
232
|
-
const functions = yield* Database.runQuery(Filter.type(
|
|
227
|
+
const functions = yield* Database.runQuery(Filter.type(Operation.PersistentOperation));
|
|
233
228
|
if (functions.length === 0) {
|
|
234
229
|
return yield* Effect.fail(new Error("No functions available"));
|
|
235
230
|
}
|
|
@@ -244,14 +239,14 @@ var selectFunction = Effect.fn(function* () {
|
|
|
244
239
|
return String(selected);
|
|
245
240
|
});
|
|
246
241
|
var selectTrigger = Effect.fn(function* (kind) {
|
|
247
|
-
const triggers = yield* Database.runQuery(Filter.type(Trigger.Trigger));
|
|
242
|
+
const triggers = yield* Database.runQuery(Query.select(Filter.type(Trigger.Trigger)).debugLabel("cli.trigger.selectTrigger"));
|
|
248
243
|
const filteredTriggers = kind ? triggers.filter((trigger2) => trigger2.spec?.kind === kind) : triggers;
|
|
249
244
|
if (filteredTriggers.length === 0) {
|
|
250
245
|
return yield* Effect.fail(new Error(kind ? `No ${kind} triggers available` : "No triggers available"));
|
|
251
246
|
}
|
|
252
247
|
const choices = yield* Effect.all(filteredTriggers.map((trigger2) => Effect.gen(function* () {
|
|
253
248
|
const fn6 = trigger2.function ? yield* Database.load(trigger2.function) : void 0;
|
|
254
|
-
const functionName = fn6 && Obj.instanceOf(
|
|
249
|
+
const functionName = fn6 && Obj.instanceOf(Operation.PersistentOperation, fn6) ? fn6.name ?? Obj.getMeta(fn6).key ?? fn6.id : void 0;
|
|
255
250
|
const title = functionName ?? trigger2.id;
|
|
256
251
|
const description = `${trigger2.enabled ? "enabled" : "disabled"} - ${trigger2.spec?.kind ?? "unknown"}`;
|
|
257
252
|
return {
|
|
@@ -266,7 +261,7 @@ var selectTrigger = Effect.fn(function* (kind) {
|
|
|
266
261
|
});
|
|
267
262
|
return String(selected);
|
|
268
263
|
});
|
|
269
|
-
var
|
|
264
|
+
var selectFeed = Effect.fn(function* () {
|
|
270
265
|
const schemas = yield* Database.runSchemaQuery({
|
|
271
266
|
location: [
|
|
272
267
|
"database",
|
|
@@ -280,7 +275,7 @@ var selectQueue = Effect.fn(function* () {
|
|
|
280
275
|
if (feedSchemas.length === 0) {
|
|
281
276
|
return yield* Effect.fail(new Error("No schemas with Feed annotation found"));
|
|
282
277
|
}
|
|
283
|
-
const
|
|
278
|
+
const feedChoices = [];
|
|
284
279
|
for (const schema of feedSchemas) {
|
|
285
280
|
yield* Effect.gen(function* () {
|
|
286
281
|
const typename = Type.getTypename(schema);
|
|
@@ -294,26 +289,26 @@ var selectQueue = Effect.fn(function* () {
|
|
|
294
289
|
if (!feedObj || !Obj.instanceOf(Feed.Feed, feedObj)) {
|
|
295
290
|
continue;
|
|
296
291
|
}
|
|
297
|
-
const
|
|
298
|
-
if (!
|
|
292
|
+
const feedDXN = Feed.getQueueDxn(feedObj);
|
|
293
|
+
if (!feedDXN) {
|
|
299
294
|
continue;
|
|
300
295
|
}
|
|
301
296
|
const label = Obj.getLabel(obj) ?? obj.id;
|
|
302
297
|
const description = Obj.getTypename(obj);
|
|
303
|
-
|
|
298
|
+
feedChoices.push({
|
|
304
299
|
title: label,
|
|
305
|
-
value:
|
|
300
|
+
value: feedDXN.toString(),
|
|
306
301
|
description
|
|
307
302
|
});
|
|
308
303
|
}
|
|
309
304
|
}).pipe(Effect.catchAll(() => Effect.void));
|
|
310
305
|
}
|
|
311
|
-
if (
|
|
306
|
+
if (feedChoices.length === 0) {
|
|
312
307
|
return yield* Effect.fail(new Error("No objects with queue properties found"));
|
|
313
308
|
}
|
|
314
309
|
const selected = yield* Prompt.select({
|
|
315
310
|
message: "Select a queue:",
|
|
316
|
-
choices:
|
|
311
|
+
choices: feedChoices
|
|
317
312
|
});
|
|
318
313
|
return String(selected);
|
|
319
314
|
});
|
|
@@ -321,7 +316,7 @@ var printTriggerRemoved = (id) => FormBuilder.make({
|
|
|
321
316
|
title: "Trigger removed"
|
|
322
317
|
}).pipe(FormBuilder.set("id", id), FormBuilder.build);
|
|
323
318
|
|
|
324
|
-
// src/
|
|
319
|
+
// src/commands/trigger/create/queue.ts
|
|
325
320
|
var queue = Command.make("queue", {
|
|
326
321
|
spaceId: Common.spaceId.pipe(Options2.optional),
|
|
327
322
|
enabled: Enabled,
|
|
@@ -334,13 +329,13 @@ var queue = Command.make("queue", {
|
|
|
334
329
|
onNone: () => selectFunction(),
|
|
335
330
|
onSome: (id) => Effect2.succeed(id)
|
|
336
331
|
});
|
|
337
|
-
const functions = yield* Database2.runQuery(Filter2.type(
|
|
332
|
+
const functions = yield* Database2.runQuery(Filter2.type(Operation2.PersistentOperation));
|
|
338
333
|
const fn6 = functions.find((fn7) => fn7.id === functionId);
|
|
339
334
|
if (!fn6) {
|
|
340
335
|
return yield* Effect2.fail(new Error(`Function not found: ${functionId}`));
|
|
341
336
|
}
|
|
342
|
-
const
|
|
343
|
-
onNone: () =>
|
|
337
|
+
const queueDXN = yield* Option2.match(options.queue, {
|
|
338
|
+
onNone: () => selectFeed(),
|
|
344
339
|
onSome: (dxn) => Effect2.succeed(dxn.toString())
|
|
345
340
|
});
|
|
346
341
|
const input = yield* Option2.match(options.input, {
|
|
@@ -357,10 +352,7 @@ var queue = Command.make("queue", {
|
|
|
357
352
|
const trigger2 = Trigger2.make({
|
|
358
353
|
function: Ref2.make(fn6),
|
|
359
354
|
enabled,
|
|
360
|
-
spec:
|
|
361
|
-
kind: "queue",
|
|
362
|
-
queue: queueDxn
|
|
363
|
-
},
|
|
355
|
+
spec: Trigger2.specQueue(queueDXN),
|
|
364
356
|
input
|
|
365
357
|
});
|
|
366
358
|
yield* Database2.add(trigger2);
|
|
@@ -372,9 +364,9 @@ var queue = Command.make("queue", {
|
|
|
372
364
|
yield* flushAndSync({
|
|
373
365
|
indexes: true
|
|
374
366
|
});
|
|
375
|
-
})).pipe(Command.withDescription("Create a queue trigger."), Command.provide(({ spaceId }) => spaceLayer(spaceId, true)), Command.provideEffectDiscard(() => withTypes(
|
|
367
|
+
})).pipe(Command.withDescription("Create a queue trigger."), Command.provide(({ spaceId }) => spaceLayer(spaceId, true)), Command.provideEffectDiscard(() => withTypes(Operation2.PersistentOperation, Trigger2.Trigger)));
|
|
376
368
|
|
|
377
|
-
// src/
|
|
369
|
+
// src/commands/trigger/create/subscription.ts
|
|
378
370
|
import * as Command2 from "@effect/cli/Command";
|
|
379
371
|
import * as Options3 from "@effect/cli/Options";
|
|
380
372
|
import * as Prompt3 from "@effect/cli/Prompt";
|
|
@@ -385,8 +377,8 @@ import * as Option3 from "effect/Option";
|
|
|
385
377
|
import { CommandConfig as CommandConfig2 } from "@dxos/cli-util";
|
|
386
378
|
import { flushAndSync as flushAndSync2, print as print2, spaceLayer as spaceLayer2, withTypes as withTypes2 } from "@dxos/cli-util";
|
|
387
379
|
import { Common as Common2 } from "@dxos/cli-util";
|
|
388
|
-
import {
|
|
389
|
-
import {
|
|
380
|
+
import { Operation as Operation3, Trigger as Trigger3 } from "@dxos/compute";
|
|
381
|
+
import { Database as Database3, Filter as Filter3, JsonSchema as JsonSchema2, Query as Query2, Ref as Ref3 } from "@dxos/echo";
|
|
390
382
|
var subscription = Command2.make("subscription", {
|
|
391
383
|
spaceId: Common2.spaceId.pipe(Options3.optional),
|
|
392
384
|
enabled: Enabled,
|
|
@@ -401,7 +393,7 @@ var subscription = Command2.make("subscription", {
|
|
|
401
393
|
onNone: () => selectFunction(),
|
|
402
394
|
onSome: (id) => Effect3.succeed(id)
|
|
403
395
|
});
|
|
404
|
-
const functions = yield* Database3.runQuery(Filter3.type(
|
|
396
|
+
const functions = yield* Database3.runQuery(Filter3.type(Operation3.PersistentOperation));
|
|
405
397
|
const fn6 = functions.find((fn7) => fn7.id === functionId);
|
|
406
398
|
if (!fn6) {
|
|
407
399
|
return yield* Effect3.fail(new Error(`Function not found: ${functionId}`));
|
|
@@ -412,7 +404,7 @@ var subscription = Command2.make("subscription", {
|
|
|
412
404
|
}).pipe(Prompt3.run),
|
|
413
405
|
onSome: (value2) => Effect3.succeed(value2)
|
|
414
406
|
});
|
|
415
|
-
const
|
|
407
|
+
const subscriptionQuery = Query2.select(Filter3.type(typename));
|
|
416
408
|
const deepOption = yield* Option3.match(options.deep, {
|
|
417
409
|
onNone: () => Prompt3.confirm({
|
|
418
410
|
message: "Watch changes to nested properties (deep)?",
|
|
@@ -450,13 +442,7 @@ var subscription = Command2.make("subscription", {
|
|
|
450
442
|
const trigger2 = Trigger3.make({
|
|
451
443
|
function: Ref3.make(fn6),
|
|
452
444
|
enabled,
|
|
453
|
-
spec:
|
|
454
|
-
kind: "subscription",
|
|
455
|
-
query: {
|
|
456
|
-
ast: queryAst
|
|
457
|
-
},
|
|
458
|
-
options: Object.keys(subscriptionOptions).length > 0 ? subscriptionOptions : void 0
|
|
459
|
-
},
|
|
445
|
+
spec: Trigger3.specSubscription(subscriptionQuery, Object.keys(subscriptionOptions).length > 0 ? subscriptionOptions : void 0),
|
|
460
446
|
input
|
|
461
447
|
});
|
|
462
448
|
yield* Database3.add(trigger2);
|
|
@@ -468,9 +454,9 @@ var subscription = Command2.make("subscription", {
|
|
|
468
454
|
yield* flushAndSync2({
|
|
469
455
|
indexes: true
|
|
470
456
|
});
|
|
471
|
-
})).pipe(Command2.withDescription("Create a subscription trigger."), Command2.provide(({ spaceId }) => spaceLayer2(spaceId, true)), Command2.provideEffectDiscard(() => withTypes2(
|
|
457
|
+
})).pipe(Command2.withDescription("Create a subscription trigger."), Command2.provide(({ spaceId }) => spaceLayer2(spaceId, true)), Command2.provideEffectDiscard(() => withTypes2(Operation3.PersistentOperation, Trigger3.Trigger)));
|
|
472
458
|
|
|
473
|
-
// src/
|
|
459
|
+
// src/commands/trigger/create/timer.ts
|
|
474
460
|
import * as Command3 from "@effect/cli/Command";
|
|
475
461
|
import * as Options4 from "@effect/cli/Options";
|
|
476
462
|
import * as Prompt4 from "@effect/cli/Prompt";
|
|
@@ -481,8 +467,8 @@ import * as Option4 from "effect/Option";
|
|
|
481
467
|
import { CommandConfig as CommandConfig3 } from "@dxos/cli-util";
|
|
482
468
|
import { flushAndSync as flushAndSync3, print as print3, spaceLayer as spaceLayer3, withTypes as withTypes3 } from "@dxos/cli-util";
|
|
483
469
|
import { Common as Common3 } from "@dxos/cli-util";
|
|
470
|
+
import { Operation as Operation4, Trigger as Trigger4 } from "@dxos/compute";
|
|
484
471
|
import { Database as Database4, Filter as Filter4, JsonSchema as JsonSchema3, Ref as Ref4 } from "@dxos/echo";
|
|
485
|
-
import { Function as Function4, Trigger as Trigger4 } from "@dxos/functions";
|
|
486
472
|
var timer = Command3.make("timer", {
|
|
487
473
|
spaceId: Common3.spaceId.pipe(Options4.optional),
|
|
488
474
|
enabled: Enabled,
|
|
@@ -495,7 +481,7 @@ var timer = Command3.make("timer", {
|
|
|
495
481
|
onNone: () => selectFunction(),
|
|
496
482
|
onSome: (id) => Effect4.succeed(id)
|
|
497
483
|
});
|
|
498
|
-
const functions = yield* Database4.runQuery(Filter4.type(
|
|
484
|
+
const functions = yield* Database4.runQuery(Filter4.type(Operation4.PersistentOperation));
|
|
499
485
|
const fn6 = functions.find((fn7) => fn7.id === functionId);
|
|
500
486
|
if (!fn6) {
|
|
501
487
|
return yield* Effect4.fail(new Error(`Function not found: ${functionId}`));
|
|
@@ -520,10 +506,7 @@ var timer = Command3.make("timer", {
|
|
|
520
506
|
const trigger2 = Trigger4.make({
|
|
521
507
|
function: Ref4.make(fn6),
|
|
522
508
|
enabled,
|
|
523
|
-
spec:
|
|
524
|
-
kind: "timer",
|
|
525
|
-
cron
|
|
526
|
-
},
|
|
509
|
+
spec: Trigger4.specTimer(cron),
|
|
527
510
|
input
|
|
528
511
|
});
|
|
529
512
|
yield* Database4.add(trigger2);
|
|
@@ -535,33 +518,35 @@ var timer = Command3.make("timer", {
|
|
|
535
518
|
yield* flushAndSync3({
|
|
536
519
|
indexes: true
|
|
537
520
|
});
|
|
538
|
-
})).pipe(Command3.withDescription("Create a timer trigger."), Command3.provide(({ spaceId }) => spaceLayer3(spaceId, true)), Command3.provideEffectDiscard(() => withTypes3(
|
|
521
|
+
})).pipe(Command3.withDescription("Create a timer trigger."), Command3.provide(({ spaceId }) => spaceLayer3(spaceId, true)), Command3.provideEffectDiscard(() => withTypes3(Operation4.PersistentOperation, Trigger4.Trigger)));
|
|
539
522
|
|
|
540
|
-
// src/
|
|
523
|
+
// src/commands/trigger/create/index.ts
|
|
541
524
|
var create = Command4.make("create").pipe(Command4.withDescription("Create a trigger."), Command4.withSubcommands([
|
|
542
525
|
subscription,
|
|
543
526
|
timer,
|
|
544
527
|
queue
|
|
545
528
|
]));
|
|
546
529
|
|
|
547
|
-
// src/
|
|
530
|
+
// src/commands/trigger/list.ts
|
|
548
531
|
import * as Command5 from "@effect/cli/Command";
|
|
549
532
|
import * as Options5 from "@effect/cli/Options";
|
|
550
533
|
import * as Console5 from "effect/Console";
|
|
551
534
|
import * as Effect5 from "effect/Effect";
|
|
552
535
|
import { CommandConfig as CommandConfig4, Common as Common4, printList, spaceIdWithDefault, spaceLayer as spaceLayer4 } from "@dxos/cli-util";
|
|
553
536
|
import { ClientService } from "@dxos/client";
|
|
554
|
-
import {
|
|
555
|
-
import {
|
|
537
|
+
import { Trigger as Trigger5 } from "@dxos/compute";
|
|
538
|
+
import { Context } from "@dxos/context";
|
|
539
|
+
import { Database as Database5, Filter as Filter5, Query as Query3 } from "@dxos/echo";
|
|
540
|
+
var __dxlog_file = "/__w/dxos/dxos/packages/plugins/plugin-automation/src/commands/trigger/list.ts";
|
|
556
541
|
var list = Command5.make("list", {
|
|
557
542
|
spaceId: Common4.spaceId.pipe(Options5.optional)
|
|
558
543
|
}, Effect5.fn(function* ({ spaceId: spaceIdOption }) {
|
|
559
544
|
const { json } = yield* CommandConfig4;
|
|
560
|
-
const triggers = yield* Database5.runQuery(Filter5.type(Trigger5.Trigger));
|
|
545
|
+
const triggers = yield* Database5.runQuery(Query3.select(Filter5.type(Trigger5.Trigger)).debugLabel("cli.trigger.list"));
|
|
561
546
|
const remoteCronIds = yield* Effect5.gen(function* () {
|
|
562
547
|
const client = yield* ClientService;
|
|
563
548
|
const spaceId = yield* spaceIdWithDefault(spaceIdOption);
|
|
564
|
-
const result = yield* Effect5.promise(() => client.edge.http.getCronTriggers(spaceId)).pipe(Effect5.catchAll(() => Effect5.succeed({
|
|
549
|
+
const result = yield* Effect5.promise(() => client.edge.http.getCronTriggers(Context.default(void 0, { "~LogMeta": "~LogMeta", F: __dxlog_file, L: 24 }), spaceId)).pipe(Effect5.catchAll(() => Effect5.succeed({
|
|
565
550
|
cronIds: []
|
|
566
551
|
})));
|
|
567
552
|
return result.cronIds;
|
|
@@ -585,16 +570,15 @@ var list = Command5.make("list", {
|
|
|
585
570
|
}
|
|
586
571
|
})).pipe(Command5.withDescription("List triggers configured on EDGE."), Command5.provide(({ spaceId }) => spaceLayer4(spaceId, true)));
|
|
587
572
|
|
|
588
|
-
// src/
|
|
573
|
+
// src/commands/trigger/remove.ts
|
|
589
574
|
import * as Command6 from "@effect/cli/Command";
|
|
590
575
|
import * as Options6 from "@effect/cli/Options";
|
|
591
576
|
import * as Console6 from "effect/Console";
|
|
592
577
|
import * as Effect6 from "effect/Effect";
|
|
593
578
|
import * as Option5 from "effect/Option";
|
|
594
579
|
import { CommandConfig as CommandConfig5, Common as Common5, print as print4, spaceLayer as spaceLayer5, withTypes as withTypes4 } from "@dxos/cli-util";
|
|
595
|
-
import {
|
|
596
|
-
import { Database as Database6 } from "@dxos/echo";
|
|
597
|
-
import { Trigger as Trigger6 } from "@dxos/functions";
|
|
580
|
+
import { Trigger as Trigger6 } from "@dxos/compute";
|
|
581
|
+
import { Database as Database6, DXN as DXN2 } from "@dxos/echo";
|
|
598
582
|
var remove = Command6.make("remove", {
|
|
599
583
|
spaceId: Common5.spaceId.pipe(Options6.optional),
|
|
600
584
|
id: TriggerId.pipe(Options6.optional)
|
|
@@ -617,10 +601,10 @@ var remove = Command6.make("remove", {
|
|
|
617
601
|
}
|
|
618
602
|
})).pipe(Command6.withDescription("Remove a trigger."), Command6.provide(({ spaceId }) => spaceLayer5(spaceId, true)), Command6.provideEffectDiscard(() => withTypes4(Trigger6.Trigger)));
|
|
619
603
|
|
|
620
|
-
// src/
|
|
604
|
+
// src/commands/trigger/update/index.ts
|
|
621
605
|
import * as Command10 from "@effect/cli/Command";
|
|
622
606
|
|
|
623
|
-
// src/
|
|
607
|
+
// src/commands/trigger/update/queue.ts
|
|
624
608
|
import * as Command7 from "@effect/cli/Command";
|
|
625
609
|
import * as Options7 from "@effect/cli/Options";
|
|
626
610
|
import * as Prompt5 from "@effect/cli/Prompt";
|
|
@@ -630,8 +614,8 @@ import * as Option6 from "effect/Option";
|
|
|
630
614
|
import { CommandConfig as CommandConfig6 } from "@dxos/cli-util";
|
|
631
615
|
import { flushAndSync as flushAndSync4, print as print5, spaceLayer as spaceLayer6, withTypes as withTypes5 } from "@dxos/cli-util";
|
|
632
616
|
import { Common as Common6 } from "@dxos/cli-util";
|
|
617
|
+
import { Operation as Operation5, Trigger as Trigger7 } from "@dxos/compute";
|
|
633
618
|
import { DXN as DXN3, Database as Database7, Filter as Filter6, JsonSchema as JsonSchema4, Obj as Obj2, Ref as Ref5 } from "@dxos/echo";
|
|
634
|
-
import { Function as Function5, Trigger as Trigger7 } from "@dxos/functions";
|
|
635
619
|
var queue2 = Command7.make("queue", {
|
|
636
620
|
spaceId: Common6.spaceId.pipe(Options7.optional),
|
|
637
621
|
id: TriggerId.pipe(Options7.optional),
|
|
@@ -662,10 +646,10 @@ var queue2 = Command7.make("queue", {
|
|
|
662
646
|
yield* flushAndSync4({
|
|
663
647
|
indexes: true
|
|
664
648
|
});
|
|
665
|
-
})).pipe(Command7.withDescription("Update a queue trigger."), Command7.provide(({ spaceId }) => spaceLayer6(spaceId, true)), Command7.provideEffectDiscard(() => withTypes5(
|
|
649
|
+
})).pipe(Command7.withDescription("Update a queue trigger."), Command7.provide(({ spaceId }) => spaceLayer6(spaceId, true)), Command7.provideEffectDiscard(() => withTypes5(Operation5.PersistentOperation, Trigger7.Trigger)));
|
|
666
650
|
var updateFunction = Effect7.fn(function* (trigger2, functionIdOption) {
|
|
667
651
|
let currentFn = trigger2.function ? yield* Database7.load(trigger2.function) : void 0;
|
|
668
|
-
if (currentFn && !Obj2.instanceOf(
|
|
652
|
+
if (currentFn && !Obj2.instanceOf(Operation5.PersistentOperation, currentFn)) {
|
|
669
653
|
currentFn = void 0;
|
|
670
654
|
}
|
|
671
655
|
const currentFunctionName = currentFn ? currentFn.name ?? currentFn.id : void 0;
|
|
@@ -681,13 +665,13 @@ var updateFunction = Effect7.fn(function* (trigger2, functionIdOption) {
|
|
|
681
665
|
onNone: () => selectFunction(),
|
|
682
666
|
onSome: (id) => Effect7.succeed(id)
|
|
683
667
|
});
|
|
684
|
-
const functions = yield* Database7.runQuery(Filter6.type(
|
|
668
|
+
const functions = yield* Database7.runQuery(Filter6.type(Operation5.PersistentOperation));
|
|
685
669
|
const foundFn = functions.find((fn6) => fn6.id === functionId);
|
|
686
|
-
if (!foundFn || !Obj2.instanceOf(
|
|
670
|
+
if (!foundFn || !Obj2.instanceOf(Operation5.PersistentOperation, foundFn)) {
|
|
687
671
|
return yield* Effect7.fail(new Error(`Function not found: ${functionId}`));
|
|
688
672
|
}
|
|
689
|
-
Obj2.
|
|
690
|
-
|
|
673
|
+
Obj2.update(trigger2, (trigger3) => {
|
|
674
|
+
trigger3.function = Ref5.make(foundFn);
|
|
691
675
|
});
|
|
692
676
|
currentFn = foundFn;
|
|
693
677
|
}
|
|
@@ -708,13 +692,13 @@ var updateQueue = Effect7.fn(function* (trigger2, queueOption) {
|
|
|
708
692
|
onSome: () => Effect7.succeed(true)
|
|
709
693
|
});
|
|
710
694
|
if (shouldChangeQueue) {
|
|
711
|
-
const
|
|
712
|
-
onNone: () =>
|
|
695
|
+
const queueDXN = yield* Option6.match(queueOption, {
|
|
696
|
+
onNone: () => selectFeed(),
|
|
713
697
|
onSome: (dxn) => Effect7.succeed(dxn.toString())
|
|
714
698
|
});
|
|
715
|
-
Obj2.
|
|
716
|
-
if (
|
|
717
|
-
|
|
699
|
+
Obj2.update(trigger2, (trigger3) => {
|
|
700
|
+
if (trigger3.spec?.kind === "queue") {
|
|
701
|
+
trigger3.spec.queue = queueDXN;
|
|
718
702
|
}
|
|
719
703
|
});
|
|
720
704
|
}
|
|
@@ -737,8 +721,8 @@ var updateInput = Effect7.fn(function* (trigger2, fn6, inputOption) {
|
|
|
737
721
|
onNone: () => promptForSchemaInput(fn6.inputSchema ? JsonSchema4.toEffectSchema(fn6.inputSchema) : void 0, currentInput),
|
|
738
722
|
onSome: (value2) => Effect7.succeed(value2)
|
|
739
723
|
});
|
|
740
|
-
Obj2.
|
|
741
|
-
|
|
724
|
+
Obj2.update(trigger2, (trigger3) => {
|
|
725
|
+
trigger3.input = inputObj;
|
|
742
726
|
});
|
|
743
727
|
}
|
|
744
728
|
});
|
|
@@ -750,12 +734,12 @@ var updateEnabled = Effect7.fn(function* (trigger2, idOption, enabled) {
|
|
|
750
734
|
}).pipe(Prompt5.run),
|
|
751
735
|
onSome: () => Effect7.succeed(enabled)
|
|
752
736
|
});
|
|
753
|
-
Obj2.
|
|
754
|
-
|
|
737
|
+
Obj2.update(trigger2, (trigger3) => {
|
|
738
|
+
trigger3.enabled = enabledValue;
|
|
755
739
|
});
|
|
756
740
|
});
|
|
757
741
|
|
|
758
|
-
// src/
|
|
742
|
+
// src/commands/trigger/update/subscription.ts
|
|
759
743
|
import * as Command8 from "@effect/cli/Command";
|
|
760
744
|
import * as Options8 from "@effect/cli/Options";
|
|
761
745
|
import * as Prompt6 from "@effect/cli/Prompt";
|
|
@@ -766,8 +750,8 @@ import * as Option7 from "effect/Option";
|
|
|
766
750
|
import { CommandConfig as CommandConfig7 } from "@dxos/cli-util";
|
|
767
751
|
import { flushAndSync as flushAndSync5, print as print6, spaceLayer as spaceLayer7, withTypes as withTypes6 } from "@dxos/cli-util";
|
|
768
752
|
import { Common as Common7 } from "@dxos/cli-util";
|
|
769
|
-
import {
|
|
770
|
-
import {
|
|
753
|
+
import { Operation as Operation6, Trigger as Trigger8 } from "@dxos/compute";
|
|
754
|
+
import { DXN as DXN4, Database as Database8, Filter as Filter7, JsonSchema as JsonSchema5, Obj as Obj3, Query as Query4, Ref as Ref6 } from "@dxos/echo";
|
|
771
755
|
var subscription2 = Command8.make("subscription", {
|
|
772
756
|
spaceId: Common7.spaceId.pipe(Options8.optional),
|
|
773
757
|
id: TriggerId.pipe(Options8.optional),
|
|
@@ -800,7 +784,7 @@ var subscription2 = Command8.make("subscription", {
|
|
|
800
784
|
yield* flushAndSync5({
|
|
801
785
|
indexes: true
|
|
802
786
|
});
|
|
803
|
-
})).pipe(Command8.withDescription("Update a subscription trigger."), Command8.provide(({ spaceId }) => spaceLayer7(spaceId, true)), Command8.provideEffectDiscard(() => withTypes6(
|
|
787
|
+
})).pipe(Command8.withDescription("Update a subscription trigger."), Command8.provide(({ spaceId }) => spaceLayer7(spaceId, true)), Command8.provideEffectDiscard(() => withTypes6(Operation6.PersistentOperation, Trigger8.Trigger)));
|
|
804
788
|
var extractCurrentTypename = (spec) => {
|
|
805
789
|
if (!spec?.query?.ast) {
|
|
806
790
|
return Option7.none();
|
|
@@ -813,7 +797,7 @@ var extractCurrentTypename = (spec) => {
|
|
|
813
797
|
};
|
|
814
798
|
var updateFunction2 = Effect8.fn(function* (trigger2, functionIdOption) {
|
|
815
799
|
let currentFn = trigger2.function ? yield* Database8.load(trigger2.function) : void 0;
|
|
816
|
-
if (currentFn && !Obj3.instanceOf(
|
|
800
|
+
if (currentFn && !Obj3.instanceOf(Operation6.PersistentOperation, currentFn)) {
|
|
817
801
|
currentFn = void 0;
|
|
818
802
|
}
|
|
819
803
|
const currentFunctionName = currentFn ? currentFn.name ?? currentFn.id : void 0;
|
|
@@ -829,13 +813,13 @@ var updateFunction2 = Effect8.fn(function* (trigger2, functionIdOption) {
|
|
|
829
813
|
onNone: () => selectFunction(),
|
|
830
814
|
onSome: (id) => Effect8.succeed(id)
|
|
831
815
|
});
|
|
832
|
-
const functions = yield* Database8.runQuery(Filter7.type(
|
|
816
|
+
const functions = yield* Database8.runQuery(Filter7.type(Operation6.PersistentOperation));
|
|
833
817
|
const foundFn = functions.find((fn6) => fn6.id === functionId);
|
|
834
|
-
if (!foundFn || !Obj3.instanceOf(
|
|
818
|
+
if (!foundFn || !Obj3.instanceOf(Operation6.PersistentOperation, foundFn)) {
|
|
835
819
|
return yield* Effect8.fail(new Error(`Function not found: ${functionId}`));
|
|
836
820
|
}
|
|
837
|
-
Obj3.
|
|
838
|
-
|
|
821
|
+
Obj3.update(trigger2, (trigger3) => {
|
|
822
|
+
trigger3.function = Ref6.make(foundFn);
|
|
839
823
|
});
|
|
840
824
|
currentFn = foundFn;
|
|
841
825
|
}
|
|
@@ -874,7 +858,7 @@ var updateSpec = Effect8.fn(function* (trigger2, typenameOption, deepOption, del
|
|
|
874
858
|
}).pipe(Prompt6.run),
|
|
875
859
|
onSome: (value2) => Effect8.succeed(value2)
|
|
876
860
|
});
|
|
877
|
-
const queryAst =
|
|
861
|
+
const queryAst = Query4.select(Filter7.type(typename)).ast;
|
|
878
862
|
const deepOptionValue = yield* Option7.match(deepOption, {
|
|
879
863
|
onNone: () => Prompt6.confirm({
|
|
880
864
|
message: "Watch changes to nested properties (deep)?",
|
|
@@ -899,8 +883,8 @@ var updateSpec = Effect8.fn(function* (trigger2, typenameOption, deepOption, del
|
|
|
899
883
|
if (Option7.isSome(delayOptionValue)) {
|
|
900
884
|
subscriptionOptions.delay = delayOptionValue.value;
|
|
901
885
|
}
|
|
902
|
-
Obj3.
|
|
903
|
-
const spec =
|
|
886
|
+
Obj3.update(trigger2, (trigger3) => {
|
|
887
|
+
const spec = trigger3.spec;
|
|
904
888
|
if (spec?.kind === "subscription") {
|
|
905
889
|
spec.query = {
|
|
906
890
|
ast: queryAst
|
|
@@ -928,8 +912,8 @@ var updateInput2 = Effect8.fn(function* (trigger2, fn6, inputOption) {
|
|
|
928
912
|
onNone: () => promptForSchemaInput(fn6.inputSchema ? JsonSchema5.toEffectSchema(fn6.inputSchema) : void 0, currentInput),
|
|
929
913
|
onSome: (value2) => Effect8.succeed(value2)
|
|
930
914
|
});
|
|
931
|
-
Obj3.
|
|
932
|
-
|
|
915
|
+
Obj3.update(trigger2, (trigger3) => {
|
|
916
|
+
trigger3.input = inputObj;
|
|
933
917
|
});
|
|
934
918
|
}
|
|
935
919
|
});
|
|
@@ -941,12 +925,12 @@ var updateEnabled2 = Effect8.fn(function* (trigger2, idOption, enabled) {
|
|
|
941
925
|
}).pipe(Prompt6.run),
|
|
942
926
|
onSome: () => Effect8.succeed(enabled)
|
|
943
927
|
});
|
|
944
|
-
Obj3.
|
|
945
|
-
|
|
928
|
+
Obj3.update(trigger2, (trigger3) => {
|
|
929
|
+
trigger3.enabled = enabledValue;
|
|
946
930
|
});
|
|
947
931
|
});
|
|
948
932
|
|
|
949
|
-
// src/
|
|
933
|
+
// src/commands/trigger/update/timer.ts
|
|
950
934
|
import * as Command9 from "@effect/cli/Command";
|
|
951
935
|
import * as Options9 from "@effect/cli/Options";
|
|
952
936
|
import * as Prompt7 from "@effect/cli/Prompt";
|
|
@@ -956,8 +940,8 @@ import * as Option8 from "effect/Option";
|
|
|
956
940
|
import { CommandConfig as CommandConfig8 } from "@dxos/cli-util";
|
|
957
941
|
import { flushAndSync as flushAndSync6, print as print7, spaceLayer as spaceLayer8, withTypes as withTypes7 } from "@dxos/cli-util";
|
|
958
942
|
import { Common as Common8 } from "@dxos/cli-util";
|
|
943
|
+
import { Operation as Operation7, Trigger as Trigger9 } from "@dxos/compute";
|
|
959
944
|
import { DXN as DXN5, Database as Database9, Filter as Filter8, JsonSchema as JsonSchema6, Obj as Obj4, Ref as Ref7 } from "@dxos/echo";
|
|
960
|
-
import { Function as Function7, Trigger as Trigger9 } from "@dxos/functions";
|
|
961
945
|
var timer2 = Command9.make("timer", {
|
|
962
946
|
spaceId: Common8.spaceId.pipe(Options9.optional),
|
|
963
947
|
id: TriggerId.pipe(Options9.optional),
|
|
@@ -988,10 +972,10 @@ var timer2 = Command9.make("timer", {
|
|
|
988
972
|
yield* flushAndSync6({
|
|
989
973
|
indexes: true
|
|
990
974
|
});
|
|
991
|
-
})).pipe(Command9.withDescription("Update a timer trigger."), Command9.provide(({ spaceId }) => spaceLayer8(spaceId, true)), Command9.provideEffectDiscard(() => withTypes7(
|
|
975
|
+
})).pipe(Command9.withDescription("Update a timer trigger."), Command9.provide(({ spaceId }) => spaceLayer8(spaceId, true)), Command9.provideEffectDiscard(() => withTypes7(Operation7.PersistentOperation, Trigger9.Trigger)));
|
|
992
976
|
var updateFunction3 = Effect9.fn(function* (trigger2, functionIdOption) {
|
|
993
977
|
let currentFn = trigger2.function ? yield* Database9.load(trigger2.function) : void 0;
|
|
994
|
-
if (currentFn && !Obj4.instanceOf(
|
|
978
|
+
if (currentFn && !Obj4.instanceOf(Operation7.PersistentOperation, currentFn)) {
|
|
995
979
|
currentFn = void 0;
|
|
996
980
|
}
|
|
997
981
|
const currentFunctionName = currentFn ? currentFn.name ?? currentFn.id : void 0;
|
|
@@ -1007,13 +991,13 @@ var updateFunction3 = Effect9.fn(function* (trigger2, functionIdOption) {
|
|
|
1007
991
|
onNone: () => selectFunction(),
|
|
1008
992
|
onSome: (id) => Effect9.succeed(id)
|
|
1009
993
|
});
|
|
1010
|
-
const functions = yield* Database9.runQuery(Filter8.type(
|
|
994
|
+
const functions = yield* Database9.runQuery(Filter8.type(Operation7.PersistentOperation));
|
|
1011
995
|
const foundFn = functions.find((fn6) => fn6.id === functionId);
|
|
1012
|
-
if (!foundFn || !Obj4.instanceOf(
|
|
996
|
+
if (!foundFn || !Obj4.instanceOf(Operation7.PersistentOperation, foundFn)) {
|
|
1013
997
|
return yield* Effect9.fail(new Error(`Function not found: ${functionId}`));
|
|
1014
998
|
}
|
|
1015
|
-
Obj4.
|
|
1016
|
-
|
|
999
|
+
Obj4.update(trigger2, (trigger3) => {
|
|
1000
|
+
trigger3.function = Ref7.make(foundFn);
|
|
1017
1001
|
});
|
|
1018
1002
|
currentFn = foundFn;
|
|
1019
1003
|
}
|
|
@@ -1039,9 +1023,9 @@ var updateCron = Effect9.fn(function* (trigger2, cronOption) {
|
|
|
1039
1023
|
}).pipe(Prompt7.run),
|
|
1040
1024
|
onSome: (value2) => Effect9.succeed(value2)
|
|
1041
1025
|
});
|
|
1042
|
-
Obj4.
|
|
1043
|
-
if (
|
|
1044
|
-
|
|
1026
|
+
Obj4.update(trigger2, (trigger3) => {
|
|
1027
|
+
if (trigger3.spec?.kind === "timer") {
|
|
1028
|
+
trigger3.spec.cron = cron;
|
|
1045
1029
|
}
|
|
1046
1030
|
});
|
|
1047
1031
|
}
|
|
@@ -1064,8 +1048,8 @@ var updateInput3 = Effect9.fn(function* (trigger2, fn6, inputOption) {
|
|
|
1064
1048
|
onNone: () => promptForSchemaInput(fn6.inputSchema ? JsonSchema6.toEffectSchema(fn6.inputSchema) : void 0, currentInput),
|
|
1065
1049
|
onSome: (value2) => Effect9.succeed(value2)
|
|
1066
1050
|
});
|
|
1067
|
-
Obj4.
|
|
1068
|
-
|
|
1051
|
+
Obj4.update(trigger2, (trigger3) => {
|
|
1052
|
+
trigger3.input = inputObj;
|
|
1069
1053
|
});
|
|
1070
1054
|
}
|
|
1071
1055
|
});
|
|
@@ -1077,19 +1061,19 @@ var updateEnabled3 = Effect9.fn(function* (trigger2, idOption, enabled) {
|
|
|
1077
1061
|
}).pipe(Prompt7.run),
|
|
1078
1062
|
onSome: () => Effect9.succeed(enabled)
|
|
1079
1063
|
});
|
|
1080
|
-
Obj4.
|
|
1081
|
-
|
|
1064
|
+
Obj4.update(trigger2, (trigger3) => {
|
|
1065
|
+
trigger3.enabled = enabledValue;
|
|
1082
1066
|
});
|
|
1083
1067
|
});
|
|
1084
1068
|
|
|
1085
|
-
// src/
|
|
1069
|
+
// src/commands/trigger/update/index.ts
|
|
1086
1070
|
var update = Command10.make("update").pipe(Command10.withDescription("Update a trigger."), Command10.withSubcommands([
|
|
1087
1071
|
subscription2,
|
|
1088
1072
|
timer2,
|
|
1089
1073
|
queue2
|
|
1090
1074
|
]));
|
|
1091
1075
|
|
|
1092
|
-
// src/
|
|
1076
|
+
// src/commands/trigger/index.ts
|
|
1093
1077
|
var trigger = Command11.make("trigger").pipe(Command11.withDescription("Manage EDGE triggers."), Command11.withSubcommands([
|
|
1094
1078
|
create,
|
|
1095
1079
|
list,
|
|
@@ -1097,19 +1081,31 @@ var trigger = Command11.make("trigger").pipe(Command11.withDescription("Manage E
|
|
|
1097
1081
|
update
|
|
1098
1082
|
]));
|
|
1099
1083
|
|
|
1100
|
-
// src/
|
|
1101
|
-
var AutomationPlugin = Plugin.define(meta).pipe(AppPlugin.
|
|
1084
|
+
// src/AutomationPlugin.node.ts
|
|
1085
|
+
var AutomationPlugin = Plugin.define(meta).pipe(AppPlugin.addAppGraphModule({
|
|
1086
|
+
activate: AppGraphBuilder
|
|
1087
|
+
}), AppPlugin.addCommandModule({
|
|
1102
1088
|
commands: [
|
|
1103
1089
|
trigger
|
|
1104
1090
|
]
|
|
1091
|
+
}), AppPlugin.addOperationHandlerModule({
|
|
1092
|
+
activate: OperationHandler
|
|
1093
|
+
}), AppPlugin.addSchemaModule({
|
|
1094
|
+
schema: [
|
|
1095
|
+
Operation8.PersistentOperation,
|
|
1096
|
+
Trigger10.Trigger,
|
|
1097
|
+
Trace.Message
|
|
1098
|
+
]
|
|
1105
1099
|
}), Plugin.addModule({
|
|
1106
1100
|
activatesOn: ClientEvents.ClientReady,
|
|
1107
|
-
|
|
1108
|
-
|
|
1101
|
+
firesBeforeActivation: [
|
|
1102
|
+
ActivationEvents.SetupProcessManager
|
|
1109
1103
|
],
|
|
1110
|
-
activate:
|
|
1104
|
+
activate: LayerSpecs
|
|
1111
1105
|
}), Plugin.make);
|
|
1106
|
+
var AutomationPlugin_node_default = AutomationPlugin;
|
|
1112
1107
|
export {
|
|
1113
|
-
AutomationPlugin
|
|
1108
|
+
AutomationPlugin,
|
|
1109
|
+
AutomationPlugin_node_default as default
|
|
1114
1110
|
};
|
|
1115
|
-
//# sourceMappingURL=
|
|
1111
|
+
//# sourceMappingURL=AutomationPlugin.node.mjs.map
|