@trigger.dev/core 0.0.0-prerelease-20240920143613 → 0.0.0-prerelease-20240926084729
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/commonjs/v3/apiClient/core.js +18 -1
- package/dist/commonjs/v3/apiClient/core.js.map +1 -1
- package/dist/commonjs/v3/apiClient/index.d.ts +59 -48
- package/dist/commonjs/v3/apiClient/index.js +7 -2
- package/dist/commonjs/v3/apiClient/index.js.map +1 -1
- package/dist/commonjs/v3/apiClientManager/index.d.ts +5 -0
- package/dist/commonjs/v3/apiClientManager/index.js +28 -1
- package/dist/commonjs/v3/apiClientManager/index.js.map +1 -1
- package/dist/commonjs/v3/index.d.ts +1 -0
- package/dist/commonjs/v3/index.js +1 -0
- package/dist/commonjs/v3/index.js.map +1 -1
- package/dist/commonjs/v3/run-metadata-api.d.ts +2 -0
- package/dist/commonjs/v3/run-metadata-api.js +8 -0
- package/dist/commonjs/v3/run-metadata-api.js.map +1 -0
- package/dist/commonjs/v3/runMetadata/index.d.ts +14 -0
- package/dist/commonjs/v3/runMetadata/index.js +60 -0
- package/dist/commonjs/v3/runMetadata/index.js.map +1 -0
- package/dist/commonjs/v3/schemas/api.d.ts +308 -230
- package/dist/commonjs/v3/schemas/api.js +12 -1
- package/dist/commonjs/v3/schemas/api.js.map +1 -1
- package/dist/commonjs/v3/schemas/build.d.ts +52 -52
- package/dist/commonjs/v3/schemas/common.d.ts +109 -100
- package/dist/commonjs/v3/schemas/common.js +3 -1
- package/dist/commonjs/v3/schemas/common.js.map +1 -1
- package/dist/commonjs/v3/schemas/messages.d.ts +2221 -2104
- package/dist/commonjs/v3/schemas/resources.d.ts +28 -28
- package/dist/commonjs/v3/schemas/schemas.d.ts +276 -257
- package/dist/commonjs/v3/workers/taskExecutor.js +12 -8
- package/dist/commonjs/v3/workers/taskExecutor.js.map +1 -1
- package/dist/commonjs/version.js +1 -1
- package/dist/esm/v3/apiClient/core.js +18 -1
- package/dist/esm/v3/apiClient/core.js.map +1 -1
- package/dist/esm/v3/apiClient/index.d.ts +59 -48
- package/dist/esm/v3/apiClient/index.js +8 -3
- package/dist/esm/v3/apiClient/index.js.map +1 -1
- package/dist/esm/v3/apiClientManager/index.d.ts +5 -0
- package/dist/esm/v3/apiClientManager/index.js +26 -0
- package/dist/esm/v3/apiClientManager/index.js.map +1 -1
- package/dist/esm/v3/index.d.ts +1 -0
- package/dist/esm/v3/index.js +1 -0
- package/dist/esm/v3/index.js.map +1 -1
- package/dist/esm/v3/run-metadata-api.d.ts +2 -0
- package/dist/esm/v3/run-metadata-api.js +5 -0
- package/dist/esm/v3/run-metadata-api.js.map +1 -0
- package/dist/esm/v3/runMetadata/index.d.ts +14 -0
- package/dist/esm/v3/runMetadata/index.js +56 -0
- package/dist/esm/v3/runMetadata/index.js.map +1 -0
- package/dist/esm/v3/schemas/api.d.ts +308 -230
- package/dist/esm/v3/schemas/api.js +11 -0
- package/dist/esm/v3/schemas/api.js.map +1 -1
- package/dist/esm/v3/schemas/build.d.ts +52 -52
- package/dist/esm/v3/schemas/common.d.ts +109 -100
- package/dist/esm/v3/schemas/common.js +3 -1
- package/dist/esm/v3/schemas/common.js.map +1 -1
- package/dist/esm/v3/schemas/messages.d.ts +2183 -2066
- package/dist/esm/v3/schemas/resources.d.ts +28 -28
- package/dist/esm/v3/schemas/schemas.d.ts +276 -257
- package/dist/esm/v3/workers/taskExecutor.js +4 -0
- package/dist/esm/v3/workers/taskExecutor.js.map +1 -1
- package/dist/esm/version.js +1 -1
- package/package.json +1 -1
|
@@ -10,12 +10,12 @@ export declare const MachineConfig: z.ZodObject<{
|
|
|
10
10
|
memory: z.ZodOptional<z.ZodUnion<[z.ZodLiteral<0.25>, z.ZodLiteral<0.5>, z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>, z.ZodLiteral<8>]>>;
|
|
11
11
|
preset: z.ZodOptional<z.ZodEnum<["micro", "small-1x", "small-2x", "medium-1x", "medium-2x", "large-1x", "large-2x"]>>;
|
|
12
12
|
}, "strip", z.ZodTypeAny, {
|
|
13
|
-
cpu?:
|
|
14
|
-
memory?:
|
|
13
|
+
cpu?: 2 | 1 | 0.25 | 0.5 | 4 | undefined;
|
|
14
|
+
memory?: 2 | 1 | 0.25 | 0.5 | 4 | 8 | undefined;
|
|
15
15
|
preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
|
|
16
16
|
}, {
|
|
17
|
-
cpu?:
|
|
18
|
-
memory?:
|
|
17
|
+
cpu?: 2 | 1 | 0.25 | 0.5 | 4 | undefined;
|
|
18
|
+
memory?: 2 | 1 | 0.25 | 0.5 | 4 | 8 | undefined;
|
|
19
19
|
preset?: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x" | undefined;
|
|
20
20
|
}>;
|
|
21
21
|
export type MachineConfig = z.infer<typeof MachineConfig>;
|
|
@@ -25,14 +25,14 @@ export declare const MachinePreset: z.ZodObject<{
|
|
|
25
25
|
memory: z.ZodNumber;
|
|
26
26
|
centsPerMs: z.ZodNumber;
|
|
27
27
|
}, "strip", z.ZodTypeAny, {
|
|
28
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
29
28
|
cpu: number;
|
|
30
29
|
memory: number;
|
|
30
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
31
31
|
centsPerMs: number;
|
|
32
32
|
}, {
|
|
33
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
34
33
|
cpu: number;
|
|
35
34
|
memory: number;
|
|
35
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
36
36
|
centsPerMs: number;
|
|
37
37
|
}>;
|
|
38
38
|
export type MachinePreset = z.infer<typeof MachinePreset>;
|
|
@@ -173,14 +173,15 @@ export declare const TaskRun: z.ZodObject<{
|
|
|
173
173
|
costInCents: z.ZodDefault<z.ZodNumber>;
|
|
174
174
|
baseCostInCents: z.ZodDefault<z.ZodNumber>;
|
|
175
175
|
version: z.ZodOptional<z.ZodString>;
|
|
176
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
|
|
176
177
|
}, "strip", z.ZodTypeAny, {
|
|
177
|
-
payload: string;
|
|
178
178
|
id: string;
|
|
179
|
-
|
|
179
|
+
payload: string;
|
|
180
180
|
payloadType: string;
|
|
181
|
+
tags: string[];
|
|
181
182
|
isTest: boolean;
|
|
182
183
|
createdAt: Date;
|
|
183
|
-
|
|
184
|
+
startedAt: Date;
|
|
184
185
|
durationMs: number;
|
|
185
186
|
costInCents: number;
|
|
186
187
|
baseCostInCents: number;
|
|
@@ -188,12 +189,13 @@ export declare const TaskRun: z.ZodObject<{
|
|
|
188
189
|
idempotencyKey?: string | undefined;
|
|
189
190
|
maxAttempts?: number | undefined;
|
|
190
191
|
version?: string | undefined;
|
|
192
|
+
metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
|
|
191
193
|
}, {
|
|
192
|
-
payload: string;
|
|
193
194
|
id: string;
|
|
195
|
+
payload: string;
|
|
194
196
|
payloadType: string;
|
|
195
|
-
createdAt: Date;
|
|
196
197
|
tags: string[];
|
|
198
|
+
createdAt: Date;
|
|
197
199
|
context?: any;
|
|
198
200
|
isTest?: boolean | undefined;
|
|
199
201
|
startedAt?: Date | undefined;
|
|
@@ -203,6 +205,7 @@ export declare const TaskRun: z.ZodObject<{
|
|
|
203
205
|
costInCents?: number | undefined;
|
|
204
206
|
baseCostInCents?: number | undefined;
|
|
205
207
|
version?: string | undefined;
|
|
208
|
+
metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
|
|
206
209
|
}>;
|
|
207
210
|
export type TaskRun = z.infer<typeof TaskRun>;
|
|
208
211
|
export declare const TaskRunExecutionTask: z.ZodObject<{
|
|
@@ -356,14 +359,15 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
356
359
|
costInCents: z.ZodDefault<z.ZodNumber>;
|
|
357
360
|
baseCostInCents: z.ZodDefault<z.ZodNumber>;
|
|
358
361
|
version: z.ZodOptional<z.ZodString>;
|
|
362
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
|
|
359
363
|
}, "strip", z.ZodTypeAny, {
|
|
360
|
-
payload: string;
|
|
361
364
|
id: string;
|
|
362
|
-
|
|
365
|
+
payload: string;
|
|
363
366
|
payloadType: string;
|
|
367
|
+
tags: string[];
|
|
364
368
|
isTest: boolean;
|
|
365
369
|
createdAt: Date;
|
|
366
|
-
|
|
370
|
+
startedAt: Date;
|
|
367
371
|
durationMs: number;
|
|
368
372
|
costInCents: number;
|
|
369
373
|
baseCostInCents: number;
|
|
@@ -371,12 +375,13 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
371
375
|
idempotencyKey?: string | undefined;
|
|
372
376
|
maxAttempts?: number | undefined;
|
|
373
377
|
version?: string | undefined;
|
|
378
|
+
metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
|
|
374
379
|
}, {
|
|
375
|
-
payload: string;
|
|
376
380
|
id: string;
|
|
381
|
+
payload: string;
|
|
377
382
|
payloadType: string;
|
|
378
|
-
createdAt: Date;
|
|
379
383
|
tags: string[];
|
|
384
|
+
createdAt: Date;
|
|
380
385
|
context?: any;
|
|
381
386
|
isTest?: boolean | undefined;
|
|
382
387
|
startedAt?: Date | undefined;
|
|
@@ -386,6 +391,7 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
386
391
|
costInCents?: number | undefined;
|
|
387
392
|
baseCostInCents?: number | undefined;
|
|
388
393
|
version?: string | undefined;
|
|
394
|
+
metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
|
|
389
395
|
}>;
|
|
390
396
|
queue: z.ZodObject<{
|
|
391
397
|
id: z.ZodString;
|
|
@@ -452,25 +458,38 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
452
458
|
memory: z.ZodNumber;
|
|
453
459
|
centsPerMs: z.ZodNumber;
|
|
454
460
|
}, "strip", z.ZodTypeAny, {
|
|
455
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
456
461
|
cpu: number;
|
|
457
462
|
memory: number;
|
|
463
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
458
464
|
centsPerMs: number;
|
|
459
465
|
}, {
|
|
460
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
461
466
|
cpu: number;
|
|
462
467
|
memory: number;
|
|
468
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
463
469
|
centsPerMs: number;
|
|
464
470
|
}>>;
|
|
465
471
|
}, "strip", z.ZodTypeAny, {
|
|
466
|
-
|
|
467
|
-
|
|
472
|
+
task: {
|
|
473
|
+
id: string;
|
|
474
|
+
filePath: string;
|
|
475
|
+
exportName: string;
|
|
476
|
+
};
|
|
477
|
+
attempt: {
|
|
478
|
+
number: number;
|
|
479
|
+
status: string;
|
|
468
480
|
id: string;
|
|
469
481
|
startedAt: Date;
|
|
482
|
+
backgroundWorkerId: string;
|
|
483
|
+
backgroundWorkerTaskId: string;
|
|
484
|
+
};
|
|
485
|
+
run: {
|
|
486
|
+
id: string;
|
|
487
|
+
payload: string;
|
|
470
488
|
payloadType: string;
|
|
489
|
+
tags: string[];
|
|
471
490
|
isTest: boolean;
|
|
472
491
|
createdAt: Date;
|
|
473
|
-
|
|
492
|
+
startedAt: Date;
|
|
474
493
|
durationMs: number;
|
|
475
494
|
costInCents: number;
|
|
476
495
|
baseCostInCents: number;
|
|
@@ -478,6 +497,11 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
478
497
|
idempotencyKey?: string | undefined;
|
|
479
498
|
maxAttempts?: number | undefined;
|
|
480
499
|
version?: string | undefined;
|
|
500
|
+
metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
|
|
501
|
+
};
|
|
502
|
+
queue: {
|
|
503
|
+
name: string;
|
|
504
|
+
id: string;
|
|
481
505
|
};
|
|
482
506
|
environment: {
|
|
483
507
|
type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
|
|
@@ -495,6 +519,16 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
495
519
|
slug: string;
|
|
496
520
|
ref: string;
|
|
497
521
|
};
|
|
522
|
+
batch?: {
|
|
523
|
+
id: string;
|
|
524
|
+
} | undefined;
|
|
525
|
+
machine?: {
|
|
526
|
+
cpu: number;
|
|
527
|
+
memory: number;
|
|
528
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
529
|
+
centsPerMs: number;
|
|
530
|
+
} | undefined;
|
|
531
|
+
}, {
|
|
498
532
|
task: {
|
|
499
533
|
id: string;
|
|
500
534
|
filePath: string;
|
|
@@ -508,26 +542,12 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
508
542
|
backgroundWorkerId: string;
|
|
509
543
|
backgroundWorkerTaskId: string;
|
|
510
544
|
};
|
|
511
|
-
queue: {
|
|
512
|
-
name: string;
|
|
513
|
-
id: string;
|
|
514
|
-
};
|
|
515
|
-
batch?: {
|
|
516
|
-
id: string;
|
|
517
|
-
} | undefined;
|
|
518
|
-
machine?: {
|
|
519
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
520
|
-
cpu: number;
|
|
521
|
-
memory: number;
|
|
522
|
-
centsPerMs: number;
|
|
523
|
-
} | undefined;
|
|
524
|
-
}, {
|
|
525
545
|
run: {
|
|
526
|
-
payload: string;
|
|
527
546
|
id: string;
|
|
547
|
+
payload: string;
|
|
528
548
|
payloadType: string;
|
|
529
|
-
createdAt: Date;
|
|
530
549
|
tags: string[];
|
|
550
|
+
createdAt: Date;
|
|
531
551
|
context?: any;
|
|
532
552
|
isTest?: boolean | undefined;
|
|
533
553
|
startedAt?: Date | undefined;
|
|
@@ -537,6 +557,11 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
537
557
|
costInCents?: number | undefined;
|
|
538
558
|
baseCostInCents?: number | undefined;
|
|
539
559
|
version?: string | undefined;
|
|
560
|
+
metadata?: Record<string, import("../../schemas/json.js").DeserializedJson> | undefined;
|
|
561
|
+
};
|
|
562
|
+
queue: {
|
|
563
|
+
name: string;
|
|
564
|
+
id: string;
|
|
540
565
|
};
|
|
541
566
|
environment: {
|
|
542
567
|
type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
|
|
@@ -554,30 +579,13 @@ export declare const TaskRunExecution: z.ZodObject<{
|
|
|
554
579
|
slug: string;
|
|
555
580
|
ref: string;
|
|
556
581
|
};
|
|
557
|
-
task: {
|
|
558
|
-
id: string;
|
|
559
|
-
filePath: string;
|
|
560
|
-
exportName: string;
|
|
561
|
-
};
|
|
562
|
-
attempt: {
|
|
563
|
-
number: number;
|
|
564
|
-
status: string;
|
|
565
|
-
id: string;
|
|
566
|
-
startedAt: Date;
|
|
567
|
-
backgroundWorkerId: string;
|
|
568
|
-
backgroundWorkerTaskId: string;
|
|
569
|
-
};
|
|
570
|
-
queue: {
|
|
571
|
-
name: string;
|
|
572
|
-
id: string;
|
|
573
|
-
};
|
|
574
582
|
batch?: {
|
|
575
583
|
id: string;
|
|
576
584
|
} | undefined;
|
|
577
585
|
machine?: {
|
|
578
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
579
586
|
cpu: number;
|
|
580
587
|
memory: number;
|
|
588
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
581
589
|
centsPerMs: number;
|
|
582
590
|
} | undefined;
|
|
583
591
|
}>;
|
|
@@ -629,32 +637,33 @@ export declare const TaskRunContext: z.ZodObject<{
|
|
|
629
637
|
costInCents: z.ZodDefault<z.ZodNumber>;
|
|
630
638
|
baseCostInCents: z.ZodDefault<z.ZodNumber>;
|
|
631
639
|
version: z.ZodOptional<z.ZodString>;
|
|
632
|
-
|
|
640
|
+
metadata: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodType<import("../../schemas/json.js").DeserializedJson, z.ZodTypeDef, import("../../schemas/json.js").DeserializedJson>>>;
|
|
641
|
+
}, "payload" | "payloadType" | "metadata">, "strip", z.ZodTypeAny, {
|
|
633
642
|
id: string;
|
|
634
|
-
|
|
643
|
+
tags: string[];
|
|
635
644
|
isTest: boolean;
|
|
636
645
|
createdAt: Date;
|
|
637
|
-
|
|
646
|
+
startedAt: Date;
|
|
638
647
|
durationMs: number;
|
|
639
648
|
costInCents: number;
|
|
640
649
|
baseCostInCents: number;
|
|
641
650
|
context?: any;
|
|
642
|
-
version?: string | undefined;
|
|
643
651
|
idempotencyKey?: string | undefined;
|
|
644
652
|
maxAttempts?: number | undefined;
|
|
653
|
+
version?: string | undefined;
|
|
645
654
|
}, {
|
|
646
655
|
id: string;
|
|
647
|
-
createdAt: Date;
|
|
648
656
|
tags: string[];
|
|
657
|
+
createdAt: Date;
|
|
649
658
|
context?: any;
|
|
650
|
-
|
|
659
|
+
isTest?: boolean | undefined;
|
|
651
660
|
startedAt?: Date | undefined;
|
|
652
661
|
idempotencyKey?: string | undefined;
|
|
653
|
-
isTest?: boolean | undefined;
|
|
654
662
|
maxAttempts?: number | undefined;
|
|
655
663
|
durationMs?: number | undefined;
|
|
656
664
|
costInCents?: number | undefined;
|
|
657
665
|
baseCostInCents?: number | undefined;
|
|
666
|
+
version?: string | undefined;
|
|
658
667
|
}>;
|
|
659
668
|
queue: z.ZodObject<{
|
|
660
669
|
id: z.ZodString;
|
|
@@ -721,30 +730,45 @@ export declare const TaskRunContext: z.ZodObject<{
|
|
|
721
730
|
memory: z.ZodNumber;
|
|
722
731
|
centsPerMs: z.ZodNumber;
|
|
723
732
|
}, "strip", z.ZodTypeAny, {
|
|
724
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
725
733
|
cpu: number;
|
|
726
734
|
memory: number;
|
|
735
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
727
736
|
centsPerMs: number;
|
|
728
737
|
}, {
|
|
729
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
730
738
|
cpu: number;
|
|
731
739
|
memory: number;
|
|
740
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
732
741
|
centsPerMs: number;
|
|
733
742
|
}>>;
|
|
734
743
|
}, "strip", z.ZodTypeAny, {
|
|
735
|
-
|
|
744
|
+
task: {
|
|
745
|
+
id: string;
|
|
746
|
+
filePath: string;
|
|
747
|
+
exportName: string;
|
|
748
|
+
};
|
|
749
|
+
attempt: {
|
|
750
|
+
number: number;
|
|
751
|
+
status: string;
|
|
736
752
|
id: string;
|
|
737
753
|
startedAt: Date;
|
|
754
|
+
};
|
|
755
|
+
run: {
|
|
756
|
+
id: string;
|
|
757
|
+
tags: string[];
|
|
738
758
|
isTest: boolean;
|
|
739
759
|
createdAt: Date;
|
|
740
|
-
|
|
760
|
+
startedAt: Date;
|
|
741
761
|
durationMs: number;
|
|
742
762
|
costInCents: number;
|
|
743
763
|
baseCostInCents: number;
|
|
744
764
|
context?: any;
|
|
745
|
-
version?: string | undefined;
|
|
746
765
|
idempotencyKey?: string | undefined;
|
|
747
766
|
maxAttempts?: number | undefined;
|
|
767
|
+
version?: string | undefined;
|
|
768
|
+
};
|
|
769
|
+
queue: {
|
|
770
|
+
name: string;
|
|
771
|
+
id: string;
|
|
748
772
|
};
|
|
749
773
|
environment: {
|
|
750
774
|
type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
|
|
@@ -762,6 +786,16 @@ export declare const TaskRunContext: z.ZodObject<{
|
|
|
762
786
|
slug: string;
|
|
763
787
|
ref: string;
|
|
764
788
|
};
|
|
789
|
+
batch?: {
|
|
790
|
+
id: string;
|
|
791
|
+
} | undefined;
|
|
792
|
+
machine?: {
|
|
793
|
+
cpu: number;
|
|
794
|
+
memory: number;
|
|
795
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
796
|
+
centsPerMs: number;
|
|
797
|
+
} | undefined;
|
|
798
|
+
}, {
|
|
765
799
|
task: {
|
|
766
800
|
id: string;
|
|
767
801
|
filePath: string;
|
|
@@ -773,33 +807,23 @@ export declare const TaskRunContext: z.ZodObject<{
|
|
|
773
807
|
id: string;
|
|
774
808
|
startedAt: Date;
|
|
775
809
|
};
|
|
776
|
-
queue: {
|
|
777
|
-
name: string;
|
|
778
|
-
id: string;
|
|
779
|
-
};
|
|
780
|
-
batch?: {
|
|
781
|
-
id: string;
|
|
782
|
-
} | undefined;
|
|
783
|
-
machine?: {
|
|
784
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
785
|
-
cpu: number;
|
|
786
|
-
memory: number;
|
|
787
|
-
centsPerMs: number;
|
|
788
|
-
} | undefined;
|
|
789
|
-
}, {
|
|
790
810
|
run: {
|
|
791
811
|
id: string;
|
|
792
|
-
createdAt: Date;
|
|
793
812
|
tags: string[];
|
|
813
|
+
createdAt: Date;
|
|
794
814
|
context?: any;
|
|
795
|
-
|
|
815
|
+
isTest?: boolean | undefined;
|
|
796
816
|
startedAt?: Date | undefined;
|
|
797
817
|
idempotencyKey?: string | undefined;
|
|
798
|
-
isTest?: boolean | undefined;
|
|
799
818
|
maxAttempts?: number | undefined;
|
|
800
819
|
durationMs?: number | undefined;
|
|
801
820
|
costInCents?: number | undefined;
|
|
802
821
|
baseCostInCents?: number | undefined;
|
|
822
|
+
version?: string | undefined;
|
|
823
|
+
};
|
|
824
|
+
queue: {
|
|
825
|
+
name: string;
|
|
826
|
+
id: string;
|
|
803
827
|
};
|
|
804
828
|
environment: {
|
|
805
829
|
type: "PRODUCTION" | "STAGING" | "DEVELOPMENT" | "PREVIEW";
|
|
@@ -817,28 +841,13 @@ export declare const TaskRunContext: z.ZodObject<{
|
|
|
817
841
|
slug: string;
|
|
818
842
|
ref: string;
|
|
819
843
|
};
|
|
820
|
-
task: {
|
|
821
|
-
id: string;
|
|
822
|
-
filePath: string;
|
|
823
|
-
exportName: string;
|
|
824
|
-
};
|
|
825
|
-
attempt: {
|
|
826
|
-
number: number;
|
|
827
|
-
status: string;
|
|
828
|
-
id: string;
|
|
829
|
-
startedAt: Date;
|
|
830
|
-
};
|
|
831
|
-
queue: {
|
|
832
|
-
name: string;
|
|
833
|
-
id: string;
|
|
834
|
-
};
|
|
835
844
|
batch?: {
|
|
836
845
|
id: string;
|
|
837
846
|
} | undefined;
|
|
838
847
|
machine?: {
|
|
839
|
-
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
840
848
|
cpu: number;
|
|
841
849
|
memory: number;
|
|
850
|
+
name: "micro" | "small-1x" | "small-2x" | "medium-1x" | "medium-2x" | "large-1x" | "large-2x";
|
|
842
851
|
centsPerMs: number;
|
|
843
852
|
} | undefined;
|
|
844
853
|
}>;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { z } from "zod";
|
|
2
|
+
import { DeserializedJsonSchema } from "../../schemas/json.js";
|
|
2
3
|
// Defaults to 0.5
|
|
3
4
|
export const MachineCpu = z.union([
|
|
4
5
|
z.literal(0.25),
|
|
@@ -110,6 +111,7 @@ export const TaskRun = z.object({
|
|
|
110
111
|
costInCents: z.number().default(0),
|
|
111
112
|
baseCostInCents: z.number().default(0),
|
|
112
113
|
version: z.string().optional(),
|
|
114
|
+
metadata: z.record(DeserializedJsonSchema).optional(),
|
|
113
115
|
});
|
|
114
116
|
export const TaskRunExecutionTask = z.object({
|
|
115
117
|
id: z.string(),
|
|
@@ -164,7 +166,7 @@ export const TaskRunContext = z.object({
|
|
|
164
166
|
backgroundWorkerId: true,
|
|
165
167
|
backgroundWorkerTaskId: true,
|
|
166
168
|
}),
|
|
167
|
-
run: TaskRun.omit({ payload: true, payloadType: true }),
|
|
169
|
+
run: TaskRun.omit({ payload: true, payloadType: true, metadata: true }),
|
|
168
170
|
queue: TaskRunExecutionQueue,
|
|
169
171
|
environment: TaskRunExecutionEnvironment,
|
|
170
172
|
organization: TaskRunExecutionOrganization,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/v3/schemas/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"common.js","sourceRoot":"","sources":["../../../../src/v3/schemas/common.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,sBAAsB,EAAE,MAAM,uBAAuB,CAAC;AAE/D,kBAAkB;AAClB,MAAM,CAAC,MAAM,UAAU,GAAG,CAAC,CAAC,KAAK,CAAC;IAChC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC;IACf,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC;IACd,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;IACZ,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC;CACb,CAAC,CAAC;AAIH,gBAAgB;AACh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