@voltro/plugin-releases 0.83.1 → 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 {
@@ -147,6 +148,8 @@ export declare const releaseAppsTable: Table<"_voltro_release_apps", FieldDefini
147
148
  readonly app: ColumnBuilder<string, "text", boolean>;
148
149
  readonly platform: ColumnBuilder<string, "text", boolean>;
149
150
  readonly shell: ColumnBuilder<string, "text", boolean>;
151
+ /** Compare-and-set token for management actions across all replicas. */
152
+ readonly revision: ColumnBuilder<number, "integer", true>;
150
153
  /** `com.acme.orders` — the store identity, where one exists. */
151
154
  readonly bundleId: ColumnBuilder<string | null, "text", boolean>;
152
155
  /** Public key the client verifies the feed with (minisign for Tauri,
@@ -228,13 +231,11 @@ export declare const releaseEventsTable: Table<"_voltro_release_events", FieldDe
228
231
  export declare class ReleaseNotFound extends ReleaseNotFound_base {
229
232
  }
230
233
 
231
- declare const ReleaseNotFound_base: Schema.TaggedErrorClass<ReleaseNotFound, "ReleaseNotFound", {
232
- readonly _tag: Schema.tag<"ReleaseNotFound">;
233
- } & {
234
- app: typeof Schema.String;
235
- version: Schema.optional<typeof Schema.String>;
236
- channel: Schema.optional<typeof Schema.String>;
237
- }>;
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>;
238
239
 
239
240
  export declare type ReleasePlatform = (typeof RELEASE_PLATFORMS)[number];
240
241
 
@@ -252,13 +253,12 @@ export declare interface ReleasePolicy {
252
253
  }
253
254
 
254
255
  export declare class ReleaseRefused extends ReleaseRefused_base {
256
+ get message(): string;
255
257
  }
256
258
 
257
- declare const ReleaseRefused_base: Schema.TaggedErrorClass<ReleaseRefused, "ReleaseRefused", {
258
- readonly _tag: Schema.tag<"ReleaseRefused">;
259
- } & {
260
- reason: typeof Schema.String;
261
- }>;
259
+ declare const ReleaseRefused_base: Schema.Class<ReleaseRefused, Schema.TaggedStruct<"ReleaseRefused", {
260
+ readonly reason: Schema.String;
261
+ }>, YieldableError>;
262
262
 
263
263
  export declare type ReleaseRow = InferRow<typeof releasesTable>;
264
264
 
@@ -318,6 +318,8 @@ export declare const releaseTables: readonly [ Table<"_voltro_release_apps", Fie
318
318
  readonly app: ColumnBuilder<string, "text", boolean>;
319
319
  readonly platform: ColumnBuilder<string, "text", boolean>;
320
320
  readonly shell: ColumnBuilder<string, "text", boolean>;
321
+ /** Compare-and-set token for management actions across all replicas. */
322
+ readonly revision: ColumnBuilder<number, "integer", true>;
321
323
  /** `com.acme.orders` — the store identity, where one exists. */
322
324
  readonly bundleId: ColumnBuilder<string | null, "text", boolean>;
323
325
  /** Public key the client verifies the feed with (minisign for Tauri,