@brimble/contracts 0.1.1 → 0.1.2
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/runner/enums.d.ts +17 -0
- package/dist/runner/enums.js +3 -1
- package/dist/runner/schemas.d.ts +32 -0
- package/dist/runner/schemas.js +6 -0
- package/package.json +1 -1
package/dist/runner/enums.d.ts
CHANGED
|
@@ -54,6 +54,23 @@ export declare const privateDependencyReason: z.ZodEnum<{
|
|
|
54
54
|
unreachable: "unreachable";
|
|
55
55
|
}>;
|
|
56
56
|
export type PrivateDependencyReason = z.infer<typeof privateDependencyReason>;
|
|
57
|
+
export declare const buildFailureCategory: z.ZodEnum<{
|
|
58
|
+
user: "user";
|
|
59
|
+
provider: "provider";
|
|
60
|
+
platform: "platform";
|
|
61
|
+
timeout: "timeout";
|
|
62
|
+
}>;
|
|
63
|
+
export type BuildFailureCategory = z.infer<typeof buildFailureCategory>;
|
|
64
|
+
export declare const buildProviderFailureReason: z.ZodEnum<{
|
|
65
|
+
unreachable: "unreachable";
|
|
66
|
+
timeout: "timeout";
|
|
67
|
+
auth: "auth";
|
|
68
|
+
billing: "billing";
|
|
69
|
+
capacity: "capacity";
|
|
70
|
+
config: "config";
|
|
71
|
+
paused: "paused";
|
|
72
|
+
}>;
|
|
73
|
+
export type BuildProviderFailureReason = z.infer<typeof buildProviderFailureReason>;
|
|
57
74
|
/** Mirrors runner ServiceStateAction (service:state). */
|
|
58
75
|
export declare const serviceStateAction: z.ZodEnum<{
|
|
59
76
|
stopped: "stopped";
|
package/dist/runner/enums.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.deployNotifyType = exports.deployStatusValue = exports.deployStatusEvent = exports.serviceRuntime = exports.serviceStateAction = exports.privateDependencyReason = exports.staleTempMode = exports.dockerCommand = exports.serviceType = exports.planType = exports.gitType = void 0;
|
|
3
|
+
exports.deployNotifyType = exports.deployStatusValue = exports.deployStatusEvent = exports.serviceRuntime = exports.serviceStateAction = exports.buildProviderFailureReason = exports.buildFailureCategory = exports.privateDependencyReason = exports.staleTempMode = exports.dockerCommand = exports.serviceType = exports.planType = exports.gitType = void 0;
|
|
4
4
|
const zod_1 = require("zod");
|
|
5
5
|
/** Mirrors @brimble/models GIT_TYPE. */
|
|
6
6
|
exports.gitType = zod_1.z.enum(['GITHUB', 'GITLAB', 'BITBUCKET', 'DOCKER', 'HUGGINGFACE', 'ORIGIN']);
|
|
@@ -14,6 +14,8 @@ exports.dockerCommand = zod_1.z.enum(['start', 'stop', 'restart', 'pause', 'unpa
|
|
|
14
14
|
exports.staleTempMode = zod_1.z.enum(['dry-run', 'on']);
|
|
15
15
|
/** Mirrors core PrivateDependencyProblemReason. */
|
|
16
16
|
exports.privateDependencyReason = zod_1.z.enum(['denied', 'dns', 'refused', 'unreachable']);
|
|
17
|
+
exports.buildFailureCategory = zod_1.z.enum(['user', 'provider', 'platform', 'timeout']);
|
|
18
|
+
exports.buildProviderFailureReason = zod_1.z.enum(['auth', 'billing', 'capacity', 'unreachable', 'config', 'timeout', 'paused']);
|
|
17
19
|
/** Mirrors runner ServiceStateAction (service:state). */
|
|
18
20
|
exports.serviceStateAction = zod_1.z.enum(['stopped', 'resumed']);
|
|
19
21
|
/** Mirrors runner ServiceRuntime (service:state). */
|
package/dist/runner/schemas.d.ts
CHANGED
|
@@ -220,6 +220,38 @@ export declare const deployCompletedSchema: z.ZodObject<{
|
|
|
220
220
|
host: z.ZodUnion<readonly [z.ZodString, z.ZodUnion<readonly [z.ZodIPv4, z.ZodIPv6]>]>;
|
|
221
221
|
port: z.ZodString;
|
|
222
222
|
}, z.core.$strip>>>;
|
|
223
|
+
build: z.ZodOptional<z.ZodObject<{
|
|
224
|
+
provider: z.ZodString;
|
|
225
|
+
fallback: z.ZodOptional<z.ZodObject<{
|
|
226
|
+
from: z.ZodString;
|
|
227
|
+
reason: z.ZodEnum<{
|
|
228
|
+
unreachable: "unreachable";
|
|
229
|
+
timeout: "timeout";
|
|
230
|
+
auth: "auth";
|
|
231
|
+
billing: "billing";
|
|
232
|
+
capacity: "capacity";
|
|
233
|
+
config: "config";
|
|
234
|
+
paused: "paused";
|
|
235
|
+
}>;
|
|
236
|
+
}, z.core.$strip>>;
|
|
237
|
+
failure: z.ZodOptional<z.ZodObject<{
|
|
238
|
+
category: z.ZodEnum<{
|
|
239
|
+
user: "user";
|
|
240
|
+
provider: "provider";
|
|
241
|
+
platform: "platform";
|
|
242
|
+
timeout: "timeout";
|
|
243
|
+
}>;
|
|
244
|
+
reason: z.ZodOptional<z.ZodEnum<{
|
|
245
|
+
unreachable: "unreachable";
|
|
246
|
+
timeout: "timeout";
|
|
247
|
+
auth: "auth";
|
|
248
|
+
billing: "billing";
|
|
249
|
+
capacity: "capacity";
|
|
250
|
+
config: "config";
|
|
251
|
+
paused: "paused";
|
|
252
|
+
}>>;
|
|
253
|
+
}, z.core.$strip>>;
|
|
254
|
+
}, z.core.$strip>>;
|
|
223
255
|
}, z.core.$strip>;
|
|
224
256
|
/** `deploy:save` — runner -> core persistence of a finished deployment record. */
|
|
225
257
|
export declare const deploySaveSchema: z.ZodObject<{
|
package/dist/runner/schemas.js
CHANGED
|
@@ -183,6 +183,11 @@ const privateDependencyProblem = zod_1.z.object({
|
|
|
183
183
|
host: zod_1.z.union([common_1.domainName, common_1.ipAddress]),
|
|
184
184
|
port: zod_1.z.string().regex(/^\d{1,5}$/, 'must be a numeric port string'),
|
|
185
185
|
});
|
|
186
|
+
const buildOutcome = zod_1.z.object({
|
|
187
|
+
provider: common_1.nonEmptyString,
|
|
188
|
+
fallback: zod_1.z.object({ from: common_1.nonEmptyString, reason: enums_1.buildProviderFailureReason }).optional(),
|
|
189
|
+
failure: zod_1.z.object({ category: enums_1.buildFailureCategory, reason: enums_1.buildProviderFailureReason.optional() }).optional(),
|
|
190
|
+
});
|
|
186
191
|
/** `deploy:completed` — runner -> core completion signal. Primary and superseded paths share this string, so most fields are optional. */
|
|
187
192
|
exports.deployCompletedSchema = zod_1.z.object({
|
|
188
193
|
name: common_1.nonEmptyString.optional(),
|
|
@@ -197,6 +202,7 @@ exports.deployCompletedSchema = zod_1.z.object({
|
|
|
197
202
|
isSuperseded: zod_1.z.boolean().optional(),
|
|
198
203
|
upKeep: zod_1.z.boolean().optional(),
|
|
199
204
|
privateDependencies: zod_1.z.array(privateDependencyProblem).optional(),
|
|
205
|
+
build: buildOutcome.optional(),
|
|
200
206
|
});
|
|
201
207
|
/** `deploy:save` — runner -> core persistence of a finished deployment record. */
|
|
202
208
|
exports.deploySaveSchema = zod_1.z.object({
|