@dxos/functions 0.8.0 → 0.8.1-main.81238a8

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 (72) hide show
  1. package/dist/lib/browser/chunk-B747D6L6.mjs +72 -0
  2. package/dist/lib/browser/chunk-B747D6L6.mjs.map +7 -0
  3. package/dist/lib/browser/{chunk-WI2RVE6E.mjs → chunk-MF6IQWJ5.mjs} +27 -25
  4. package/dist/lib/browser/chunk-MF6IQWJ5.mjs.map +7 -0
  5. package/dist/lib/browser/{chunk-6XYG2TNO.mjs → chunk-Y3UMWWI4.mjs} +74 -22
  6. package/dist/lib/browser/chunk-Y3UMWWI4.mjs.map +7 -0
  7. package/dist/lib/browser/edge/index.mjs +1 -9
  8. package/dist/lib/browser/index.mjs +13 -11
  9. package/dist/lib/browser/index.mjs.map +2 -2
  10. package/dist/lib/browser/meta.json +1 -1
  11. package/dist/lib/browser/testing/index.mjs +2 -2
  12. package/dist/lib/browser/types/index.mjs +15 -5
  13. package/dist/lib/node/{chunk-UNB65EWP.cjs → chunk-5Z24F7Z3.cjs} +77 -22
  14. package/dist/lib/node/chunk-5Z24F7Z3.cjs.map +7 -0
  15. package/dist/lib/node/{chunk-MZMHE4DC.cjs → chunk-D4T2DS7U.cjs} +9 -69
  16. package/dist/lib/node/chunk-D4T2DS7U.cjs.map +7 -0
  17. package/dist/lib/node/{chunk-HH4ZO3YY.cjs → chunk-P2QIHNWP.cjs} +40 -38
  18. package/dist/lib/node/chunk-P2QIHNWP.cjs.map +7 -0
  19. package/dist/lib/node/edge/index.cjs +4 -12
  20. package/dist/lib/node/edge/index.cjs.map +2 -2
  21. package/dist/lib/node/index.cjs +33 -31
  22. package/dist/lib/node/index.cjs.map +2 -2
  23. package/dist/lib/node/meta.json +1 -1
  24. package/dist/lib/node/testing/index.cjs +7 -7
  25. package/dist/lib/node/types/index.cjs +26 -16
  26. package/dist/lib/node/types/index.cjs.map +2 -2
  27. package/dist/lib/node-esm/chunk-D43PP2YW.mjs +72 -0
  28. package/dist/lib/node-esm/chunk-D43PP2YW.mjs.map +7 -0
  29. package/dist/lib/node-esm/{chunk-A3BWJQVO.mjs → chunk-SNVRZBGG.mjs} +74 -22
  30. package/dist/lib/node-esm/chunk-SNVRZBGG.mjs.map +7 -0
  31. package/dist/lib/node-esm/{chunk-CM2LOG4A.mjs → chunk-USFENOK3.mjs} +27 -25
  32. package/dist/lib/node-esm/chunk-USFENOK3.mjs.map +7 -0
  33. package/dist/lib/node-esm/edge/index.mjs +1 -9
  34. package/dist/lib/node-esm/index.mjs +13 -11
  35. package/dist/lib/node-esm/index.mjs.map +2 -2
  36. package/dist/lib/node-esm/meta.json +1 -1
  37. package/dist/lib/node-esm/testing/index.mjs +2 -2
  38. package/dist/lib/node-esm/types/index.mjs +15 -5
  39. package/dist/types/src/edge/functions.d.ts +0 -9
  40. package/dist/types/src/edge/functions.d.ts.map +1 -1
  41. package/dist/types/src/handler.d.ts +2 -2
  42. package/dist/types/src/handler.d.ts.map +1 -1
  43. package/dist/types/src/trigger/type/timer-trigger.d.ts.map +1 -1
  44. package/dist/types/src/types/index.d.ts +1 -0
  45. package/dist/types/src/types/index.d.ts.map +1 -1
  46. package/dist/types/src/types/schema.d.ts +20 -26
  47. package/dist/types/src/types/schema.d.ts.map +1 -1
  48. package/dist/types/src/types/trace.d.ts +63 -81
  49. package/dist/types/src/types/trace.d.ts.map +1 -1
  50. package/dist/types/src/types/types.d.ts +7 -7
  51. package/dist/types/src/types/url.d.ts +11 -0
  52. package/dist/types/src/types/url.d.ts.map +1 -0
  53. package/package.json +20 -20
  54. package/src/edge/functions.ts +2 -63
  55. package/src/handler.ts +3 -3
  56. package/src/runtime/scheduler.test.ts +2 -1
  57. package/src/trigger/type/timer-trigger.ts +21 -18
  58. package/src/types/index.ts +1 -0
  59. package/src/types/schema.ts +8 -6
  60. package/src/types/trace.ts +26 -9
  61. package/src/types/url.ts +47 -0
  62. package/dist/lib/browser/chunk-6XYG2TNO.mjs.map +0 -7
  63. package/dist/lib/browser/chunk-WI2RVE6E.mjs.map +0 -7
  64. package/dist/lib/browser/chunk-YJEIETRB.mjs +0 -128
  65. package/dist/lib/browser/chunk-YJEIETRB.mjs.map +0 -7
  66. package/dist/lib/node/chunk-HH4ZO3YY.cjs.map +0 -7
  67. package/dist/lib/node/chunk-MZMHE4DC.cjs.map +0 -7
  68. package/dist/lib/node/chunk-UNB65EWP.cjs.map +0 -7
  69. package/dist/lib/node-esm/chunk-A3BWJQVO.mjs.map +0 -7
  70. package/dist/lib/node-esm/chunk-CM2LOG4A.mjs.map +0 -7
  71. package/dist/lib/node-esm/chunk-T2KBXTMR.mjs +0 -128
  72. package/dist/lib/node-esm/chunk-T2KBXTMR.mjs.map +0 -7
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "version": 3,
3
3
  "sources": ["../../../src/handler.ts"],
