@voltro/plugin-releases 0.84.0 → 0.86.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/CHANGELOG.md +1215 -0
- package/THIRD-PARTY-NOTICES.md +127 -609
- package/dist/artifactMetadata.js +27 -0
- package/dist/errors.d.ts +10 -12
- package/dist/errors.js +5 -1
- package/dist/feeds.js +112 -0
- package/dist/index.d.ts +37 -23
- package/dist/index.js +441 -536
- package/dist/names.js +4 -0
- package/dist/retention.js +13 -0
- package/dist/{rollout-CGRKMTfv.js → rollout.js} +1 -1
- package/dist/rpc.d.ts +162 -132
- package/dist/rpc.js +263 -2
- package/dist/schema.js +85 -0
- package/dist/uploadIdentity.server.js +5 -0
- package/dist/web.js +2 -2
- package/package.json +7 -7
- package/dist/rpc-DeEV8l3U.js +0 -226
package/dist/names.js
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
//#region src/names.ts
|
|
2
|
+
var e = "_voltro_release_apps", t = "_voltro_release_channels", n = "_voltro_releases", r = "_voltro_release_artifacts", i = "_voltro_release_events";
|
|
3
|
+
//#endregion
|
|
4
|
+
export { n as RELEASES_TABLE, e as RELEASE_APPS_TABLE, r as RELEASE_ARTIFACTS_TABLE, t as RELEASE_CHANNELS_TABLE, i as RELEASE_EVENTS_TABLE };
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { compareVersions as e } from "./rollout.js";
|
|
2
|
+
var t = (t, n, r) => {
|
|
3
|
+
let i = /* @__PURE__ */ new Set();
|
|
4
|
+
for (let e of n) e.currentReleaseId !== null && i.add(e.currentReleaseId);
|
|
5
|
+
let a = [];
|
|
6
|
+
for (let o of n) {
|
|
7
|
+
let n = r(o.name), s = Number.isFinite(n) ? Math.max(1, Math.floor(n)) : 10, c = t.filter((e) => e.channelId === o.id).sort((t, n) => e(n.version, t.version));
|
|
8
|
+
for (let e of c.slice(s)) i.has(e.id) || a.push(e);
|
|
9
|
+
}
|
|
10
|
+
return a;
|
|
11
|
+
};
|
|
12
|
+
//#endregion
|
|
13
|
+
export { t as planRetention };
|
|
@@ -52,4 +52,4 @@ var e = (e) => {
|
|
|
52
52
|
};
|
|
53
53
|
}, s = (e) => [...e].sort((e, n) => t(n, e));
|
|
54
54
|
//#endregion
|
|
55
|
-
export {
|
|
55
|
+
export { t as compareVersions, o as evaluatePolicy, a as inRollout, n as isNewerVersion, e as parseVersion, i as rolloutBucket, s as sortVersionsDesc };
|
package/dist/rpc.d.ts
CHANGED
|
@@ -2,117 +2,131 @@ import { MutationProcedureDescriptor } from '@voltro/protocol';
|
|
|
2
2
|
import { PluginRpcClientDescriptor } from '@voltro/protocol';
|
|
3
3
|
import { QueryProcedureDescriptor } from '@voltro/protocol';
|
|
4
4
|
import { Schema } from 'effect';
|
|
5
|
+
import { YieldableError } from 'effect/Cause';
|
|
5
6
|
|
|
6
7
|
export declare const BASE_NAME = "@voltro/plugin-releases";
|
|
7
8
|
|
|
8
9
|
export declare const createDescriptor: MutationProcedureDescriptor<"releases.create", Schema.Struct<{
|
|
9
|
-
expectedTarget: Schema.optional<Schema.Struct<{
|
|
10
|
-
id:
|
|
11
|
-
revision: Schema.
|
|
10
|
+
readonly expectedTarget: Schema.optional<Schema.Struct<{
|
|
11
|
+
readonly id: Schema.String;
|
|
12
|
+
readonly revision: Schema.Number;
|
|
12
13
|
}>>;
|
|
13
|
-
app:
|
|
14
|
-
channel:
|
|
15
|
-
version:
|
|
16
|
-
buildId: Schema.optional<
|
|
17
|
-
notes: Schema.optional<
|
|
18
|
-
cohorts: Schema.optional<Schema
|
|
14
|
+
readonly app: Schema.String;
|
|
15
|
+
readonly channel: Schema.String;
|
|
16
|
+
readonly version: Schema.String;
|
|
17
|
+
readonly buildId: Schema.optional<Schema.String>;
|
|
18
|
+
readonly notes: Schema.optional<Schema.String>;
|
|
19
|
+
readonly cohorts: Schema.optional<Schema.$Array<Schema.String>>;
|
|
19
20
|
}>, Schema.Struct<{
|
|
20
|
-
id:
|
|
21
|
-
}>, Schema.Union<[typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
21
|
+
readonly id: Schema.String;
|
|
22
|
+
}>, Schema.Union<readonly [typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
22
23
|
|
|
23
24
|
export declare const listDescriptor: QueryProcedureDescriptor<"releases.list", Schema.Struct<{
|
|
24
|
-
app:
|
|
25
|
-
}>, Schema
|
|
26
|
-
id:
|
|
27
|
-
version:
|
|
28
|
-
buildId: Schema.NullOr<
|
|
29
|
-
state:
|
|
30
|
-
rolloutPercent:
|
|
31
|
-
channel:
|
|
32
|
-
createdAt:
|
|
33
|
-
artifacts:
|
|
34
|
-
signed:
|
|
35
|
-
}>>,
|
|
25
|
+
readonly app: Schema.String;
|
|
26
|
+
}>, Schema.$Array<Schema.Struct<{
|
|
27
|
+
readonly id: Schema.String;
|
|
28
|
+
readonly version: Schema.String;
|
|
29
|
+
readonly buildId: Schema.NullOr<Schema.String>;
|
|
30
|
+
readonly state: Schema.String;
|
|
31
|
+
readonly rolloutPercent: Schema.Number;
|
|
32
|
+
readonly channel: Schema.String;
|
|
33
|
+
readonly createdAt: Schema.String;
|
|
34
|
+
readonly artifacts: Schema.Number;
|
|
35
|
+
readonly signed: Schema.Boolean;
|
|
36
|
+
}>>, Schema.Never>;
|
|
36
37
|
|
|
37
38
|
/** The reactive policy every client subscribes to. Table-sourced, so a
|
|
38
39
|
* promote, rollout change or policy edit reaches every live client. */
|
|
39
40
|
export declare const policyDescriptor: QueryProcedureDescriptor<"releases.policy", Schema.Struct<{
|
|
40
|
-
app:
|
|
41
|
-
channel:
|
|
41
|
+
readonly app: Schema.String;
|
|
42
|
+
readonly channel: Schema.String;
|
|
42
43
|
}>, Schema.Struct<{
|
|
43
|
-
app:
|
|
44
|
-
channel:
|
|
45
|
-
latestVersion: Schema.NullOr<
|
|
46
|
-
minSupportedVersion: Schema.NullOr<
|
|
47
|
-
killSwitches: Schema
|
|
48
|
-
rolloutPercent:
|
|
49
|
-
rolloutSalt: Schema.NullOr<
|
|
50
|
-
cohorts: Schema.NullOr<Schema
|
|
51
|
-
}>,
|
|
44
|
+
readonly app: Schema.String;
|
|
45
|
+
readonly channel: Schema.String;
|
|
46
|
+
readonly latestVersion: Schema.NullOr<Schema.String>;
|
|
47
|
+
readonly minSupportedVersion: Schema.NullOr<Schema.String>;
|
|
48
|
+
readonly killSwitches: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
49
|
+
readonly rolloutPercent: Schema.Number;
|
|
50
|
+
readonly rolloutSalt: Schema.NullOr<Schema.String>;
|
|
51
|
+
readonly cohorts: Schema.NullOr<Schema.$Array<Schema.String>>;
|
|
52
|
+
}>, Schema.Never>;
|
|
52
53
|
|
|
53
54
|
export declare const PolicySchema: Schema.Struct<{
|
|
54
|
-
app:
|
|
55
|
-
channel:
|
|
56
|
-
latestVersion: Schema.NullOr<
|
|
57
|
-
minSupportedVersion: Schema.NullOr<
|
|
58
|
-
killSwitches: Schema
|
|
59
|
-
rolloutPercent:
|
|
60
|
-
rolloutSalt: Schema.NullOr<
|
|
61
|
-
cohorts: Schema.NullOr<Schema
|
|
55
|
+
readonly app: Schema.String;
|
|
56
|
+
readonly channel: Schema.String;
|
|
57
|
+
readonly latestVersion: Schema.NullOr<Schema.String>;
|
|
58
|
+
readonly minSupportedVersion: Schema.NullOr<Schema.String>;
|
|
59
|
+
readonly killSwitches: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
60
|
+
readonly rolloutPercent: Schema.Number;
|
|
61
|
+
readonly rolloutSalt: Schema.NullOr<Schema.String>;
|
|
62
|
+
readonly cohorts: Schema.NullOr<Schema.$Array<Schema.String>>;
|
|
62
63
|
}>;
|
|
63
64
|
|
|
64
65
|
export declare type PolicyWire = typeof PolicySchema.Type;
|
|
65
66
|
|
|
67
|
+
export declare const prepareUploadDescriptor: QueryProcedureDescriptor<"releases.prepareUpload", Schema.Struct<{
|
|
68
|
+
readonly operationId: Schema.optionalKey<Schema.String>;
|
|
69
|
+
readonly expectedTarget: Schema.optional<Schema.Struct<{
|
|
70
|
+
readonly id: Schema.String;
|
|
71
|
+
readonly revision: Schema.Number;
|
|
72
|
+
}>>;
|
|
73
|
+
readonly appPrefix: Schema.optional<Schema.NonEmptyString>;
|
|
74
|
+
readonly releaseId: Schema.String;
|
|
75
|
+
readonly app: Schema.optional<Schema.String>;
|
|
76
|
+
readonly version: Schema.optional<Schema.String>;
|
|
77
|
+
}>, Schema.Struct<{
|
|
78
|
+
readonly releaseId: Schema.String;
|
|
79
|
+
readonly app: Schema.String;
|
|
80
|
+
readonly version: Schema.String;
|
|
81
|
+
}>, Schema.Union<readonly [typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
82
|
+
|
|
66
83
|
export declare const promoteDescriptor: MutationProcedureDescriptor<"releases.promote", Schema.Struct<{
|
|
67
|
-
expectedTarget: Schema.optional<Schema.Struct<{
|
|
68
|
-
id:
|
|
69
|
-
revision: Schema.
|
|
84
|
+
readonly expectedTarget: Schema.optional<Schema.Struct<{
|
|
85
|
+
readonly id: Schema.String;
|
|
86
|
+
readonly revision: Schema.Number;
|
|
70
87
|
}>>;
|
|
71
|
-
app:
|
|
72
|
-
version:
|
|
73
|
-
to:
|
|
74
|
-
rolloutPercent: Schema.optional<Schema.
|
|
88
|
+
readonly app: Schema.String;
|
|
89
|
+
readonly version: Schema.String;
|
|
90
|
+
readonly to: Schema.String;
|
|
91
|
+
readonly rolloutPercent: Schema.optional<Schema.Number>;
|
|
75
92
|
}>, Schema.Struct<{
|
|
76
|
-
channel:
|
|
77
|
-
version:
|
|
78
|
-
rolloutPercent:
|
|
79
|
-
}>, Schema.Union<[typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
93
|
+
readonly channel: Schema.String;
|
|
94
|
+
readonly version: Schema.String;
|
|
95
|
+
readonly rolloutPercent: Schema.Number;
|
|
96
|
+
}>, Schema.Union<readonly [typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
80
97
|
|
|
81
98
|
/** Register an app target at runtime — what a hosted feed (one api serving
|
|
82
99
|
* many projects' apps) needs, where `apps:` in the plugin's config cannot
|
|
83
100
|
* know them. Idempotent: a target that exists answers with its id. */
|
|
84
101
|
export declare const registerAppDescriptor: MutationProcedureDescriptor<"releases.registerApp", Schema.Struct<{
|
|
85
|
-
app:
|
|
86
|
-
platform: Schema.
|
|
87
|
-
shell: Schema.
|
|
88
|
-
bundleId: Schema.optional<
|
|
89
|
-
updaterPublicKey: Schema.optional<
|
|
90
|
-
runtimeVersion: Schema.optional<
|
|
91
|
-
channels: Schema.optional<Schema
|
|
102
|
+
readonly app: Schema.String;
|
|
103
|
+
readonly platform: Schema.Literals<readonly ["web", "ios", "android", "macos", "windows", "linux"]>;
|
|
104
|
+
readonly shell: Schema.Literals<readonly ["pwa", "expo", "tauri", "electron"]>;
|
|
105
|
+
readonly bundleId: Schema.optional<Schema.String>;
|
|
106
|
+
readonly updaterPublicKey: Schema.optional<Schema.String>;
|
|
107
|
+
readonly runtimeVersion: Schema.optional<Schema.String>;
|
|
108
|
+
readonly channels: Schema.optional<Schema.$Array<Schema.String>>;
|
|
92
109
|
}>, Schema.Struct<{
|
|
93
|
-
id:
|
|
94
|
-
created:
|
|
110
|
+
readonly id: Schema.String;
|
|
111
|
+
readonly created: Schema.Boolean;
|
|
95
112
|
}>, typeof ReleaseRefused>;
|
|
96
113
|
|
|
97
114
|
declare class ReleaseNotFound extends ReleaseNotFound_base {
|
|
98
115
|
}
|
|
99
116
|
|
|
100
|
-
declare const ReleaseNotFound_base: Schema.
|
|
101
|
-
readonly
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
channel: Schema.optional<typeof Schema.String>;
|
|
106
|
-
}>;
|
|
117
|
+
declare const ReleaseNotFound_base: Schema.Class<ReleaseNotFound, Schema.TaggedStruct<"ReleaseNotFound", {
|
|
118
|
+
readonly app: Schema.String;
|
|
119
|
+
readonly version: Schema.optional<Schema.String>;
|
|
120
|
+
readonly channel: Schema.optional<Schema.String>;
|
|
121
|
+
}>, YieldableError>;
|
|
107
122
|
|
|
108
123
|
declare class ReleaseRefused extends ReleaseRefused_base {
|
|
124
|
+
get message(): string;
|
|
109
125
|
}
|
|
110
126
|
|
|
111
|
-
declare const ReleaseRefused_base: Schema.
|
|
112
|
-
readonly
|
|
113
|
-
}
|
|
114
|
-
reason: typeof Schema.String;
|
|
115
|
-
}>;
|
|
127
|
+
declare const ReleaseRefused_base: Schema.Class<ReleaseRefused, Schema.TaggedStruct<"ReleaseRefused", {
|
|
128
|
+
readonly reason: Schema.String;
|
|
129
|
+
}>, YieldableError>;
|
|
116
130
|
|
|
117
131
|
/** The scope that promotes, rolls out, rolls back and changes policy. */
|
|
118
132
|
export declare const RELEASES_MANAGE_SCOPE = "releases:manage";
|
|
@@ -120,80 +134,96 @@ export declare const RELEASES_MANAGE_SCOPE = "releases:manage";
|
|
|
120
134
|
export declare const releasesRpcClientImports: ReadonlyArray<PluginRpcClientDescriptor>;
|
|
121
135
|
|
|
122
136
|
export declare const ReleaseSummarySchema: Schema.Struct<{
|
|
123
|
-
id:
|
|
124
|
-
version:
|
|
125
|
-
buildId: Schema.NullOr<
|
|
126
|
-
state:
|
|
127
|
-
rolloutPercent:
|
|
128
|
-
channel:
|
|
129
|
-
createdAt:
|
|
130
|
-
artifacts:
|
|
131
|
-
signed:
|
|
137
|
+
readonly id: Schema.String;
|
|
138
|
+
readonly version: Schema.String;
|
|
139
|
+
readonly buildId: Schema.NullOr<Schema.String>;
|
|
140
|
+
readonly state: Schema.String;
|
|
141
|
+
readonly rolloutPercent: Schema.Number;
|
|
142
|
+
readonly channel: Schema.String;
|
|
143
|
+
readonly createdAt: Schema.String;
|
|
144
|
+
readonly artifacts: Schema.Number;
|
|
145
|
+
readonly signed: Schema.Boolean;
|
|
146
|
+
}>;
|
|
147
|
+
|
|
148
|
+
export declare const ReleaseUploadPreparationInput: Schema.Struct<{
|
|
149
|
+
readonly operationId: Schema.optionalKey<Schema.String>;
|
|
150
|
+
readonly expectedTarget: Schema.optional<Schema.Struct<{
|
|
151
|
+
readonly id: Schema.String;
|
|
152
|
+
readonly revision: Schema.Number;
|
|
153
|
+
}>>;
|
|
154
|
+
readonly appPrefix: Schema.optional<Schema.NonEmptyString>;
|
|
155
|
+
readonly releaseId: Schema.String;
|
|
156
|
+
readonly app: Schema.optional<Schema.String>;
|
|
157
|
+
readonly version: Schema.optional<Schema.String>;
|
|
132
158
|
}>;
|
|
133
159
|
|
|
134
160
|
export declare const rollbackDescriptor: MutationProcedureDescriptor<"releases.rollback", Schema.Struct<{
|
|
135
|
-
app:
|
|
136
|
-
channel:
|
|
137
|
-
reason:
|
|
138
|
-
expectedTarget: Schema.optional<Schema.Struct<{
|
|
139
|
-
id:
|
|
140
|
-
revision: Schema.
|
|
161
|
+
readonly app: Schema.String;
|
|
162
|
+
readonly channel: Schema.String;
|
|
163
|
+
readonly reason: Schema.String;
|
|
164
|
+
readonly expectedTarget: Schema.optional<Schema.Struct<{
|
|
165
|
+
readonly id: Schema.String;
|
|
166
|
+
readonly revision: Schema.Number;
|
|
141
167
|
}>>;
|
|
142
168
|
}>, Schema.Struct<{
|
|
143
|
-
version: Schema.NullOr<
|
|
144
|
-
}>, Schema.Union<[typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
169
|
+
readonly version: Schema.NullOr<Schema.String>;
|
|
170
|
+
}>, Schema.Union<readonly [typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
145
171
|
|
|
146
172
|
export declare const rolloutDescriptor: MutationProcedureDescriptor<"releases.rollout", Schema.Struct<{
|
|
147
|
-
app:
|
|
148
|
-
channel:
|
|
149
|
-
percent: Schema.
|
|
150
|
-
expectedTarget: Schema.optional<Schema.Struct<{
|
|
151
|
-
id:
|
|
152
|
-
revision: Schema.
|
|
173
|
+
readonly app: Schema.String;
|
|
174
|
+
readonly channel: Schema.String;
|
|
175
|
+
readonly percent: Schema.Number;
|
|
176
|
+
readonly expectedTarget: Schema.optional<Schema.Struct<{
|
|
177
|
+
readonly id: Schema.String;
|
|
178
|
+
readonly revision: Schema.Number;
|
|
153
179
|
}>>;
|
|
154
180
|
}>, Schema.Struct<{
|
|
155
|
-
version:
|
|
156
|
-
rolloutPercent:
|
|
157
|
-
}>, Schema.Union<[typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
181
|
+
readonly version: Schema.String;
|
|
182
|
+
readonly rolloutPercent: Schema.Number;
|
|
183
|
+
}>, Schema.Union<readonly [typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
158
184
|
|
|
159
185
|
export declare const setPolicyDescriptor: MutationProcedureDescriptor<"releases.setPolicy", Schema.Struct<{
|
|
160
|
-
expectedTarget: Schema.optional<Schema.Struct<{
|
|
161
|
-
id:
|
|
162
|
-
revision: Schema.
|
|
186
|
+
readonly expectedTarget: Schema.optional<Schema.Struct<{
|
|
187
|
+
readonly id: Schema.String;
|
|
188
|
+
readonly revision: Schema.Number;
|
|
163
189
|
}>>;
|
|
164
|
-
app:
|
|
165
|
-
channel:
|
|
166
|
-
minSupportedVersion: Schema.optional<Schema.NullOr<
|
|
167
|
-
killSwitches: Schema.optional<Schema
|
|
168
|
-
reason:
|
|
190
|
+
readonly app: Schema.String;
|
|
191
|
+
readonly channel: Schema.String;
|
|
192
|
+
readonly minSupportedVersion: Schema.optional<Schema.NullOr<Schema.String>>;
|
|
193
|
+
readonly killSwitches: Schema.optional<Schema.$Record<Schema.String, Schema.$Array<Schema.String>>>;
|
|
194
|
+
readonly reason: Schema.String;
|
|
169
195
|
}>, Schema.Struct<{
|
|
170
|
-
app:
|
|
171
|
-
channel:
|
|
172
|
-
latestVersion: Schema.NullOr<
|
|
173
|
-
minSupportedVersion: Schema.NullOr<
|
|
174
|
-
killSwitches: Schema
|
|
175
|
-
rolloutPercent:
|
|
176
|
-
rolloutSalt: Schema.NullOr<
|
|
177
|
-
cohorts: Schema.NullOr<Schema
|
|
178
|
-
}>, Schema.Union<[typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
196
|
+
readonly app: Schema.String;
|
|
197
|
+
readonly channel: Schema.String;
|
|
198
|
+
readonly latestVersion: Schema.NullOr<Schema.String>;
|
|
199
|
+
readonly minSupportedVersion: Schema.NullOr<Schema.String>;
|
|
200
|
+
readonly killSwitches: Schema.$Record<Schema.String, Schema.$Array<Schema.String>>;
|
|
201
|
+
readonly rolloutPercent: Schema.Number;
|
|
202
|
+
readonly rolloutSalt: Schema.NullOr<Schema.String>;
|
|
203
|
+
readonly cohorts: Schema.NullOr<Schema.$Array<Schema.String>>;
|
|
204
|
+
}>, Schema.Union<readonly [typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
179
205
|
|
|
180
206
|
export declare const uploadDescriptor: MutationProcedureDescriptor<"releases.upload", Schema.Struct<{
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
207
|
+
readonly kind: Schema.String;
|
|
208
|
+
readonly target: Schema.optional<Schema.String>;
|
|
209
|
+
readonly url: Schema.String;
|
|
210
|
+
readonly sha256: Schema.String;
|
|
211
|
+
readonly size: Schema.Number;
|
|
212
|
+
readonly signature: Schema.optional<Schema.String>;
|
|
213
|
+
readonly notarized: Schema.optional<Schema.Boolean>;
|
|
214
|
+
readonly assetKey: Schema.optional<Schema.String>;
|
|
215
|
+
readonly contentType: Schema.optional<Schema.String>;
|
|
216
|
+
readonly operationId: Schema.optionalKey<Schema.String>;
|
|
217
|
+
readonly expectedTarget: Schema.optional<Schema.Struct<{
|
|
218
|
+
readonly id: Schema.String;
|
|
219
|
+
readonly revision: Schema.Number;
|
|
184
220
|
}>>;
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
sha256: typeof Schema.String;
|
|
190
|
-
size: typeof Schema.Number;
|
|
191
|
-
signature: Schema.optional<typeof Schema.String>;
|
|
192
|
-
notarized: Schema.optional<typeof Schema.Boolean>;
|
|
193
|
-
assetKey: Schema.optional<typeof Schema.String>;
|
|
194
|
-
contentType: Schema.optional<typeof Schema.String>;
|
|
221
|
+
readonly appPrefix: Schema.optional<Schema.NonEmptyString>;
|
|
222
|
+
readonly releaseId: Schema.String;
|
|
223
|
+
readonly app: Schema.optional<Schema.String>;
|
|
224
|
+
readonly version: Schema.optional<Schema.String>;
|
|
195
225
|
}>, Schema.Struct<{
|
|
196
|
-
id:
|
|
197
|
-
}>, Schema.Union<[typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
226
|
+
readonly id: Schema.String;
|
|
227
|
+
}>, Schema.Union<readonly [typeof ReleaseRefused, typeof ReleaseNotFound]>>;
|
|
198
228
|
|
|
199
229
|
export { }
|
package/dist/rpc.js
CHANGED
|
@@ -1,2 +1,263 @@
|
|
|
1
|
-
import {
|
|
2
|
-
|
|
1
|
+
import { artifactHash as e, artifactOperationId as t, artifactSize as n, artifactText as r, hasArtifactSignature as i } from "./artifactMetadata.js";
|
|
2
|
+
import { ReleaseNotFound as a, ReleaseRefused as o } from "./errors.js";
|
|
3
|
+
import { RELEASES_TABLE as s, RELEASE_APPS_TABLE as c, RELEASE_ARTIFACTS_TABLE as l, RELEASE_CHANNELS_TABLE as u } from "./names.js";
|
|
4
|
+
import { Schema as d } from "effect";
|
|
5
|
+
import { defineMutation as f, defineQuery as p } from "@voltro/protocol";
|
|
6
|
+
//#region src/rpc.ts
|
|
7
|
+
var m = "@voltro/plugin-releases", h = "releases:manage", g = d.optional(d.Struct({
|
|
8
|
+
id: d.String,
|
|
9
|
+
revision: d.Number.pipe(d.check(d.isInt()), d.check(d.isGreaterThanOrEqualTo(0)))
|
|
10
|
+
})), _ = d.Struct({
|
|
11
|
+
app: d.String,
|
|
12
|
+
channel: d.String,
|
|
13
|
+
latestVersion: d.NullOr(d.String),
|
|
14
|
+
minSupportedVersion: d.NullOr(d.String),
|
|
15
|
+
killSwitches: d.Record(d.String, d.Array(d.String)),
|
|
16
|
+
rolloutPercent: d.Number,
|
|
17
|
+
rolloutSalt: d.NullOr(d.String),
|
|
18
|
+
cohorts: d.NullOr(d.Array(d.String))
|
|
19
|
+
}), v = p({
|
|
20
|
+
name: "releases.policy",
|
|
21
|
+
input: d.Struct({
|
|
22
|
+
app: d.String,
|
|
23
|
+
channel: d.String
|
|
24
|
+
}),
|
|
25
|
+
output: _,
|
|
26
|
+
source: [u, s],
|
|
27
|
+
openAccess: "the release policy of a channel is what every client — signed in or not — must evaluate before it may continue; it carries versions and feature keys, no data"
|
|
28
|
+
}), y = d.Struct({
|
|
29
|
+
id: d.String,
|
|
30
|
+
version: d.String,
|
|
31
|
+
buildId: d.NullOr(d.String),
|
|
32
|
+
state: d.String,
|
|
33
|
+
rolloutPercent: d.Number,
|
|
34
|
+
channel: d.String,
|
|
35
|
+
createdAt: d.String,
|
|
36
|
+
artifacts: d.Number,
|
|
37
|
+
signed: d.Boolean
|
|
38
|
+
}), b = p({
|
|
39
|
+
name: "releases.list",
|
|
40
|
+
input: d.Struct({ app: d.String }),
|
|
41
|
+
output: d.Array(y),
|
|
42
|
+
source: [s],
|
|
43
|
+
guards: [{ scope: h }]
|
|
44
|
+
}), x = f({
|
|
45
|
+
name: "releases.registerApp",
|
|
46
|
+
input: d.Struct({
|
|
47
|
+
app: d.String,
|
|
48
|
+
platform: d.Literals([
|
|
49
|
+
"web",
|
|
50
|
+
"ios",
|
|
51
|
+
"android",
|
|
52
|
+
"macos",
|
|
53
|
+
"windows",
|
|
54
|
+
"linux"
|
|
55
|
+
]),
|
|
56
|
+
shell: d.Literals([
|
|
57
|
+
"pwa",
|
|
58
|
+
"expo",
|
|
59
|
+
"tauri",
|
|
60
|
+
"electron"
|
|
61
|
+
]),
|
|
62
|
+
bundleId: d.optional(d.String),
|
|
63
|
+
updaterPublicKey: d.optional(d.String),
|
|
64
|
+
runtimeVersion: d.optional(d.String),
|
|
65
|
+
channels: d.optional(d.Array(d.String))
|
|
66
|
+
}),
|
|
67
|
+
output: d.Struct({
|
|
68
|
+
id: d.String,
|
|
69
|
+
created: d.Boolean
|
|
70
|
+
}),
|
|
71
|
+
error: o,
|
|
72
|
+
guards: [{ scope: h }]
|
|
73
|
+
}), S = f({
|
|
74
|
+
name: "releases.create",
|
|
75
|
+
input: d.Struct({
|
|
76
|
+
expectedTarget: g,
|
|
77
|
+
app: d.String,
|
|
78
|
+
channel: d.String,
|
|
79
|
+
version: d.String,
|
|
80
|
+
buildId: d.optional(d.String),
|
|
81
|
+
notes: d.optional(d.String),
|
|
82
|
+
cohorts: d.optional(d.Array(d.String))
|
|
83
|
+
}),
|
|
84
|
+
output: d.Struct({ id: d.String }),
|
|
85
|
+
error: d.Union([o, a]),
|
|
86
|
+
guards: [{ scope: h }]
|
|
87
|
+
}), C = d.String.check(d.makeFilter(r, { message: "Artifact metadata must be nonblank text without control characters" })), w = d.String.check(d.makeFilter(e, { message: "Artifact sha256 must contain exactly 64 hexadecimal characters" })), T = d.Number.check(d.makeFilter(n, { message: "Artifact size must be a positive safe integer" })), E = d.String.check(d.makeFilter(i, { message: "Artifact signature must not be blank or contain NUL" })), D = d.String.check(d.makeFilter(t, { message: "Artifact operationId must be nonblank text without control characters and at most 200 characters" })), O = d.Struct({
|
|
88
|
+
operationId: d.optionalKey(D),
|
|
89
|
+
expectedTarget: g,
|
|
90
|
+
appPrefix: d.optional(d.NonEmptyString),
|
|
91
|
+
releaseId: C,
|
|
92
|
+
app: d.optional(C),
|
|
93
|
+
version: d.optional(C)
|
|
94
|
+
}), k = p({
|
|
95
|
+
name: "releases.prepareUpload",
|
|
96
|
+
input: O,
|
|
97
|
+
output: d.Struct({
|
|
98
|
+
releaseId: d.String,
|
|
99
|
+
app: d.String,
|
|
100
|
+
version: d.String
|
|
101
|
+
}),
|
|
102
|
+
source: [
|
|
103
|
+
c,
|
|
104
|
+
s,
|
|
105
|
+
l
|
|
106
|
+
],
|
|
107
|
+
error: d.Union([o, a]),
|
|
108
|
+
guards: [{ scope: h }]
|
|
109
|
+
}), A = f({
|
|
110
|
+
name: "releases.upload",
|
|
111
|
+
input: d.Struct({
|
|
112
|
+
...O.fields,
|
|
113
|
+
kind: C,
|
|
114
|
+
target: d.optional(C),
|
|
115
|
+
url: C,
|
|
116
|
+
sha256: w,
|
|
117
|
+
size: T,
|
|
118
|
+
signature: d.optional(E),
|
|
119
|
+
notarized: d.optional(d.Boolean),
|
|
120
|
+
assetKey: d.optional(C),
|
|
121
|
+
contentType: d.optional(C)
|
|
122
|
+
}),
|
|
123
|
+
output: d.Struct({ id: d.String }),
|
|
124
|
+
error: d.Union([o, a]),
|
|
125
|
+
guards: [{ scope: h }]
|
|
126
|
+
}), j = f({
|
|
127
|
+
name: "releases.promote",
|
|
128
|
+
input: d.Struct({
|
|
129
|
+
expectedTarget: g,
|
|
130
|
+
app: d.String,
|
|
131
|
+
version: d.String,
|
|
132
|
+
to: d.String,
|
|
133
|
+
rolloutPercent: d.optional(d.Number.pipe(d.check(d.isInt())))
|
|
134
|
+
}),
|
|
135
|
+
output: d.Struct({
|
|
136
|
+
channel: d.String,
|
|
137
|
+
version: d.String,
|
|
138
|
+
rolloutPercent: d.Number
|
|
139
|
+
}),
|
|
140
|
+
error: d.Union([o, a]),
|
|
141
|
+
guards: [{ scope: h }]
|
|
142
|
+
}), M = f({
|
|
143
|
+
name: "releases.rollout",
|
|
144
|
+
input: d.Struct({
|
|
145
|
+
app: d.String,
|
|
146
|
+
channel: d.String,
|
|
147
|
+
percent: d.Number.pipe(d.check(d.isInt())),
|
|
148
|
+
expectedTarget: g
|
|
149
|
+
}),
|
|
150
|
+
output: d.Struct({
|
|
151
|
+
version: d.String,
|
|
152
|
+
rolloutPercent: d.Number
|
|
153
|
+
}),
|
|
154
|
+
error: d.Union([o, a]),
|
|
155
|
+
guards: [{ scope: h }]
|
|
156
|
+
}), N = f({
|
|
157
|
+
name: "releases.rollback",
|
|
158
|
+
input: d.Struct({
|
|
159
|
+
app: d.String,
|
|
160
|
+
channel: d.String,
|
|
161
|
+
reason: d.String,
|
|
162
|
+
expectedTarget: g
|
|
163
|
+
}),
|
|
164
|
+
output: d.Struct({ version: d.NullOr(d.String) }),
|
|
165
|
+
error: d.Union([o, a]),
|
|
166
|
+
guards: [{ scope: h }]
|
|
167
|
+
}), P = f({
|
|
168
|
+
name: "releases.setPolicy",
|
|
169
|
+
input: d.Struct({
|
|
170
|
+
expectedTarget: g,
|
|
171
|
+
app: d.String,
|
|
172
|
+
channel: d.String,
|
|
173
|
+
minSupportedVersion: d.optional(d.NullOr(d.String)),
|
|
174
|
+
killSwitches: d.optional(d.Record(d.String, d.Array(d.String))),
|
|
175
|
+
reason: d.String
|
|
176
|
+
}),
|
|
177
|
+
output: _,
|
|
178
|
+
error: d.Union([o, a]),
|
|
179
|
+
guards: [{ scope: h }]
|
|
180
|
+
}), F = [
|
|
181
|
+
{
|
|
182
|
+
tag: "releases.policy",
|
|
183
|
+
kind: "query",
|
|
184
|
+
import: {
|
|
185
|
+
module: "@voltro/plugin-releases/rpc",
|
|
186
|
+
name: "policyDescriptor"
|
|
187
|
+
}
|
|
188
|
+
},
|
|
189
|
+
{
|
|
190
|
+
tag: "releases.list",
|
|
191
|
+
kind: "query",
|
|
192
|
+
import: {
|
|
193
|
+
module: "@voltro/plugin-releases/rpc",
|
|
194
|
+
name: "listDescriptor"
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
{
|
|
198
|
+
tag: "releases.registerApp",
|
|
199
|
+
kind: "mutation",
|
|
200
|
+
import: {
|
|
201
|
+
module: "@voltro/plugin-releases/rpc",
|
|
202
|
+
name: "registerAppDescriptor"
|
|
203
|
+
}
|
|
204
|
+
},
|
|
205
|
+
{
|
|
206
|
+
tag: "releases.create",
|
|
207
|
+
kind: "mutation",
|
|
208
|
+
import: {
|
|
209
|
+
module: "@voltro/plugin-releases/rpc",
|
|
210
|
+
name: "createDescriptor"
|
|
211
|
+
}
|
|
212
|
+
},
|
|
213
|
+
{
|
|
214
|
+
tag: "releases.prepareUpload",
|
|
215
|
+
kind: "query",
|
|
216
|
+
import: {
|
|
217
|
+
module: "@voltro/plugin-releases/rpc",
|
|
218
|
+
name: "prepareUploadDescriptor"
|
|
219
|
+
}
|
|
220
|
+
},
|
|
221
|
+
{
|
|
222
|
+
tag: "releases.upload",
|
|
223
|
+
kind: "mutation",
|
|
224
|
+
import: {
|
|
225
|
+
module: "@voltro/plugin-releases/rpc",
|
|
226
|
+
name: "uploadDescriptor"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
{
|
|
230
|
+
tag: "releases.promote",
|
|
231
|
+
kind: "mutation",
|
|
232
|
+
import: {
|
|
233
|
+
module: "@voltro/plugin-releases/rpc",
|
|
234
|
+
name: "promoteDescriptor"
|
|
235
|
+
}
|
|
236
|
+
},
|
|
237
|
+
{
|
|
238
|
+
tag: "releases.rollout",
|
|
239
|
+
kind: "mutation",
|
|
240
|
+
import: {
|
|
241
|
+
module: "@voltro/plugin-releases/rpc",
|
|
242
|
+
name: "rolloutDescriptor"
|
|
243
|
+
}
|
|
244
|
+
},
|
|
245
|
+
{
|
|
246
|
+
tag: "releases.rollback",
|
|
247
|
+
kind: "mutation",
|
|
248
|
+
import: {
|
|
249
|
+
module: "@voltro/plugin-releases/rpc",
|
|
250
|
+
name: "rollbackDescriptor"
|
|
251
|
+
}
|
|
252
|
+
},
|
|
253
|
+
{
|
|
254
|
+
tag: "releases.setPolicy",
|
|
255
|
+
kind: "mutation",
|
|
256
|
+
import: {
|
|
257
|
+
module: "@voltro/plugin-releases/rpc",
|
|
258
|
+
name: "setPolicyDescriptor"
|
|
259
|
+
}
|
|
260
|
+
}
|
|
261
|
+
];
|
|
262
|
+
//#endregion
|
|
263
|
+
export { m as BASE_NAME, _ as PolicySchema, h as RELEASES_MANAGE_SCOPE, y as ReleaseSummarySchema, O as ReleaseUploadPreparationInput, S as createDescriptor, b as listDescriptor, v as policyDescriptor, k as prepareUploadDescriptor, j as promoteDescriptor, x as registerAppDescriptor, F as releasesRpcClientImports, N as rollbackDescriptor, M as rolloutDescriptor, P as setPolicyDescriptor, A as uploadDescriptor };
|