@dxos/functions 0.6.14-main.f49f251 → 0.6.14-staging.3e2eaca

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.
Files changed (32) hide show
  1. package/dist/lib/browser/{chunk-TNNXVSUN.mjs → chunk-7QJNOQ6N.mjs} +25 -24
  2. package/dist/lib/browser/chunk-7QJNOQ6N.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-2O2MAZE4.mjs → chunk-L7H5DE53.mjs} +2 -2
  4. package/dist/lib/browser/index.mjs +2 -2
  5. package/dist/lib/browser/meta.json +1 -1
  6. package/dist/lib/browser/testing/index.mjs +2 -2
  7. package/dist/lib/browser/types.mjs +1 -1
  8. package/dist/lib/node/{chunk-SCSHB4MF.cjs → chunk-3KJEM5VR.cjs} +15 -15
  9. package/dist/lib/node/{chunk-O44VB3FE.cjs → chunk-TNG3Z74V.cjs} +28 -27
  10. package/dist/lib/node/chunk-TNG3Z74V.cjs.map +7 -0
  11. package/dist/lib/node/index.cjs +12 -12
  12. package/dist/lib/node/meta.json +1 -1
  13. package/dist/lib/node/testing/index.cjs +10 -10
  14. package/dist/lib/node/types.cjs +5 -5
  15. package/dist/lib/node/types.cjs.map +1 -1
  16. package/dist/lib/node-esm/{chunk-AM7SW4YW.mjs → chunk-DMTGUST2.mjs} +2 -2
  17. package/dist/lib/node-esm/{chunk-TJ4S5QZ3.mjs → chunk-SLC6ICH2.mjs} +25 -24
  18. package/dist/lib/node-esm/chunk-SLC6ICH2.mjs.map +7 -0
  19. package/dist/lib/node-esm/index.mjs +2 -2
  20. package/dist/lib/node-esm/meta.json +1 -1
  21. package/dist/lib/node-esm/testing/index.mjs +2 -2
  22. package/dist/lib/node-esm/types.mjs +1 -1
  23. package/dist/types/src/types.d.ts +36 -36
  24. package/dist/types/src/types.d.ts.map +1 -1
  25. package/package.json +14 -14
  26. package/src/types.ts +36 -44
  27. package/dist/lib/browser/chunk-TNNXVSUN.mjs.map +0 -7
  28. package/dist/lib/node/chunk-O44VB3FE.cjs.map +0 -7
  29. package/dist/lib/node-esm/chunk-TJ4S5QZ3.mjs.map +0 -7
  30. /package/dist/lib/browser/{chunk-2O2MAZE4.mjs.map → chunk-L7H5DE53.mjs.map} +0 -0
  31. /package/dist/lib/node/{chunk-SCSHB4MF.cjs.map → chunk-3KJEM5VR.cjs.map} +0 -0
  32. /package/dist/lib/node-esm/{chunk-AM7SW4YW.mjs.map → chunk-DMTGUST2.mjs.map} +0 -0