4
- "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema as S } from '@effect/schema';\nimport { type Effect } from 'effect';\n\nimport { type Client, PublicKey } from '@dxos/client';\nimport { type Space, type SpaceId } from '@dxos/client/echo';\nimport type { CoreDatabase, EchoDatabase, ReactiveEchoObject } from '@dxos/echo-db';\nimport { type HasId } from '@dxos/echo-schema';\nimport { type DXN } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type QueryResult } from '@dxos/protocols';\nimport { isNonNullable } from '@dxos/util';\n\n// TODO(burdon): Model after http request. Ref Lambda/OpenFaaS.\n// https://docs.aws.amazon.com/lambda/latest/dg/typescript-handler.html\n// https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml/#functions\n// https://www.npmjs.com/package/aws-lambda\n\n/**\n * Function handler.\n */\nexport type FunctionHandler<TData = {}, TMeta = {}, TOutput = any> = (params: {\n context: FunctionContext;\n event: FunctionEvent<TData, TMeta>;\n /**\n * @deprecated\n */\n response: FunctionResponse;\n}) => TOutput | Promise<TOutput> | Effect.Effect<TOutput, any>;\n\n/**\n * Function context.\n */\nexport interface FunctionContext {\n getSpace: (spaceId: SpaceId) => Promise<SpaceAPI>;\n\n /**\n * Space from which the function was invoked.\n */\n space: SpaceAPI | undefined;\n\n ai: FunctionContextAi;\n\n /**\n * @deprecated\n */\n // TODO(burdon): Limit access to individual space.\n client: Client;\n /**\n * @deprecated\n */\n // TODO(burdon): Replace with storage service abstraction.\n dataDir?: string;\n}\n\nexport interface FunctionContextAi {\n // TODO(dmaretskyi): Refer to cloudflare AI docs for more comprehensive typedefs.\n run(model: string, inputs: any, options?: any): Promise<any>;\n}\n\n/**\n * Event payload.\n */\n// TODO(dmaretskyi): Update type definitions to match the actual payload.\nexport type FunctionEvent<TData = {}, TMeta = {}> = {\n data: FunctionEventMeta<TMeta> & TData;\n};\n\n/**\n * Metadata from trigger.\n */\nexport type FunctionEventMeta<TMeta = {}> = {\n meta: TMeta;\n};\n\n/**\n * Function response.\n */\nexport type FunctionResponse = {\n status(code: number): FunctionResponse;\n};\n\n//\n// API.\n//\n\n// TODO(dmaretskyi): Temporary API to get the queues working.\n// TODO(dmaretskyi): To be replaced with integrating queues into echo.\nexport interface QueuesAPI {\n queryQueue(queue: DXN, options?: {}): Promise<QueryResult>;\n insertIntoQueue(queue: DXN, objects: HasId[]): Promise<void>;\n}\n\n/**\n * Space interface available to functions.\n */\nexport interface SpaceAPI {\n get id(): SpaceId;\n /**\n * @deprecated\n */\n get crud(): CoreDatabase;\n get db(): EchoDatabase;\n // TODO(dmaretskyi): Align with echo api --- queues.get(id).append(items);\n get queues(): QueuesAPI;\n}\n\n// TODO(wittjosiah): Fix this.\nconst __assertFunctionSpaceIsCompatibleWithTheClientSpace = () => {\n // const _: SpaceAPI = {} as Space;\n};\n\nexport type FunctionDefinition = {\n description?: string;\n inputSchema: S.Schema.AnyNoContext;\n outputSchema?: S.Schema.AnyNoContext;\n handler: FunctionHandler<any>;\n};\n\nexport type DefineFunctionParams<T, O = any> = {\n description?: string;\n inputSchema: S.Schema<T, any>;\n outputSchema?: S.Schema<O, any>;\n handler: FunctionHandler<T, any, O>;\n};\n\n// TODO(dmaretskyi): Bind input type to function handler.\nexport const defineFunction = <T, O>(params: DefineFunctionParams<T, O>): FunctionDefinition => {\n if (!S.isSchema(params.inputSchema)) {\n throw new Error('Input schema must be a valid schema');\n }\n if (typeof params.handler !== 'function') {\n throw new Error('Handler must be a function');\n }\n\n return {\n description: params.description,\n inputSchema: params.inputSchema,\n outputSchema: params.outputSchema ?? S.Any,\n handler: params.handler,\n };\n};\n\n//\n// Subscription utils.\n//\n\nexport type RawSubscriptionData = {\n spaceKey?: string;\n objects?: string[];\n};\n\nexport type SubscriptionData = {\n space?: Space;\n objects?: ReactiveEchoObject<any>[];\n};\n\n/**\n * Handler wrapper for subscription events; extracts space and objects.\n *\n * To test:\n * ```\n * curl -s -X POST -H \"Content-Type: application/json\" --data '{\"space\": \"0446...1cbb\"}' http://localhost:7100/dev/email-extractor\n * ```\n *\n * NOTE: Get space key from devtools or `dx space list --json`\n */\n// TODO(burdon): Evolve into plugin definition like Composer.\nexport const subscriptionHandler = <TMeta>(\n handler: FunctionHandler<SubscriptionData, TMeta>,\n types?: S.Schema<any>[],\n): FunctionHandler<RawSubscriptionData, TMeta> => {\n return async ({ event: { data }, context, response, ...rest }) => {\n const { client } = context;\n const space = data.spaceKey ? client.spaces.get(PublicKey.from(data.spaceKey)) : undefined;\n if (!space) {\n log.error('Invalid space');\n return response.status(500);\n }\n\n registerTypes(space, types);\n const objects = space\n ? data.objects\n ?.map<ReactiveEchoObject<any> | undefined>((id) => space!.db.getObjectById(id))\n .filter(isNonNullable)\n : [];\n\n if (!!data.spaceKey && !space) {\n log.warn('invalid space', { data });\n } else {\n log.info('handler', { space: space?.key.truncate(), objects: objects?.length });\n }\n\n return handler({ event: { data: { ...data, space, objects } }, context, response, ...rest });\n };\n};\n\n// TODO(burdon): Evolve types as part of function metadata.\nconst registerTypes = (space: Space, types: S.Schema<any>[] = []) => {\n const registry = space.db.graph.schemaRegistry;\n for (const type of types) {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AAYV,SAASA,SAASW;MAAO,GAAA;;;;;;IAC/E;AAEA,WAAOlC,QAAQ;MAAEM,OAAO;QAAEC,MAAM;UAAE,GAAGA;UAAMK;UAAOW;QAAQ;MAAE;MAAGf;MAASC;MAAU,GAAGC;IAAK,CAAA;EAC5F;AACF;AAGA,IAAMY,gBAAgB,CAACV,OAAcP,QAAyB,CAAA,MAAE;AAC9D,QAAM8B,WAAWvB,MAAMc,GAAGU,MAAMC;AAChC,aAAWC,QAAQjC,OAAO;AACxB,QAAI,CAAC8B,SAASI,UAAUD,IAAAA,GAAO;AAC7BH,eAASK,UAAU;QAACF;OAAK;IAC3B;EACF;AACF;",
4
+ "sourcesContent": ["//\n// Copyright 2023 DXOS.org\n//\n\nimport { Schema as S } from 'effect';\nimport { type Effect } from 'effect';\n\nimport { type Client, PublicKey } from '@dxos/client';\nimport { type Space, type SpaceId } from '@dxos/client/echo';\nimport type { CoreDatabase, EchoDatabase, ReactiveEchoObject } from '@dxos/echo-db';\nimport { type HasId } from '@dxos/echo-schema';\nimport { type DXN } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type QueryResult } from '@dxos/protocols';\nimport { isNonNullable } from '@dxos/util';\n\n// TODO(burdon): Model after http request. Ref Lambda/OpenFaaS.\n// https://docs.aws.amazon.com/lambda/latest/dg/typescript-handler.html\n// https://www.serverless.com/framework/docs/providers/aws/guide/serverless.yml/#functions\n// https://www.npmjs.com/package/aws-lambda\n\n/**\n * Function handler.\n */\nexport type FunctionHandler<TData = {}, TMeta = {}, TOutput = any> = (params: {\n context: FunctionContext;\n event: FunctionEvent<TData, TMeta>;\n /**\n * @deprecated\n */\n response: FunctionResponse;\n}) => TOutput | Promise<TOutput> | Effect.Effect<TOutput, any>;\n\n/**\n * Function context.\n */\nexport interface FunctionContext {\n getSpace: (spaceId: SpaceId) => Promise<SpaceAPI>;\n\n /**\n * Space from which the function was invoked.\n */\n space: SpaceAPI | undefined;\n\n ai: FunctionContextAi;\n\n /**\n * @deprecated\n */\n // TODO(burdon): Limit access to individual space.\n client: Client;\n /**\n * @deprecated\n */\n // TODO(burdon): Replace with storage service abstraction.\n dataDir?: string;\n}\n\nexport interface FunctionContextAi {\n // TODO(dmaretskyi): Refer to cloudflare AI docs for more comprehensive typedefs.\n run(model: string, inputs: any, options?: any): Promise<any>;\n}\n\n/**\n * Event payload.\n */\n// TODO(dmaretskyi): Update type definitions to match the actual payload.\nexport type FunctionEvent<TData = {}, TMeta = {}> = {\n data: FunctionEventMeta<TMeta> & TData;\n};\n\n/**\n * Metadata from trigger.\n */\nexport type FunctionEventMeta<TMeta = {}> = {\n meta: TMeta;\n};\n\n/**\n * Function response.\n */\nexport type FunctionResponse = {\n status(code: number): FunctionResponse;\n};\n\n//\n// API.\n//\n\n// TODO(dmaretskyi): Temporary API to get the queues working.\n// TODO(dmaretskyi): To be replaced with integrating queues into echo.\nexport interface QueuesAPI {\n queryQueue(queue: DXN, options?: {}): Promise<QueryResult>;\n insertIntoQueue(queue: DXN, objects: HasId[]): Promise<void>;\n}\n\n/**\n * Space interface available to functions.\n */\nexport interface SpaceAPI {\n get id(): SpaceId;\n /**\n * @deprecated\n */\n get crud(): CoreDatabase;\n get db(): EchoDatabase;\n // TODO(dmaretskyi): Align with echo api --- queues.get(id).append(items);\n get queues(): QueuesAPI;\n}\n\n// TODO(wittjosiah): Fix this.\nconst __assertFunctionSpaceIsCompatibleWithTheClientSpace = () => {\n // const _: SpaceAPI = {} as Space;\n};\n\nexport type FunctionDefinition = {\n description?: string;\n inputSchema: S.Schema.AnyNoContext;\n outputSchema?: S.Schema.AnyNoContext;\n handler: FunctionHandler<any>;\n};\n\nexport type DefineFunctionParams<T, O = any> = {\n description?: string;\n inputSchema: S.Schema<T, any>;\n outputSchema?: S.Schema<O, any>;\n handler: FunctionHandler<T, any, O>;\n};\n\n// TODO(dmaretskyi): Bind input type to function handler.\nexport const defineFunction = <T, O>(params: DefineFunctionParams<T, O>): FunctionDefinition => {\n if (!S.isSchema(params.inputSchema)) {\n throw new Error('Input schema must be a valid schema');\n }\n if (typeof params.handler !== 'function') {\n throw new Error('Handler must be a function');\n }\n\n return {\n description: params.description,\n inputSchema: params.inputSchema,\n outputSchema: params.outputSchema ?? S.Any,\n handler: params.handler,\n };\n};\n\n//\n// Subscription utils.\n//\n\nexport type RawSubscriptionData = {\n spaceKey?: string;\n objects?: string[];\n};\n\nexport type SubscriptionData = {\n space?: Space;\n objects?: ReactiveEchoObject<any>[];\n};\n\n/**\n * Handler wrapper for subscription events; extracts space and objects.\n *\n * To test:\n * ```\n * curl -s -X POST -H \"Content-Type: application/json\" --data '{\"space\": \"0446...1cbb\"}' http://localhost:7100/dev/email-extractor\n * ```\n *\n * NOTE: Get space key from devtools or `dx space list --json`\n */\n// TODO(burdon): Evolve into plugin definition like Composer.\nexport const subscriptionHandler = <TMeta>(\n handler: FunctionHandler<SubscriptionData, TMeta>,\n types?: S.Schema.AnyNoContext[],\n): FunctionHandler<RawSubscriptionData, TMeta> => {\n return async ({ event: { data }, context, response, ...rest }) => {\n const { client } = context;\n const space = data.spaceKey ? client.spaces.get(PublicKey.from(data.spaceKey)) : undefined;\n if (!space) {\n log.error('Invalid space');\n return response.status(500);\n }\n\n registerTypes(space, types);\n const objects = space\n ? data.objects\n ?.map<ReactiveEchoObject<any> | undefined>((id) => space!.db.getObjectById(id))\n .filter(isNonNullable)\n : [];\n\n if (!!data.spaceKey && !space) {\n log.warn('invalid space', { data });\n } else {\n log.info('handler', { space: space?.key.truncate(), objects: objects?.length });\n }\n\n return handler({ event: { data: { ...data, space, objects } }, context, response, ...rest });\n };\n};\n\n// TODO(burdon): Evolve types as part of function metadata.\nconst registerTypes = (space: Space, types: S.Schema.AnyNoContext[] = []) => {\n const registry = space.db.graph.schemaRegistry;\n for (const type of types) {\n if (!registry.hasSchema(type)) {\n registry.addSchema([type]);\n }\n }\n};\n"],
5
+ "mappings": ";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAIA,SAASA,UAAUC,SA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AAE;MAAGf;MAASC;MAAU,GAAGC;IAAK,CAAA;EAC5F;AACF;AAGA,IAAMY,gBAAgB,CAACV,OAAcP,QAAiC,CAAA,MAAE;AACtE,QAAM8B,WAAWvB,MAAMc,GAAGU,MAAMC;AAChC,aAAWC,QAAQjC,OAAO;AACxB,QAAI,CAAC8B,SAASI,UAAUD,IAAAA,GAAO;AAC7BH,eAASK,UAAU;QAACF;OAAK;IAC3B;EACF;AACF;",
6
6
  "names": ["Schema", "S", "PublicKey", "log", "isNonNullable", "defineFunction", "params", "S", "isSchema", "inputSchema", "Error", "handler", "description", "outputSchema", "Any", "subscriptionHandler", "types", "event", "data", "context", "response", "rest", "client", "space", "spaceKey", "spaces", "get", "PublicKey", "from", "undefined", "log", "error", "status", "registerTypes", "objects", "map", "id", "db", "getObjectById", "filter", "isNonNullable", "warn", "info", "key", "truncate", "length", "registry", "graph", "schemaRegistry", "type", "hasSchema", "addSchema"]
