@dxos/functions-runtime-cloudflare 0.8.4-main.bc674ce → 0.8.4-main.ef1bc66f44

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dxos/functions-runtime-cloudflare",
3
- "version": "0.8.4-main.bc674ce",
3
+ "version": "0.8.4-main.ef1bc66f44",
4
4
  "description": "Functions runtime for Cloudflare.",
5
5
  "homepage": "https://dxos.org",
6
6
  "bugs": "https://github.com/dxos/dxos/issues",
@@ -27,23 +27,23 @@
27
27
  "src"
28
28
  ],
29
29
  "dependencies": {
30
- "effect": "3.19.11",
31
- "@dxos/codec-protobuf": "0.8.4-main.bc674ce",
32
- "@dxos/context": "0.8.4-main.bc674ce",
33
- "@dxos/debug": "0.8.4-main.bc674ce",
34
- "@dxos/echo": "0.8.4-main.bc674ce",
35
- "@dxos/echo-protocol": "0.8.4-main.bc674ce",
36
- "@dxos/errors": "0.8.4-main.bc674ce",
37
- "@dxos/invariant": "0.8.4-main.bc674ce",
38
- "@dxos/keys": "0.8.4-main.bc674ce",
39
- "@dxos/echo-db": "0.8.4-main.bc674ce",
40
- "@dxos/log": "0.8.4-main.bc674ce",
41
- "@dxos/protocols": "0.8.4-main.bc674ce",
42
- "@dxos/util": "0.8.4-main.bc674ce"
30
+ "effect": "3.19.16",
31
+ "@dxos/codec-protobuf": "0.8.4-main.ef1bc66f44",
32
+ "@dxos/debug": "0.8.4-main.ef1bc66f44",
33
+ "@dxos/echo": "0.8.4-main.ef1bc66f44",
34
+ "@dxos/context": "0.8.4-main.ef1bc66f44",
35
+ "@dxos/echo-protocol": "0.8.4-main.ef1bc66f44",
36
+ "@dxos/errors": "0.8.4-main.ef1bc66f44",
37
+ "@dxos/invariant": "0.8.4-main.ef1bc66f44",
38
+ "@dxos/keys": "0.8.4-main.ef1bc66f44",
39
+ "@dxos/echo-db": "0.8.4-main.ef1bc66f44",
40
+ "@dxos/log": "0.8.4-main.ef1bc66f44",
41
+ "@dxos/protocols": "0.8.4-main.ef1bc66f44",
42
+ "@dxos/util": "0.8.4-main.ef1bc66f44"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@cloudflare/workers-types": "^4.20251210.0",
46
- "@dxos/types": "0.8.4-main.bc674ce"
46
+ "@dxos/types": "0.8.4-main.ef1bc66f44"
47
47
  },
