@rivetkit/cloudflare-workers 2.0.22-rc.1 → 2.0.22-rc.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/mod.d.cts CHANGED
@@ -3,7 +3,6 @@ import { Client, ActorKey, Registry } from 'rivetkit';
3
3
  export { Client } from 'rivetkit';
4
4
  import * as rivetkit_utils from 'rivetkit/utils';
5
5
  import * as rivetkit_log from 'rivetkit/log';
6
- import * as hono from 'hono';
7
6
  import * as rivetkit_driver_helpers from 'rivetkit/driver-helpers';
8
7
  import { z } from 'zod';
9
8
  import { DurableObject } from 'cloudflare:workers';
@@ -26,21 +25,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
26
25
  name: string;
27
26
  manager: (registryConfig: rivetkit.RegistryConfig, runConfig: rivetkit.RunConfig) => rivetkit_driver_helpers.ManagerDriver;
28
27
  }>>;
29
- cors: z.ZodOptional<z.ZodType<{
30
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
31
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
32
- allowHeaders?: string[];
33
- maxAge?: number;
34
- credentials?: boolean;
35
- exposeHeaders?: string[];
36
- }, z.ZodTypeDef, {
37
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
38
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
39
- allowHeaders?: string[];
40
- maxAge?: number;
41
- credentials?: boolean;
42
- exposeHeaders?: string[];
43
- }>>;
44
28
  maxIncomingMessageSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
45
29
  inspector: z.ZodDefault<z.ZodOptional<z.ZodObject<{
46
30
  enabled: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
@@ -53,21 +37,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
53
37
  actor?: boolean | undefined;
54
38
  manager?: boolean | undefined;
55
39
  }>]>>>;
56
- cors: z.ZodDefault<z.ZodOptional<z.ZodType<{
57
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
58
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
59
- allowHeaders?: string[];
60
- maxAge?: number;
61
- credentials?: boolean;
62
- exposeHeaders?: string[];
63
- }, z.ZodTypeDef, {
64
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
65
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
66
- allowHeaders?: string[];
67
- maxAge?: number;
68
- credentials?: boolean;
69
- exposeHeaders?: string[];
70
- }>>>;
71
40
  token: z.ZodDefault<z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodString>>>;
72
41
  defaultEndpoint: z.ZodOptional<z.ZodString>;
73
42
  }, "strip", z.ZodTypeAny, {
@@ -76,14 +45,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
76
45
  manager: boolean;
77
46
  };
78
47
  token: (...args: unknown[]) => string;
79
- cors: {
80
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
81
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
82
- allowHeaders?: string[];
83
- maxAge?: number;
84
- credentials?: boolean;
85
- exposeHeaders?: string[];
86
- };
87
48
  defaultEndpoint?: string | undefined;
88
49
  }, {
89
50
  enabled?: boolean | {
@@ -91,14 +52,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
91
52
  manager?: boolean | undefined;
92
53
  } | undefined;
93
54
  token?: ((...args: unknown[]) => string) | undefined;
94
- cors?: {
95
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
96
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
97
- allowHeaders?: string[];
98
- maxAge?: number;
99
- credentials?: boolean;
100
- exposeHeaders?: string[];
101
- } | undefined;
102
55
  defaultEndpoint?: string | undefined;
103
56
  }>>>;
104
57
  disableDefaultServer: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -149,7 +102,7 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
149
102
  slotsPerRunner?: number | undefined;
150
103
  }>]>>;
151
104
  } & {
152
- runnerKey: z.ZodDefault<z.ZodString>;
105
+ runnerKey: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
153
106
  totalSlots: z.ZodDefault<z.ZodNumber>;
154
107
  endpoint: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
155
108
  token: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
@@ -176,14 +129,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
176
129
  manager: boolean;
177
130
  };
178
131
  token: (...args: unknown[]) => string;
179
- cors: {
180
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
181
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
182
- allowHeaders?: string[];
183
- maxAge?: number;
184
- credentials?: boolean;
185
- exposeHeaders?: string[];
186
- };
187
132
  defaultEndpoint?: string | undefined;
188
133
  };
189
134
  disableDefaultServer: boolean;
@@ -198,7 +143,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
198
143
  level?: "error" | "trace" | "fatal" | "warn" | "info" | "debug" | "silent" | undefined;
199
144
  baseLogger?: rivetkit_log.Logger | undefined;
200
145
  };
201
- runnerKey: string;
202
146
  totalSlots: number;
203
147
  namespace: string;
204
148
  runnerName: string;
@@ -207,14 +151,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
207
151
  headers: Record<string, string>;
208
152
  disableHealthCheck: boolean;
209
153
  managerPath: string;