7
7
  }
@@ -1 +1 @@
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":4779,"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":7882},"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-CM2LOG4A.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-A3BWJQVO.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","InvocationTrace","ScriptType","TraceEvent","TraceEventException","TraceEventLog","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":3468},"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-CM2LOG4A.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-A3BWJQVO.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-CM2LOG4A.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":26827},"packages/core/functions/dist/lib/node-esm/chunk-CM2LOG4A.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-A3BWJQVO.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-A3BWJQVO.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","InvocationTrace","ScriptType","TraceEvent","TraceEventException","TraceEventLog","TriggerKind","TriggerSchema"],"entryPoint":"packages/core/functions/src/types/index.ts","inputs":{},"bytes":686},"packages/core/functions/dist/lib/node-esm/chunk-A3BWJQVO.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":13241},"packages/core/functions/dist/lib/node-esm/chunk-A3BWJQVO.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","InvocationTrace","ScriptType","TraceEvent","TraceEventException","TraceEventLog","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":6179},"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":6205,"imports":[{"path":"@dxos/client/edge","kind":"import-statement","external":true},{"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":4831,"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":6233,"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/url.ts":{"bytes":5599,"imports":[],"format":"esm"},"packages/core/functions/src/types/index.ts":{"bytes":740,"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"},{"path":"packages/core/functions/src/types/url.ts","kind":"import-statement","original":"./url"}],"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","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":4673,"imports":[{"path":"cron-schedule","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-D43PP2YW.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"}],"exports":["incrementSemverPatch","publicKeyToDid","uploadWorkerFunction"],"entryPoint":"packages/core/functions/src/edge/index.ts","inputs":{},"bytes":342},"packages/core/functions/dist/lib/node-esm/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":7891},"packages/core/functions/dist/lib/node-esm/index.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-D43PP2YW.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-USFENOK3.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-SNVRZBGG.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"},{"path":"effect","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","InvocationOutcome","InvocationTraceEvent","ScriptType","TraceEvent","TraceEventException","TraceEventLog","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":2076}},"bytes":3512},"packages/core/functions/dist/lib/node-esm/chunk-D43PP2YW.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":3124},"packages/core/functions/dist/lib/node-esm/chunk-D43PP2YW.mjs":{"imports":[{"path":"@dxos/client/edge","kind":"import-statement","external":true},{"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":["incrementSemverPatch","publicKeyToDid","uploadWorkerFunction"],"inputs":{"packages/core/functions/src/edge/functions.ts":{"bytesInOutput":1612},"packages/core/functions/src/edge/index.ts":{"bytesInOutput":0}},"bytes":1876},"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-USFENOK3.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-SNVRZBGG.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-USFENOK3.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":27170},"packages/core/functions/dist/lib/node-esm/chunk-USFENOK3.mjs":{"imports":[{"path":"packages/core/functions/dist/lib/node-esm/chunk-SNVRZBGG.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-schedule","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":1086},"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":14241},"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-SNVRZBGG.mjs","kind":"import-statement"},{"path":"packages/core/functions/dist/lib/node-esm/chunk-DHGBFXSZ.mjs","kind":"import-statement"}],"exports":["FUNCTIONS_PRESET_META_KEY","FUNCTION_TYPES","FunctionDef","FunctionManifestSchema","FunctionTrigger","FunctionTriggerSchema","FunctionType","InvocationOutcome","InvocationTraceEvent","ScriptType","TraceEvent","TraceEventException","TraceEventLog","TriggerKind","TriggerSchema","getInvocationUrl","getUserFunctionUrlInMetadata","setUserFunctionUrlInMetadata"],"entryPoint":"packages/core/functions/src/types/index.ts","inputs":{},"bytes":964},"packages/core/functions/dist/lib/node-esm/chunk-SNVRZBGG.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":17072},"packages/core/functions/dist/lib/node-esm/chunk-SNVRZBGG.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":["FUNCTIONS_PRESET_META_KEY","FUNCTION_TYPES","FunctionDef","FunctionManifestSchema","FunctionTrigger","FunctionTriggerSchema","FunctionType","InvocationOutcome","InvocationTraceEvent","ScriptType","TraceEvent","TraceEventException","TraceEventLog","TriggerKind","TriggerSchema","getInvocationUrl","getUserFunctionUrlInMetadata","setUserFunctionUrlInMetadata"],"inputs":{"packages/core/functions/src/types/schema.ts":{"bytesInOutput":1057},"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":1502},"packages/core/functions/src/types/url.ts":{"bytesInOutput":1138}},"bytes":8053},"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-CM2LOG4A.mjs";
5
+ } from "../chunk-USFENOK3.mjs";
6
6
  import {
7
7
  FunctionDef,
8
8
  FunctionTrigger
9
- } from "../chunk-A3BWJQVO.mjs";
9
+ } from "../chunk-SNVRZBGG.mjs";
10
10
  import {
11
11
  __require
12
12
  } from "../chunk-DHGBFXSZ.mjs";
