@distilled.cloud/cloudflare 0.7.5 → 0.7.7

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": "@distilled.cloud/cloudflare",
3
- "version": "0.7.5",
3
+ "version": "0.7.7",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/alchemy-run/distilled",
@@ -63,7 +63,7 @@
63
63
  "specs:update": "git -C specs/cloudflare-typescript fetch && git -C specs/cloudflare-typescript checkout main && git -C specs/cloudflare-typescript pull"
64
64
  },
65
65
  "dependencies": {
66
- "@distilled.cloud/core": "0.7.5",
66
+ "@distilled.cloud/core": "0.7.7",
67
67
  "effect": "4.0.0-beta.38"
68
68
  },
69
69
  "devDependencies": {
@@ -37,6 +37,14 @@ T.applyErrorMatchers(DurableObjectAlreadyHasApplication, [
37
37
  },
38
38
  ]);
39
39
 
40
+ export class DurableObjectNotContainerEnabled extends Schema.TaggedErrorClass<DurableObjectNotContainerEnabled>()(
41
+ "DurableObjectNotContainerEnabled",
42
+ { code: Schema.Number, message: Schema.String },
43
+ ) {}
44
+ T.applyErrorMatchers(DurableObjectNotContainerEnabled, [
45
+ { code: 1607, message: { includes: "DURABLE_OBJECT_NOT_CONTAINER_ENABLED" } },
46
+ ]);
47
+
40
48
  export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
41
49
  "InvalidRoute",
42
50
  { code: Schema.Number, message: Schema.String },
@@ -1418,7 +1426,8 @@ export const CreateContainerApplicationResponse =
1418
1426
  export type CreateContainerApplicationError =
1419
1427
  | DefaultErrors
1420
1428
  | InvalidRoute
1421
- | DurableObjectAlreadyHasApplication;
1429
+ | DurableObjectAlreadyHasApplication
1430
+ | DurableObjectNotContainerEnabled;
1422
1431
 
1423
1432
  export const createContainerApplication: API.OperationMethod<
1424
1433
  CreateContainerApplicationRequest,
@@ -1428,7 +1437,11 @@ export const createContainerApplication: API.OperationMethod<
1428
1437
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
1429
1438
  input: CreateContainerApplicationRequest,
1430
1439
  output: CreateContainerApplicationResponse,
1431
- errors: [InvalidRoute, DurableObjectAlreadyHasApplication],
1440
+ errors: [
1441
+ InvalidRoute,
1442
+ DurableObjectAlreadyHasApplication,
1443
+ DurableObjectNotContainerEnabled,
1444
+ ],
1432
1445
  }));
1433
1446
 
1434
1447
  export interface UpdateContainerApplicationRequest {
@@ -36,6 +36,14 @@ export class DomainNotFound extends Schema.TaggedErrorClass<DomainNotFound>()(
36
36
  ) {}
37
37
  T.applyErrorMatchers(DomainNotFound, [{ code: 100114 }]);
38
38
 
39
+ export class DurableObjectMustBeSqlite extends Schema.TaggedErrorClass<DurableObjectMustBeSqlite>()(
40
+ "DurableObjectMustBeSqlite",
41
+ { code: Schema.Number, message: Schema.String },
42
+ ) {}
43
+ T.applyErrorMatchers(DurableObjectMustBeSqlite, [
44
+ { code: 10074, message: { includes: "not a SQLite Durable Object" } },
45
+ ]);
46
+
39
47
  export class InvalidRoute extends Schema.TaggedErrorClass<InvalidRoute>()(
40
48
  "InvalidRoute",
41
49
  { code: Schema.Number, message: Schema.String },
@@ -6834,6 +6842,7 @@ export interface PutScriptRequest {
6834
6842
  scriptName?: string;
6835
6843
  }
6836
6844
  | { name: string; part: string; type: "wasm_module" }
6845
+ | { name: string; type: "worker_loader" }
6837
6846
  )[];
6838
6847
  bodyPart?: string;
6839
6848
  compatibilityDate?: string;
@@ -7197,6 +7206,10 @@ export const PutScriptRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7197
7206
  part: Schema.String,
7198
7207
  type: Schema.Literal("wasm_module"),
7199
7208
  }),
7209
+ Schema.Struct({
7210
+ name: Schema.String,
7211
+ type: Schema.Literal("worker_loader"),
7212
+ }),
7200
7213
  ]),
7201
7214
  ),
7202
7215
  ),
@@ -7761,7 +7774,11 @@ export const PutScriptResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
7761
7774
  T.ResponsePath("result"),
7762
7775
  ) as unknown as Schema.Schema<PutScriptResponse>;
7763
7776
 
7764
- export type PutScriptError = DefaultErrors | InvalidRoute;
7777
+ export type PutScriptError =
7778
+ | DefaultErrors
7779
+ | InvalidRoute
7780
+ | InvalidWorkerScript
7781
+ | DurableObjectMustBeSqlite;
7765
7782
 
7766
7783
  export const putScript: API.OperationMethod<
7767
7784
  PutScriptRequest,
@@ -7771,7 +7788,7 @@ export const putScript: API.OperationMethod<
7771
7788
  > = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
7772
7789
  input: PutScriptRequest,
7773
7790
  output: PutScriptResponse,
7774
- errors: [InvalidRoute],
7791
+ errors: [InvalidRoute, InvalidWorkerScript, DurableObjectMustBeSqlite],
7775
7792
  }));
7776
7793
 
7777
7794
  export interface DeleteScriptRequest {