@distilled.cloud/cloudflare 0.8.0 → 0.9.0

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.
@@ -9,85 +9,85 @@ import type * as HttpClient from "effect/unstable/http/HttpClient";
9
9
  import * as API from "../client/api.ts";
10
10
  import type { Credentials } from "../credentials.ts";
11
11
  import { type DefaultErrors } from "../errors.ts";
12
- declare const ContentTypeRequired_base: Schema.ErrorClass<ContentTypeRequired, Schema.TaggedStruct<"ContentTypeRequired", {
12
+ declare const ContentTypeRequired_base: Schema.Class<ContentTypeRequired, Schema.TaggedStruct<"ContentTypeRequired", {
13
13
  readonly code: Schema.Number;
14
14
  readonly message: Schema.String;
15
15
  }>, import("effect/Cause").YieldableError>;
16
16
  export declare class ContentTypeRequired extends ContentTypeRequired_base {
17
17
  }
18
- declare const DeploymentNotFound_base: Schema.ErrorClass<DeploymentNotFound, Schema.TaggedStruct<"DeploymentNotFound", {
18
+ declare const DeploymentNotFound_base: Schema.Class<DeploymentNotFound, Schema.TaggedStruct<"DeploymentNotFound", {
19
19
  readonly code: Schema.Number;
20
20
  readonly message: Schema.String;
21
21
  }>, import("effect/Cause").YieldableError>;
22
22
  export declare class DeploymentNotFound extends DeploymentNotFound_base {
23
23
  }
24
- declare const DomainNotFound_base: Schema.ErrorClass<DomainNotFound, Schema.TaggedStruct<"DomainNotFound", {
24
+ declare const DomainNotFound_base: Schema.Class<DomainNotFound, Schema.TaggedStruct<"DomainNotFound", {
25
25
  readonly code: Schema.Number;
26
26
  readonly message: Schema.String;
27
27
  }>, import("effect/Cause").YieldableError>;
28
28
  export declare class DomainNotFound extends DomainNotFound_base {
29
29
  }
30
- declare const DurableObjectMustBeSqlite_base: Schema.ErrorClass<DurableObjectMustBeSqlite, Schema.TaggedStruct<"DurableObjectMustBeSqlite", {
30
+ declare const DurableObjectMustBeSqlite_base: Schema.Class<DurableObjectMustBeSqlite, Schema.TaggedStruct<"DurableObjectMustBeSqlite", {
31
31
  readonly code: Schema.Number;
32
32
  readonly message: Schema.String;
33
33
  }>, import("effect/Cause").YieldableError>;
34
34
  export declare class DurableObjectMustBeSqlite extends DurableObjectMustBeSqlite_base {
35
35
  }
36
- declare const InvalidRoute_base: Schema.ErrorClass<InvalidRoute, Schema.TaggedStruct<"InvalidRoute", {
36
+ declare const InvalidRoute_base: Schema.Class<InvalidRoute, Schema.TaggedStruct<"InvalidRoute", {
37
37
  readonly code: Schema.Number;
38
38
  readonly message: Schema.String;
39
39
  }>, import("effect/Cause").YieldableError>;
40
40
  export declare class InvalidRoute extends InvalidRoute_base {
41
41
  }
42
- declare const InvalidRoutePattern_base: Schema.ErrorClass<InvalidRoutePattern, Schema.TaggedStruct<"InvalidRoutePattern", {
42
+ declare const InvalidRoutePattern_base: Schema.Class<InvalidRoutePattern, Schema.TaggedStruct<"InvalidRoutePattern", {
43
43
  readonly code: Schema.Number;
44
44
  readonly message: Schema.String;
45
45
  }>, import("effect/Cause").YieldableError>;
46
46
  export declare class InvalidRoutePattern extends InvalidRoutePattern_base {
47
47
  }
48
- declare const InvalidWorkerScript_base: Schema.ErrorClass<InvalidWorkerScript, Schema.TaggedStruct<"InvalidWorkerScript", {
48
+ declare const InvalidWorkerScript_base: Schema.Class<InvalidWorkerScript, Schema.TaggedStruct<"InvalidWorkerScript", {
49
49
  readonly code: Schema.Number;
50
50
  readonly message: Schema.String;
51
51
  }>, import("effect/Cause").YieldableError>;
52
52
  export declare class InvalidWorkerScript extends InvalidWorkerScript_base {
53
53
  }
54
- declare const QueueConsumerConflict_base: Schema.ErrorClass<QueueConsumerConflict, Schema.TaggedStruct<"QueueConsumerConflict", {
54
+ declare const QueueConsumerConflict_base: Schema.Class<QueueConsumerConflict, Schema.TaggedStruct<"QueueConsumerConflict", {
55
55
  readonly code: Schema.Number;
56
56
  readonly message: Schema.String;
57
57
  }>, import("effect/Cause").YieldableError>;
58
58
  export declare class QueueConsumerConflict extends QueueConsumerConflict_base {
59
59
  }
60
- declare const RouteNotFound_base: Schema.ErrorClass<RouteNotFound, Schema.TaggedStruct<"RouteNotFound", {
60
+ declare const RouteNotFound_base: Schema.Class<RouteNotFound, Schema.TaggedStruct<"RouteNotFound", {
61
61
  readonly code: Schema.Number;
62
62
  readonly message: Schema.String;
63
63
  }>, import("effect/Cause").YieldableError>;
64
64
  export declare class RouteNotFound extends RouteNotFound_base {
65
65
  }
66
- declare const SecretNotFound_base: Schema.ErrorClass<SecretNotFound, Schema.TaggedStruct<"SecretNotFound", {
66
+ declare const SecretNotFound_base: Schema.Class<SecretNotFound, Schema.TaggedStruct<"SecretNotFound", {
67
67
  readonly code: Schema.Number;
68
68
  readonly message: Schema.String;
69
69
  }>, import("effect/Cause").YieldableError>;
70
70
  export declare class SecretNotFound extends SecretNotFound_base {
71
71
  }
72
- declare const ServiceBindingConflict_base: Schema.ErrorClass<ServiceBindingConflict, Schema.TaggedStruct<"ServiceBindingConflict", {
72
+ declare const ServiceBindingConflict_base: Schema.Class<ServiceBindingConflict, Schema.TaggedStruct<"ServiceBindingConflict", {
73
73
  readonly code: Schema.Number;
74
74
  readonly message: Schema.String;
75
75
  }>, import("effect/Cause").YieldableError>;
76
76
  export declare class ServiceBindingConflict extends ServiceBindingConflict_base {
77
77
  }
78
- declare const VersionNotFound_base: Schema.ErrorClass<VersionNotFound, Schema.TaggedStruct<"VersionNotFound", {
78
+ declare const VersionNotFound_base: Schema.Class<VersionNotFound, Schema.TaggedStruct<"VersionNotFound", {
79
79
  readonly code: Schema.Number;
80
80
  readonly message: Schema.String;
81
81
  }>, import("effect/Cause").YieldableError>;
82
82
  export declare class VersionNotFound extends VersionNotFound_base {
83
83
  }
84
- declare const WorkerNotFound_base: Schema.ErrorClass<WorkerNotFound, Schema.TaggedStruct<"WorkerNotFound", {
84
+ declare const WorkerNotFound_base: Schema.Class<WorkerNotFound, Schema.TaggedStruct<"WorkerNotFound", {
85
85
  readonly code: Schema.Number;
86
86
  readonly message: Schema.String;
87
87
  }>, import("effect/Cause").YieldableError>;
88
88
  export declare class WorkerNotFound extends WorkerNotFound_base {
89
89
  }
90
- declare const WorkerVersionNotFound_base: Schema.ErrorClass<WorkerVersionNotFound, Schema.TaggedStruct<"WorkerVersionNotFound", {
90
+ declare const WorkerVersionNotFound_base: Schema.Class<WorkerVersionNotFound, Schema.TaggedStruct<"WorkerVersionNotFound", {
91
91
  readonly code: Schema.Number;
92
92
  readonly message: Schema.String;
93
93
  }>, import("effect/Cause").YieldableError>;
@@ -9,43 +9,43 @@ import type * as HttpClient from "effect/unstable/http/HttpClient";
9
9
  import * as API from "../client/api.ts";
10
10
  import type { Credentials } from "../credentials.ts";
11
11
  import { type DefaultErrors } from "../errors.ts";
12
- declare const InstanceCannotTerminate_base: Schema.ErrorClass<InstanceCannotTerminate, Schema.TaggedStruct<"InstanceCannotTerminate", {
12
+ declare const InstanceCannotTerminate_base: Schema.Class<InstanceCannotTerminate, Schema.TaggedStruct<"InstanceCannotTerminate", {
13
13
  readonly code: Schema.Number;
14
14
  readonly message: Schema.String;
15
15
  }>, import("effect/Cause").YieldableError>;
16
16
  export declare class InstanceCannotTerminate extends InstanceCannotTerminate_base {
17
17
  }
18
- declare const InstanceNotFound_base: Schema.ErrorClass<InstanceNotFound, Schema.TaggedStruct<"InstanceNotFound", {
18
+ declare const InstanceNotFound_base: Schema.Class<InstanceNotFound, Schema.TaggedStruct<"InstanceNotFound", {
19
19
  readonly code: Schema.Number;
20
20
  readonly message: Schema.String;
21
21
  }>, import("effect/Cause").YieldableError>;
22
22
  export declare class InstanceNotFound extends InstanceNotFound_base {
23
23
  }
24
- declare const InvalidBody_base: Schema.ErrorClass<InvalidBody, Schema.TaggedStruct<"InvalidBody", {
24
+ declare const InvalidBody_base: Schema.Class<InvalidBody, Schema.TaggedStruct<"InvalidBody", {
25
25
  readonly code: Schema.Number;
26
26
  readonly message: Schema.String;
27
27
  }>, import("effect/Cause").YieldableError>;
28
28
  export declare class InvalidBody extends InvalidBody_base {
29
29
  }
30
- declare const InvalidRoute_base: Schema.ErrorClass<InvalidRoute, Schema.TaggedStruct<"InvalidRoute", {
30
+ declare const InvalidRoute_base: Schema.Class<InvalidRoute, Schema.TaggedStruct<"InvalidRoute", {
31
31
  readonly code: Schema.Number;
32
32
  readonly message: Schema.String;
33
33
  }>, import("effect/Cause").YieldableError>;
34
34
  export declare class InvalidRoute extends InvalidRoute_base {
35
35
  }
36
- declare const VersionNotFound_base: Schema.ErrorClass<VersionNotFound, Schema.TaggedStruct<"VersionNotFound", {
36
+ declare const VersionNotFound_base: Schema.Class<VersionNotFound, Schema.TaggedStruct<"VersionNotFound", {
37
37
  readonly code: Schema.Number;
38
38
  readonly message: Schema.String;
39
39
  }>, import("effect/Cause").YieldableError>;
40
40
  export declare class VersionNotFound extends VersionNotFound_base {
41
41
  }
42
- declare const WorkflowInternalError_base: Schema.ErrorClass<WorkflowInternalError, Schema.TaggedStruct<"WorkflowInternalError", {
42
+ declare const WorkflowInternalError_base: Schema.Class<WorkflowInternalError, Schema.TaggedStruct<"WorkflowInternalError", {
43
43
  readonly code: Schema.Number;
44
44
  readonly message: Schema.String;
45
45
  }>, import("effect/Cause").YieldableError>;
46
46
  export declare class WorkflowInternalError extends WorkflowInternalError_base {
47
47
  }
48
- declare const WorkflowNotFound_base: Schema.ErrorClass<WorkflowNotFound, Schema.TaggedStruct<"WorkflowNotFound", {
48
+ declare const WorkflowNotFound_base: Schema.Class<WorkflowNotFound, Schema.TaggedStruct<"WorkflowNotFound", {
49
49
  readonly code: Schema.Number;
50
50
  readonly message: Schema.String;
51
51
  }>, import("effect/Cause").YieldableError>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@distilled.cloud/cloudflare",
3
- "version": "0.8.0",
3
+ "version": "0.9.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/alchemy-run/distilled",
@@ -63,12 +63,12 @@
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.8.0",
67
- "effect": "4.0.0-beta.43"
66
+ "@distilled.cloud/core": "0.9.0",
67
+ "effect": "4.0.0-beta.46"
68
68
  },
69
69
  "devDependencies": {
70
- "@effect/platform-node": "4.0.0-beta.43",
71
- "@effect/vitest": "4.0.0-beta.43",
70
+ "@effect/platform-node": "4.0.0-beta.46",
71
+ "@effect/vitest": "4.0.0-beta.46",
72
72
  "@types/bun": "^1.3.0",
73
73
  "@types/node": "^25.3.5",
74
74
  "dotenv": "^16.5.0",
@@ -77,6 +77,6 @@
77
77
  "vitest": "^3.2.3"
78
78
  },
79
79
  "peerDependencies": {
80
- "effect": "4.0.0-beta.43"
80
+ "effect": "4.0.0-beta.46"
81
81
  }
82
82
  }
@@ -5,7 +5,7 @@ import * as Effect from "effect/Effect";
5
5
  import * as Layer from "effect/Layer";
6
6
  import * as Option from "effect/Option";
7
7
  import * as Redacted from "effect/Redacted";
8
- import * as ServiceMap from "effect/ServiceMap";
8
+ import * as Context from "effect/Context";
9
9
 
10
10
  export const DEFAULT_API_BASE_URL = "https://api.cloudflare.com/client/v4";
11
11
 
@@ -71,7 +71,7 @@ export class OAuthRefreshError extends Data.TaggedError(
71
71
 
72
72
  export type CredentialsError = ConfigError | OAuthRefreshError;
73
73
 
74
- export class Credentials extends ServiceMap.Service<
74
+ export class Credentials extends Context.Service<
75
75
  Credentials,
76
76
  Effect.Effect<ResolvedCredentials, CredentialsError, any>
77
77
  >()("CloudflareCredentials") {}
package/src/retry.ts CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as Effect from "effect/Effect";
2
2
  import * as Layer from "effect/Layer";
3
- import * as ServiceMap from "effect/ServiceMap";
3
+ import * as Context from "effect/Context";
4
4
  export {
5
5
  type Options,
6
6
  type Factory,
@@ -17,7 +17,7 @@ import {
17
17
  transientOptions,
18
18
  } from "@distilled.cloud/core/retry";
19
19
 
20
- export class Retry extends ServiceMap.Service<Retry, Policy>()(
20
+ export class Retry extends Context.Service<Retry, Policy>()(
21
21
  "CloudflareRetry",
22
22
  ) {}
23
23