@@ -1,33 +1,43 @@
1
1
  import { createRequire } from 'node:module';const require = createRequire(import.meta.url);
2
2
  import {
3
+ FUNCTIONS_PRESET_META_KEY,
3
4
  FUNCTION_TYPES,
4
5
  FunctionDef,
5
6
  FunctionManifestSchema,
6
7
  FunctionTrigger,
7
8
  FunctionTriggerSchema,
8
9
  FunctionType,
9
- InvocationTrace,
10
+ InvocationOutcome,
11
+ InvocationTraceEvent,
10
12
  ScriptType,
11
13
  TraceEvent,
12
14
  TraceEventException,
13
15
  TraceEventLog,
14
16
  TriggerKind,
15
- TriggerSchema
16
- } from "../chunk-A3BWJQVO.mjs";
17
+ TriggerSchema,
18
+ getInvocationUrl,
19
+ getUserFunctionUrlInMetadata,
20
+ setUserFunctionUrlInMetadata
21
+ } from "../chunk-SNVRZBGG.mjs";
17
22
  import "../chunk-DHGBFXSZ.mjs";
18
23
  export {
24
+ FUNCTIONS_PRESET_META_KEY,
19
25
  FUNCTION_TYPES,
20
26
  FunctionDef,
21
27
  FunctionManifestSchema,
22
28
  FunctionTrigger,
23
29
  FunctionTriggerSchema,
24
30
  FunctionType,
25
- InvocationTrace,
31
+ InvocationOutcome,
32
+ InvocationTraceEvent,
26
33
  ScriptType,
27
34
  TraceEvent,
28
35
  TraceEventException,
29
36
  TraceEventLog,
30
37
  TriggerKind,
31
- TriggerSchema
38
+ TriggerSchema,
39
+ getInvocationUrl,
40
+ getUserFunctionUrlInMetadata,
41
+ setUserFunctionUrlInMetadata
32
42
  };