@@ -1 +1 @@
1
- {"inputs":{"packages/core/functions/src/types.ts":{"bytes":10352,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/function/function-registry.ts":{"bytes":13004,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/function/index.ts":{"bytes":529,"imports":[{"path":"packages/core/functions/src/function/function-registry.ts","kind":"import-statement","original":"./function-registry"}],"format":"esm"},"packages/core/functions/src/handler.ts":{"bytes":10610,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/subscription-trigger.ts":{"bytes":10343,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytes":4173,"imports":[{"path":"cron","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/websocket-trigger.ts":{"bytes":13341,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/index.ts":{"bytes":864,"imports":[{"path":"packages/core/functions/src/trigger/type/subscription-trigger.ts","kind":"import-statement","original":"./subscription-trigger"},{"path":"packages/core/functions/src/trigger/type/timer-trigger.ts","kind":"import-statement","original":"./timer-trigger"},{"path":"packages/core/functions/src/trigger/type/websocket-trigger.ts","kind":"import-statement","original":"./websocket-trigger"}],"format":"esm"},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytes":28453,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/trigger/type/index.ts","kind":"import-statement","original":"./type"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/trigger/index.ts":{"bytes":603,"imports":[{"path":"packages/core/functions/src/trigger/trigger-registry.ts","kind":"import-statement","original":"./trigger-registry"},{"path":"packages/core/functions/src/trigger/type/index.ts","kind":"import-statement","original":"./type"}],"format":"esm"},"packages/core/functions/src/index.ts":{"bytes":840,"imports":[{"path":"packages/core/functions/src/function/index.ts","kind":"import-statement","original":"./function"},{"path":"packages/core/functions/src/handler.ts","kind":"import-statement","original":"./handler"},{"path":"packages/core/functions/src/trigger/index.ts","kind":"import-statement","original":"./trigger"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/core/functions/src/testing/types.ts":{"bytes":1131,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/dev-server.ts":{"bytes":28958,"imports":[{"path":"express","kind":"import-statement","external":true},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/scheduler.ts":{"bytes":21084,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/index.ts":{"bytes":598,"imports":[{"path":"packages/core/functions/src/runtime/dev-server.ts","kind":"import-statement","original":"./dev-server"},{"path":"packages/core/functions/src/runtime/scheduler.ts","kind":"import-statement","original":"./scheduler"}],"format":"esm"},"packages/core/functions/src/testing/setup.ts":{"bytes":12707,"imports":[{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/function/index.ts","kind":"import-statement","original":"../function"},{"path":"packages/core/functions/src/runtime/index.ts","kind":"import-statement","original":"../runtime"},{"path":"packages/core/functions/src/trigger/index.ts","kind":"import-statement","original":"../trigger"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/util.ts":{"bytes":4292,"imports":[{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/manifest.ts":{"bytes":1139,"imports":[],"format":"esm"},"packages/core/functions/src/testing/index.ts":{"bytes":749,"imports":[{"path":"packages/core/functions/src/testing/setup.ts","kind":"import-statement","original":"./setup"},{"path":"packages/core/functions/src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/testing/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/core/functions/src/testing/manifest.ts","kind":"import-statement","original":"./manifest"}],"format":"esm"}},"outputs":{"packages/core/functions/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5750},"packages/core/functions/dist/lib/node/index.cjs":{"imports":[{"path":"packages/core/functions/dist/lib/node/chunk-SCSHB4MF.cjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node/chunk-O44VB3FE.cjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionRegistry","FunctionTrigger","TriggerRegistry","createSubscriptionTrigger","createTimerTrigger","createWebSocket","createWebsocketTrigger","subscriptionHandler"],"entryPoint":"packages/core/functions/src/index.ts","inputs":{"packages/core/functions/src/index.ts":{"bytesInOutput":0},"packages/core/functions/src/handler.ts":{"bytesInOutput":1624}},"bytes":2242},"packages/core/functions/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32236},"packages/core/functions/dist/lib/node/testing/index.cjs":{"imports":[{"path":"packages/core/functions/dist/lib/node/chunk-SCSHB4MF.cjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node/chunk-O44VB3FE.cjs","kind":"import-statement"},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"express","kind":"import-statement","external":true},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"exports":["TestType","createFunctionRuntime","createInitializedClients","inviteMember","startFunctionsHost","testFunctionManifest","triggerWebhook"],"entryPoint":"packages/core/functions/src/testing/index.ts","inputs":{"packages/core/functions/src/testing/setup.ts":{"bytesInOutput":2775},"packages/core/functions/src/testing/types.ts":{"bytesInOutput":182},"packages/core/functions/src/runtime/dev-server.ts":{"bytesInOutput":7860},"packages/core/functions/src/runtime/index.ts":{"bytesInOutput":0},"packages/core/functions/src/runtime/scheduler.ts":{"bytesInOutput":5330},"packages/core/functions/src/testing/index.ts":{"bytesInOutput":0},"packages/core/functions/src/testing/util.ts":{"bytesInOutput":1051},"packages/core/functions/src/testing/manifest.ts":{"bytesInOutput":146}},"bytes":18055},"packages/core/functions/dist/lib/node/chunk-SCSHB4MF.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33088},"packages/core/functions/dist/lib/node/chunk-SCSHB4MF.cjs":{"imports":[{"path":"packages/core/functions/dist/lib/node/chunk-O44VB3FE.cjs","kind":"import-statement"},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"cron","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["FunctionRegistry","TriggerRegistry","createSubscriptionTrigger","createTimerTrigger","createWebSocket","createWebsocketTrigger"],"inputs":{"packages/core/functions/src/function/function-registry.ts":{"bytesInOutput":3046},"packages/core/functions/src/function/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/type/subscription-trigger.ts":{"bytesInOutput":2008},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytesInOutput":898},"packages/core/functions/src/trigger/type/websocket-trigger.ts":{"bytesInOutput":3491},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytesInOutput":7421},"packages/core/functions/src/trigger/type/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/index.ts":{"bytesInOutput":0}},"bytes":17447},"packages/core/functions/dist/lib/node/types.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node/types.cjs":{"imports":[{"path":"packages/core/functions/dist/lib/node/chunk-O44VB3FE.cjs","kind":"import-statement"}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionTrigger"],"entryPoint":"packages/core/functions/src/types.ts","inputs":{},"bytes":243},"packages/core/functions/dist/lib/node/chunk-O44VB3FE.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5698},"packages/core/functions/dist/lib/node/chunk-O44VB3FE.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionTrigger","__require"],"inputs":{"packages/core/functions/src/types.ts":{"bytesInOutput":2005}},"bytes":2559}}}
1
+ {"inputs":{"packages/core/functions/src/types.ts":{"bytes":10493,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/function/function-registry.ts":{"bytes":13004,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/function/index.ts":{"bytes":529,"imports":[{"path":"packages/core/functions/src/function/function-registry.ts","kind":"import-statement","original":"./function-registry"}],"format":"esm"},"packages/core/functions/src/handler.ts":{"bytes":10610,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/subscription-trigger.ts":{"bytes":10343,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytes":4173,"imports":[{"path":"cron","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/websocket-trigger.ts":{"bytes":13341,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/index.ts":{"bytes":864,"imports":[{"path":"packages/core/functions/src/trigger/type/subscription-trigger.ts","kind":"import-statement","original":"./subscription-trigger"},{"path":"packages/core/functions/src/trigger/type/timer-trigger.ts","kind":"import-statement","original":"./timer-trigger"},{"path":"packages/core/functions/src/trigger/type/websocket-trigger.ts","kind":"import-statement","original":"./websocket-trigger"}],"format":"esm"},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytes":28453,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/trigger/type/index.ts","kind":"import-statement","original":"./type"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/trigger/index.ts":{"bytes":603,"imports":[{"path":"packages/core/functions/src/trigger/trigger-registry.ts","kind":"import-statement","original":"./trigger-registry"},{"path":"packages/core/functions/src/trigger/type/index.ts","kind":"import-statement","original":"./type"}],"format":"esm"},"packages/core/functions/src/index.ts":{"bytes":840,"imports":[{"path":"packages/core/functions/src/function/index.ts","kind":"import-statement","original":"./function"},{"path":"packages/core/functions/src/handler.ts","kind":"import-statement","original":"./handler"},{"path":"packages/core/functions/src/trigger/index.ts","kind":"import-statement","original":"./trigger"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/core/functions/src/testing/types.ts":{"bytes":1131,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/dev-server.ts":{"bytes":28958,"imports":[{"path":"express","kind":"import-statement","external":true},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/scheduler.ts":{"bytes":21084,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/index.ts":{"bytes":598,"imports":[{"path":"packages/core/functions/src/runtime/dev-server.ts","kind":"import-statement","original":"./dev-server"},{"path":"packages/core/functions/src/runtime/scheduler.ts","kind":"import-statement","original":"./scheduler"}],"format":"esm"},"packages/core/functions/src/testing/setup.ts":{"bytes":12707,"imports":[{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/function/index.ts","kind":"import-statement","original":"../function"},{"path":"packages/core/functions/src/runtime/index.ts","kind":"import-statement","original":"../runtime"},{"path":"packages/core/functions/src/trigger/index.ts","kind":"import-statement","original":"../trigger"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/util.ts":{"bytes":4292,"imports":[{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/manifest.ts":{"bytes":1139,"imports":[],"format":"esm"},"packages/core/functions/src/testing/index.ts":{"bytes":749,"imports":[{"path":"packages/core/functions/src/testing/setup.ts","kind":"import-statement","original":"./setup"},{"path":"packages/core/functions/src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/testing/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/core/functions/src/testing/manifest.ts","kind":"import-statement","original":"./manifest"}],"format":"esm"}},"outputs":{"packages/core/functions/dist/lib/node/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5750},"packages/core/functions/dist/lib/node/index.cjs":{"imports":[{"path":"packages/core/functions/dist/lib/node/chunk-3KJEM5VR.cjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node/chunk-TNG3Z74V.cjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionRegistry","FunctionTrigger","TriggerRegistry","createSubscriptionTrigger","createTimerTrigger","createWebSocket","createWebsocketTrigger","subscriptionHandler"],"entryPoint":"packages/core/functions/src/index.ts","inputs":{"packages/core/functions/src/index.ts":{"bytesInOutput":0},"packages/core/functions/src/handler.ts":{"bytesInOutput":1624}},"bytes":2242},"packages/core/functions/dist/lib/node/testing/index.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32236},"packages/core/functions/dist/lib/node/testing/index.cjs":{"imports":[{"path":"packages/core/functions/dist/lib/node/chunk-3KJEM5VR.cjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node/chunk-TNG3Z74V.cjs","kind":"import-statement"},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"express","kind":"import-statement","external":true},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"exports":["TestType","createFunctionRuntime","createInitializedClients","inviteMember","startFunctionsHost","testFunctionManifest","triggerWebhook"],"entryPoint":"packages/core/functions/src/testing/index.ts","inputs":{"packages/core/functions/src/testing/setup.ts":{"bytesInOutput":2775},"packages/core/functions/src/testing/types.ts":{"bytesInOutput":182},"packages/core/functions/src/runtime/dev-server.ts":{"bytesInOutput":7860},"packages/core/functions/src/runtime/index.ts":{"bytesInOutput":0},"packages/core/functions/src/runtime/scheduler.ts":{"bytesInOutput":5330},"packages/core/functions/src/testing/index.ts":{"bytesInOutput":0},"packages/core/functions/src/testing/util.ts":{"bytesInOutput":1051},"packages/core/functions/src/testing/manifest.ts":{"bytesInOutput":146}},"bytes":18055},"packages/core/functions/dist/lib/node/chunk-3KJEM5VR.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33088},"packages/core/functions/dist/lib/node/chunk-3KJEM5VR.cjs":{"imports":[{"path":"packages/core/functions/dist/lib/node/chunk-TNG3Z74V.cjs","kind":"import-statement"},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"cron","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["FunctionRegistry","TriggerRegistry","createSubscriptionTrigger","createTimerTrigger","createWebSocket","createWebsocketTrigger"],"inputs":{"packages/core/functions/src/function/function-registry.ts":{"bytesInOutput":3046},"packages/core/functions/src/function/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/type/subscription-trigger.ts":{"bytesInOutput":2008},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytesInOutput":898},"packages/core/functions/src/trigger/type/websocket-trigger.ts":{"bytesInOutput":3491},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytesInOutput":7421},"packages/core/functions/src/trigger/type/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/index.ts":{"bytesInOutput":0}},"bytes":17447},"packages/core/functions/dist/lib/node/types.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node/types.cjs":{"imports":[{"path":"packages/core/functions/dist/lib/node/chunk-TNG3Z74V.cjs","kind":"import-statement"}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionTrigger"],"entryPoint":"packages/core/functions/src/types.ts","inputs":{},"bytes":243},"packages/core/functions/dist/lib/node/chunk-TNG3Z74V.cjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5742},"packages/core/functions/dist/lib/node/chunk-TNG3Z74V.cjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionTrigger","__require"],"inputs":{"packages/core/functions/src/types.ts":{"bytesInOutput":2072}},"bytes":2626}}}
@@ -37,8 +37,8 @@ __export(testing_exports, {
37
37
  triggerWebhook: () => triggerWebhook
38
38
  });
39
39
  module.exports = __toCommonJS(testing_exports);
40
- var import_chunk_SCSHB4MF = require("../chunk-SCSHB4MF.cjs");
41
- var import_chunk_O44VB3FE = require("../chunk-O44VB3FE.cjs");
40
+ var import_chunk_3KJEM5VR = require("../chunk-3KJEM5VR.cjs");
41
+ var import_chunk_TNG3Z74V = require("../chunk-TNG3Z74V.cjs");
42
42
  var import_get_port_please = require("get-port-please");
43
43
  var import_node_path = __toESM(require("node:path"));
44
44
  var import_async = require("@dxos/async");
@@ -276,11 +276,11 @@ var DevServer = class {
276
276
  C: (f, a) => f(...a)
277
277
  });
278
278
  if (force) {
279
- Object.keys(import_chunk_O44VB3FE.__require.cache).filter((key) => key.startsWith(filePath)).forEach((key) => {
280
- delete import_chunk_O44VB3FE.__require.cache[key];
279
+ Object.keys(import_chunk_TNG3Z74V.__require.cache).filter((key) => key.startsWith(filePath)).forEach((key) => {
280
+ delete import_chunk_TNG3Z74V.__require.cache[key];
281
281
  });
282
282
  }
283
- const module2 = (0, import_chunk_O44VB3FE.__require)(filePath);
283
+ const module2 = (0, import_chunk_TNG3Z74V.__require)(filePath);
284
284
  if (typeof module2.default !== "function") {
285
285
  throw new Error(`Handler must export default function: ${uri}`);
286
286
  }
@@ -569,8 +569,8 @@ var createInitializedClients = async (testBuilder, count = 1, config) => {
569
569
  config,
570
570
  services: testBuilder.createLocalClientServices(),
571
571
  types: [
572
- import_chunk_O44VB3FE.FunctionDef,
573
- import_chunk_O44VB3FE.FunctionTrigger,
572
+ import_chunk_TNG3Z74V.FunctionDef,
573
+ import_chunk_TNG3Z74V.FunctionTrigger,
574
574
  TestType
575
575
  ]
576
576
  }));
@@ -607,7 +607,7 @@ var createFunctionRuntime = async (testBuilder, pluginInitializer) => {
607
607
  };
608
608
  var startFunctionsHost = async (testBuilder, pluginInitializer, options) => {
609
609
  const functionRuntime = await createFunctionRuntime(testBuilder, pluginInitializer);
610
- const functionsRegistry = new import_chunk_SCSHB4MF.FunctionRegistry(functionRuntime);
610
+ const functionsRegistry = new import_chunk_3KJEM5VR.FunctionRegistry(functionRuntime);
611
611
  const devServer = await startDevServer(testBuilder, functionRuntime, functionsRegistry, options);
612
612
  const scheduler = await startScheduler(testBuilder, functionRuntime, devServer, functionsRegistry);
613
613
  return {
@@ -621,7 +621,7 @@ var startFunctionsHost = async (testBuilder, pluginInitializer, options) => {
621
621
  };
622
622
  };
623
623
  var startScheduler = async (testBuilder, client, devServer, functionRegistry) => {
624
- const triggerRegistry = new import_chunk_SCSHB4MF.TriggerRegistry(client);
624
+ const triggerRegistry = new import_chunk_3KJEM5VR.TriggerRegistry(client);
625
625
  const scheduler = new Scheduler(functionRegistry, triggerRegistry, {
626
626
  endpoint: devServer.endpoint
627
627
  });
@@ -641,7 +641,7 @@ var startDevServer = async (testBuilder, client, functionRegistry, options) => {
641
641
  };
642
642
  var __dxlog_file3 = "/home/runner/work/dxos/dxos/packages/core/functions/src/testing/util.ts";
643
643
  var triggerWebhook = async (space, uri) => {
644
- const trigger = (await space.db.query(import_echo2.Filter.schema(import_chunk_O44VB3FE.FunctionTrigger, (t) => t.function === uri)).run()).objects[0];
644
+ const trigger = (await space.db.query(import_echo2.Filter.schema(import_chunk_TNG3Z74V.FunctionTrigger, (t) => t.function === uri)).run()).objects[0];
645
645
  (0, import_invariant2.invariant)(trigger.spec.type === "webhook", void 0, {
646
646
  F: __dxlog_file3,
647
647
  L: 17,
@@ -18,13 +18,13 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var types_exports = {};
20
20
  __export(types_exports, {
21
- FUNCTION_SCHEMA: () => import_chunk_O44VB3FE.FUNCTION_SCHEMA,
22
- FunctionDef: () => import_chunk_O44VB3FE.FunctionDef,
23
- FunctionManifestSchema: () => import_chunk_O44VB3FE.FunctionManifestSchema,
24
- FunctionTrigger: () => import_chunk_O44VB3FE.FunctionTrigger
21
+ FUNCTION_SCHEMA: () => import_chunk_TNG3Z74V.FUNCTION_SCHEMA,
22
+ FunctionDef: () => import_chunk_TNG3Z74V.FunctionDef,
23
+ FunctionManifestSchema: () => import_chunk_TNG3Z74V.FunctionManifestSchema,
24
+ FunctionTrigger: () => import_chunk_TNG3Z74V.FunctionTrigger
25
25
  });
26
26
  module.exports = __toCommonJS(types_exports);
27
- var import_chunk_O44VB3FE = require("./chunk-O44VB3FE.cjs");
27
+ var import_chunk_TNG3Z74V = require("./chunk-TNG3Z74V.cjs");
28
28
  // Annotate the CommonJS export names for ESM import in node:
29
29
  0 && (module.exports = {
30
30
  FUNCTION_SCHEMA,
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["types.cjs"],
4
- "sourcesContent": ["import {\n FUNCTION_SCHEMA,\n FunctionDef,\n FunctionManifestSchema,\n FunctionTrigger\n} from \"./chunk-O44VB3FE.cjs\";\nexport {\n FUNCTION_SCHEMA,\n FunctionDef,\n FunctionManifestSchema,\n FunctionTrigger\n};\n//# sourceMappingURL=types.cjs.map\n"],
4
+ "sourcesContent": ["import {\n FUNCTION_SCHEMA,\n FunctionDef,\n FunctionManifestSchema,\n FunctionTrigger\n} from \"./chunk-TNG3Z74V.cjs\";\nexport {\n FUNCTION_SCHEMA,\n FunctionDef,\n FunctionManifestSchema,\n FunctionTrigger\n};\n//# sourceMappingURL=types.cjs.map\n"],
5
5
  "mappings": ";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,4BAKO;",
6
6
  "names": []
7
7
  }
@@ -2,7 +2,7 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
  import {
3
3
  FunctionDef,
4
4
  FunctionTrigger
5
- } from "./chunk-TJ4S5QZ3.mjs";
5
+ } from "./chunk-SLC6ICH2.mjs";
6
6
 
7
7
  // packages/core/functions/src/function/function-registry.ts
8
8
  import { Event } from "@dxos/async";
@@ -601,4 +601,4 @@ export {
601
601
  createWebSocket,
602
602
  TriggerRegistry
603
603
  };
604
- //# sourceMappingURL=chunk-AM7SW4YW.mjs.map
604
+ //# sourceMappingURL=chunk-DMTGUST2.mjs.map
@@ -8,41 +8,42 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require
8
8
 
9
9
  // packages/core/functions/src/types.ts
10
10
  import { RawObject, S, TypedObject } from "@dxos/echo-schema";
11
- var SubscriptionTriggerSchema = S.mutable(S.Struct({
12
- type: S.Literal("subscription"),
13
- // TODO(burdon): Define query DSL (from ECHO).
14
- filter: S.Array(S.Struct({
15
- type: S.String,
16
- props: S.optional(S.Record({
17
- key: S.String,
18
- value: S.Any
19
- }))
20
- })),
21
- options: S.optional(S.Struct({
22
- // Watch changes to object (not just creation).
23
- deep: S.optional(S.Boolean),
24
- // Debounce changes (delay in ms).
25
- delay: S.optional(S.Number)
26
- }))
27
- }));
28
- var TimerTriggerSchema = S.mutable(S.Struct({
11
+ var TimerTriggerSchema = S.Struct({
29
12
  type: S.Literal("timer"),
30
13
  cron: S.String
31
- }));
32
- var WebhookTriggerSchema = S.mutable(S.Struct({
14
+ }).pipe(S.mutable);
15
+ var WebhookTriggerSchema = S.Struct({
33
16
  type: S.Literal("webhook"),
34
17
  method: S.String,
35
18
  // Assigned port.
36
19
  port: S.optional(S.Number)
37
- }));
38
- var WebsocketTriggerSchema = S.mutable(S.Struct({
20
+ }).pipe(S.mutable);
21
+ var WebsocketTriggerSchema = S.Struct({
39
22
  type: S.Literal("websocket"),
40
23
  url: S.String,
41
24
  init: S.optional(S.Record({
42
25
  key: S.String,
43
26
  value: S.Any
44
27
  }))
45
- }));
28
+ }).pipe(S.mutable);
29
+ var QuerySchema = S.Struct({
30
+ type: S.String,
31
+ props: S.optional(S.Record({
32
+ key: S.String,
33
+ value: S.Any
34
+ }))
35
+ });
36
+ var SubscriptionTriggerSchema = S.Struct({
37
+ type: S.Literal("subscription"),
38
+ // TODO(burdon): Define query DSL (from ECHO). Reconcile with Table.Query.
39
+ filter: S.Array(QuerySchema),
40
+ options: S.optional(S.Struct({
41
+ // Watch changes to object (not just creation).
42
+ deep: S.optional(S.Boolean),
43
+ // Debounce changes (delay in ms).
44
+ delay: S.optional(S.Number)
45
+ }))
46
+ }).pipe(S.mutable);
46
47
  var TriggerSpecSchema = S.Union(TimerTriggerSchema, WebhookTriggerSchema, WebsocketTriggerSchema, SubscriptionTriggerSchema);
47
48
  var FunctionDef = class extends TypedObject({
48
49
  typename: "dxos.org/type/FunctionDef",
@@ -87,4 +88,4 @@ export {
87
88
  FunctionManifestSchema,
88
89
  FUNCTION_SCHEMA
89
90
  };
90
- //# sourceMappingURL=chunk-TJ4S5QZ3.mjs.map
91
+ //# sourceMappingURL=chunk-SLC6ICH2.mjs.map
@@ -0,0 +1,7 @@
1
+ {
2
+ "version": 3,
3
+ "sources": ["../../../src/types.ts"],
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { RawObject, S, TypedObject } from '@dxos/echo-schema';\n\n/**\n * Type discriminator for TriggerSpec.\n * Every spec has a type field of type FunctionTriggerType that we can use to understand which\n * type we're working with.\n * https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions\n */\nexport type FunctionTriggerType = 'subscription' | 'timer' | 'webhook' | 'websocket';\n\nconst TimerTriggerSchema = S.Struct({\n type: S.Literal('timer'),\n cron: S.String,\n}).pipe(S.mutable);\n\nexport type TimerTrigger = S.Schema.Type<typeof TimerTriggerSchema>;\n\nconst WebhookTriggerSchema = S.Struct({\n type: S.Literal('webhook'),\n method: S.String,\n // Assigned port.\n port: S.optional(S.Number),\n}).pipe(S.mutable);\n\nexport type WebhookTrigger = S.Schema.Type<typeof WebhookTriggerSchema>;\n\nconst WebsocketTriggerSchema = S.Struct({\n type: S.Literal('websocket'),\n url: S.String,\n init: S.optional(S.Record({ key: S.String, value: S.Any })),\n}).pipe(S.mutable);\n\nexport type WebsocketTrigger = S.Schema.Type<typeof WebsocketTriggerSchema>;\n\nconst QuerySchema = S.Struct({\n type: S.String,\n props: S.optional(S.Record({ key: S.String, value: S.Any })),\n});\n\nconst SubscriptionTriggerSchema = S.Struct({\n type: S.Literal('subscription'),\n // TODO(burdon): Define query DSL (from ECHO). Reconcile with Table.Query.\n filter: S.Array(QuerySchema),\n options: S.optional(\n S.Struct({\n // Watch changes to object (not just creation).\n deep: S.optional(S.Boolean),\n // Debounce changes (delay in ms).\n delay: S.optional(S.Number),\n }),\n ),\n}).pipe(S.mutable);\n\nexport type SubscriptionTrigger = S.Schema.Type<typeof SubscriptionTriggerSchema>;\n\nconst TriggerSpecSchema = S.Union(\n TimerTriggerSchema,\n WebhookTriggerSchema,\n WebsocketTriggerSchema,\n SubscriptionTriggerSchema,\n);\n\nexport type TriggerSpec = TimerTrigger | WebhookTrigger | WebsocketTrigger | SubscriptionTrigger;\n\n/**\n * Function definition.\n */\nexport class FunctionDef extends TypedObject({\n typename: 'dxos.org/type/FunctionDef',\n version: '0.1.0',\n})({\n uri: S.String,\n description: S.optional(S.String),\n route: S.String,\n handler: S.String,\n}) {}\n\n/**\n * Function trigger.\n */\nexport class FunctionTrigger extends TypedObject({\n typename: 'dxos.org/type/FunctionTrigger',\n version: '0.1.0',\n})({\n name: S.optional(S.String),\n enabled: S.optional(S.Boolean),\n function: S.String.pipe(S.annotations({ description: 'Function URI.' })),\n // The `meta` property is merged into the event data passed to the function.\n meta: S.optional(S.mutable(S.Record({ key: S.String, value: S.Any }))),\n spec: TriggerSpecSchema,\n}) {}\n\n/**\n * Function manifest file.\n */\nexport const FunctionManifestSchema = S.Struct({\n functions: S.optional(S.mutable(S.Array(RawObject(FunctionDef)))),\n triggers: S.optional(S.mutable(S.Array(RawObject(FunctionTrigger)))),\n});\n\nexport type FunctionManifest = S.Schema.Type<typeof FunctionManifestSchema>;\n\n// TODO(burdon): Standards?\nexport const FUNCTION_SCHEMA = [FunctionDef, FunctionTrigger];\n"],
5
+ "mappings": ";;;;;;;;;AAIA,SAASA,WAAWC,GAAGC,mBAAmB;AAU1C,IAAMC,qBAAqBC,EAAEC,OAAO;EAClCC,MAAMF,EAAEG,QAAQ,OAAA;EAChBC,MAAMJ,EAAEK;AACV,CAAA,EAAGC,KAAKN,EAAEO,OAAO;AAIjB,IAAMC,uBAAuBR,EAAEC,OAAO;EACpCC,MAAMF,EAAEG,QAAQ,SAAA;EAChBM,QAAQT,EAAEK;;EAEVK,MAAMV,EAAEW,SAASX,EAAEY,MAAM;AAC3B,CAAA,EAAGN,KAAKN,EAAEO,OAAO;AAIjB,IAAMM,yBAAyBb,EAAEC,OAAO;EACtCC,MAAMF,EAAEG,QAAQ,WAAA;EAChBW,KAAKd,EAAEK;EACPU,MAAMf,EAAEW,SAASX,EAAEgB,OAAO;IAAEC,KAAKjB,EAAEK;IAAQa,OAAOlB,EAAEmB;EAAI,CAAA,CAAA;AAC1D,CAAA,EAAGb,KAAKN,EAAEO,OAAO;AAIjB,IAAMa,cAAcpB,EAAEC,OAAO;EAC3BC,MAAMF,EAAEK;EACRgB,OAAOrB,EAAEW,SAASX,EAAEgB,OAAO;IAAEC,KAAKjB,EAAEK;IAAQa,OAAOlB,EAAEmB;EAAI,CAAA,CAAA;AAC3D,CAAA;AAEA,IAAMG,4BAA4BtB,EAAEC,OAAO;EACzCC,MAAMF,EAAEG,QAAQ,cAAA;;EAEhBoB,QAAQvB,EAAEwB,MAAMJ,WAAAA;EAChBK,SAASzB,EAAEW,SACTX,EAAEC,OAAO;;IAEPyB,MAAM1B,EAAEW,SAASX,EAAE2B,OAAO;;IAE1BC,OAAO5B,EAAEW,SAASX,EAAEY,MAAM;EAC5B,CAAA,CAAA;AAEJ,CAAA,EAAGN,KAAKN,EAAEO,OAAO;AAIjB,IAAMsB,oBAAoB7B,EAAE8B,MAC1B/B,oBACAS,sBACAK,wBACAS,yBAAAA;AAQK,IAAMS,cAAN,cAA0BC,YAAY;EAC3CC,UAAU;EACVC,SAAS;AACX,CAAA,EAAG;EACDC,KAAKnC,EAAEK;EACP+B,aAAapC,EAAEW,SAASX,EAAEK,MAAM;EAChCgC,OAAOrC,EAAEK;EACTiC,SAAStC,EAAEK;AACb,CAAA,EAAA;AAAI;AAKG,IAAMkC,kBAAN,cAA8BP,YAAY;EAC/CC,UAAU;EACVC,SAAS;AACX,CAAA,EAAG;EACDM,MAAMxC,EAAEW,SAASX,EAAEK,MAAM;EACzBoC,SAASzC,EAAEW,SAASX,EAAE2B,OAAO;EAC7Be,UAAU1C,EAAEK,OAAOC,KAAKN,EAAE2C,YAAY;IAAEP,aAAa;EAAgB,CAAA,CAAA;;EAErEQ,MAAM5C,EAAEW,SAASX,EAAEO,QAAQP,EAAEgB,OAAO;IAAEC,KAAKjB,EAAEK;IAAQa,OAAOlB,EAAEmB;EAAI,CAAA,CAAA,CAAA;EAClE0B,MAAMhB;AACR,CAAA,EAAA;AAAI;AAKG,IAAMiB,yBAAyB9C,EAAEC,OAAO;EAC7C8C,WAAW/C,EAAEW,SAASX,EAAEO,QAAQP,EAAEwB,MAAMwB,UAAUjB,WAAAA,CAAAA,CAAAA,CAAAA;EAClDkB,UAAUjD,EAAEW,SAASX,EAAEO,QAAQP,EAAEwB,MAAMwB,UAAUT,eAAAA,CAAAA,CAAAA,CAAAA;AACnD,CAAA;AAKO,IAAMW,kBAAkB;EAACnB;EAAaQ;;",
6
+ "names": ["RawObject", "S", "TypedObject", "TimerTriggerSchema", "S", "Struct", "type", "Literal", "cron", "String", "pipe", "mutable", "WebhookTriggerSchema", "method", "port", "optional", "Number", "WebsocketTriggerSchema", "url", "init", "Record", "key", "value", "Any", "QuerySchema", "props", "SubscriptionTriggerSchema", "filter", "Array", "options", "deep", "Boolean", "delay", "TriggerSpecSchema", "Union", "FunctionDef", "TypedObject", "typename", "version", "uri", "description", "route", "handler", "FunctionTrigger", "name", "enabled", "function", "annotations", "meta", "spec", "FunctionManifestSchema", "functions", "RawObject", "triggers", "FUNCTION_SCHEMA"]
7
+ }
@@ -6,13 +6,13 @@ import {
6
6
  createTimerTrigger,
7
7
  createWebSocket,
8
8
  createWebsocketTrigger
9
- } from "./chunk-AM7SW4YW.mjs";
9
+ } from "./chunk-DMTGUST2.mjs";
10
10
  import {
11
11
  FUNCTION_SCHEMA,
12
12
  FunctionDef,
13
13
  FunctionManifestSchema,
14
14
  FunctionTrigger
15
- } from "./chunk-TJ4S5QZ3.mjs";
15
+ } from "./chunk-SLC6ICH2.mjs";
16
16
 
17
17
  // packages/core/functions/src/handler.ts
18
18
  import { PublicKey } from "@dxos/client";
@@ -1 +1 @@
1
- {"inputs":{"packages/core/functions/src/types.ts":{"bytes":10352,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/function/function-registry.ts":{"bytes":13004,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/function/index.ts":{"bytes":529,"imports":[{"path":"packages/core/functions/src/function/function-registry.ts","kind":"import-statement","original":"./function-registry"}],"format":"esm"},"packages/core/functions/src/handler.ts":{"bytes":10610,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/subscription-trigger.ts":{"bytes":10343,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytes":4173,"imports":[{"path":"cron","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/websocket-trigger.ts":{"bytes":13341,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/index.ts":{"bytes":864,"imports":[{"path":"packages/core/functions/src/trigger/type/subscription-trigger.ts","kind":"import-statement","original":"./subscription-trigger"},{"path":"packages/core/functions/src/trigger/type/timer-trigger.ts","kind":"import-statement","original":"./timer-trigger"},{"path":"packages/core/functions/src/trigger/type/websocket-trigger.ts","kind":"import-statement","original":"./websocket-trigger"}],"format":"esm"},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytes":28453,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/trigger/type/index.ts","kind":"import-statement","original":"./type"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/trigger/index.ts":{"bytes":603,"imports":[{"path":"packages/core/functions/src/trigger/trigger-registry.ts","kind":"import-statement","original":"./trigger-registry"},{"path":"packages/core/functions/src/trigger/type/index.ts","kind":"import-statement","original":"./type"}],"format":"esm"},"packages/core/functions/src/index.ts":{"bytes":840,"imports":[{"path":"packages/core/functions/src/function/index.ts","kind":"import-statement","original":"./function"},{"path":"packages/core/functions/src/handler.ts","kind":"import-statement","original":"./handler"},{"path":"packages/core/functions/src/trigger/index.ts","kind":"import-statement","original":"./trigger"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/core/functions/src/testing/types.ts":{"bytes":1131,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/dev-server.ts":{"bytes":28958,"imports":[{"path":"express","kind":"import-statement","external":true},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/scheduler.ts":{"bytes":21084,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/index.ts":{"bytes":598,"imports":[{"path":"packages/core/functions/src/runtime/dev-server.ts","kind":"import-statement","original":"./dev-server"},{"path":"packages/core/functions/src/runtime/scheduler.ts","kind":"import-statement","original":"./scheduler"}],"format":"esm"},"packages/core/functions/src/testing/setup.ts":{"bytes":12707,"imports":[{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/function/index.ts","kind":"import-statement","original":"../function"},{"path":"packages/core/functions/src/runtime/index.ts","kind":"import-statement","original":"../runtime"},{"path":"packages/core/functions/src/trigger/index.ts","kind":"import-statement","original":"../trigger"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/util.ts":{"bytes":4292,"imports":[{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/manifest.ts":{"bytes":1139,"imports":[],"format":"esm"},"packages/core/functions/src/testing/index.ts":{"bytes":749,"imports":[{"path":"packages/core/functions/src/testing/setup.ts","kind":"import-statement","original":"./setup"},{"path":"packages/core/functions/src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/testing/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/core/functions/src/testing/manifest.ts","kind":"import-statement","original":"./manifest"}],"format":"esm"}},"outputs":{"packages/core/functions/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5751},"packages/core/functions/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-AM7SW4YW.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-TJ4S5QZ3.mjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionRegistry","FunctionTrigger","TriggerRegistry","createSubscriptionTrigger","createTimerTrigger","createWebSocket","createWebsocketTrigger","subscriptionHandler"],"entryPoint":"packages/core/functions/src/index.ts","inputs":{"packages/core/functions/src/index.ts":{"bytesInOutput":0},"packages/core/functions/src/handler.ts":{"bytesInOutput":1624}},"bytes":2334},"packages/core/functions/dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32237},"packages/core/functions/dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-AM7SW4YW.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-TJ4S5QZ3.mjs","kind":"import-statement"},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"express","kind":"import-statement","external":true},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"exports":["TestType","createFunctionRuntime","createInitializedClients","inviteMember","startFunctionsHost","testFunctionManifest","triggerWebhook"],"entryPoint":"packages/core/functions/src/testing/index.ts","inputs":{"packages/core/functions/src/testing/setup.ts":{"bytesInOutput":2775},"packages/core/functions/src/testing/types.ts":{"bytesInOutput":182},"packages/core/functions/src/runtime/dev-server.ts":{"bytesInOutput":7860},"packages/core/functions/src/runtime/index.ts":{"bytesInOutput":0},"packages/core/functions/src/runtime/scheduler.ts":{"bytesInOutput":5330},"packages/core/functions/src/testing/index.ts":{"bytesInOutput":0},"packages/core/functions/src/testing/util.ts":{"bytesInOutput":1051},"packages/core/functions/src/testing/manifest.ts":{"bytesInOutput":146}},"bytes":18147},"packages/core/functions/dist/lib/node-esm/chunk-AM7SW4YW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33089},"packages/core/functions/dist/lib/node-esm/chunk-AM7SW4YW.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-TJ4S5QZ3.mjs","kind":"import-statement"},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"cron","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["FunctionRegistry","TriggerRegistry","createSubscriptionTrigger","createTimerTrigger","createWebSocket","createWebsocketTrigger"],"inputs":{"packages/core/functions/src/function/function-registry.ts":{"bytesInOutput":3046},"packages/core/functions/src/function/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/type/subscription-trigger.ts":{"bytesInOutput":2008},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytesInOutput":898},"packages/core/functions/src/trigger/type/websocket-trigger.ts":{"bytesInOutput":3491},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytesInOutput":7421},"packages/core/functions/src/trigger/type/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/index.ts":{"bytesInOutput":0}},"bytes":17539},"packages/core/functions/dist/lib/node-esm/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node-esm/types.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-TJ4S5QZ3.mjs","kind":"import-statement"}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionTrigger"],"entryPoint":"packages/core/functions/src/types.ts","inputs":{},"bytes":335},"packages/core/functions/dist/lib/node-esm/chunk-TJ4S5QZ3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5699},"packages/core/functions/dist/lib/node-esm/chunk-TJ4S5QZ3.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionTrigger","__require"],"inputs":{"packages/core/functions/src/types.ts":{"bytesInOutput":2005}},"bytes":2651}}}
1
+ {"inputs":{"packages/core/functions/src/types.ts":{"bytes":10493,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/function/function-registry.ts":{"bytes":13004,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/function/index.ts":{"bytes":529,"imports":[{"path":"packages/core/functions/src/function/function-registry.ts","kind":"import-statement","original":"./function-registry"}],"format":"esm"},"packages/core/functions/src/handler.ts":{"bytes":10610,"imports":[{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/subscription-trigger.ts":{"bytes":10343,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytes":4173,"imports":[{"path":"cron","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/websocket-trigger.ts":{"bytes":13341,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/trigger/type/index.ts":{"bytes":864,"imports":[{"path":"packages/core/functions/src/trigger/type/subscription-trigger.ts","kind":"import-statement","original":"./subscription-trigger"},{"path":"packages/core/functions/src/trigger/type/timer-trigger.ts","kind":"import-statement","original":"./timer-trigger"},{"path":"packages/core/functions/src/trigger/type/websocket-trigger.ts","kind":"import-statement","original":"./websocket-trigger"}],"format":"esm"},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytes":28453,"imports":[{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/trigger/type/index.ts","kind":"import-statement","original":"./type"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/trigger/index.ts":{"bytes":603,"imports":[{"path":"packages/core/functions/src/trigger/trigger-registry.ts","kind":"import-statement","original":"./trigger-registry"},{"path":"packages/core/functions/src/trigger/type/index.ts","kind":"import-statement","original":"./type"}],"format":"esm"},"packages/core/functions/src/index.ts":{"bytes":840,"imports":[{"path":"packages/core/functions/src/function/index.ts","kind":"import-statement","original":"./function"},{"path":"packages/core/functions/src/handler.ts","kind":"import-statement","original":"./handler"},{"path":"packages/core/functions/src/trigger/index.ts","kind":"import-statement","original":"./trigger"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/core/functions/src/testing/types.ts":{"bytes":1131,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/dev-server.ts":{"bytes":28958,"imports":[{"path":"express","kind":"import-statement","external":true},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/scheduler.ts":{"bytes":21084,"imports":[{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/runtime/index.ts":{"bytes":598,"imports":[{"path":"packages/core/functions/src/runtime/dev-server.ts","kind":"import-statement","original":"./dev-server"},{"path":"packages/core/functions/src/runtime/scheduler.ts","kind":"import-statement","original":"./scheduler"}],"format":"esm"},"packages/core/functions/src/testing/setup.ts":{"bytes":12707,"imports":[{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"packages/core/functions/src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/function/index.ts","kind":"import-statement","original":"../function"},{"path":"packages/core/functions/src/runtime/index.ts","kind":"import-statement","original":"../runtime"},{"path":"packages/core/functions/src/trigger/index.ts","kind":"import-statement","original":"../trigger"},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/util.ts":{"bytes":4292,"imports":[{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/manifest.ts":{"bytes":1139,"imports":[],"format":"esm"},"packages/core/functions/src/testing/index.ts":{"bytes":749,"imports":[{"path":"packages/core/functions/src/testing/setup.ts","kind":"import-statement","original":"./setup"},{"path":"packages/core/functions/src/testing/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/testing/util.ts","kind":"import-statement","original":"./util"},{"path":"packages/core/functions/src/testing/manifest.ts","kind":"import-statement","original":"./manifest"}],"format":"esm"}},"outputs":{"packages/core/functions/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5751},"packages/core/functions/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-DMTGUST2.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-SLC6ICH2.mjs","kind":"import-statement"},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionRegistry","FunctionTrigger","TriggerRegistry","createSubscriptionTrigger","createTimerTrigger","createWebSocket","createWebsocketTrigger","subscriptionHandler"],"entryPoint":"packages/core/functions/src/index.ts","inputs":{"packages/core/functions/src/index.ts":{"bytesInOutput":0},"packages/core/functions/src/handler.ts":{"bytesInOutput":1624}},"bytes":2334},"packages/core/functions/dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32237},"packages/core/functions/dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-DMTGUST2.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-SLC6ICH2.mjs","kind":"import-statement"},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"express","kind":"import-statement","external":true},{"path":"get-port-please","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"node:path","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/client/testing","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/protocols/proto/dxos/client/services","kind":"import-statement","external":true}],"exports":["TestType","createFunctionRuntime","createInitializedClients","inviteMember","startFunctionsHost","testFunctionManifest","triggerWebhook"],"entryPoint":"packages/core/functions/src/testing/index.ts","inputs":{"packages/core/functions/src/testing/setup.ts":{"bytesInOutput":2775},"packages/core/functions/src/testing/types.ts":{"bytesInOutput":182},"packages/core/functions/src/runtime/dev-server.ts":{"bytesInOutput":7860},"packages/core/functions/src/runtime/index.ts":{"bytesInOutput":0},"packages/core/functions/src/runtime/scheduler.ts":{"bytesInOutput":5330},"packages/core/functions/src/testing/index.ts":{"bytesInOutput":0},"packages/core/functions/src/testing/util.ts":{"bytesInOutput":1051},"packages/core/functions/src/testing/manifest.ts":{"bytesInOutput":146}},"bytes":18147},"packages/core/functions/dist/lib/node-esm/chunk-DMTGUST2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":33089},"packages/core/functions/dist/lib/node-esm/chunk-DMTGUST2.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-SLC6ICH2.mjs","kind":"import-statement"},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"cron","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/async","kind":"import-statement","external":true},{"path":"@dxos/client/echo","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/util","kind":"import-statement","external":true}],"exports":["FunctionRegistry","TriggerRegistry","createSubscriptionTrigger","createTimerTrigger","createWebSocket","createWebsocketTrigger"],"inputs":{"packages/core/functions/src/function/function-registry.ts":{"bytesInOutput":3046},"packages/core/functions/src/function/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/type/subscription-trigger.ts":{"bytesInOutput":2008},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytesInOutput":898},"packages/core/functions/src/trigger/type/websocket-trigger.ts":{"bytesInOutput":3491},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytesInOutput":7421},"packages/core/functions/src/trigger/type/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/index.ts":{"bytesInOutput":0}},"bytes":17539},"packages/core/functions/dist/lib/node-esm/types.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node-esm/types.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-SLC6ICH2.mjs","kind":"import-statement"}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionTrigger"],"entryPoint":"packages/core/functions/src/types.ts","inputs":{},"bytes":335},"packages/core/functions/dist/lib/node-esm/chunk-SLC6ICH2.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5743},"packages/core/functions/dist/lib/node-esm/chunk-SLC6ICH2.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["FUNCTION_SCHEMA","FunctionDef","FunctionManifestSchema","FunctionTrigger","__require"],"inputs":{"packages/core/functions/src/types.ts":{"bytesInOutput":2072}},"bytes":2718}}}
@@ -2,12 +2,12 @@ import { createRequire } from 'node:module';const require = createRequire(import
2
2
  import {
3
3
  FunctionRegistry,
4
4
  TriggerRegistry
5
- } from "../chunk-AM7SW4YW.mjs";
5
+ } from "../chunk-DMTGUST2.mjs";
6
6
  import {
7
7
  FunctionDef,
8
8
  FunctionTrigger,
9
9
  __require
10
- } from "../chunk-TJ4S5QZ3.mjs";
10
+ } from "../chunk-SLC6ICH2.mjs";
11
11
 
12
12
  // packages/core/functions/src/testing/setup.ts
13
13
  import { getRandomPort } from "get-port-please";
@@ -4,7 +4,7 @@ import {
4
4
  FunctionDef,
5
5
  FunctionManifestSchema,
6
6
  FunctionTrigger
7
- } from "./chunk-TJ4S5QZ3.mjs";
7
+ } from "./chunk-SLC6ICH2.mjs";
8
8
  export {
9
9
  FUNCTION_SCHEMA,
10
10
  FunctionDef,
@@ -6,18 +6,6 @@ import { S } from '@dxos/echo-schema';
6
6
  * https://www.typescriptlang.org/docs/handbook/2/narrowing.html#discriminated-unions
7
7
  */
8
8
  export type FunctionTriggerType = 'subscription' | 'timer' | 'webhook' | 'websocket';
9
- declare const SubscriptionTriggerSchema: S.mutable<S.Struct<{
10
- type: S.Literal<["subscription"]>;
11
- filter: S.Array$<S.Struct<{
12
- type: typeof S.String;
13
- props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
14
- }>>;
15
- options: S.optional<S.Struct<{
16
- deep: S.optional<typeof S.Boolean>;
17
- delay: S.optional<typeof S.Number>;
18
- }>>;
19
- }>>;
20
- export type SubscriptionTrigger = S.Schema.Type<typeof SubscriptionTriggerSchema>;
21
9
  declare const TimerTriggerSchema: S.mutable<S.Struct<{
22
10
  type: S.Literal<["timer"]>;
23
11
  cron: typeof S.String;
@@ -35,6 +23,18 @@ declare const WebsocketTriggerSchema: S.mutable<S.Struct<{
35
23
  init: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
36
24
  }>>;
37
25
  export type WebsocketTrigger = S.Schema.Type<typeof WebsocketTriggerSchema>;
26
+ declare const SubscriptionTriggerSchema: S.mutable<S.Struct<{
27
+ type: S.Literal<["subscription"]>;
28
+ filter: S.Array$<S.Struct<{
29
+ type: typeof S.String;
30
+ props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
31
+ }>>;
32
+ options: S.optional<S.Struct<{
33
+ deep: S.optional<typeof S.Boolean>;
34
+ delay: S.optional<typeof S.Number>;
35
+ }>>;
36
+ }>>;
37
+ export type SubscriptionTrigger = S.Schema.Type<typeof SubscriptionTriggerSchema>;
38
38
  export type TriggerSpec = TimerTrigger | WebhookTrigger | WebsocketTrigger | SubscriptionTrigger;
39
39
  declare const FunctionDef_base: import("@dxos/echo-schema").AbstractTypedObject<{
40
40
  handler: string;
@@ -62,18 +62,6 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").AbstractTypedObj
62
62
  [x: string]: any;
63
63
  } | undefined;
64
64
  spec: {
65
- filter: readonly {
66
- readonly type: string;
67
- readonly props?: {
68
- readonly [x: string]: any;
69
- } | undefined;
70
- }[];
71
- type: "subscription";
72
- options?: {
73
- readonly deep?: boolean | undefined;
74
- readonly delay?: number | undefined;
75
- } | undefined;
76
- } | {
77
65
  type: "timer";
78
66
  cron: string;
79
67
  } | {
@@ -86,6 +74,18 @@ declare const FunctionTrigger_base: import("@dxos/echo-schema").AbstractTypedObj
86
74
  init?: {
87
75
  readonly [x: string]: any;
88
76
  } | undefined;
77
+ } | {
78
+ filter: readonly {
79
+ readonly type: string;
80
+ readonly props?: {
81
+ readonly [x: string]: any;
82
+ } | undefined;
83
+ }[];
84
+ type: "subscription";
85
+ options?: {
86
+ readonly deep?: boolean | undefined;
87
+ readonly delay?: number | undefined;
88
+ } | undefined;
89
89
  };
90
90
  } & {
91
91
  id: string;
@@ -147,18 +147,6 @@ export declare const FunctionManifestSchema: S.Struct<{
147
147
  [x: string]: any;
148
148
  } | undefined;
149
149
  spec: {
150
- filter: readonly {
151
- readonly type: string;
152
- readonly props?: {
153
- readonly [x: string]: any;
154
- } | undefined;
155
- }[];
156
- type: "subscription";
157
- options?: {
158
- readonly deep?: boolean | undefined;
159
- readonly delay?: number | undefined;
160
- } | undefined;
161
- } | {
162
150
  type: "timer";
163
151
  cron: string;
164
152
  } | {
@@ -171,6 +159,18 @@ export declare const FunctionManifestSchema: S.Struct<{
171
159
  init?: {
172
160
  readonly [x: string]: any;
173
161
  } | undefined;
162
+ } | {
163
+ filter: readonly {
164
+ readonly type: string;
165
+ readonly props?: {
166
+ readonly [x: string]: any;
167
+ } | undefined;
168
+ }[];
169
+ type: "subscription";
170
+ options?: {
171
+ readonly deep?: boolean | undefined;
172
+ readonly delay?: number | undefined;
173
+ } | undefined;
174
174
  };
175
175
  } & {
176
176
  "@meta"?: import("@dxos/echo-schema").ObjectMeta;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAErF,QAAA,MAAM,yBAAyB;;;;;;;;;;GAmB9B,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAElF,QAAA,MAAM,kBAAkB;;;GAKvB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,QAAA,MAAM,oBAAoB;;;;GAOzB,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,QAAA,MAAM,sBAAsB;;;;GAM3B,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAS5E,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;;;;;;;;;;;;;;AAEjG;;GAEG;AACH,qBAAa,WAAY,SAAQ,gBAQ/B;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL;;GAEG;AACH,qBAAa,eAAgB,SAAQ,oBAUnC;CAAG;AAEL;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAG5E,eAAO,MAAM,eAAe,iDAAiC,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types.ts"],"names":[],"mappings":"AAIA,OAAO,EAAa,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,MAAM,mBAAmB,GAAG,cAAc,GAAG,OAAO,GAAG,SAAS,GAAG,WAAW,CAAC;AAErF,QAAA,MAAM,kBAAkB;;;GAGN,CAAC;AAEnB,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,kBAAkB,CAAC,CAAC;AAEpE,QAAA,MAAM,oBAAoB;;;;GAKR,CAAC;AAEnB,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAExE,QAAA,MAAM,sBAAsB;;;;GAIV,CAAC;AAEnB,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAO5E,QAAA,MAAM,yBAAyB;;;;;;;;;;GAYb,CAAC;AAEnB,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,yBAAyB,CAAC,CAAC;AASlF,MAAM,MAAM,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,gBAAgB,GAAG,mBAAmB,CAAC;;;;;;;;;;;;;;AAEjG;;GAEG;AACH,qBAAa,WAAY,SAAQ,gBAQ/B;CAAG;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEL;;GAEG;AACH,qBAAa,eAAgB,SAAQ,oBAUnC;CAAG;AAEL;;GAEG;AACH,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAGjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAG5E,eAAO,MAAM,eAAe,iDAAiC,CAAC"}