48
48
  "publishConfig": {
49
49
  "access": "public"
@@ -4,21 +4,14 @@
4
4
 
5
5
  import { NotImplementedError, RuntimeServiceError } from '@dxos/errors';
6
6
  import { invariant } from '@dxos/invariant';
7
- import { type QueueService as QueueServiceProto } from '@dxos/protocols';
8
- import type {
9
- DeleteFromQueueRequest,
10
- EdgeFunctionEnv,
11
- InsertIntoQueueRequest,
12
- QueryQueueRequest,
13
- QueryResult,
14
- } from '@dxos/protocols';
7
+ import { type EdgeFunctionEnv, type FeedProtocol } from '@dxos/protocols';
15
8
 
16
- export class QueueServiceImpl implements QueueServiceProto {
9
+ export class QueueServiceImpl implements FeedProtocol.QueueService {
17
10
  constructor(
18
11
  protected _ctx: EdgeFunctionEnv.ExecutionContext,
19
12
  private readonly _queueService: EdgeFunctionEnv.QueueService,
20
13
  ) {}
21
- async queryQueue(request: QueryQueueRequest): Promise<QueryResult> {
14
+ async queryQueue(request: FeedProtocol.QueryQueueRequest): Promise<FeedProtocol.QueryResult> {
22
15
  const { query } = request;
23
16
  const { queueIds, ...filter } = query!;
24
17
  const spaceId = query!.spaceId;
@@ -46,7 +39,7 @@ export class QueueServiceImpl implements QueueServiceProto {
46
39
  }
47
40
  }
48
41
 
49
- async insertIntoQueue(request: InsertIntoQueueRequest): Promise<void> {
42
+ async insertIntoQueue(request: FeedProtocol.InsertIntoQueueRequest): Promise<void> {
50
43
  const { subspaceTag, spaceId, queueId, objects } = request;
51
44
  try {
52
45
  await this._queueService.append(this._ctx, `dxn:queue:${subspaceTag}:${spaceId}:${queueId}`, objects ?? []);
@@ -59,7 +52,7 @@ export class QueueServiceImpl implements QueueServiceProto {
59
52
  }
60
53
  }
61
54
 
62
- deleteFromQueue(request: DeleteFromQueueRequest): Promise<void> {
55
+ deleteFromQueue(request: FeedProtocol.DeleteFromQueueRequest): Promise<void> {
63
56
  const { subspaceTag, spaceId, queueId } = request;
64
57
  throw new NotImplementedError({
65
58
  message: 'Deleting from queue is not supported.',
@@ -4,9 +4,7 @@
4
4
 
5
5
  import { type AnyEntity } from '@dxos/echo/internal';
6
6
  import { type DXN, type SpaceId } from '@dxos/keys';
7
- import type { QueryResult } from '@dxos/protocols';
8
- import { type EdgeFunctionEnv } from '@dxos/protocols';
9
- import { type QueueService as QueueServiceProto } from '@dxos/protocols';
7
+ import { type EdgeFunctionEnv, type FeedProtocol } from '@dxos/protocols';
10
8
  import { type QueryService as QueryServiceProto } from '@dxos/protocols/proto/dxos/echo/query';
11
9
  import type { DataService as DataServiceProto } from '@dxos/protocols/proto/dxos/echo/service';
12
10
 
@@ -40,7 +38,7 @@ export class ServiceContainer {
40
38
  async createServices(): Promise<{
41
39
  dataService: DataServiceProto;
42
40
  queryService: QueryServiceProto;
43
- queueService: QueueServiceProto;
41
+ queueService: FeedProtocol.QueueService;
44
42
  functionsAiService: EdgeFunctionEnv.FunctionsAiService;
45
43
  }> {
46
44
  const dataService = new DataServiceImpl(this._executionContext, this._dataService);
@@ -55,7 +53,7 @@ export class ServiceContainer {
55
53
  };
56
54
  }
57
55
 
58
- async queryQueue(queue: DXN): Promise<QueryResult> {
56
+ async queryQueue(queue: DXN): Promise<FeedProtocol.QueryResult> {
59
57
  const { spaceId } = queue.asQueueDXN() ?? {};
60
58
  using result = (await this._queueService.query({}, queue.toString(), { spaceId: spaceId! })) as any;
61
59
  // Copy returned object to avoid hanging RPC stub
package/src/queues-api.ts CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  import { type AnyEntity } from '@dxos/echo/internal';
6
6
  import type { DXN, SpaceId } from '@dxos/keys';
7
- import type { QueryResult } from '@dxos/protocols';
7
+ import { type FeedProtocol } from '@dxos/protocols';
8
8
 
9
9
  import type { ServiceContainer } from './internal';
10
10
 
@@ -14,7 +14,7 @@ import type { ServiceContainer } from './internal';
14
14
  * @deprecated
15
15
  */
16
16
  export interface QueuesAPI {
17
- queryQueue(queue: DXN, options?: {}): Promise<QueryResult>;
17
+ queryQueue(queue: DXN, options?: {}): Promise<FeedProtocol.QueryResult>;
18
18
  insertIntoQueue(queue: DXN, objects: AnyEntity[]): Promise<void>;
19
19
  }
20
20
 
@@ -27,7 +27,7 @@ export class QueuesAPIImpl implements QueuesAPI {
27
27
  private readonly _spaceId: SpaceId,
28
28
  ) {}
29
29
 
30
- queryQueue(queue: DXN, options?: {}): Promise<QueryResult> {
30
+ queryQueue(queue: DXN, options?: {}): Promise<FeedProtocol.QueryResult> {
31
31
  return this._serviceContainer.queryQueue(queue);
32
32
  }
33
33