@distilled.cloud/cloudflare 0.7.4 → 0.7.6
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/lib/services/containers.d.ts +7 -1
- package/lib/services/containers.d.ts.map +1 -1
- package/lib/services/containers.js +10 -1
- package/lib/services/containers.js.map +1 -1
- package/lib/services/workers.d.ts +7 -1
- package/lib/services/workers.d.ts.map +1 -1
- package/lib/services/workers.js +6 -1
- package/lib/services/workers.js.map +1 -1
- package/package.json +2 -2
- package/src/services/containers.ts +15 -2
- package/src/services/workers.ts +13 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@distilled.cloud/cloudflare",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.6",
|
|
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.
|
|
66
|
+
"@distilled.cloud/core": "0.7.6",
|
|
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: [
|
|
1440
|
+
errors: [
|
|
1441
|
+
InvalidRoute,
|
|
1442
|
+
DurableObjectAlreadyHasApplication,
|
|
1443
|
+
DurableObjectNotContainerEnabled,
|
|
1444
|
+
],
|
|
1432
1445
|
}));
|
|
1433
1446
|
|
|
1434
1447
|
export interface UpdateContainerApplicationRequest {
|
package/src/services/workers.ts
CHANGED
|
@@ -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 },
|
|
@@ -7761,7 +7769,10 @@ export const PutScriptResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
|
|
|
7761
7769
|
T.ResponsePath("result"),
|
|
7762
7770
|
) as unknown as Schema.Schema<PutScriptResponse>;
|
|
7763
7771
|
|
|
7764
|
-
export type PutScriptError =
|
|
7772
|
+
export type PutScriptError =
|
|
7773
|
+
| DefaultErrors
|
|
7774
|
+
| InvalidRoute
|
|
7775
|
+
| DurableObjectMustBeSqlite;
|
|
7765
7776
|
|
|
7766
7777
|
export const putScript: API.OperationMethod<
|
|
7767
7778
|
PutScriptRequest,
|
|
@@ -7771,7 +7782,7 @@ export const putScript: API.OperationMethod<
|
|
|
7771
7782
|
> = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
|
|
7772
7783
|
input: PutScriptRequest,
|
|
7773
7784
|
output: PutScriptResponse,
|
|
7774
|
-
errors: [InvalidRoute],
|
|
7785
|
+
errors: [InvalidRoute, DurableObjectMustBeSqlite],
|
|
7775
7786
|
}));
|
|
7776
7787
|
|
|
7777
7788
|
export interface DeleteScriptRequest {
|