Make isRetry context property backwards compatible and add it to the TriggerContext type

This commit is contained in:
Eric Allam
2023-07-17 16:27:53 +01:00
parent fba8eec319
commit 69af845ad1
3 changed files with 7 additions and 2 deletions
+5
View File
@@ -0,0 +1,5 @@
---
"@trigger.dev/sdk": patch
---
Make isRetry context property backwards compatible and add it to the TriggerContext type
+1 -1
View File
@@ -307,7 +307,7 @@ export const RunJobBodySchema = z.object({
run: z.object({
id: z.string(),
isTest: z.boolean(),
isRetry: z.boolean(),
isRetry: z.boolean().default(false),
startedAt: z.coerce.date(),
}),
environment: z.object({
+1 -1
View File
@@ -19,7 +19,7 @@ export interface TriggerContext {
/** Organization metadata */
organization: { slug: string; id: string; title: string };
/** Run metadata */
run: { id: string; isTest: boolean; startedAt: Date };
run: { id: string; isTest: boolean; startedAt: Date; isRetry: boolean };
/** Event metadata */
event: { id: string; name: string; context: any; timestamp: Date };
/** Source metadata */