@dxos/functions-runtime-cloudflare 0.8.4-main.21d9917
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/README.md +47 -0
- package/dist/lib/browser/index.mjs +1137 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/node-esm/index.mjs +1139 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/types/src/functions-client.d.ts +33 -0
- package/dist/types/src/functions-client.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +6 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/internal/adapter.d.ts +12 -0
- package/dist/types/src/internal/adapter.d.ts.map +1 -0
- package/dist/types/src/internal/data-service-impl.d.ts +26 -0
- package/dist/types/src/internal/data-service-impl.d.ts.map +1 -0
- package/dist/types/src/internal/index.d.ts +2 -0
- package/dist/types/src/internal/index.d.ts.map +1 -0
- package/dist/types/src/internal/query-service-impl.d.ts +19 -0
- package/dist/types/src/internal/query-service-impl.d.ts.map +1 -0
- package/dist/types/src/internal/queue-service-impl.d.ts +11 -0
- package/dist/types/src/internal/queue-service-impl.d.ts.map +1 -0
- package/dist/types/src/internal/service-container.d.ts +27 -0
- package/dist/types/src/internal/service-container.d.ts.map +1 -0
- package/dist/types/src/internal/utils.d.ts +2 -0
- package/dist/types/src/internal/utils.d.ts.map +1 -0
- package/dist/types/src/logger.d.ts +2 -0
- package/dist/types/src/logger.d.ts.map +1 -0
- package/dist/types/src/queues-api.d.ts +22 -0
- package/dist/types/src/queues-api.d.ts.map +1 -0
- package/dist/types/src/space-proxy.d.ts +26 -0
- package/dist/types/src/space-proxy.d.ts.map +1 -0
- package/dist/types/src/types.d.ts +31 -0
- package/dist/types/src/types.d.ts.map +1 -0
- package/dist/types/src/wrap-handler-for-cloudflare.d.ts +6 -0
- package/dist/types/src/wrap-handler-for-cloudflare.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +52 -0
- package/src/functions-client.ts +88 -0
- package/src/index.ts +9 -0
- package/src/internal/adapter.ts +48 -0
- package/src/internal/data-service-impl.ts +142 -0
- package/src/internal/index.ts +5 -0
- package/src/internal/query-service-impl.ts +107 -0
- package/src/internal/queue-service-impl.ts +69 -0
- package/src/internal/service-container.ts +73 -0
- package/src/internal/utils.ts +5 -0
- package/src/logger.ts +42 -0
- package/src/queues-api.ts +38 -0
- package/src/space-proxy.ts +66 -0
- package/src/types.ts +40 -0
- package/src/wrap-handler-for-cloudflare.ts +132 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/functions-client.ts", "../../../src/internal/data-service-impl.ts", "../../../src/internal/utils.ts", "../../../src/internal/query-service-impl.ts", "../../../src/internal/adapter.ts", "../../../src/internal/queue-service-impl.ts", "../../../src/internal/service-container.ts", "../../../src/space-proxy.ts", "../../../src/queues-api.ts", "../../../src/types.ts", "../../../src/wrap-handler-for-cloudflare.ts", "../../../src/logger.ts"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2024 DXOS.org\n//\n\nimport { Resource } from '@dxos/context';\nimport { EchoClient } from '@dxos/echo-db';\nimport { invariant } from '@dxos/invariant';\nimport { type SpaceId } from '@dxos/keys';\nimport { type EdgeFunctionEnv } from '@dxos/protocols';\n\nimport { ServiceContainer } from './internal';\nimport { SpaceProxy } from './space-proxy';\n\ntype Services = {\n dataService: EdgeFunctionEnv.DataService;\n queueService: EdgeFunctionEnv.QueueService;\n functionsAiService: EdgeFunctionEnv.FunctionsAiService;\n};\n\n/**\n * API for functions to integrate with ECHO and HALO.\n * @deprecated\n */\nexport class FunctionsClient extends Resource {\n private readonly _serviceContainer;\n private readonly _echoClient;\n private readonly _executionContext: EdgeFunctionEnv.ExecutionContext = {};\n\n private readonly _spaces = new Map<SpaceId, SpaceProxy>();\n\n constructor(services: Services) {\n super();\n invariant(typeof services.dataService !== 'undefined', 'DataService is required');\n invariant(typeof services.queueService !== 'undefined', 'QueueService is required');\n this._serviceContainer = new ServiceContainer(\n this._executionContext,\n services.dataService,\n services.queueService,\n services.functionsAiService,\n );\n this._echoClient = new EchoClient({});\n }\n\n get echo(): EchoClient {\n return this._echoClient;\n }\n\n protected override async _open() {\n const { dataService, queryService } = await this._serviceContainer.createServices();\n this._echoClient.connectToService({ dataService, queryService });\n await this._echoClient.open();\n }\n\n protected override async _close() {\n for (const space of this._spaces.values()) {\n await space.close();\n }\n this._spaces.clear();\n\n await this._echoClient.close();\n }\n\n async getSpace(spaceId: SpaceId): Promise<SpaceProxy> {\n if (!this._spaces.has(spaceId)) {\n const space = new SpaceProxy(this._serviceContainer, this._echoClient, spaceId);\n this._spaces.set(spaceId, space);\n }\n const space = this._spaces.get(spaceId)!;\n await space.open(); // No-op if already open.\n return space;\n }\n}\n\nexport const createClientFromEnv = async (env: any): Promise<FunctionsClient> => {\n const client = new FunctionsClient({\n dataService: env.DATA_SERVICE,\n queueService: env.QUEUE_SERVICE,\n functionsAiService: env.FUNCTIONS_AI_SERVICE,\n });\n await client.open();\n return client;\n};\n\n/**\n - Provides data access capabilities for user functions.\n - No real-time replication or reactive queries -- function receives a snapshot.\n - Function event contains the metadata but doesn't need to include the data.\n */\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { RequestOptions } from '@dxos/codec-protobuf';\nimport { Stream } from '@dxos/codec-protobuf/stream';\nimport { raise } from '@dxos/debug';\nimport { NotImplementedError, RuntimeServiceError } from '@dxos/errors';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceId } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type EdgeFunctionEnv } from '@dxos/protocols';\nimport type {\n BatchedDocumentUpdates,\n CreateDocumentRequest,\n CreateDocumentResponse,\n DataService as DataServiceProto,\n GetDocumentHeadsRequest,\n GetDocumentHeadsResponse,\n GetSpaceSyncStateRequest,\n ReIndexHeadsRequest,\n SpaceSyncState,\n UpdateRequest,\n UpdateSubscriptionRequest,\n} from '@dxos/protocols/proto/dxos/echo/service';\n\nimport { copyUint8Array } from './utils';\n\nexport class DataServiceImpl implements DataServiceProto {\n private dataSubscriptions = new Map<string, { spaceId: SpaceId; next: (msg: BatchedDocumentUpdates) => void }>();\n\n constructor(\n private _executionContext: EdgeFunctionEnv.ExecutionContext,\n private _dataService: EdgeFunctionEnv.DataService,\n ) {}\n\n subscribe({ subscriptionId, spaceId }: { subscriptionId: string; spaceId: string }): Stream<BatchedDocumentUpdates> {\n return new Stream(({ next }) => {\n invariant(SpaceId.isValid(spaceId));\n this.dataSubscriptions.set(subscriptionId, { spaceId, next });\n\n return () => {\n this.dataSubscriptions.delete(subscriptionId);\n };\n });\n }\n\n async updateSubscription({ subscriptionId, addIds }: UpdateSubscriptionRequest): Promise<void> {\n const sub =\n this.dataSubscriptions.get(subscriptionId) ??\n raise(\n new RuntimeServiceError({\n message: 'Subscription not found.',\n context: { subscriptionId },\n }),\n );\n\n if (addIds) {\n log.info('request documents', { count: addIds.length });\n // TODO(dmaretskyi): Batch.\n for (const documentId of addIds) {\n using document = await this._dataService.getDocument(this._executionContext, sub.spaceId, documentId);\n log.info('document loaded', { documentId, spaceId: sub.spaceId, found: !!document });\n if (!document) {\n log.warn('not found', { documentId });\n continue;\n }\n sub.next({\n updates: [\n {\n documentId,\n // Copy returned object to avoid hanging RPC stub\n // See https://developers.cloudflare.com/workers/runtime-apis/rpc/lifecycle/\n mutation: copyUint8Array(document.data),\n },\n ],\n });\n }\n }\n }\n\n async createDocument({ spaceId, initialValue }: CreateDocumentRequest): Promise<CreateDocumentResponse> {\n using response = await this._dataService.createDocument(this._executionContext, { spaceId, initialValue });\n return { documentId: response.documentId };\n }\n\n async update({ updates, subscriptionId }: UpdateRequest): Promise<void> {\n const sub =\n this.dataSubscriptions.get(subscriptionId) ??\n raise(\n new RuntimeServiceError({\n message: 'Subscription not found.',\n context: { subscriptionId },\n }),\n );\n // TODO(dmaretskyi): Batch.\n try {\n for (const update of updates ?? []) {\n await this._dataService.changeDocument(this._executionContext, sub.spaceId, update.documentId, update.mutation);\n }\n } catch (error) {\n throw RuntimeServiceError.wrap({\n message: 'Failed to apply document updates.',\n context: { subscriptionId },\n ifTypeDiffers: true,\n })(error);\n }\n }\n\n async flush(): Promise<void> {\n // No-op.\n }\n\n subscribeSpaceSyncState(_request: GetSpaceSyncStateRequest, _options?: RequestOptions): Stream<SpaceSyncState> {\n throw new NotImplementedError({\n message: 'subscribeSpaceSyncState is not implemented.',\n });\n }\n\n async getDocumentHeads({ documentIds: _documentIds }: GetDocumentHeadsRequest): Promise<GetDocumentHeadsResponse> {\n throw new NotImplementedError({\n message: 'getDocumentHeads is not implemented.',\n });\n }\n\n async reIndexHeads({ documentIds: _documentIds }: ReIndexHeadsRequest): Promise<void> {\n throw new NotImplementedError({\n message: 'reIndexHeads is not implemented.',\n });\n }\n\n async updateIndexes(): Promise<void> {\n log.error('updateIndexes is not available in EDGE env.');\n // No-op.\n }\n\n async waitUntilHeadsReplicated({ heads: _heads }: { heads: any }): Promise<void> {\n throw new NotImplementedError({\n message: 'waitUntilHeadsReplicated is not implemented.',\n });\n }\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport const copyUint8Array = (value: Uint8Array): Uint8Array => new Uint8Array(value);\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\n\nimport { Stream } from '@dxos/codec-protobuf/stream';\nimport { QueryAST } from '@dxos/echo-protocol';\nimport { NotImplementedError, RuntimeServiceError } from '@dxos/errors';\nimport { invariant } from '@dxos/invariant';\nimport { PublicKey } from '@dxos/keys';\nimport { SpaceId } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { type EdgeFunctionEnv } from '@dxos/protocols';\nimport {\n type QueryRequest,\n type QueryResponse,\n type QueryResult as QueryResultProto,\n type QueryService as QueryServiceProto,\n} from '@dxos/protocols/proto/dxos/echo/query';\n\nimport { queryToDataServiceRequest } from './adapter';\nimport { copyUint8Array } from './utils';\n\nexport class QueryServiceImpl implements QueryServiceProto {\n private _queryCount = 0;\n\n constructor(\n private readonly _executionContext: EdgeFunctionEnv.ExecutionContext,\n private readonly _dataService: EdgeFunctionEnv.DataService,\n ) {}\n\n execQuery(request: QueryRequest): Stream<QueryResponse> {\n log.info('execQuery', { request });\n const query = QueryAST.Query.pipe(Schema.decodeUnknownSync)(JSON.parse(request.query));\n const requestedSpaceIds = getTargetSpacesForQuery(query);\n invariant(requestedSpaceIds.length === 1, 'Only one space is supported');\n const spaceId = requestedSpaceIds[0];\n\n return Stream.fromPromise<QueryResponse>(\n (async () => {\n try {\n this._queryCount++;\n log.info('begin query', { spaceId });\n using queryResponse = await this._dataService.queryDocuments(\n this._executionContext,\n queryToDataServiceRequest(query),\n );\n log.info('query response', { spaceId, filter: request.filter, resultCount: queryResponse.results.length });\n return {\n results: queryResponse.results.map(\n (object): QueryResultProto => ({\n id: object.objectId,\n spaceId,\n spaceKey: PublicKey.ZERO,\n documentId: object.document.documentId,\n // Rank 1 for predicate matches where ranking is not determined.\n rank: 1,\n // Copy returned object to avoid hanging RPC stub.\n // See https://developers.cloudflare.com/workers/runtime-apis/rpc/lifecycle/\n documentAutomerge: copyUint8Array(object.document.data),\n }),\n ),\n } satisfies QueryResponse;\n } catch (error) {\n log.error('query failed', { err: error });\n throw new RuntimeServiceError({\n message: `Query execution failed (queryCount=${this._queryCount})`,\n context: { spaceId, filter: request.filter, queryCount: this._queryCount },\n cause: error,\n });\n }\n })(),\n );\n }\n\n async reindex() {\n throw new NotImplementedError({\n message: 'Reindex is not implemented.',\n });\n }\n\n async setConfig() {\n throw new NotImplementedError({\n message: 'SetConfig is not implemented.',\n });\n }\n}\n\n/**\n * Lists spaces this query will select from.\n */\nexport const getTargetSpacesForQuery = (query: QueryAST.Query): SpaceId[] => {\n const spaces = new Set<SpaceId>();\n\n const visitor = (node: QueryAST.Query) => {\n if (node.type === 'options') {\n if (node.options.spaceIds) {\n for (const spaceId of node.options.spaceIds) {\n spaces.add(SpaceId.make(spaceId));\n }\n }\n }\n };\n QueryAST.visit(query, visitor);\n return [...spaces];\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { failUndefined } from '@dxos/debug';\nimport { type QueryAST } from '@dxos/echo-protocol';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceId } from '@dxos/keys';\nimport { type EdgeFunctionEnv } from '@dxos/protocols';\n\nexport const queryToDataServiceRequest = (query: QueryAST.Query): EdgeFunctionEnv.QueryRequest => {\n const { filter, options } = isSimpleSelectionQuery(query) ?? failUndefined();\n invariant(options?.spaceIds?.length === 1, 'Only one space is supported');\n invariant(filter.type === 'object', 'Only object filters are supported');\n\n const spaceId = options.spaceIds[0];\n invariant(SpaceId.isValid(spaceId));\n\n return {\n spaceId,\n type: filter.typename ?? undefined,\n objectIds: [...(filter.id ?? [])],\n };\n};\n\n/**\n * Extracts the filter and options from a query.\n * Supports Select(...) and Options(Select(...)) queries.\n */\nexport const isSimpleSelectionQuery = (\n query: QueryAST.Query,\n): { filter: QueryAST.Filter; options?: QueryAST.QueryOptions } | null => {\n switch (query.type) {\n case 'options': {\n const maybeFilter = isSimpleSelectionQuery(query.query);\n if (!maybeFilter) {\n return null;\n }\n return { filter: maybeFilter.filter, options: query.options };\n }\n case 'select': {\n return { filter: query.filter, options: undefined };\n }\n default: {\n return null;\n }\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { NotImplementedError, RuntimeServiceError } from '@dxos/errors';\nimport { invariant } from '@dxos/invariant';\nimport { type QueueService as QueueServiceProto } from '@dxos/protocols';\nimport type {\n DeleteFromQueueRequest,\n EdgeFunctionEnv,\n InsertIntoQueueRequest,\n QueryQueueRequest,\n QueryResult,\n} from '@dxos/protocols';\n\nexport class QueueServiceImpl implements QueueServiceProto {\n constructor(\n protected _ctx: EdgeFunctionEnv.ExecutionContext,\n private readonly _queueService: EdgeFunctionEnv.QueueService,\n ) {}\n async queryQueue(request: QueryQueueRequest): Promise<QueryResult> {\n const { query } = request;\n const { queueIds, ...filter } = query!;\n const spaceId = query!.spaceId;\n const queueId = queueIds?.[0];\n invariant(request.query.queuesNamespace);\n try {\n using result = await this._queueService.query(\n this._ctx,\n `dxn:queue:${request.query.queuesNamespace}:${spaceId}:${queueId}`,\n filter,\n );\n return {\n // Copy returned object to avoid hanging RPC stub\n // See https://developers.cloudflare.com/workers/runtime-apis/rpc/lifecycle/\n objects: structuredClone(result.objects),\n nextCursor: result.nextCursor,\n prevCursor: result.prevCursor,\n };\n } catch (error) {\n throw RuntimeServiceError.wrap({\n message: 'Queue query failed.',\n context: { subspaceTag: request.query.queuesNamespace, spaceId, queueId },\n ifTypeDiffers: true,\n })(error);\n }\n }\n\n async insertIntoQueue(request: InsertIntoQueueRequest): Promise<void> {\n const { subspaceTag, spaceId, queueId, objects } = request;\n try {\n await this._queueService.append(this._ctx, `dxn:queue:${subspaceTag}:${spaceId}:${queueId}`, objects ?? []);\n } catch (error) {\n throw RuntimeServiceError.wrap({\n message: 'Queue append failed.',\n context: { subspaceTag, spaceId, queueId },\n ifTypeDiffers: true,\n })(error);\n }\n }\n\n deleteFromQueue(request: DeleteFromQueueRequest): Promise<void> {\n const { subspaceTag, spaceId, queueId } = request;\n throw new NotImplementedError({\n message: 'Deleting from queue is not supported.',\n context: { subspaceTag, spaceId, queueId },\n });\n }\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { type AnyEntity } from '@dxos/echo/internal';\nimport { type DXN, type SpaceId } from '@dxos/keys';\nimport type { QueryResult } from '@dxos/protocols';\nimport { type EdgeFunctionEnv } from '@dxos/protocols';\nimport { type QueueService as QueueServiceProto } from '@dxos/protocols';\nimport { type QueryService as QueryServiceProto } from '@dxos/protocols/proto/dxos/echo/query';\nimport type { DataService as DataServiceProto } from '@dxos/protocols/proto/dxos/echo/service';\n\nimport { DataServiceImpl } from './data-service-impl';\nimport { QueryServiceImpl } from './query-service-impl';\nimport { QueueServiceImpl } from './queue-service-impl';\n\n/**\n * TODO: make this implement DataService and QueryService to unify API over edge and web backend\n */\nexport class ServiceContainer {\n constructor(\n private readonly _executionContext: EdgeFunctionEnv.ExecutionContext,\n private readonly _dataService: EdgeFunctionEnv.DataService,\n private readonly _queueService: EdgeFunctionEnv.QueueService,\n private readonly _functionsService: EdgeFunctionEnv.FunctionsAiService,\n ) {}\n\n async getSpaceMeta(spaceId: SpaceId): Promise<EdgeFunctionEnv.SpaceMeta | undefined> {\n using result = await this._dataService.getSpaceMeta(this._executionContext, spaceId);\n // Copy returned object to avoid hanging RPC stub\n // See https://developers.cloudflare.com/workers/runtime-apis/rpc/lifecycle/\n return result\n ? {\n spaceKey: result.spaceKey,\n rootDocumentId: result.rootDocumentId,\n }\n : undefined;\n }\n\n async createServices(): Promise<{\n dataService: DataServiceProto;\n queryService: QueryServiceProto;\n queueService: QueueServiceProto;\n functionsAiService: EdgeFunctionEnv.FunctionsAiService;\n }> {\n const dataService = new DataServiceImpl(this._executionContext, this._dataService);\n const queryService = new QueryServiceImpl(this._executionContext, this._dataService);\n const queueService = new QueueServiceImpl(this._executionContext, this._queueService);\n\n return {\n dataService,\n queryService,\n queueService,\n functionsAiService: this._functionsService,\n };\n }\n\n async queryQueue(queue: DXN): Promise<QueryResult> {\n const { spaceId } = queue.asQueueDXN() ?? {};\n using result = (await this._queueService.query({}, queue.toString(), { spaceId: spaceId! })) as any;\n // Copy returned object to avoid hanging RPC stub\n // See https://developers.cloudflare.com/workers/runtime-apis/rpc/lifecycle/\n return {\n objects: structuredClone(result.objects),\n nextCursor: result.nextCursor ?? null,\n prevCursor: result.prevCursor ?? null,\n };\n }\n\n async insertIntoQueue(queue: DXN, objects: AnyEntity[]): Promise<void> {\n await this._queueService.append({}, queue.toString(), objects);\n }\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport { Resource } from '@dxos/context';\nimport { type Database } from '@dxos/echo';\nimport { type CoreDatabase, type EchoClient, type EchoDatabaseImpl } from '@dxos/echo-db';\nimport { invariant } from '@dxos/invariant';\nimport { PublicKey, type SpaceId } from '@dxos/keys';\n\nimport type { ServiceContainer } from './internal';\nimport { type QueuesAPI, QueuesAPIImpl } from './queues-api';\n\n/**\n * @deprecated\n */\nexport class SpaceProxy extends Resource {\n private _db?: EchoDatabaseImpl = undefined;\n private _queuesApi: QueuesAPIImpl;\n\n constructor(\n private readonly _serviceContainer: ServiceContainer,\n private readonly _echoClient: EchoClient,\n private readonly _id: SpaceId,\n ) {\n super();\n this._queuesApi = new QueuesAPIImpl(this._serviceContainer, this._id);\n }\n\n get id(): SpaceId {\n return this._id;\n }\n\n get db(): Database.Database {\n invariant(this._db);\n return this._db;\n }\n\n /**\n * @deprecated Use db API.\n */\n get crud(): CoreDatabase {\n invariant(this._db);\n return this._db.coreDatabase;\n }\n\n get queues(): QueuesAPI {\n return this._queuesApi;\n }\n\n protected override async _open() {\n const meta = await this._serviceContainer.getSpaceMeta(this._id);\n if (!meta) {\n throw new Error(`Space not found: ${this._id}`);\n }\n\n this._db = this._echoClient.constructDatabase({\n spaceId: this._id,\n spaceKey: PublicKey.from(meta.spaceKey),\n reactiveSchemaQuery: false,\n owningObject: this,\n });\n\n await this._db.coreDatabase.open({ rootUrl: meta.rootDocumentId });\n }\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type AnyEntity } from '@dxos/echo/internal';\nimport type { DXN, SpaceId } from '@dxos/keys';\nimport type { QueryResult } from '@dxos/protocols';\n\nimport type { ServiceContainer } from './internal';\n\n// TODO(dmaretskyi): Temporary API to get the queues working.\n// TODO(dmaretskyi): To be replaced with integrating queues into echo.\n/**\n * @deprecated\n */\nexport interface QueuesAPI {\n queryQueue(queue: DXN, options?: {}): Promise<QueryResult>;\n insertIntoQueue(queue: DXN, objects: AnyEntity[]): Promise<void>;\n}\n\n/**\n * @deprecated\n */\nexport class QueuesAPIImpl implements QueuesAPI {\n constructor(\n private readonly _serviceContainer: ServiceContainer,\n private readonly _spaceId: SpaceId,\n ) {}\n\n queryQueue(queue: DXN, options?: {}): Promise<QueryResult> {\n return this._serviceContainer.queryQueue(queue);\n }\n\n insertIntoQueue(queue: DXN, objects: AnyEntity[]): Promise<void> {\n // TODO(dmaretskyi): Ugly.\n return this._serviceContainer.insertIntoQueue(queue, JSON.parse(JSON.stringify(objects)));\n }\n}\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { JsonSchemaType } from '@dxos/echo/internal';\n\n/**\n * Is used for to route the request to the metadata handler instead of the main handler.\n */\nexport const FUNCTION_ROUTE_HEADER = 'X-DXOS-Function-Route';\n\nexport enum FunctionRouteValue {\n Meta = 'meta',\n}\n\nexport type FunctionMetadata = {\n /**\n * FQN.\n */\n key: string;\n /**\n * Human-readable name.\n */\n name?: string;\n\n /**\n * Description.\n */\n description?: string;\n\n /**\n * Input schema.\n */\n inputSchema?: JsonSchemaType;\n\n /**\n * Output schema.\n */\n outputSchema?: JsonSchemaType;\n};\n", "//\n// Copyright 2024 DXOS.org\n//\n\nimport type { JsonSchemaType } from '@dxos/echo/internal';\nimport { invariant } from '@dxos/invariant';\nimport { SpaceId } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { EdgeResponse } from '@dxos/protocols';\nimport type { EdgeFunctionEnv, FunctionProtocol } from '@dxos/protocols';\n\nimport { ServiceContainer } from './internal';\nimport { FUNCTION_ROUTE_HEADER, type FunctionMetadata, FunctionRouteValue } from './types';\n\n/**\n * Wraps a user function in a Cloudflare-compatible handler.\n */\nexport const wrapHandlerForCloudflare = (func: FunctionProtocol.Func): ExportedHandlerFetchHandler<any> => {\n return async (request: Request, env: EdgeFunctionEnv.Env): Promise<Response> => {\n // TODO(dmaretskyi): Should theÓ scope name reflect the function name?\n // TODO(mykola): Wrap in withCleanAutomergeWasmState;\n // TODO(mykola): Wrap in withNewExecutionContext;\n // Meta route is used to get the input schema of the function by the functions service.\n if (request.headers.get(FUNCTION_ROUTE_HEADER) === FunctionRouteValue.Meta) {\n return handleFunctionMetaCall(func, request);\n }\n\n try {\n const spaceId = new URL(request.url).searchParams.get('spaceId');\n if (spaceId) {\n if (!SpaceId.isValid(spaceId)) {\n return new Response('Invalid spaceId', { status: 400 });\n }\n }\n\n const serviceContainer = new ServiceContainer({}, env.DATA_SERVICE, env.QUEUE_SERVICE, env.FUNCTIONS_AI_SERVICE);\n const context = await createFunctionContext({\n serviceContainer,\n contextSpaceId: spaceId as SpaceId | undefined,\n });\n\n return EdgeResponse.success(await invokeFunction(func, context, request));\n } catch (error: any) {\n log.error('error invoking function', { error, stack: error.stack });\n return EdgeResponse.failure({\n message: error?.message ?? 'Internal error',\n error,\n });\n }\n };\n};\n\nconst invokeFunction = async (func: FunctionProtocol.Func, context: FunctionProtocol.Context, request: Request) => {\n // TODO(dmaretskyi): For some reason requests get wrapped like this.\n const { data } = await decodeRequest(request);\n\n return func.handler({\n context,\n data,\n });\n};\n\nconst decodeRequest = async (request: Request) => {\n const {\n data: { bodyText, ...rest },\n trigger,\n } = (await request.json()) as any;\n\n if (!bodyText) {\n return { data: rest, trigger };\n }\n\n // Webhook passed body as bodyText. Use it as function input if a well-formatted JSON\n // TODO: better trigger input mapping\n try {\n const data = JSON.parse(bodyText);\n return { data, trigger: { ...trigger, ...rest } };\n } catch (err) {\n log.catch(err);\n return { data: { bodyText, ...rest } };\n }\n};\n\nconst handleFunctionMetaCall = (functionDefinition: FunctionProtocol.Func, request: Request): Response => {\n const response: FunctionMetadata = {\n key: functionDefinition.meta.key,\n name: functionDefinition.meta.name,\n description: functionDefinition.meta.description,\n inputSchema: functionDefinition.meta.inputSchema as JsonSchemaType | undefined,\n outputSchema: functionDefinition.meta.outputSchema as JsonSchemaType | undefined,\n };\n\n return new Response(JSON.stringify(response), {\n headers: {\n 'Content-Type': 'application/json',\n },\n });\n};\n\nconst createFunctionContext = async ({\n serviceContainer,\n contextSpaceId,\n}: {\n serviceContainer: ServiceContainer;\n contextSpaceId: SpaceId | undefined;\n}): Promise<FunctionProtocol.Context> => {\n const { dataService, queryService, queueService, functionsAiService } = await serviceContainer.createServices();\n\n let spaceKey: string | undefined;\n let rootUrl: string | undefined;\n if (contextSpaceId) {\n const meta = await serviceContainer.getSpaceMeta(contextSpaceId);\n if (!meta) {\n throw new Error(`Space not found: ${contextSpaceId}`);\n }\n spaceKey = meta.spaceKey;\n invariant(!meta.rootDocumentId.startsWith('automerge:'));\n rootUrl = `automerge:${meta.rootDocumentId}`;\n }\n\n return {\n services: {\n dataService,\n queryService,\n queueService,\n functionsAiService,\n },\n spaceId: contextSpaceId,\n spaceKey,\n spaceRootUrl: rootUrl,\n } as any; // TODO(dmaretskyi): Link and fix before merging\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/* eslint-disable no-console */\n\nimport { LogLevel, type LogProcessor, log, shouldLog } from '@dxos/log';\n\nexport const setupFunctionsLogger = () => {\n log.runtimeConfig.processors.length = 0;\n log.runtimeConfig.processors.push(functionLogProcessor);\n};\n\nconst functionLogProcessor: LogProcessor = (config, entry) => {\n if (!shouldLog(entry, config.filters)) {\n return;\n }\n\n switch (entry.level) {\n case LogLevel.DEBUG:\n console.debug(entry.message, entry.context);\n break;\n case LogLevel.TRACE:\n console.debug(entry.message, entry.context);\n break;\n case LogLevel.VERBOSE:\n console.log(entry.message, entry.context);\n break;\n case LogLevel.INFO:\n console.info(entry.message, entry.context);\n break;\n case LogLevel.WARN:\n console.warn(entry.message, entry.context);\n break;\n case LogLevel.ERROR:\n console.error(entry.message, entry.context);\n break;\n default:\n console.log(entry.message, entry.context);\n break;\n }\n};\n"],
|
|
5
|
+
"mappings": ";AAIA,SAASA,YAAAA,iBAAgB;AACzB,SAASC,kBAAkB;AAC3B,SAASC,aAAAA,kBAAiB;;;ACD1B,SAASC,cAAc;AACvB,SAASC,aAAa;AACtB,SAASC,qBAAqBC,2BAA2B;AACzD,SAASC,iBAAiB;AAC1B,SAASC,eAAe;AACxB,SAASC,WAAW;;;ACNb,IAAMC,iBAAiB,C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AClD,MAAI,CAACC,UAAUD,OAAOD,OAAOG,OAAO,GAAG;AACrC;EACF;AAEA,UAAQF,MAAMG,OAAK;IACjB,KAAKC,SAASC;AACZC,cAAQC,MAAMP,MAAMQ,SAASR,MAAMS,OAAO;AAC1C;IACF,KAAKL,SAASM;AACZJ,cAAQC,MAAMP,MAAMQ,SAASR,MAAMS,OAAO;AAC1C;IACF,KAAKL,SAASO;AACZL,cAAQb,IAAIO,MAAMQ,SAASR,MAAMS,OAAO;AACxC;IACF,KAAKL,SAASQ;AACZN,cAAQO,KAAKb,MAAMQ,SAASR,MAAMS,OAAO;AACzC;IACF,KAAKL,SAASU;AACZR,cAAQS,KAAKf,MAAMQ,SAASR,MAAMS,OAAO;AACzC;IACF,KAAKL,SAASY;AACZV,cAAQW,MAAMjB,MAAMQ,SAASR,MAAMS,OAAO;AAC1C;IACF;AACEH,cAAQb,IAAIO,MAAMQ,SAASR,MAAMS,OAAO;AACxC;EACJ;AACF;",
|
|
6
|
+
"names": ["Resource", "EchoClient", "invariant", "Stream", "raise", "NotImplementedError", "RuntimeServiceError", "invariant", "SpaceId", "log", "copyUint8Array", "value", "Uint8Array", "DataServiceImpl", "dataSubscriptions", "Map", "_executionContext", "_dataService", "subscribe", "subscriptionId", "spaceId", "Stream", "next", "invariant", "SpaceId", "isValid", "set", "delete", "updateSubscription", "addIds", "sub", "get", "raise", "RuntimeServiceError", "message", "context", "log", "info", "count", "length", "documentId", "document", "getDocument", "found", "warn", "updates", "mutation", "copyUint8Array", "data", "createDocument", "initialValue", "response", "update", "changeDocument", "error", "wrap", "ifTypeDiffers", "flush", "subscribeSpaceSyncState", "_request", "_options", "NotImplementedError", "getDocumentHeads", "documentIds", "_documentIds", "reIndexHeads", "updateIndexes", "waitUntilHeadsReplicated", "heads", "_heads", "Schema", "Stream", "QueryAST", "NotImplementedError", "RuntimeServiceError", "invariant", "PublicKey", "SpaceId", "log", "failUndefined", "invariant", "SpaceId", "queryToDataServiceRequest", "query", "filter", "options", "isSimpleSelectionQuery", "spaceIds", "length", "type", "spaceId", "isValid", "typename", "undefined", "objectIds", "id", "maybeFilter", "QueryServiceImpl", "_queryCount", "_executionContext", "_dataService", "execQuery", "request", "log", "info", "query", "QueryAST", "Query", "pipe", "decodeUnknownSync", "JSON", "parse", "requestedSpaceIds", "getTargetSpacesForQuery", "invariant", "length", "spaceId", "Stream", "fromPromise", "queryResponse", "queryDocuments", "queryToDataServiceRequest", "filter", "resultCount", "results", "map", "object", "id", "objectId", "spaceKey", "PublicKey", "ZERO", "documentId", "document", "rank", "documentAutomerge", "copyUint8Array", "data", "error", "err", "RuntimeServiceError", "message", "context", "queryCount", "cause", "reindex", "NotImplementedError", "setConfig", "spaces", "Set", "visitor", "node", "type", "options", "spaceIds", "add", "SpaceId", "make", "visit", "NotImplementedError", "RuntimeServiceError", "invariant", "QueueServiceImpl", "_ctx", "_queueService", "queryQueue", "request", "query", "queueIds", "filter", "spaceId", "queueId", "queuesNamespace", "result", "objects", "structuredClone", "nextCursor", "prevCursor", "error", "wrap", "message", "context", "subspaceTag", "ifTypeDiffers", "insertIntoQueue", "append", "deleteFromQueue", "ServiceContainer", "_executionContext", "_dataService", "_queueService", "_functionsService", "getSpaceMeta", "spaceId", "result", "spaceKey", "rootDocumentId", "undefined", "createServices", "dataService", "DataServiceImpl", "queryService", "QueryServiceImpl", "queueService", "QueueServiceImpl", "functionsAiService", "queryQueue", "queue", "asQueueDXN", "query", "toString", "objects", "structuredClone", "nextCursor", "prevCursor", "insertIntoQueue", "append", "Resource", "invariant", "PublicKey", "QueuesAPIImpl", "_serviceContainer", "_spaceId", "queryQueue", "queue", "options", "insertIntoQueue", "objects", "JSON", "parse", "stringify", "SpaceProxy", "Resource", "_db", "undefined", "_queuesApi", "_serviceContainer", "_echoClient", "_id", "QueuesAPIImpl", "id", "db", "invariant", "crud", "coreDatabase", "queues", "_open", "meta", "getSpaceMeta", "Error", "constructDatabase", "spaceId", "spaceKey", "PublicKey", "from", "reactiveSchemaQuery", "owningObject", "open", "rootUrl", "rootDocumentId", "FunctionsClient", "Resource", "_serviceContainer", "_echoClient", "_executionContext", "_spaces", "Map", "services", "invariant", "dataService", "queueService", "ServiceContainer", "functionsAiService", "EchoClient", "echo", "_open", "queryService", "createServices", "connectToService", "open", "_close", "space", "values", "close", "clear", "getSpace", "spaceId", "has", "SpaceProxy", "set", "get", "createClientFromEnv", "env", "client", "DATA_SERVICE", "QUEUE_SERVICE", "FUNCTIONS_AI_SERVICE", "FUNCTION_ROUTE_HEADER", "FunctionRouteValue", "invariant", "SpaceId", "log", "EdgeResponse", "wrapHandlerForCloudflare", "func", "request", "env", "headers", "get", "FUNCTION_ROUTE_HEADER", "FunctionRouteValue", "Meta", "handleFunctionMetaCall", "spaceId", "URL", "url", "searchParams", "SpaceId", "isValid", "Response", "status", "serviceContainer", "ServiceContainer", "DATA_SERVICE", "QUEUE_SERVICE", "FUNCTIONS_AI_SERVICE", "context", "createFunctionContext", "contextSpaceId", "EdgeResponse", "success", "invokeFunction", "error", "log", "stack", "failure", "message", "data", "decodeRequest", "handler", "bodyText", "rest", "trigger", "json", "JSON", "parse", "err", "catch", "functionDefinition", "response", "key", "meta", "name", "description", "inputSchema", "outputSchema", "stringify", "dataService", "queryService", "queueService", "functionsAiService", "createServices", "spaceKey", "rootUrl", "getSpaceMeta", "Error", "invariant", "rootDocumentId", "startsWith", "services", "spaceRootUrl", "LogLevel", "log", "shouldLog", "setupFunctionsLogger", "log", "runtimeConfig", "processors", "length", "push", "functionLogProcessor", "config", "entry", "shouldLog", "filters", "level", "LogLevel", "DEBUG", "console", "debug", "message", "context", "TRACE", "VERBOSE", "INFO", "info", "WARN", "warn", "ERROR", "error"]
|
|
7
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"inputs":{"src/internal/utils.ts":{"bytes":692,"imports":[],"format":"esm"},"src/internal/data-service-impl.ts":{"bytes":19658,"imports":[{"path":"@dxos/codec-protobuf/stream","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/errors","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":"src/internal/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/internal/adapter.ts":{"bytes":5596,"imports":[{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true}],"format":"esm"},"src/internal/query-service-impl.ts":{"bytes":16599,"imports":[{"path":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf/stream","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"src/internal/adapter.ts","kind":"import-statement","original":"./adapter"},{"path":"src/internal/utils.ts","kind":"import-statement","original":"./utils"}],"format":"esm"},"src/internal/queue-service-impl.ts":{"bytes":11425,"imports":[{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true}],"format":"esm"},"src/internal/service-container.ts":{"bytes":12087,"imports":[{"path":"src/internal/data-service-impl.ts","kind":"import-statement","original":"./data-service-impl"},{"path":"src/internal/query-service-impl.ts","kind":"import-statement","original":"./query-service-impl"},{"path":"src/internal/queue-service-impl.ts","kind":"import-statement","original":"./queue-service-impl"}],"format":"esm"},"src/internal/index.ts":{"bytes":503,"imports":[{"path":"src/internal/service-container.ts","kind":"import-statement","original":"./service-container"}],"format":"esm"},"src/queues-api.ts":{"bytes":2969,"imports":[],"format":"esm"},"src/space-proxy.ts":{"bytes":6240,"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"src/queues-api.ts","kind":"import-statement","original":"./queues-api"}],"format":"esm"},"src/functions-client.ts":{"bytes":9326,"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"src/internal/index.ts","kind":"import-statement","original":"./internal"},{"path":"src/space-proxy.ts","kind":"import-statement","original":"./space-proxy"}],"format":"esm"},"src/types.ts":{"bytes":1696,"imports":[],"format":"esm"},"src/wrap-handler-for-cloudflare.ts":{"bytes":15375,"imports":[{"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/protocols","kind":"import-statement","external":true},{"path":"src/internal/index.ts","kind":"import-statement","original":"./internal"},{"path":"src/types.ts","kind":"import-statement","original":"./types"}],"format":"esm"},"src/logger.ts":{"bytes":4389,"imports":[{"path":"@dxos/log","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":879,"imports":[{"path":"src/functions-client.ts","kind":"import-statement","original":"./functions-client"},{"path":"src/internal/index.ts","kind":"import-statement","original":"./internal"},{"path":"src/types.ts","kind":"import-statement","original":"./types"},{"path":"src/wrap-handler-for-cloudflare.ts","kind":"import-statement","original":"./wrap-handler-for-cloudflare"},{"path":"src/logger.ts","kind":"import-statement","original":"./logger"}],"format":"esm"}},"outputs":{"dist/lib/browser/index.mjs.map":{"imports":[],"exports":[],"inputs":{},"bytes":45403},"dist/lib/browser/index.mjs":{"imports":[{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/echo-db","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf/stream","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/errors","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":"effect/Schema","kind":"import-statement","external":true},{"path":"@dxos/codec-protobuf/stream","kind":"import-statement","external":true},{"path":"@dxos/echo-protocol","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true},{"path":"@dxos/debug","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","kind":"import-statement","external":true},{"path":"@dxos/errors","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/context","kind":"import-statement","external":true},{"path":"@dxos/invariant","kind":"import-statement","external":true},{"path":"@dxos/keys","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/protocols","kind":"import-statement","external":true},{"path":"@dxos/log","kind":"import-statement","external":true}],"exports":["FUNCTION_ROUTE_HEADER","FunctionRouteValue","FunctionsClient","ServiceContainer","createClientFromEnv","setupFunctionsLogger","wrapHandlerForCloudflare"],"entryPoint":"src/index.ts","inputs":{"src/functions-client.ts":{"bytesInOutput":2163},"src/internal/data-service-impl.ts":{"bytesInOutput":7096},"src/internal/utils.ts":{"bytesInOutput":55},"src/internal/query-service-impl.ts":{"bytesInOutput":6314},"src/internal/adapter.ts":{"bytesInOutput":1609},"src/internal/queue-service-impl.ts":{"bytesInOutput":4771},"src/internal/service-container.ts":{"bytesInOutput":4226},"src/space-proxy.ts":{"bytesInOutput":1561},"src/queues-api.ts":{"bytesInOutput":414},"src/index.ts":{"bytesInOutput":0},"src/types.ts":{"bytesInOutput":205},"src/wrap-handler-for-cloudflare.ts":{"bytesInOutput":3517},"src/logger.ts":{"bytesInOutput":948}},"bytes":33568}}}
|