@dxos/functions 0.7.5-labs.e27f9b9 → 0.7.5-labs.f400bbc
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/dist/lib/browser/bundler/index.mjs +239 -0
- package/dist/lib/browser/bundler/index.mjs.map +7 -0
- package/dist/lib/browser/{chunk-R4ERZ4GX.mjs → chunk-IXJNRWJP.mjs} +47 -10
- package/dist/lib/browser/chunk-IXJNRWJP.mjs.map +7 -0
- package/dist/lib/browser/{chunk-FTGUA7ZJ.mjs → chunk-XLM3CJXO.mjs} +2 -2
- package/dist/lib/browser/index.mjs +23 -7
- package/dist/lib/browser/index.mjs.map +3 -3
- package/dist/lib/browser/meta.json +1 -1
- package/dist/lib/browser/testing/index.mjs +2 -2
- package/dist/lib/browser/types/index.mjs +1 -1
- package/dist/lib/node/bundler/index.cjs +261 -0
- package/dist/lib/node/bundler/index.cjs.map +7 -0
- package/dist/lib/node/{chunk-4WNFTPH7.cjs → chunk-MGCKR53Q.cjs} +47 -12
- package/dist/lib/node/chunk-MGCKR53Q.cjs.map +7 -0
- package/dist/lib/node/{chunk-NC6L7H5C.cjs → chunk-TLSUCABH.cjs} +15 -15
- package/dist/lib/node/index.cjs +36 -19
- package/dist/lib/node/index.cjs.map +3 -3
- package/dist/lib/node/meta.json +1 -1
- package/dist/lib/node/testing/index.cjs +7 -7
- package/dist/lib/node/types/index.cjs +10 -10
- package/dist/lib/node/types/index.cjs.map +1 -1
- package/dist/lib/node-esm/bundler/index.mjs +239 -0
- package/dist/lib/node-esm/bundler/index.mjs.map +7 -0
- package/dist/lib/node-esm/{chunk-FK2RGYVS.mjs → chunk-CKTHJQ7M.mjs} +2 -2
- package/dist/lib/node-esm/{chunk-UOQLFLOW.mjs → chunk-FCZGNRNF.mjs} +47 -10
- package/dist/lib/node-esm/chunk-FCZGNRNF.mjs.map +7 -0
- package/dist/lib/node-esm/index.mjs +23 -7
- package/dist/lib/node-esm/index.mjs.map +3 -3
- package/dist/lib/node-esm/meta.json +1 -1
- package/dist/lib/node-esm/testing/index.mjs +2 -2
- package/dist/lib/node-esm/types/index.mjs +1 -1
- package/dist/types/src/bundler/bundler.d.ts +51 -0
- package/dist/types/src/bundler/bundler.d.ts.map +1 -0
- package/dist/types/src/bundler/bundler.test.d.ts +2 -0
- package/dist/types/src/bundler/bundler.test.d.ts.map +1 -0
- package/dist/types/src/bundler/index.d.ts +2 -0
- package/dist/types/src/bundler/index.d.ts.map +1 -0
- package/dist/types/src/handler.d.ts +30 -4
- package/dist/types/src/handler.d.ts.map +1 -1
- package/dist/types/src/testing/types.d.ts +2 -2
- package/dist/types/src/types/index.d.ts +1 -0
- package/dist/types/src/types/index.d.ts.map +1 -1
- package/dist/types/src/types/schema.d.ts +18 -16
- package/dist/types/src/types/schema.d.ts.map +1 -1
- package/dist/types/src/types/trace.d.ts +103 -0
- package/dist/types/src/types/trace.d.ts.map +1 -0
- package/dist/types/src/types/types.d.ts +33 -9
- package/dist/types/src/types/types.d.ts.map +1 -1
- package/package.json +32 -18
- package/src/bundler/bundler.test.ts +59 -0
- package/src/bundler/bundler.ts +264 -0
- package/src/bundler/index.ts +5 -0
- package/src/handler.ts +58 -9
- package/src/types/index.ts +1 -0
- package/src/types/schema.ts +1 -1
- package/src/types/trace.ts +49 -0
- package/src/types/types.ts +11 -2
- package/dist/lib/browser/chunk-R4ERZ4GX.mjs.map +0 -7
- package/dist/lib/node/chunk-4WNFTPH7.cjs.map +0 -7
- package/dist/lib/node-esm/chunk-UOQLFLOW.mjs.map +0 -7
- /package/dist/lib/browser/{chunk-FTGUA7ZJ.mjs.map → chunk-XLM3CJXO.mjs.map} +0 -0
- /package/dist/lib/node/{chunk-NC6L7H5C.cjs.map → chunk-TLSUCABH.cjs.map} +0 -0
- /package/dist/lib/node-esm/{chunk-FK2RGYVS.mjs.map → chunk-CKTHJQ7M.mjs.map} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"packages/core/functions/src/edge/functions.ts":{"bytes":13907,"imports":[{"path":"@dxos/edge-client","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/edge/index.ts":{"bytes":501,"imports":[{"path":"packages/core/functions/src/edge/functions.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/core/functions/src/types/schema.ts":{"bytes":4347,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/types/types.ts":{"bytes":15589,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/types/index.ts":{"bytes":580,"imports":[{"path":"packages/core/functions/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/core/functions/src/types/types.ts","kind":"import-statement","original":"./types"}],"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/index.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":10710,"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":10314,"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/index.ts":{"bytes":751,"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"}],"format":"esm"},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytes":28465,"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/index.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":920,"imports":[{"path":"packages/core/functions/src/edge/index.ts","kind":"import-statement","original":"./edge"},{"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/index.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":21200,"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/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/util.ts":{"bytes":4310,"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/index.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/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node-esm/edge/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-T2KBXTMR.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"}],"exports":["FUNCTIONS_PRESET_META_KEY","getInvocationUrl","getUserFunctionUrlInMetadata","incrementSemverPatch","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/core/functions/src/edge/index.ts","inputs":{},"bytes":568},"packages/core/functions/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":5839},"packages/core/functions/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-T2KBXTMR.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-FK2RGYVS.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-UOQLFLOW.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.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":["FUNCTIONS_PRESET_META_KEY","FUNCTION_TYPES","FunctionDef","FunctionManifestSchema","FunctionRegistry","FunctionTrigger","FunctionTriggerSchema","FunctionType","ScriptType","TriggerKind","TriggerRegistry","TriggerSchema","createSubscriptionTrigger","createTimerTrigger","getInvocationUrl","getUserFunctionUrlInMetadata","incrementSemverPatch","publicKeyToDid","setUserFunctionUrlInMetadata","subscriptionHandler","uploadWorkerFunction"],"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":2844},"packages/core/functions/dist/lib/node-esm/chunk-T2KBXTMR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7185},"packages/core/functions/dist/lib/node-esm/chunk-T2KBXTMR.mjs":{"imports":[{"path":"@dxos/edge-client","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["FUNCTIONS_PRESET_META_KEY","getInvocationUrl","getUserFunctionUrlInMetadata","incrementSemverPatch","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/core/functions/src/edge/functions.ts":{"bytesInOutput":3390},"packages/core/functions/src/edge/index.ts":{"bytesInOutput":0}},"bytes":3767},"packages/core/functions/dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32290},"packages/core/functions/dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-FK2RGYVS.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-UOQLFLOW.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.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":5364},"packages/core/functions/src/testing/index.ts":{"bytesInOutput":0},"packages/core/functions/src/testing/util.ts":{"bytesInOutput":1067},"packages/core/functions/src/testing/manifest.ts":{"bytesInOutput":146}},"bytes":18237},"packages/core/functions/dist/lib/node-esm/chunk-FK2RGYVS.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26827},"packages/core/functions/dist/lib/node-esm/chunk-FK2RGYVS.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-UOQLFLOW.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/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"],"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":2007},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytesInOutput":898},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytesInOutput":7538},"packages/core/functions/src/trigger/type/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/index.ts":{"bytesInOutput":0}},"bytes":14053},"packages/core/functions/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-UOQLFLOW.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"}],"exports":["FUNCTION_TYPES","FunctionDef","FunctionManifestSchema","FunctionTrigger","FunctionTriggerSchema","FunctionType","ScriptType","TriggerKind","TriggerSchema"],"entryPoint":"packages/core/functions/src/types/index.ts","inputs":{},"bytes":540},"packages/core/functions/dist/lib/node-esm/chunk-UOQLFLOW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":10175},"packages/core/functions/dist/lib/node-esm/chunk-UOQLFLOW.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["FUNCTION_TYPES","FunctionDef","FunctionManifestSchema","FunctionTrigger","FunctionTriggerSchema","FunctionType","ScriptType","TriggerKind","TriggerSchema"],"inputs":{"packages/core/functions/src/types/schema.ts":{"bytesInOutput":1000},"packages/core/functions/src/types/index.ts":{"bytesInOutput":0},"packages/core/functions/src/types/types.ts":{"bytesInOutput":3409}},"bytes":4817},"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs":{"imports":[],"exports":["__require"],"inputs":{},"bytes":526}}}
|
|
1
|
+
{"inputs":{"packages/core/functions/src/bundler/bundler.ts":{"bytes":30383,"imports":[{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/bundler/index.ts":{"bytes":502,"imports":[{"path":"packages/core/functions/src/bundler/bundler.ts","kind":"import-statement","original":"./bundler"}],"format":"esm"},"packages/core/functions/src/edge/functions.ts":{"bytes":13907,"imports":[{"path":"@dxos/edge-client","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/edge/index.ts":{"bytes":501,"imports":[{"path":"packages/core/functions/src/edge/functions.ts","kind":"import-statement","original":"./functions"}],"format":"esm"},"packages/core/functions/src/types/schema.ts":{"bytes":4417,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/types/types.ts":{"bytes":16526,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"format":"esm"},"packages/core/functions/src/types/trace.ts":{"bytes":4659,"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"packages/core/functions/src/types/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"packages/core/functions/src/types/index.ts":{"bytes":661,"imports":[{"path":"packages/core/functions/src/types/schema.ts","kind":"import-statement","original":"./schema"},{"path":"packages/core/functions/src/types/types.ts","kind":"import-statement","original":"./types"},{"path":"packages/core/functions/src/types/trace.ts","kind":"import-statement","original":"./trace"}],"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/index.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":14030,"imports":[{"path":"@effect/schema","kind":"import-statement","external":true},{"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":10314,"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/index.ts":{"bytes":751,"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"}],"format":"esm"},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytes":28465,"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/index.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":920,"imports":[{"path":"packages/core/functions/src/edge/index.ts","kind":"import-statement","original":"./edge"},{"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/index.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":21200,"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/index.ts","kind":"import-statement","original":"../types"}],"format":"esm"},"packages/core/functions/src/testing/util.ts":{"bytes":4310,"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/index.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/bundler/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":14437},"packages/core/functions/dist/lib/node-esm/bundler/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"},{"path":"esbuild-wasm","kind":"import-statement","external":true},{"path":"@dxos/crypto","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["Bundler","initializeBundler"],"entryPoint":"packages/core/functions/src/bundler/index.ts","inputs":{"packages/core/functions/src/bundler/bundler.ts":{"bytesInOutput":7125},"packages/core/functions/src/bundler/index.ts":{"bytesInOutput":0}},"bytes":7378},"packages/core/functions/dist/lib/node-esm/edge/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node-esm/edge/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-T2KBXTMR.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"}],"exports":["FUNCTIONS_PRESET_META_KEY","getInvocationUrl","getUserFunctionUrlInMetadata","incrementSemverPatch","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"entryPoint":"packages/core/functions/src/edge/index.ts","inputs":{},"bytes":568},"packages/core/functions/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7878},"packages/core/functions/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-T2KBXTMR.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-CKTHJQ7M.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-FCZGNRNF.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"},{"path":"@effect/schema","kind":"import-statement","external":true},{"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":["FUNCTIONS_PRESET_META_KEY","FUNCTION_TYPES","FunctionDef","FunctionManifestSchema","FunctionRegistry","FunctionTrigger","FunctionTriggerSchema","FunctionType","ScriptType","TriggerKind","TriggerRegistry","TriggerSchema","createSubscriptionTrigger","createTimerTrigger","defineFunction","getInvocationUrl","getUserFunctionUrlInMetadata","incrementSemverPatch","publicKeyToDid","setUserFunctionUrlInMetadata","subscriptionHandler","uploadWorkerFunction"],"entryPoint":"packages/core/functions/src/index.ts","inputs":{"packages/core/functions/src/index.ts":{"bytesInOutput":0},"packages/core/functions/src/handler.ts":{"bytesInOutput":2084}},"bytes":3322},"packages/core/functions/dist/lib/node-esm/chunk-T2KBXTMR.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7185},"packages/core/functions/dist/lib/node-esm/chunk-T2KBXTMR.mjs":{"imports":[{"path":"@dxos/edge-client","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["FUNCTIONS_PRESET_META_KEY","getInvocationUrl","getUserFunctionUrlInMetadata","incrementSemverPatch","publicKeyToDid","setUserFunctionUrlInMetadata","uploadWorkerFunction"],"inputs":{"packages/core/functions/src/edge/functions.ts":{"bytesInOutput":3390},"packages/core/functions/src/edge/index.ts":{"bytesInOutput":0}},"bytes":3767},"packages/core/functions/dist/lib/node-esm/testing/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":32290},"packages/core/functions/dist/lib/node-esm/testing/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-CKTHJQ7M.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-FCZGNRNF.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.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":5364},"packages/core/functions/src/testing/index.ts":{"bytesInOutput":0},"packages/core/functions/src/testing/util.ts":{"bytesInOutput":1067},"packages/core/functions/src/testing/manifest.ts":{"bytesInOutput":146}},"bytes":18237},"packages/core/functions/dist/lib/node-esm/chunk-CKTHJQ7M.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26827},"packages/core/functions/dist/lib/node-esm/chunk-CKTHJQ7M.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-FCZGNRNF.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/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"],"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":2007},"packages/core/functions/src/trigger/type/timer-trigger.ts":{"bytesInOutput":898},"packages/core/functions/src/trigger/trigger-registry.ts":{"bytesInOutput":7538},"packages/core/functions/src/trigger/type/index.ts":{"bytesInOutput":0},"packages/core/functions/src/trigger/index.ts":{"bytesInOutput":0}},"bytes":14053},"packages/core/functions/dist/lib/node-esm/types/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node-esm/types/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-FCZGNRNF.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"}],"exports":["FUNCTION_TYPES","FunctionDef","FunctionManifestSchema","FunctionTrigger","FunctionTriggerSchema","FunctionType","ScriptType","TriggerKind","TriggerSchema"],"entryPoint":"packages/core/functions/src/types/index.ts","inputs":{},"bytes":540},"packages/core/functions/dist/lib/node-esm/chunk-FCZGNRNF.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13213},"packages/core/functions/dist/lib/node-esm/chunk-FCZGNRNF.mjs":{"imports":[{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true},{"path":"@dxos/echo-schema","kind":"import-statement","external":true}],"exports":["FUNCTION_TYPES","FunctionDef","FunctionManifestSchema","FunctionTrigger","FunctionTriggerSchema","FunctionType","ScriptType","TriggerKind","TriggerSchema"],"inputs":{"packages/core/functions/src/types/schema.ts":{"bytesInOutput":1010},"packages/core/functions/src/types/index.ts":{"bytesInOutput":0},"packages/core/functions/src/types/types.ts":{"bytesInOutput":3644},"packages/core/functions/src/types/trace.ts":{"bytesInOutput":997}},"bytes":6106},"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":93},"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs":{"imports":[],"exports":["__require"],"inputs":{},"bytes":526}}}
|
|
@@ -2,11 +2,11 @@ import { createRequire } from 'node:module';const require = createRequire(import
|
|
|
2
2
|
import {
|
|
3
3
|
FunctionRegistry,
|
|
4
4
|
TriggerRegistry
|
|
5
|
-
} from "../chunk-
|
|
5
|
+
} from "../chunk-CKTHJQ7M.mjs";
|
|
6
6
|
import {
|
|
7
7
|
FunctionDef,
|
|
8
8
|
FunctionTrigger
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-FCZGNRNF.mjs";
|
|
10
10
|
import {
|
|
11
11
|
__require
|
|
12
12
|
} from "../chunk-DHGBFXSZ.mjs";
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
import { type BuildOptions } from 'esbuild';
|
|
2
|
+
import { type BuildResult } from 'esbuild-wasm';
|
|
3
|
+
export type Import = {
|
|
4
|
+
moduleUrl: string;
|
|
5
|
+
defaultImport: boolean;
|
|
6
|
+
namedImports: string[];
|
|
7
|
+
};
|
|
8
|
+
export type BundleOptions = {
|
|
9
|
+
/**
|
|
10
|
+
* Path to the source file on the local file system.
|
|
11
|
+
* If provided, the path will be used instead of the `source` code.
|
|
12
|
+
*/
|
|
13
|
+
path?: string;
|
|
14
|
+
/**
|
|
15
|
+
* Source code to bundle.
|
|
16
|
+
* Required if `path` is not provided.
|
|
17
|
+
*/
|
|
18
|
+
source?: string;
|
|
19
|
+
};
|
|
20
|
+
export type BundleResult = {
|
|
21
|
+
timestamp: number;
|
|
22
|
+
sourceHash?: Buffer;
|
|
23
|
+
imports?: Import[];
|
|
24
|
+
bundle?: string;
|
|
25
|
+
error?: any;
|
|
26
|
+
};
|
|
27
|
+
export type BundlerOptions = {
|
|
28
|
+
platform: BuildOptions['platform'];
|
|
29
|
+
sandboxedModules: string[];
|
|
30
|
+
remoteModules: Record<string, string>;
|
|
31
|
+
};
|
|
32
|
+
export declare const initializeBundler: (options: {
|
|
33
|
+
wasmUrl: string;
|
|
34
|
+
}) => Promise<void>;
|
|
35
|
+
/**
|
|
36
|
+
* ESBuild bundler.
|
|
37
|
+
*/
|
|
38
|
+
export declare class Bundler {
|
|
39
|
+
private readonly _options;
|
|
40
|
+
constructor(_options: BundlerOptions);
|
|
41
|
+
bundle({ path, source }: BundleOptions): Promise<BundleResult>;
|
|
42
|
+
analyzeImports(result: BuildResult): Import[];
|
|
43
|
+
analyzeSourceFileImports(code: string): {
|
|
44
|
+
defaultImportName: string;
|
|
45
|
+
namedImports: string[];
|
|
46
|
+
wildcardImportName: string;
|
|
47
|
+
moduleIdentifier: string;
|
|
48
|
+
quotes: string;
|
|
49
|
+
}[];
|
|
50
|
+
}
|
|
51
|
+
//# sourceMappingURL=bundler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.d.ts","sourceRoot":"","sources":["../../../../src/bundler/bundler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,SAAS,CAAC;AAC5C,OAAO,EAAqB,KAAK,WAAW,EAAe,MAAM,cAAc,CAAC;AAMhF,MAAM,MAAM,MAAM,GAAG;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,OAAO,CAAC;IACvB,YAAY,EAAE,MAAM,EAAE,CAAC;CACxB,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B;;;OAGG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IAEd;;;OAGG;IACH,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,EAAE,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,GAAG,CAAC;CACb,CAAC;AAEF,MAAM,MAAM,cAAc,GAAG;IAC3B,QAAQ,EAAE,YAAY,CAAC,UAAU,CAAC,CAAC;IACnC,gBAAgB,EAAE,MAAM,EAAE,CAAC;IAC3B,aAAa,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;CACvC,CAAC;AAGF,eAAO,MAAM,iBAAiB,YAAmB;IAAE,OAAO,EAAE,MAAM,CAAA;CAAE,kBAInE,CAAC;AAEF;;GAEG;AACH,qBAAa,OAAO;IACN,OAAO,CAAC,QAAQ,CAAC,QAAQ;gBAAR,QAAQ,EAAE,cAAc;IAE/C,MAAM,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,EAAE,aAAa,GAAG,OAAO,CAAC,YAAY,CAAC;IAwFpE,cAAc,CAAC,MAAM,EAAE,WAAW,GAAG,MAAM,EAAE;IA2B7C,wBAAwB,CAAC,IAAI,EAAE,MAAM;;;;;;;CAatC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"bundler.test.d.ts","sourceRoot":"","sources":["../../../../src/bundler/bundler.test.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/bundler/index.ts"],"names":[],"mappings":"AAIA,cAAc,WAAW,CAAC"}
|
|
@@ -1,18 +1,22 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { Schema as S } from '@effect/schema';
|
|
2
|
+
import { type Effect } from 'effect';
|
|
2
3
|
import { type Client } from '@dxos/client';
|
|
3
4
|
import { type Space, type SpaceId } from '@dxos/client/echo';
|
|
4
|
-
import type { CoreDatabase, ReactiveEchoObject } from '@dxos/echo-db';
|
|
5
|
+
import type { CoreDatabase, EchoDatabase, ReactiveEchoObject } from '@dxos/echo-db';
|
|
6
|
+
import { type HasId } from '@dxos/echo-schema';
|
|
7
|
+
import { type DXN } from '@dxos/keys';
|
|
8
|
+
import { type QueryResult } from '@dxos/protocols';
|
|
5
9
|
/**
|
|
6
10
|
* Function handler.
|
|
7
11
|
*/
|
|
8
|
-
export type FunctionHandler<TData = {}, TMeta = {}> = (params: {
|
|
12
|
+
export type FunctionHandler<TData = {}, TMeta = {}, TOutput = any> = (params: {
|
|
9
13
|
context: FunctionContext;
|
|
10
14
|
event: FunctionEvent<TData, TMeta>;
|
|
11
15
|
/**
|
|
12
16
|
* @deprecated
|
|
13
17
|
*/
|
|
14
18
|
response: FunctionResponse;
|
|
15
|
-
}) => Promise<
|
|
19
|
+
}) => TOutput | Promise<TOutput> | Effect.Effect<TOutput, any>;
|
|
16
20
|
/**
|
|
17
21
|
* Function context.
|
|
18
22
|
*/
|
|
@@ -53,13 +57,35 @@ export type FunctionEventMeta<TMeta = {}> = {
|
|
|
53
57
|
export type FunctionResponse = {
|
|
54
58
|
status(code: number): FunctionResponse;
|
|
55
59
|
};
|
|
60
|
+
export interface QueuesAPI {
|
|
61
|
+
queryQueue(queue: DXN, options?: {}): Promise<QueryResult>;
|
|
62
|
+
insertIntoQueue(queue: DXN, objects: HasId[]): Promise<void>;
|
|
63
|
+
}
|
|
56
64
|
/**
|
|
57
65
|
* Space interface available to functions.
|
|
58
66
|
*/
|
|
59
67
|
export interface SpaceAPI {
|
|
60
68
|
get id(): SpaceId;
|
|
69
|
+
/**
|
|
70
|
+
* @deprecated
|
|
71
|
+
*/
|
|
61
72
|
get crud(): CoreDatabase;
|
|
73
|
+
get db(): EchoDatabase;
|
|
74
|
+
get queues(): QueuesAPI;
|
|
62
75
|
}
|
|
76
|
+
export type FunctionDefinition = {
|
|
77
|
+
description?: string;
|
|
78
|
+
inputSchema: S.Schema.AnyNoContext;
|
|
79
|
+
outputSchema?: S.Schema.AnyNoContext;
|
|
80
|
+
handler: FunctionHandler<any>;
|
|
81
|
+
};
|
|
82
|
+
export type DefineFunctionParams<T, O = any> = {
|
|
83
|
+
description?: string;
|
|
84
|
+
inputSchema: S.Schema<T, any>;
|
|
85
|
+
outputSchema?: S.Schema<O, any>;
|
|
86
|
+
handler: FunctionHandler<T, any, O>;
|
|
87
|
+
};
|
|
88
|
+
export declare const defineFunction: <T, O>(params: DefineFunctionParams<T, O>) => FunctionDefinition;
|
|
63
89
|
export type RawSubscriptionData = {
|
|
64
90
|
spaceKey?: string;
|
|
65
91
|
objects?: string[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/handler.ts"],"names":[],"mappings":"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"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { S } from '@dxos/echo-schema';
|
|
2
|
-
declare const TestType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("
|
|
2
|
+
declare const TestType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
3
3
|
title: typeof S.String;
|
|
4
|
-
}, import("
|
|
4
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
5
5
|
title: typeof S.String;
|
|
6
6
|
}>>;
|
|
7
7
|
export declare class TestType extends TestType_base {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/types/index.ts"],"names":[],"mappings":"AAIA,cAAc,UAAU,CAAC;AACzB,cAAc,SAAS,CAAC;AACxB,cAAc,SAAS,CAAC"}
|
|
@@ -1,51 +1,53 @@
|
|
|
1
1
|
import { JsonSchemaType, S } from '@dxos/echo-schema';
|
|
2
|
-
declare const ScriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("
|
|
2
|
+
declare const ScriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
3
3
|
name: S.optional<typeof S.String>;
|
|
4
4
|
description: S.optional<typeof S.String>;
|
|
5
5
|
changed: S.optional<typeof S.Boolean>;
|
|
6
|
-
source: import("@dxos/echo-schema").Ref$<import("
|
|
6
|
+
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
7
7
|
content: typeof S.String;
|
|
8
|
-
}, import("
|
|
9
|
-
}, import("
|
|
8
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
9
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
10
10
|
name: S.optional<typeof S.String>;
|
|
11
11
|
description: S.optional<typeof S.String>;
|
|
12
12
|
changed: S.optional<typeof S.Boolean>;
|
|
13
|
-
source: import("@dxos/echo-schema").Ref$<import("
|
|
13
|
+
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
14
14
|
content: typeof S.String;
|
|
15
|
-
}, import("
|
|
15
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
16
16
|
}>>;
|
|
17
17
|
/**
|
|
18
18
|
* Source script.
|
|
19
19
|
*/
|
|
20
20
|
export declare class ScriptType extends ScriptType_base {
|
|
21
21
|
}
|
|
22
|
-
declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("
|
|
22
|
+
declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
|
|
23
23
|
name: typeof S.NonEmptyString;
|
|
24
24
|
version: typeof S.String;
|
|
25
25
|
description: S.optional<typeof S.String>;
|
|
26
|
-
source: S.optional<import("@dxos/echo-schema").Ref$<import("
|
|
26
|
+
source: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
27
27
|
name: S.optional<typeof S.String>;
|
|
28
28
|
description: S.optional<typeof S.String>;
|
|
29
29
|
changed: S.optional<typeof S.Boolean>;
|
|
30
|
-
source: import("@dxos/echo-schema").Ref$<import("
|
|
30
|
+
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
31
31
|
content: typeof S.String;
|
|
32
|
-
}, import("
|
|
33
|
-
}, import("
|
|
32
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
33
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>>;
|
|
34
34
|
inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
35
|
+
outputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
35
36
|
binding: S.optional<typeof S.String>;
|
|
36
|
-
}, import("
|
|
37
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
|
|
37
38
|
name: typeof S.NonEmptyString;
|
|
38
39
|
version: typeof S.String;
|
|
39
40
|
description: S.optional<typeof S.String>;
|
|
40
|
-
source: S.optional<import("@dxos/echo-schema").Ref$<import("
|
|
41
|
+
source: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
41
42
|
name: S.optional<typeof S.String>;
|
|
42
43
|
description: S.optional<typeof S.String>;
|
|
43
44
|
changed: S.optional<typeof S.Boolean>;
|
|
44
|
-
source: import("@dxos/echo-schema").Ref$<import("
|
|
45
|
+
source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
|
|
45
46
|
content: typeof S.String;
|
|
46
|
-
}, import("
|
|
47
|
-
}, import("
|
|
47
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>;
|
|
48
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>>>;
|
|
48
49
|
inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
50
|
+
outputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
|
|
49
51
|
binding: S.optional<typeof S.String>;
|
|
50
52
|
}>>;
|
|
51
53
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAO,CAAC,EAAe,MAAM,mBAAmB,CAAC;;;;;;
|
|
1
|
+
{"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,cAAc,EAAO,CAAC,EAAe,MAAM,mBAAmB,CAAC;;;;;;wBAM/D,EAAI,MAAK;;;;;;;wBAAT,EAAI,MAAK;;;AAHlB;;GAEG;AACH,qBAAa,UAAW,SAAQ,eAU9B;CAAG;;;;;;;;;;4BAVI,EAAI,MAAK;;;;;;;;;;;;;;;4BAAT,EAAI,MAAK;;;;;;;AAYlB;;GAEG;AAEH,qBAAa,YAAa,SAAQ,iBAmBhC;CAAG"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Expando, Ref, S } from '@dxos/echo-schema';
|
|
2
|
+
declare const InvocationTrace: S.Schema<{
|
|
3
|
+
readonly id: string;
|
|
4
|
+
invocationTraceQueue: Ref<Expando>;
|
|
5
|
+
invocationTarget: Ref<Expando>;
|
|
6
|
+
trigger?: Ref<import("@dxos/echo-schema").TypedObjectFields<{
|
|
7
|
+
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
8
|
+
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
9
|
+
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
10
|
+
type: S.Literal<[import("./types").TriggerKind.Timer]>;
|
|
11
|
+
cron: S.SchemaClass<string, string, never>;
|
|
12
|
+
}>>, S.mutable<S.Struct<{
|
|
13
|
+
type: S.Literal<[import("./types").TriggerKind.Webhook]>;
|
|
14
|
+
method: S.optional<S.SchemaClass<string, string, never>>;
|
|
15
|
+
port: S.optional<S.SchemaClass<number, number, never>>;
|
|
16
|
+
}>>, S.mutable<S.Struct<{
|
|
17
|
+
type: S.Literal<[import("./types").TriggerKind.Subscription]>;
|
|
18
|
+
filter: S.Struct<{
|
|
19
|
+
type: S.optional<S.SchemaClass<string, string, never>>;
|
|
20
|
+
props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
|
|
21
|
+
}>;
|
|
22
|
+
options: S.optional<S.Struct<{
|
|
23
|
+
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
24
|
+
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
25
|
+
}>>;
|
|
26
|
+
}>>, S.mutable<S.Struct<{
|
|
27
|
+
type: S.Literal<[import("./types").TriggerKind.Email]>;
|
|
28
|
+
}>>, S.mutable<S.Struct<{
|
|
29
|
+
type: S.Literal<[import("./types").TriggerKind.Queue]>;
|
|
30
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
31
|
+
}>>]>>;
|
|
32
|
+
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
33
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>> | undefined;
|
|
34
|
+
}, {
|
|
35
|
+
readonly id: string;
|
|
36
|
+
invocationTraceQueue: Ref<Expando>;
|
|
37
|
+
invocationTarget: Ref<Expando>;
|
|
38
|
+
trigger?: Ref<import("@dxos/echo-schema").TypedObjectFields<{
|
|
39
|
+
readonly function: S.optional<S.SchemaClass<string, string, never>>;
|
|
40
|
+
readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
41
|
+
readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
|
|
42
|
+
type: S.Literal<[import("./types").TriggerKind.Timer]>;
|
|
43
|
+
cron: S.SchemaClass<string, string, never>;
|
|
44
|
+
}>>, S.mutable<S.Struct<{
|
|
45
|
+
type: S.Literal<[import("./types").TriggerKind.Webhook]>;
|
|
46
|
+
method: S.optional<S.SchemaClass<string, string, never>>;
|
|
47
|
+
port: S.optional<S.SchemaClass<number, number, never>>;
|
|
48
|
+
}>>, S.mutable<S.Struct<{
|
|
49
|
+
type: S.Literal<[import("./types").TriggerKind.Subscription]>;
|
|
50
|
+
filter: S.Struct<{
|
|
51
|
+
type: S.optional<S.SchemaClass<string, string, never>>;
|
|
52
|
+
props: S.optional<S.Record$<typeof S.String, typeof S.Any>>;
|
|
53
|
+
}>;
|
|
54
|
+
options: S.optional<S.Struct<{
|
|
55
|
+
deep: S.optional<S.SchemaClass<boolean, boolean, never>>;
|
|
56
|
+
delay: S.optional<S.SchemaClass<number, number, never>>;
|
|
57
|
+
}>>;
|
|
58
|
+
}>>, S.mutable<S.Struct<{
|
|
59
|
+
type: S.Literal<[import("./types").TriggerKind.Email]>;
|
|
60
|
+
}>>, S.mutable<S.Struct<{
|
|
61
|
+
type: S.Literal<[import("./types").TriggerKind.Queue]>;
|
|
62
|
+
queue: S.refine<string, S.Schema<string, string, never>>;
|
|
63
|
+
}>>]>>;
|
|
64
|
+
readonly meta: S.optional<S.mutable<S.Record$<typeof S.String, typeof S.Any>>>;
|
|
65
|
+
}, import("@dxos/echo-schema").TypedObjectOptions>> | undefined;
|
|
66
|
+
}, never>;
|
|
67
|
+
export type InvocationTraceEvent = S.Schema.Type<typeof InvocationTrace>;
|
|
68
|
+
declare const TraceEvent: S.Schema<{
|
|
69
|
+
readonly id: string;
|
|
70
|
+
outcome: string;
|
|
71
|
+
truncated: boolean;
|
|
72
|
+
logs: {
|
|
73
|
+
readonly context?: object | undefined;
|
|
74
|
+
readonly timestampMs: number;
|
|
75
|
+
readonly level: string;
|
|
76
|
+
readonly message: string;
|
|
77
|
+
}[];
|
|
78
|
+
exceptions: {
|
|
79
|
+
readonly name: string;
|
|
80
|
+
readonly timestampMs: number;
|
|
81
|
+
readonly message: string;
|
|
82
|
+
readonly stack?: string | undefined;
|
|
83
|
+
}[];
|
|
84
|
+
}, {
|
|
85
|
+
readonly id: string;
|
|
86
|
+
outcome: string;
|
|
87
|
+
truncated: boolean;
|
|
88
|
+
logs: {
|
|
89
|
+
readonly context?: object | undefined;
|
|
90
|
+
readonly timestampMs: number;
|
|
91
|
+
readonly level: string;
|
|
92
|
+
readonly message: string;
|
|
93
|
+
}[];
|
|
94
|
+
exceptions: {
|
|
95
|
+
readonly name: string;
|
|
96
|
+
readonly timestampMs: number;
|
|
97
|
+
readonly message: string;
|
|
98
|
+
readonly stack?: string | undefined;
|
|
99
|
+
}[];
|
|
100
|
+
}, never>;
|
|
101
|
+
export type TraceEvent = S.Schema.Type<typeof TraceEvent>;
|
|
102
|
+
export {};
|
|
103
|
+
//# sourceMappingURL=trace.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trace.d.ts","sourceRoot":"","sources":["../../../../src/types/trace.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,OAAO,EAAY,GAAG,EAAE,CAAC,EAAE,MAAM,mBAAmB,CAAC;AAI1E,QAAA,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAcwC,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,eAAe,CAAC,CAAC;AAgBzE,QAAA,MAAM,UAAU;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAMwC,CAAC;AAEzD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC"}
|