@prave/shared 1.4.0 → 1.4.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.
|
@@ -220,6 +220,8 @@ export declare const runSchema: z.ZodObject<{
|
|
|
220
220
|
total_failures: number;
|
|
221
221
|
}>;
|
|
222
222
|
export type Run = z.infer<typeof runSchema>;
|
|
223
|
+
export declare const runEnvVarsSchema: z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>;
|
|
224
|
+
export type RunEnvVars = z.infer<typeof runEnvVarsSchema>;
|
|
223
225
|
export declare const createRunInputSchema: z.ZodObject<{
|
|
224
226
|
bundle_id: z.ZodString;
|
|
225
227
|
name: z.ZodString;
|
|
@@ -275,6 +277,7 @@ export declare const createRunInputSchema: z.ZodObject<{
|
|
|
275
277
|
}>]>;
|
|
276
278
|
timezone: z.ZodDefault<z.ZodString>;
|
|
277
279
|
timeout_seconds: z.ZodOptional<z.ZodNumber>;
|
|
280
|
+
env_vars: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>>;
|
|
278
281
|
}, "strip", z.ZodTypeAny, {
|
|
279
282
|
name: string;
|
|
280
283
|
bundle_id: string;
|
|
@@ -298,6 +301,7 @@ export declare const createRunInputSchema: z.ZodObject<{
|
|
|
298
301
|
cron_expr: string;
|
|
299
302
|
};
|
|
300
303
|
timeout_seconds?: number | undefined;
|
|
304
|
+
env_vars?: Record<string, string> | undefined;
|
|
301
305
|
}, {
|
|
302
306
|
name: string;
|
|
303
307
|
bundle_id: string;
|
|
@@ -321,6 +325,7 @@ export declare const createRunInputSchema: z.ZodObject<{
|
|
|
321
325
|
};
|
|
322
326
|
timezone?: string | undefined;
|
|
323
327
|
timeout_seconds?: number | undefined;
|
|
328
|
+
env_vars?: Record<string, string> | undefined;
|
|
324
329
|
}>;
|
|
325
330
|
export type CreateRunInput = z.infer<typeof createRunInputSchema>;
|
|
326
331
|
export declare const updateRunInputSchema: z.ZodObject<{
|
|
@@ -378,6 +383,7 @@ export declare const updateRunInputSchema: z.ZodObject<{
|
|
|
378
383
|
timezone: z.ZodOptional<z.ZodString>;
|
|
379
384
|
timeout_seconds: z.ZodOptional<z.ZodNumber>;
|
|
380
385
|
status: z.ZodOptional<z.ZodEnum<["active", "paused"]>>;
|
|
386
|
+
env_vars: z.ZodOptional<z.ZodEffects<z.ZodRecord<z.ZodString, z.ZodString>, Record<string, string>, Record<string, string>>>;
|
|
381
387
|
}, "strip", z.ZodTypeAny, {
|
|
382
388
|
status?: "active" | "paused" | undefined;
|
|
383
389
|
name?: string | undefined;
|
|
@@ -401,6 +407,7 @@ export declare const updateRunInputSchema: z.ZodObject<{
|
|
|
401
407
|
kind: "custom";
|
|
402
408
|
cron_expr: string;
|
|
403
409
|
} | undefined;
|
|
410
|
+
env_vars?: Record<string, string> | undefined;
|
|
404
411
|
}, {
|
|
405
412
|
status?: "active" | "paused" | undefined;
|
|
406
413
|
name?: string | undefined;
|
|
@@ -424,6 +431,7 @@ export declare const updateRunInputSchema: z.ZodObject<{
|
|
|
424
431
|
kind: "custom";
|
|
425
432
|
cron_expr: string;
|
|
426
433
|
} | undefined;
|
|
434
|
+
env_vars?: Record<string, string> | undefined;
|
|
427
435
|
}>;
|
|
428
436
|
export type UpdateRunInput = z.infer<typeof updateRunInputSchema>;
|
|
429
437
|
export declare const runExecutionSchema: z.ZodObject<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"run.schema.d.ts","sourceRoot":"","sources":["../../src/schemas/run.schema.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAEvB;;;;;;;;;;;GAWG;AAKH,eAAO,MAAM,cAAc,oEAOzB,CAAA;AACF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAKrD,eAAO,MAAM,qBAAqB,+DAMhC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G,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAEjE,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAS/B,CAAA;AACF,MAAM,MAAM,cAAc,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAA;AAGjE,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAgB7B,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,kBAAkB,CAAC,CAAA;AAO7D,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;EAK9B,CAAA;AACF,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,mBAAmB,CAAC,CAAA;AAG/D,MAAM,WAAW,aAAa;IAC5B,MAAM,EAAE,MAAM,CAAA;IACd,YAAY,EAAE,MAAM,CAAA;IACpB,YAAY,EAAE,MAAM,CAAA;CACrB"}
|
|
@@ -132,6 +132,16 @@ export const runSchema = z.object({
|
|
|
132
132
|
created_at: z.string().datetime(),
|
|
133
133
|
updated_at: z.string().datetime(),
|
|
134
134
|
});
|
|
135
|
+
// Env-vars dict accepted from the wizard. Keys must be valid POSIX env
|
|
136
|
+
// names; values are free-form strings. Capped at 50 entries to keep
|
|
137
|
+
// the encrypted blob under a few kB and prevent UI runaway.
|
|
138
|
+
export const runEnvVarsSchema = z
|
|
139
|
+
.record(z
|
|
140
|
+
.string()
|
|
141
|
+
.regex(/^[A-Za-z_][A-Za-z0-9_]*$/, 'Use POSIX env names: letters, digits, underscore.'), z.string().max(8_000))
|
|
142
|
+
.refine((o) => Object.keys(o).length <= 50, {
|
|
143
|
+
message: 'Max 50 env vars per run.',
|
|
144
|
+
});
|
|
135
145
|
export const createRunInputSchema = z.object({
|
|
136
146
|
bundle_id: z.string().uuid(),
|
|
137
147
|
name: z.string().min(1).max(120),
|
|
@@ -139,6 +149,7 @@ export const createRunInputSchema = z.object({
|
|
|
139
149
|
schedule: runScheduleInputSchema,
|
|
140
150
|
timezone: z.string().min(2).max(60).default('UTC'),
|
|
141
151
|
timeout_seconds: z.number().int().min(5).max(300).optional(),
|
|
152
|
+
env_vars: runEnvVarsSchema.optional(),
|
|
142
153
|
});
|
|
143
154
|
export const updateRunInputSchema = z.object({
|
|
144
155
|
name: z.string().min(1).max(120).optional(),
|
|
@@ -147,6 +158,8 @@ export const updateRunInputSchema = z.object({
|
|
|
147
158
|
timezone: z.string().optional(),
|
|
148
159
|
timeout_seconds: z.number().int().min(5).max(300).optional(),
|
|
149
160
|
status: z.enum(['active', 'paused']).optional(),
|
|
161
|
+
// Replace the full env-vars set. Passing `{}` clears them all.
|
|
162
|
+
env_vars: runEnvVarsSchema.optional(),
|
|
150
163
|
});
|
|
151
164
|
// ── Execution ────────────────────────────────────────────────────────
|
|
152
165
|
export const runExecutionSchema = z.object({
|