@trigger.dev/core 2.2.8 → 2.2.10
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/index.d.ts +239 -1050
- package/dist/index.js +14 -5
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -53,6 +53,7 @@ __export(src_exports, {
|
|
|
53
53
|
CommonMissingConnectionNotificationResolvedPayloadSchema: () => CommonMissingConnectionNotificationResolvedPayloadSchema,
|
|
54
54
|
CompleteTaskBodyInputSchema: () => CompleteTaskBodyInputSchema,
|
|
55
55
|
CompleteTaskBodyV2InputSchema: () => CompleteTaskBodyV2InputSchema,
|
|
56
|
+
ConcurrencyLimitOptionsSchema: () => ConcurrencyLimitOptionsSchema,
|
|
56
57
|
ConnectionAuthSchema: () => ConnectionAuthSchema,
|
|
57
58
|
CreateExternalConnectionBodySchema: () => CreateExternalConnectionBodySchema,
|
|
58
59
|
CreateRunResponseBodySchema: () => CreateRunResponseBodySchema,
|
|
@@ -761,7 +762,10 @@ var RunStatusSchema = import_zod10.z.union([
|
|
|
761
762
|
import_zod10.z.literal("ABORTED"),
|
|
762
763
|
import_zod10.z.literal("CANCELED"),
|
|
763
764
|
import_zod10.z.literal("UNRESOLVED_AUTH"),
|
|
764
|
-
import_zod10.z.literal("INVALID_PAYLOAD")
|
|
765
|
+
import_zod10.z.literal("INVALID_PAYLOAD"),
|
|
766
|
+
import_zod10.z.literal("EXECUTING"),
|
|
767
|
+
import_zod10.z.literal("WAITING_TO_CONTINUE"),
|
|
768
|
+
import_zod10.z.literal("WAITING_TO_EXECUTE")
|
|
765
769
|
]);
|
|
766
770
|
var RunTaskSchema = import_zod10.z.object({
|
|
767
771
|
/** The Task id */
|
|
@@ -1069,6 +1073,10 @@ var QueueOptionsSchema = import_zod12.z.object({
|
|
|
1069
1073
|
name: import_zod12.z.string(),
|
|
1070
1074
|
maxConcurrent: import_zod12.z.number().optional()
|
|
1071
1075
|
});
|
|
1076
|
+
var ConcurrencyLimitOptionsSchema = import_zod12.z.object({
|
|
1077
|
+
id: import_zod12.z.string(),
|
|
1078
|
+
limit: import_zod12.z.number()
|
|
1079
|
+
});
|
|
1072
1080
|
var JobMetadataSchema = import_zod12.z.object({
|
|
1073
1081
|
id: import_zod12.z.string(),
|
|
1074
1082
|
name: import_zod12.z.string(),
|
|
@@ -1082,7 +1090,8 @@ var JobMetadataSchema = import_zod12.z.object({
|
|
|
1082
1090
|
"initial",
|
|
1083
1091
|
"latest"
|
|
1084
1092
|
]),
|
|
1085
|
-
preprocessRuns: import_zod12.z.boolean()
|
|
1093
|
+
preprocessRuns: import_zod12.z.boolean(),
|
|
1094
|
+
concurrencyLimit: ConcurrencyLimitOptionsSchema.or(import_zod12.z.number().int().positive()).optional()
|
|
1086
1095
|
});
|
|
1087
1096
|
var SourceMetadataV1Schema = import_zod12.z.object({
|
|
1088
1097
|
version: import_zod12.z.literal("1"),
|
|
@@ -1172,7 +1181,7 @@ var EndpointIndexErrorSchema = import_zod12.z.object({
|
|
|
1172
1181
|
var IndexEndpointStatsSchema = import_zod12.z.object({
|
|
1173
1182
|
jobs: import_zod12.z.number(),
|
|
1174
1183
|
sources: import_zod12.z.number(),
|
|
1175
|
-
webhooks: import_zod12.z.number(),
|
|
1184
|
+
webhooks: import_zod12.z.number().optional(),
|
|
1176
1185
|
dynamicTriggers: import_zod12.z.number(),
|
|
1177
1186
|
dynamicSchedules: import_zod12.z.number(),
|
|
1178
1187
|
disabledJobs: import_zod12.z.number().default(0),
|
|
@@ -1546,7 +1555,6 @@ var RunTaskOptionsSchema = import_zod12.z.object({
|
|
|
1546
1555
|
/** A No Operation means that the code won't be executed. This is used internally to implement features like [io.wait()](https://trigger.dev/docs/sdk/io/wait). */
|
|
1547
1556
|
noop: import_zod12.z.boolean().default(false),
|
|
1548
1557
|
redact: RedactSchema.optional(),
|
|
1549
|
-
trigger: TriggerMetadataSchema.optional(),
|
|
1550
1558
|
parallel: import_zod12.z.boolean().optional()
|
|
1551
1559
|
});
|
|
1552
1560
|
var RunTaskBodyInputSchema = RunTaskOptionsSchema.extend({
|
|
@@ -2177,7 +2185,8 @@ async function requestFilterMatches(request, filter) {
|
|
|
2177
2185
|
if (!requestMethodMatches(clonedRequest.method, filter.method)) {
|
|
2178
2186
|
return false;
|
|
2179
2187
|
}
|
|
2180
|
-
|
|
2188
|
+
const headersObj = Object.fromEntries(clonedRequest.headers.entries());
|
|
2189
|
+
if (filter.headers && !eventFilterMatches(headersObj, filter.headers)) {
|
|
2181
2190
|
return false;
|
|
2182
2191
|
}
|
|
2183
2192
|
const searchParams = new URL(clonedRequest.url).searchParams;
|