210
- cors?: {
211
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
212
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
213
- allowHeaders?: string[];
214
- maxAge?: number;
215
- credentials?: boolean;
216
- exposeHeaders?: string[];
217
- } | undefined;
218
154
  overrideServerAddress?: string | undefined;
219
155
  autoConfigureServerless?: boolean | {
220
156
  metadata?: Record<string, unknown> | undefined;
@@ -226,20 +162,13 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
226
162
  runnersMargin?: number | undefined;
227
163
  slotsPerRunner?: number | undefined;
228
164
  } | undefined;
165
+ runnerKey?: string | undefined;
229
166
  endpoint?: string | undefined;
230
167
  token?: string | undefined;
231
168
  fetch?: ExportedHandlerFetchHandler<{
232
169
  RIVET: Client<any>;
233
170
  }, unknown> | undefined;
234
171
  }, {
235
- cors?: {
236
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
237
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
238
- allowHeaders?: string[];
239
- maxAge?: number;
240
- credentials?: boolean;
241
- exposeHeaders?: string[];
242
- } | undefined;
243
172
  maxIncomingMessageSize?: number | undefined;
244
173
  inspector?: {
245
174
  enabled?: boolean | {
@@ -247,14 +176,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
247
176
  manager?: boolean | undefined;
248
177
  } | undefined;
249
178
  token?: ((...args: unknown[]) => string) | undefined;
250
- cors?: {
251
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
252
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
253
- allowHeaders?: string[];
254
- maxAge?: number;
255
- credentials?: boolean;
256
- exposeHeaders?: string[];
257
- } | undefined;
258
179
  defaultEndpoint?: string | undefined;
259
180
  } | undefined;
260
181
  disableDefaultServer?: boolean | undefined;
package/dist/mod.d.ts CHANGED
@@ -3,7 +3,6 @@ import { Client, ActorKey, Registry } from 'rivetkit';
3
3
  export { Client } from 'rivetkit';
4
4
  import * as rivetkit_utils from 'rivetkit/utils';
5
5
  import * as rivetkit_log from 'rivetkit/log';
6
- import * as hono from 'hono';
7
6
  import * as rivetkit_driver_helpers from 'rivetkit/driver-helpers';
8
7
  import { z } from 'zod';
9
8
  import { DurableObject } from 'cloudflare:workers';
@@ -26,21 +25,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
26
25
  name: string;
27
26
  manager: (registryConfig: rivetkit.RegistryConfig, runConfig: rivetkit.RunConfig) => rivetkit_driver_helpers.ManagerDriver;
28
27
  }>>;
29
- cors: z.ZodOptional<z.ZodType<{
30
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
31
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
32
- allowHeaders?: string[];
33
- maxAge?: number;
34
- credentials?: boolean;
35
- exposeHeaders?: string[];
36
- }, z.ZodTypeDef, {
37
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
38
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
39
- allowHeaders?: string[];
40
- maxAge?: number;
41
- credentials?: boolean;
42
- exposeHeaders?: string[];
43
- }>>;
44
28
  maxIncomingMessageSize: z.ZodDefault<z.ZodOptional<z.ZodNumber>>;
45
29
  inspector: z.ZodDefault<z.ZodOptional<z.ZodObject<{
46
30
  enabled: z.ZodDefault<z.ZodOptional<z.ZodUnion<[z.ZodBoolean, z.ZodObject<{
@@ -53,21 +37,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
53
37
  actor?: boolean | undefined;
54
38
  manager?: boolean | undefined;
55
39
  }>]>>>;
56
- cors: z.ZodDefault<z.ZodOptional<z.ZodType<{
57
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
58
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
59
- allowHeaders?: string[];
60
- maxAge?: number;
61
- credentials?: boolean;
62
- exposeHeaders?: string[];
63
- }, z.ZodTypeDef, {
64
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
65
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
66
- allowHeaders?: string[];
67
- maxAge?: number;
68
- credentials?: boolean;
69
- exposeHeaders?: string[];
70
- }>>>;
71
40
  token: z.ZodDefault<z.ZodOptional<z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodString>>>;
72
41
  defaultEndpoint: z.ZodOptional<z.ZodString>;
73
42
  }, "strip", z.ZodTypeAny, {
@@ -76,14 +45,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
76
45
  manager: boolean;
77
46
  };
78
47
  token: (...args: unknown[]) => string;
79
- cors: {
80
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
81
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
82
- allowHeaders?: string[];
83
- maxAge?: number;
84
- credentials?: boolean;
85
- exposeHeaders?: string[];
86
- };
87
48
  defaultEndpoint?: string | undefined;