33
43
  //# sourceMappingURL=index.mjs.map
@@ -1,9 +1,7 @@
1
1
  import { type DID } from 'iso-did/types';
2
2
  import { type Client } from '@dxos/client';
3
- import { type ObjectMeta } from '@dxos/echo-schema';
4
3
  import type { PublicKey, SpaceId } from '@dxos/keys';
5
4
  import { type UploadFunctionResponseBody } from '@dxos/protocols';
6
- export declare const FUNCTIONS_PRESET_META_KEY = "dxos.org/service/function-preset";
7
5
  export type UploadWorkerArgs = {
8
6
  client: Client;
9
7
  name?: string;
@@ -13,13 +11,6 @@ export type UploadWorkerArgs = {
13
11
  spaceId: SpaceId;
14
12
  };
15
13
  export declare const uploadWorkerFunction: ({ client, name, version, source, spaceId, functionId, }: UploadWorkerArgs) => Promise<UploadFunctionResponseBody>;
16
- export declare const getUserFunctionUrlInMetadata: (meta: ObjectMeta) => string | undefined;
17
- export declare const setUserFunctionUrlInMetadata: (meta: ObjectMeta, functionUrl: string) => void;
18
- export declare const getInvocationUrl: (functionUrl: string, edgeUrl: string, options?: InvocationOptions) => string;
19
14
  export declare const incrementSemverPatch: (version: string) => string;
20
15
  export declare const publicKeyToDid: (key: PublicKey) => DID;
21
- export type InvocationOptions = {
22
- spaceId?: SpaceId;
23
- subjectId?: string;
24
- };
25
16
  //# sourceMappingURL=functions.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"functions.d.ts","sourceRoot":"","sources":["../../../../src/edge/functions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,GAAG,EAAE,MAAM,eAAe,CAAC;AAEzC,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,cAAc,CAAC;AAC3C,OAAO,EAAE,KAAK,UAAU,EAAE,MAAM,mBAAmB,C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C;AAElE,MAAM,MAAM,gBAAgB,GAAG;IAC7B,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,OAAO,CAAC;CAClB,CAAC;AAEF,eAAO,MAAM,oBAAoB,4DAO9B,gBAAgB,KAAG,OAAO,CAAC,0BAA0B,CAiBvD,CAAC;AAEF,eAAO,MAAM,oBAAoB,YAAa,MAAM,KAAG,MAKtD,CAAC;AAEF,eAAO,MAAM,cAAc,QAAS,SAAS,KAAG,GAE/C,CAAC"}
@@ -1,4 +1,4 @@
1
- import { Schema as S } from '@effect/schema';
1
+ import { Schema as S } from 'effect';
2
2
  import { type Effect } from 'effect';
3
3
  import { type Client } from '@dxos/client';
4
4
  import { type Space, type SpaceId } from '@dxos/client/echo';
@@ -104,5 +104,5 @@ export type SubscriptionData = {
104
104
  *
105
105
  * NOTE: Get space key from devtools or `dx space list --json`
106
106
  */
107
- export declare const subscriptionHandler: <TMeta>(handler: FunctionHandler<SubscriptionData, TMeta>, types?: S.Schema<any>[]) => FunctionHandler<RawSubscriptionData, TMeta>;
107
+ export declare const subscriptionHandler: <TMeta>(handler: FunctionHandler<SubscriptionData, TMeta>, types?: S.Schema.AnyNoContext[]) => FunctionHandler<RawSubscriptionData, TMeta>;
108
108
  //# sourceMappingURL=handler.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"handler.d.ts","sourceRoot":"","sources":["../../../src/handler.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,gBAAgB,CAAC;AAC7C,OAAO,EAAE,KAAK,MAAM,EAAE,MAAM,QAAQ,CAAC;AAErC,OAAO,EAAE,KAAK,MAAM,EAAa,MAAM,cAAc,CAAC;AACtD,OAAO,EAAE,KAAK,KAAK,EAAE,KAAK,OAAO,EA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M,EAAE,CAAC;CACpB,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,CAAC,EAAE,KAAK,CAAC;IACd,OAAO,CAAC,EAAE,kBAAkB,CAAC,GAAG,CAAC,EAAE,CAAC;CACrC,CAAC;AAEF;;;;;;;;;GASG;AAEH,eAAO,MAAM,mBAAmB,GAAI,KAAK,WAC9B,eAAe,CAAC,gBAAgB,EAAE,KAAK,CAAC,UACzC,CAAC,CAAC,MAAM,CAAC,YAAY,EAAE,KAC9B,eAAe,CAAC,mBAAmB,EAAE,KAAK,CAwB5C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"timer-trigger.d.ts","sourceRoot":"","sources":["../../../../../src/trigger/type/timer-trigger.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEhF,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CA8B3D,CAAC"}
1
+ {"version":3,"file":"timer-trigger.d.ts","sourceRoot":"","sources":["../../../../../src/trigger/type/timer-trigger.ts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAwB,KAAK,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAEhF,eAAO,MAAM,kBAAkB,EAAE,cAAc,CAAC,YAAY,CAiC3D,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export * from './schema';
2
2
  export * from './types';
3
3
  export * from './trace';
4
+ export * from './url';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -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;AACxB,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;AACxB,cAAc,OAAO,CAAC"}
@@ -1,12 +1,8 @@
1
- import { JsonSchemaType, S } from '@dxos/echo-schema';
2
- declare const ScriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
3
- name: S.optional<typeof S.String>;
4
- description: S.optional<typeof S.String>;
5
- changed: S.optional<typeof S.Boolean>;
6
- source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
7
- content: typeof S.String;
8
- }, import("@dxos/echo-schema").TypedObjectOptions>>;
9
- }, import("@dxos/echo-schema").TypedObjectOptions>, S.Struct.Encoded<{
1
+ import { JsonSchemaType, Ref, S } from '@dxos/echo-schema';
2
+ /**
3
+ * Source script.
4
+ */
5
+ export declare const ScriptType: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
10
6
  name: S.optional<typeof S.String>;
11
7
  description: S.optional<typeof S.String>;
12
8
  changed: S.optional<typeof S.Boolean>;
@@ -14,23 +10,20 @@ declare const ScriptType_base: import("@dxos/echo-schema").TypedObjectPrototype<
14
10
  content: typeof S.String;
15
11
  }, import("@dxos/echo-schema").TypedObjectOptions>>;
16
12
  }>>;
17
- /**
18
- * Source script.
19
- */
20
- export declare class ScriptType extends ScriptType_base {
21
- }
13
+ export type ScriptType = S.Schema.Type<typeof ScriptType>;
22
14
  declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototype<import("@dxos/echo-schema").TypedObjectFields<{
23
15
  name: typeof S.NonEmptyString;
24
16
  version: typeof S.String;
25
17
  description: S.optional<typeof S.String>;
26
- source: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
27
- name: S.optional<typeof S.String>;
28
- description: S.optional<typeof S.String>;
29
- changed: S.optional<typeof S.Boolean>;
30
- source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
18
+ source: S.optional<import("@dxos/echo-schema").Ref$<{
19
+ readonly id: string;
20
+ name?: string | undefined;
21
+ source: Ref<import("@dxos/echo-schema").TypedObjectFields<{
31
22
  content: typeof S.String;
32
23
  }, import("@dxos/echo-schema").TypedObjectOptions>>;
33
- }, import("@dxos/echo-schema").TypedObjectOptions>>>;
24
+ description?: string | undefined;
25
+ changed?: boolean | undefined;
26
+ }>>;
34
27
  inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
35
28
  outputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
36
29
  binding: S.optional<typeof S.String>;
@@ -38,14 +31,15 @@ declare const FunctionType_base: import("@dxos/echo-schema").TypedObjectPrototyp
38
31
  name: typeof S.NonEmptyString;
39
32
  version: typeof S.String;
40
33
  description: S.optional<typeof S.String>;
41
- source: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
42
- name: S.optional<typeof S.String>;
43
- description: S.optional<typeof S.String>;
44
- changed: S.optional<typeof S.Boolean>;
45
- source: import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
34
+ source: S.optional<import("@dxos/echo-schema").Ref$<{
35
+ readonly id: string;
36
+ name?: string | undefined;
37
+ source: Ref<import("@dxos/echo-schema").TypedObjectFields<{
46
38
  content: typeof S.String;
47
39
  }, import("@dxos/echo-schema").TypedObjectOptions>>;
48
- }, import("@dxos/echo-schema").TypedObjectOptions>>>;
40
+ description?: string | undefined;
41
+ changed?: boolean | undefined;
42
+ }>>;
49
43
  inputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
