@distilled.cloud/cloudflare 0.15.0 → 0.15.1

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.
@@ -34,6 +34,9 @@ export class DurableObjectMustBeSqlite extends Schema.TaggedErrorClass()("Durabl
34
34
  T.applyErrorMatchers(DurableObjectMustBeSqlite, [
35
35
  { code: 10074, message: { includes: "not a SQLite Durable Object" } },
36
36
  ]);
37
+ export class HostnameAlreadyInUse extends Schema.TaggedErrorClass()("HostnameAlreadyInUse", { code: Schema.Number, message: Schema.String }) {
38
+ }
39
+ T.applyErrorMatchers(HostnameAlreadyInUse, [{ code: 100116 }]);
37
40
  export class InvalidRoute extends Schema.TaggedErrorClass()("InvalidRoute", { code: Schema.Number, message: Schema.String }) {
38
41
  }
39
42
  T.applyErrorMatchers(InvalidRoute, [
@@ -52,6 +55,14 @@ T.applyErrorMatchers(QueueConsumerConflict, [{ code: 10064 }]);
52
55
  export class RouteNotFound extends Schema.TaggedErrorClass()("RouteNotFound", { code: Schema.Number, message: Schema.String }) {
53
56
  }
54
57
  T.applyErrorMatchers(RouteNotFound, [{ code: 10009 }]);
58
+ export class ScriptStartupError extends Schema.TaggedErrorClass()("ScriptStartupError", { code: Schema.Number, message: Schema.String }) {
59
+ }
60
+ T.applyErrorMatchers(ScriptStartupError, [{ code: 10021 }]);
61
+ export class ScriptModuleNotFound extends Schema.TaggedErrorClass()("ScriptModuleNotFound", { code: Schema.Number, message: Schema.String }) {
62
+ }
63
+ T.applyErrorMatchers(ScriptModuleNotFound, [
64
+ { code: 10021, message: { includes: "No such module" } },
65
+ ]);
55
66
  export class SecretNotFound extends Schema.TaggedErrorClass()("SecretNotFound", { code: Schema.Number, message: Schema.String }) {
56
67
  }
57
68
  T.applyErrorMatchers(SecretNotFound, [{ code: 10056 }]);
@@ -2130,7 +2141,7 @@ export const PutDomainResponse = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2130
2141
  export const putDomain = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
2131
2142
  input: PutDomainRequest,
2132
2143
  output: PutDomainResponse,
2133
- errors: [WorkerNotFound, InvalidRoute],
2144
+ errors: [WorkerNotFound, InvalidRoute, HostnameAlreadyInUse],
2134
2145
  }));
2135
2146
  export const DeleteDomainRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
2136
2147
  domainId: Schema.String.pipe(T.HttpPath("domainId")),
@@ -3812,6 +3823,8 @@ export const putScript = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
3812
3823
  InvalidWorkerScript,
3813
3824
  DurableObjectMustBeSqlite,
3814
3825
  DuplicateMigrationTarget,
3826
+ ScriptStartupError,
3827
+ ScriptModuleNotFound,
3815
3828
  ],
3816
3829
  }));
3817
3830
  export const DeleteScriptRequest = /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({
@@ -4080,7 +4093,12 @@ export const PutScriptContentResponse =
4080
4093
  export const putScriptContent = /*@__PURE__*/ /*#__PURE__*/ API.make(() => ({
4081
4094
  input: PutScriptContentRequest,
4082
4095
  output: PutScriptContentResponse,
4083
- errors: [WorkerNotFound, InvalidWorkerScript],
4096
+ errors: [
4097
+ WorkerNotFound,
4098
+ InvalidWorkerScript,
4099
+ ScriptStartupError,
4100
+ ScriptModuleNotFound,
4101
+ ],
4084
4102
  }));
4085
4103
  export const GetScriptDeploymentRequest =
4086
4104
  /*@__PURE__*/ /*#__PURE__*/ Schema.Struct({