88
49
  }, {
89
50
  enabled?: boolean | {
@@ -91,14 +52,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
91
52
  manager?: boolean | undefined;
92
53
  } | undefined;
93
54
  token?: ((...args: unknown[]) => string) | undefined;
94
- cors?: {
95
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
96
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
97
- allowHeaders?: string[];
98
- maxAge?: number;
99
- credentials?: boolean;
100
- exposeHeaders?: string[];
101
- } | undefined;
102
55
  defaultEndpoint?: string | undefined;
103
56
  }>>>;
104
57
  disableDefaultServer: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
@@ -149,7 +102,7 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
149
102
  slotsPerRunner?: number | undefined;
150
103
  }>]>>;
151
104
  } & {
152
- runnerKey: z.ZodDefault<z.ZodString>;
105
+ runnerKey: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
153
106
  totalSlots: z.ZodDefault<z.ZodNumber>;
154
107
  endpoint: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
155
108
  token: z.ZodEffects<z.ZodOptional<z.ZodString>, string | undefined, string | undefined>;
@@ -176,14 +129,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
176
129
  manager: boolean;
177
130
  };
178
131
  token: (...args: unknown[]) => string;
179
- cors: {
180
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
181
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
182
- allowHeaders?: string[];
183
- maxAge?: number;
184
- credentials?: boolean;
185
- exposeHeaders?: string[];
186
- };
187
132
  defaultEndpoint?: string | undefined;
188
133
  };
189
134
  disableDefaultServer: boolean;
@@ -198,7 +143,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
198
143
  level?: "error" | "trace" | "fatal" | "warn" | "info" | "debug" | "silent" | undefined;
199
144
  baseLogger?: rivetkit_log.Logger | undefined;
200
145
  };
201
- runnerKey: string;
202
146
  totalSlots: number;
203
147
  namespace: string;
204
148
  runnerName: string;
@@ -207,14 +151,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
207
151
  headers: Record<string, string>;
208
152
  disableHealthCheck: boolean;
209
153
  managerPath: string;
210
- cors?: {
211
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
212
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
213
- allowHeaders?: string[];
214
- maxAge?: number;
215
- credentials?: boolean;
216
- exposeHeaders?: string[];
217
- } | undefined;
218
154
  overrideServerAddress?: string | undefined;
219
155
  autoConfigureServerless?: boolean | {
220
156
  metadata?: Record<string, unknown> | undefined;
@@ -226,20 +162,13 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
226
162
  runnersMargin?: number | undefined;
227
163
  slotsPerRunner?: number | undefined;
228
164
  } | undefined;
165
+ runnerKey?: string | undefined;
229
166
  endpoint?: string | undefined;
230
167
  token?: string | undefined;
231
168
  fetch?: ExportedHandlerFetchHandler<{
232
169
  RIVET: Client<any>;
233
170
  }, unknown> | undefined;
234
171
  }, {
235
- cors?: {
236
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
237
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
238
- allowHeaders?: string[];
239
- maxAge?: number;
240
- credentials?: boolean;
241
- exposeHeaders?: string[];
242
- } | undefined;
243
172
  maxIncomingMessageSize?: number | undefined;
244
173
  inspector?: {
245
174
  enabled?: boolean | {
@@ -247,14 +176,6 @@ declare const ConfigSchema: z.ZodDefault<z.ZodObject<Omit<{
247
176
  manager?: boolean | undefined;
248
177
  } | undefined;
249
178
  token?: ((...args: unknown[]) => string) | undefined;
250
- cors?: {
251
- origin: string | string[] | ((origin: string, c: hono.Context) => Promise<string | undefined | null> | string | undefined | null);
252
- allowMethods?: string[] | ((origin: string, c: hono.Context) => Promise<string[]> | string[]);
253
- allowHeaders?: string[];
254
- maxAge?: number;
255
- credentials?: boolean;
256
- exposeHeaders?: string[];
257
- } | undefined;
258
179
  defaultEndpoint?: string | undefined;
259
180
  } | undefined;
260
181
  disableDefaultServer?: boolean | undefined;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rivetkit/cloudflare-workers",
3
- "version": "2.0.22-rc.1",
3
+ "version": "2.0.22-rc.2",
4
4
  "description": "Cloudflare Workers adapter for RivetKit actors",
5
5
  "keywords": [
6
6
  "rivetkit",
@@ -46,7 +46,7 @@
46
46
  "invariant": "^2.2.4",
47
47
  "zod": "^3.25.76",
48
48
  "hono": "^4.7.0",
49
- "rivetkit": "2.0.22-rc.1"
49
+ "rivetkit": "2.0.22-rc.2"
50
50
  },
51
51
  "stableVersion": "0.8.0",
52
52
  "scripts": {