50
44
  outputSchema: S.optional<S.Schema<JsonSchemaType, JsonSchemaType, never>>;
51
45
  binding: S.optional<typeof S.String>;
@@ -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;;;;;;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"}
1
+ {"version":3,"file":"schema.d.ts","sourceRoot":"","sources":["../../../../src/types/schema.ts"],"names":[],"mappings":"AAIA,OAAO,EAAc,cAAc,EAAqB,GAAG,EAAE,CAAC,EAAe,MAAM,mBAAmB,CAAC;AAGvG;;GAEG;AACH,eAAO,MAAM,UAAU;;;;;wBAFtB,EAAE,MAAM;;GAa2C,CAAC;AACrD,MAAM,MAAM,UAAU,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,UAAU,CAAC,CAAC;;;;;;;;;4BAdzD,EAAE,MAAM;;;;;;;;;;;;;;;;4BAAR,EAAE,MAAM;;;;;;;;;AAgBT;;GAEG;AAEH,qBAAa,YAAa,SAAQ,iBAmBhC;CAAG"}
@@ -1,41 +1,32 @@
1
- import { Expando, Ref, S } from '@dxos/echo-schema';
2
- export 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<{
1
+ import { Expando, S } from '@dxos/echo-schema';
2
+ export declare enum InvocationOutcome {
3
+ SUCCESS = "success",
4
+ FAILURE = "failure"
5
+ }
6
+ export declare const TraceEventException: S.Struct<{
7
+ timestampMs: typeof S.Number;
8
+ message: typeof S.String;
9
+ name: typeof S.String;
10
+ stack: S.optional<typeof S.String>;
11
+ }>;
12
+ export declare const InvocationTraceEvent: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
13
+ id: import("@dxos/echo-schema").ObjectIdClass;
14
+ timestampMs: typeof S.Number;
15
+ outcome: S.Enums<typeof InvocationOutcome>;
16
+ input: typeof S.Object;
17
+ durationMs: typeof S.Number;
18
+ /**
19
+ * Queue DXN for function/workflow invocation events.
20
+ */
21
+ invocationTraceQueue: import("@dxos/echo-schema").Ref$<Expando>;
22
+ /**
23
+ * DXN of the invoked function/workflow.
24
+ */
25
+ invocationTarget: import("@dxos/echo-schema").Ref$<Expando>;
26
+ /**
27
+ * Present for automatic invocations.
28
+ */
29
+ trigger: S.optional<import("@dxos/echo-schema").Ref$<import("@dxos/echo-schema").TypedObjectFields<{
39
30
  readonly function: S.optional<S.SchemaClass<string, string, never>>;
40
31
  readonly enabled: S.optional<S.SchemaClass<boolean, boolean, never>>;
41
32
  readonly spec: S.optional<S.Union<[S.mutable<S.Struct<{
@@ -59,56 +50,47 @@ export declare const InvocationTrace: S.Schema<{
59
50
  type: S.Literal<[import("./types").TriggerKind.Email]>;
60
51
  }>>, S.mutable<S.Struct<{
61
52
  type: S.Literal<[import("./types").TriggerKind.Queue]>;
62
- queue: S.refine<string, S.Schema<string, string, never>>;
53
+ queue: S.refine<string, typeof S.NonEmptyString>;
63
54
  }>>]>>;
64
55
  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>;
56
+ }, import("@dxos/echo-schema").TypedObjectOptions>>>;
57
+ /**
58
+ * Present for outcome FAILURE.
59
+ */
60
+ exception: S.optional<S.Struct<{
61
+ timestampMs: typeof S.Number;
62
+ message: typeof S.String;
63
+ name: typeof S.String;
64
+ stack: S.optional<typeof S.String>;
65
+ }>>;
66
+ }>>;
67
+ export type InvocationTraceEvent = S.Schema.Type<typeof InvocationTraceEvent>;
68
68
  export declare const TraceEventLog: S.Struct<{
69
69
  timestampMs: typeof S.Number;
70
70
  level: typeof S.String;
71
71
  message: typeof S.String;
72
72
  context: S.optional<typeof S.Object>;
73
73
  }>;
74
- export declare const TraceEventException: S.Struct<{
75
- timestampMs: typeof S.Number;
76
- message: typeof S.String;
77
- name: typeof S.String;
78
- stack: S.optional<typeof S.String>;
79
- }>;
80
- export declare const TraceEvent: S.Schema<{
81
- readonly id: string;
82
- outcome: string;
83
- truncated: boolean;
84
- logs: {
85
- readonly context?: object | undefined;
86
- readonly timestampMs: number;
87
- readonly level: string;
88
- readonly message: string;
89
- }[];
90
- exceptions: {
91
- readonly name: string;
92
- readonly timestampMs: number;
93
- readonly message: string;
94
- readonly stack?: string | undefined;
95
- }[];
96
- }, {
97
- readonly id: string;
98
- outcome: string;
99
- truncated: boolean;
100
- logs: {
101
- readonly context?: object | undefined;
102
- readonly timestampMs: number;
103
- readonly level: string;
104
- readonly message: string;
105
- }[];
106
- exceptions: {
107
- readonly name: string;
108
- readonly timestampMs: number;
109
- readonly message: string;
110
- readonly stack?: string | undefined;
111
- }[];
112
- }, never>;
74
+ export declare const TraceEvent: import("@dxos/echo-schema").EchoObjectSchema<S.Struct<{
75
+ id: import("@dxos/echo-schema").ObjectIdClass;
76
+ outcome: typeof S.String;
77
+ truncated: typeof S.Boolean;
78
+ /**
79
+ * Time when the event was persisted.
80
+ */
81
+ ingestionTimestampMs: typeof S.Number;
82
+ logs: S.Array$<S.Struct<{
83
+ timestampMs: typeof S.Number;
84
+ level: typeof S.String;
85
+ message: typeof S.String;
86
+ context: S.optional<typeof S.Object>;
87
+ }>>;
88
+ exceptions: S.Array$<S.Struct<{
89
+ timestampMs: typeof S.Number;
90
+ message: typeof S.String;
91
+ name: typeof S.String;
92
+ stack: S.optional<typeof S.String>;
93
+ }>>;
94
+ }>>;
113
95
  export type TraceEvent = S.Schema.Type<typeof TraceEvent>;
114
96
  //# sourceMappingURL=trace.d.ts.map
@@ -1 +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,eAAO,MAAM,eAAe;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;SAciC,CAAC;AAE9D,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,e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