@voltro/plugin-releases 0.84.0 → 0.85.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.
package/dist/errors.d.ts CHANGED
@@ -1,25 +1,23 @@
1
1
  import { Schema } from 'effect';
2
+ import { YieldableError } from 'effect/Cause';
2
3
 
3
4
  export declare const releaseErrors: readonly [typeof ReleaseNotFound, typeof ReleaseRefused];
4
5
 
5
6
  export declare class ReleaseNotFound extends ReleaseNotFound_base {
6
7
  }
7
8
 
8
- declare const ReleaseNotFound_base: Schema.TaggedErrorClass<ReleaseNotFound, "ReleaseNotFound", {
9
- readonly _tag: Schema.tag<"ReleaseNotFound">;
10
- } & {
11
- app: typeof Schema.String;
12
- version: Schema.optional<typeof Schema.String>;
13
- channel: Schema.optional<typeof Schema.String>;
14
- }>;
9
+ declare const ReleaseNotFound_base: Schema.Class<ReleaseNotFound, Schema.TaggedStruct<"ReleaseNotFound", {
10
+ readonly app: Schema.String;
11
+ readonly version: Schema.optional<Schema.String>;
12
+ readonly channel: Schema.optional<Schema.String>;
13
+ }>, YieldableError>;
15
14
 
16
15
  export declare class ReleaseRefused extends ReleaseRefused_base {
16
+ get message(): string;
17
17
  }
18
18
 
19
- declare const ReleaseRefused_base: Schema.TaggedErrorClass<ReleaseRefused, "ReleaseRefused", {
20
- readonly _tag: Schema.tag<"ReleaseRefused">;
21
- } & {
22
- reason: typeof Schema.String;
23
- }>;
19
+ declare const ReleaseRefused_base: Schema.Class<ReleaseRefused, Schema.TaggedStruct<"ReleaseRefused", {
20
+ readonly reason: Schema.String;
21
+ }>, YieldableError>;
24
22
 
25
23
  export { }
package/dist/errors.js CHANGED
@@ -4,6 +4,10 @@ var t = class extends e.TaggedError()("ReleaseNotFound", {
4
4
  app: e.String,
5
5
  version: e.optional(e.String),
6
6
  channel: e.optional(e.String)
7
- }) {}, n = class extends e.TaggedError()("ReleaseRefused", { reason: e.String }) {}, r = [t, n];
7
+ }) {}, n = class extends e.TaggedError()("ReleaseRefused", { reason: e.String }) {
8
+ get message() {
9
+ return this.reason;
10
+ }
11
+ }, r = [t, n];
8
12
  //#endregion
9
13
  export { t as ReleaseNotFound, n as ReleaseRefused, r as releaseErrors };
package/dist/index.d.ts CHANGED
@@ -4,6 +4,7 @@ import { InferRow } from '@voltro/database';
4
4
  import { Schema } from 'effect';
5
5
  import { Table } from '@voltro/database';
6
6
  import { VoltroPlugin } from '@voltro/protocol';
7
+ import { YieldableError } from 'effect/Cause';
7
8
 
8
9
  export declare const BASE_NAME = "@voltro/plugin-releases";
9
10
 
@@ -105,14 +106,14 @@ export declare const parseVersion: (raw: string) => {
105
106
  export declare const pickDownload: (release: FeedRelease, os: string, arch?: string) => FeedArtifact | null;
106
107
 
107
108
  declare const PolicySchema: Schema.Struct<{
108
- app: typeof Schema.String;
109
- channel: typeof Schema.String;
110
- latestVersion: Schema.NullOr<typeof Schema.String>;
111
- minSupportedVersion: Schema.NullOr<typeof Schema.String>;
112
- killSwitches: Schema.Record$<typeof Schema.String, Schema.Array$<typeof Schema.String>>;
113
- rolloutPercent: typeof Schema.Number;
114
- rolloutSalt: Schema.NullOr<typeof Schema.String>;
115
- cohorts: Schema.NullOr<Schema.Array$<typeof Schema.String>>;
109
+ readonly app: Schema.String;
110
+ readonly channel: Schema.String;
111
+ readonly latestVersion: Schema.NullOr<Schema.String>;
112
+ readonly minSupportedVersion: Schema.NullOr<Schema.String>;
113
+ readonly killSwitches: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
114
+ readonly rolloutPercent: Schema.Number;
115
+ readonly rolloutSalt: Schema.NullOr<Schema.String>;
116
+ readonly cohorts: Schema.NullOr<Schema.$Array<Schema.String>>;
116
117
  }>;
117
118
 
118
119
  export declare interface PolicyVerdict {
@@ -230,13 +231,11 @@ export declare const releaseEventsTable: Table<"_voltro_release_events", FieldDe
230
231
  export declare class ReleaseNotFound extends ReleaseNotFound_base {
231
232
  }
232
233
 
233
- declare const ReleaseNotFound_base: Schema.TaggedErrorClass<ReleaseNotFound, "ReleaseNotFound", {
234
- readonly _tag: Schema.tag<"ReleaseNotFound">;
235
- } & {
236
- app: typeof Schema.String;
237
- version: Schema.optional<typeof Schema.String>;
238
- channel: Schema.optional<typeof Schema.String>;
239
- }>;
234
+ declare const ReleaseNotFound_base: Schema.Class<ReleaseNotFound, Schema.TaggedStruct<"ReleaseNotFound", {
235
+ readonly app: Schema.String;
236
+ readonly version: Schema.optional<Schema.String>;
237
+ readonly channel: Schema.optional<Schema.String>;
238
+ }>, YieldableError>;
240
239
 
241
240
  export declare type ReleasePlatform = (typeof RELEASE_PLATFORMS)[number];
242
241
 
@@ -254,13 +253,12 @@ export declare interface ReleasePolicy {
254
253
  }
255
254
 
256
255
  export declare class ReleaseRefused extends ReleaseRefused_base {
256
+ get message(): string;
257
257
  }
258
258
 
259
- declare const ReleaseRefused_base: Schema.TaggedErrorClass<ReleaseRefused, "ReleaseRefused", {
260
- readonly _tag: Schema.tag<"ReleaseRefused">;
261
- } & {
262
- reason: typeof Schema.String;
263
- }>;
259
+ declare const ReleaseRefused_base: Schema.Class<ReleaseRefused, Schema.TaggedStruct<"ReleaseRefused", {
260
+ readonly reason: Schema.String;
261
+ }>, YieldableError>;
264
262
 
265
263
  export declare type ReleaseRow = InferRow<typeof releasesTable>;
266
264