@trigger.dev/core 0.0.0-v3-canary-20240322220011 → 0.0.0-v3-canary-20240325170325
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/v3/index.d.mts +985 -416
- package/dist/v3/index.d.ts +985 -416
- package/dist/v3/index.js +356 -118
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +353 -119
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/otel/index.d.mts +0 -2
- package/dist/v3/otel/index.d.ts +0 -2
- package/dist/v3/otel/index.js +4 -13
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs +4 -5
- package/dist/v3/otel/index.mjs.map +1 -1
- package/package.json +11 -15
package/dist/v3/index.mjs
CHANGED
|
@@ -248,7 +248,8 @@ var BackgroundWorkerServerMessages = z.discriminatedUnion("type", [
|
|
|
248
248
|
id: z.string(),
|
|
249
249
|
image: z.string(),
|
|
250
250
|
envId: z.string(),
|
|
251
|
-
runId: z.string()
|
|
251
|
+
runId: z.string(),
|
|
252
|
+
version: z.string()
|
|
252
253
|
})
|
|
253
254
|
]);
|
|
254
255
|
var serverWebsocketMessages = {
|
|
@@ -348,17 +349,62 @@ var RateLimitOptions = z.discriminatedUnion("type", [
|
|
|
348
349
|
SlidingWindowRateLimit
|
|
349
350
|
]);
|
|
350
351
|
var RetryOptions = z.object({
|
|
352
|
+
/** The number of attempts before giving up */
|
|
351
353
|
maxAttempts: z.number().int().optional(),
|
|
354
|
+
/** The exponential factor to use when calculating the next retry time.
|
|
355
|
+
*
|
|
356
|
+
* Each subsequent retry will be calculated as `previousTimeout * factor`
|
|
357
|
+
*/
|
|
352
358
|
factor: z.number().optional(),
|
|
359
|
+
/** The minimum time to wait before retrying */
|
|
353
360
|
minTimeoutInMs: z.number().int().optional(),
|
|
361
|
+
/** The maximum time to wait before retrying */
|
|
354
362
|
maxTimeoutInMs: z.number().int().optional(),
|
|
363
|
+
/** Randomize the timeout between retries.
|
|
364
|
+
*
|
|
365
|
+
* This can be useful to prevent the thundering herd problem where all retries happen at the same time.
|
|
366
|
+
*/
|
|
355
367
|
randomize: z.boolean().optional()
|
|
356
368
|
});
|
|
357
369
|
var QueueOptions = z.object({
|
|
358
|
-
/**
|
|
359
|
-
|
|
370
|
+
/** You can define a shared queue and then pass the name in to your task.
|
|
371
|
+
*
|
|
372
|
+
* @example
|
|
373
|
+
*
|
|
374
|
+
* ```ts
|
|
375
|
+
* const myQueue = queue({
|
|
376
|
+
name: "my-queue",
|
|
377
|
+
concurrencyLimit: 1,
|
|
378
|
+
});
|
|
379
|
+
|
|
380
|
+
export const task1 = task({
|
|
381
|
+
id: "task-1",
|
|
382
|
+
queue: {
|
|
383
|
+
name: "my-queue",
|
|
384
|
+
},
|
|
385
|
+
run: async (payload: { message: string }) => {
|
|
386
|
+
// ...
|
|
387
|
+
},
|
|
388
|
+
});
|
|
389
|
+
|
|
390
|
+
export const task2 = task({
|
|
391
|
+
id: "task-2",
|
|
392
|
+
queue: {
|
|
393
|
+
name: "my-queue",
|
|
394
|
+
},
|
|
395
|
+
run: async (payload: { message: string }) => {
|
|
396
|
+
// ...
|
|
397
|
+
},
|
|
398
|
+
});
|
|
399
|
+
* ```
|
|
400
|
+
*/
|
|
401
|
+
name: z.string().optional(),
|
|
402
|
+
/** An optional property that specifies the maximum number of concurrent run executions.
|
|
403
|
+
*
|
|
404
|
+
* If this property is omitted, the task can potentially use up the full concurrency of an environment. */
|
|
360
405
|
concurrencyLimit: z.number().int().min(1).max(1e3).optional(),
|
|
361
|
-
|
|
406
|
+
/** @deprecated This feature is coming soon */
|
|
407
|
+
rateLimit: RateLimitOptions.optional()
|
|
362
408
|
});
|
|
363
409
|
var TaskMetadata = z.object({
|
|
364
410
|
id: z.string(),
|
|
@@ -435,10 +481,21 @@ var ProdChildToWorkerMessages = {
|
|
|
435
481
|
READY_TO_DISPOSE: {
|
|
436
482
|
message: z.undefined()
|
|
437
483
|
},
|
|
484
|
+
READY_FOR_CHECKPOINT: {
|
|
485
|
+
message: z.object({
|
|
486
|
+
version: z.literal("v1").default("v1")
|
|
487
|
+
})
|
|
488
|
+
},
|
|
489
|
+
CANCEL_CHECKPOINT: {
|
|
490
|
+
message: z.object({
|
|
491
|
+
version: z.literal("v1").default("v1")
|
|
492
|
+
})
|
|
493
|
+
},
|
|
438
494
|
WAIT_FOR_DURATION: {
|
|
439
495
|
message: z.object({
|
|
440
496
|
version: z.literal("v1").default("v1"),
|
|
441
|
-
ms: z.number()
|
|
497
|
+
ms: z.number(),
|
|
498
|
+
now: z.number()
|
|
442
499
|
}),
|
|
443
500
|
callback: z.object({
|
|
444
501
|
willCheckpointAndRestore: z.boolean()
|
|
@@ -447,14 +504,14 @@ var ProdChildToWorkerMessages = {
|
|
|
447
504
|
WAIT_FOR_TASK: {
|
|
448
505
|
message: z.object({
|
|
449
506
|
version: z.literal("v1").default("v1"),
|
|
450
|
-
|
|
507
|
+
friendlyId: z.string()
|
|
451
508
|
})
|
|
452
509
|
},
|
|
453
510
|
WAIT_FOR_BATCH: {
|
|
454
511
|
message: z.object({
|
|
455
512
|
version: z.literal("v1").default("v1"),
|
|
456
|
-
|
|
457
|
-
|
|
513
|
+
batchFriendlyId: z.string(),
|
|
514
|
+
runFriendlyIds: z.string().array()
|
|
458
515
|
})
|
|
459
516
|
},
|
|
460
517
|
UNCAUGHT_EXCEPTION: {
|
|
@@ -668,6 +725,11 @@ var Machine = z.object({
|
|
|
668
725
|
cpu: z.string().default("1").optional(),
|
|
669
726
|
memory: z.string().default("500Mi").optional()
|
|
670
727
|
});
|
|
728
|
+
var WaitReason = z.enum([
|
|
729
|
+
"WAIT_FOR_DURATION",
|
|
730
|
+
"WAIT_FOR_TASK",
|
|
731
|
+
"WAIT_FOR_BATCH"
|
|
732
|
+
]);
|
|
671
733
|
var ProviderToPlatformMessages = {
|
|
672
734
|
LOG: {
|
|
673
735
|
message: z.object({
|
|
@@ -698,7 +760,7 @@ var PlatformToProviderMessages = {
|
|
|
698
760
|
message: z.object({
|
|
699
761
|
version: z.literal("v1").default("v1"),
|
|
700
762
|
imageTag: z.string(),
|
|
701
|
-
|
|
763
|
+
shortCode: z.string(),
|
|
702
764
|
envId: z.string(),
|
|
703
765
|
apiKey: z.string(),
|
|
704
766
|
apiUrl: z.string()
|
|
@@ -729,13 +791,13 @@ var PlatformToProviderMessages = {
|
|
|
729
791
|
version: z.literal("v1").default("v1"),
|
|
730
792
|
checkpointId: z.string(),
|
|
731
793
|
runId: z.string(),
|
|
732
|
-
attemptId: z.string(),
|
|
733
794
|
type: z.enum([
|
|
734
795
|
"DOCKER",
|
|
735
796
|
"KUBERNETES"
|
|
736
797
|
]),
|
|
737
798
|
location: z.string(),
|
|
738
|
-
reason: z.string().optional()
|
|
799
|
+
reason: z.string().optional(),
|
|
800
|
+
imageRef: z.string()
|
|
739
801
|
})
|
|
740
802
|
},
|
|
741
803
|
DELETE: {
|
|
@@ -787,8 +849,8 @@ var CoordinatorToPlatformMessages = {
|
|
|
787
849
|
READY_FOR_EXECUTION: {
|
|
788
850
|
message: z.object({
|
|
789
851
|
version: z.literal("v1").default("v1"),
|
|
790
|
-
|
|
791
|
-
|
|
852
|
+
runId: z.string(),
|
|
853
|
+
totalCompletions: z.number()
|
|
792
854
|
}),
|
|
793
855
|
callback: z.discriminatedUnion("success", [
|
|
794
856
|
z.object({
|
|
@@ -803,19 +865,19 @@ var CoordinatorToPlatformMessages = {
|
|
|
803
865
|
READY_FOR_RESUME: {
|
|
804
866
|
message: z.object({
|
|
805
867
|
version: z.literal("v1").default("v1"),
|
|
806
|
-
|
|
807
|
-
type:
|
|
808
|
-
"WAIT_FOR_DURATION",
|
|
809
|
-
"WAIT_FOR_TASK",
|
|
810
|
-
"WAIT_FOR_BATCH"
|
|
811
|
-
])
|
|
868
|
+
attemptFriendlyId: z.string(),
|
|
869
|
+
type: WaitReason
|
|
812
870
|
})
|
|
813
871
|
},
|
|
814
872
|
TASK_RUN_COMPLETED: {
|
|
815
873
|
message: z.object({
|
|
816
874
|
version: z.literal("v1").default("v1"),
|
|
817
875
|
execution: ProdTaskRunExecution,
|
|
818
|
-
completion: TaskRunExecutionResult
|
|
876
|
+
completion: TaskRunExecutionResult,
|
|
877
|
+
checkpoint: z.object({
|
|
878
|
+
docker: z.boolean(),
|
|
879
|
+
location: z.string()
|
|
880
|
+
}).optional()
|
|
819
881
|
})
|
|
820
882
|
},
|
|
821
883
|
TASK_HEARTBEAT: {
|
|
@@ -827,21 +889,23 @@ var CoordinatorToPlatformMessages = {
|
|
|
827
889
|
CHECKPOINT_CREATED: {
|
|
828
890
|
message: z.object({
|
|
829
891
|
version: z.literal("v1").default("v1"),
|
|
830
|
-
|
|
892
|
+
attemptFriendlyId: z.string(),
|
|
831
893
|
docker: z.boolean(),
|
|
832
894
|
location: z.string(),
|
|
833
895
|
reason: z.discriminatedUnion("type", [
|
|
834
896
|
z.object({
|
|
835
897
|
type: z.literal("WAIT_FOR_DURATION"),
|
|
836
|
-
ms: z.number()
|
|
898
|
+
ms: z.number(),
|
|
899
|
+
now: z.number()
|
|
837
900
|
}),
|
|
838
901
|
z.object({
|
|
839
902
|
type: z.literal("WAIT_FOR_BATCH"),
|
|
840
|
-
|
|
903
|
+
batchFriendlyId: z.string(),
|
|
904
|
+
runFriendlyIds: z.string().array()
|
|
841
905
|
}),
|
|
842
906
|
z.object({
|
|
843
907
|
type: z.literal("WAIT_FOR_TASK"),
|
|
844
|
-
|
|
908
|
+
friendlyId: z.string()
|
|
845
909
|
}),
|
|
846
910
|
z.object({
|
|
847
911
|
type: z.literal("RETRYING_AFTER_FAILURE"),
|
|
@@ -863,10 +927,12 @@ var CoordinatorToPlatformMessages = {
|
|
|
863
927
|
}
|
|
864
928
|
};
|
|
865
929
|
var PlatformToCoordinatorMessages = {
|
|
866
|
-
|
|
930
|
+
RESUME_AFTER_DEPENDENCY: {
|
|
867
931
|
message: z.object({
|
|
868
932
|
version: z.literal("v1").default("v1"),
|
|
933
|
+
runId: z.string(),
|
|
869
934
|
attemptId: z.string(),
|
|
935
|
+
attemptFriendlyId: z.string(),
|
|
870
936
|
completions: TaskRunExecutionResult.array(),
|
|
871
937
|
executions: TaskRunExecution.array()
|
|
872
938
|
})
|
|
@@ -874,13 +940,21 @@ var PlatformToCoordinatorMessages = {
|
|
|
874
940
|
RESUME_AFTER_DURATION: {
|
|
875
941
|
message: z.object({
|
|
876
942
|
version: z.literal("v1").default("v1"),
|
|
877
|
-
attemptId: z.string()
|
|
943
|
+
attemptId: z.string(),
|
|
944
|
+
attemptFriendlyId: z.string()
|
|
878
945
|
})
|
|
879
946
|
},
|
|
880
947
|
REQUEST_ATTEMPT_CANCELLATION: {
|
|
881
948
|
message: z.object({
|
|
882
949
|
version: z.literal("v1").default("v1"),
|
|
883
|
-
attemptId: z.string()
|
|
950
|
+
attemptId: z.string(),
|
|
951
|
+
attemptFriendlyId: z.string()
|
|
952
|
+
})
|
|
953
|
+
},
|
|
954
|
+
READY_FOR_RETRY: {
|
|
955
|
+
message: z.object({
|
|
956
|
+
version: z.literal("v1").default("v1"),
|
|
957
|
+
runId: z.string()
|
|
884
958
|
})
|
|
885
959
|
}
|
|
886
960
|
};
|
|
@@ -947,19 +1021,25 @@ var ProdWorkerToCoordinatorMessages = {
|
|
|
947
1021
|
READY_FOR_EXECUTION: {
|
|
948
1022
|
message: z.object({
|
|
949
1023
|
version: z.literal("v1").default("v1"),
|
|
950
|
-
|
|
951
|
-
|
|
1024
|
+
runId: z.string(),
|
|
1025
|
+
totalCompletions: z.number()
|
|
952
1026
|
})
|
|
953
1027
|
},
|
|
954
1028
|
READY_FOR_RESUME: {
|
|
955
1029
|
message: z.object({
|
|
956
1030
|
version: z.literal("v1").default("v1"),
|
|
957
|
-
|
|
958
|
-
type:
|
|
959
|
-
|
|
960
|
-
|
|
961
|
-
|
|
962
|
-
|
|
1031
|
+
attemptFriendlyId: z.string(),
|
|
1032
|
+
type: WaitReason
|
|
1033
|
+
})
|
|
1034
|
+
},
|
|
1035
|
+
READY_FOR_CHECKPOINT: {
|
|
1036
|
+
message: z.object({
|
|
1037
|
+
version: z.literal("v1").default("v1")
|
|
1038
|
+
})
|
|
1039
|
+
},
|
|
1040
|
+
CANCEL_CHECKPOINT: {
|
|
1041
|
+
message: z.object({
|
|
1042
|
+
version: z.literal("v1").default("v1")
|
|
963
1043
|
})
|
|
964
1044
|
},
|
|
965
1045
|
TASK_HEARTBEAT: {
|
|
@@ -975,14 +1055,16 @@ var ProdWorkerToCoordinatorMessages = {
|
|
|
975
1055
|
completion: TaskRunExecutionResult
|
|
976
1056
|
}),
|
|
977
1057
|
callback: z.object({
|
|
978
|
-
|
|
1058
|
+
willCheckpointAndRestore: z.boolean(),
|
|
979
1059
|
shouldExit: z.boolean()
|
|
980
1060
|
})
|
|
981
1061
|
},
|
|
982
1062
|
WAIT_FOR_DURATION: {
|
|
983
1063
|
message: z.object({
|
|
984
1064
|
version: z.literal("v1").default("v1"),
|
|
985
|
-
ms: z.number()
|
|
1065
|
+
ms: z.number(),
|
|
1066
|
+
now: z.number(),
|
|
1067
|
+
attemptFriendlyId: z.string()
|
|
986
1068
|
}),
|
|
987
1069
|
callback: z.object({
|
|
988
1070
|
willCheckpointAndRestore: z.boolean()
|
|
@@ -991,7 +1073,9 @@ var ProdWorkerToCoordinatorMessages = {
|
|
|
991
1073
|
WAIT_FOR_TASK: {
|
|
992
1074
|
message: z.object({
|
|
993
1075
|
version: z.literal("v1").default("v1"),
|
|
994
|
-
|
|
1076
|
+
friendlyId: z.string(),
|
|
1077
|
+
// This is the attempt that is waiting
|
|
1078
|
+
attemptFriendlyId: z.string()
|
|
995
1079
|
}),
|
|
996
1080
|
callback: z.object({
|
|
997
1081
|
willCheckpointAndRestore: z.boolean()
|
|
@@ -1000,8 +1084,10 @@ var ProdWorkerToCoordinatorMessages = {
|
|
|
1000
1084
|
WAIT_FOR_BATCH: {
|
|
1001
1085
|
message: z.object({
|
|
1002
1086
|
version: z.literal("v1").default("v1"),
|
|
1003
|
-
|
|
1004
|
-
|
|
1087
|
+
batchFriendlyId: z.string(),
|
|
1088
|
+
runFriendlyIds: z.string().array(),
|
|
1089
|
+
// This is the attempt that is waiting
|
|
1090
|
+
attemptFriendlyId: z.string()
|
|
1005
1091
|
}),
|
|
1006
1092
|
callback: z.object({
|
|
1007
1093
|
willCheckpointAndRestore: z.boolean()
|
|
@@ -1020,7 +1106,7 @@ var ProdWorkerToCoordinatorMessages = {
|
|
|
1020
1106
|
}
|
|
1021
1107
|
};
|
|
1022
1108
|
var CoordinatorToProdWorkerMessages = {
|
|
1023
|
-
|
|
1109
|
+
RESUME_AFTER_DEPENDENCY: {
|
|
1024
1110
|
message: z.object({
|
|
1025
1111
|
version: z.literal("v1").default("v1"),
|
|
1026
1112
|
attemptId: z.string(),
|
|
@@ -1050,6 +1136,12 @@ var CoordinatorToProdWorkerMessages = {
|
|
|
1050
1136
|
message: z.object({
|
|
1051
1137
|
version: z.literal("v1").default("v1")
|
|
1052
1138
|
})
|
|
1139
|
+
},
|
|
1140
|
+
READY_FOR_RETRY: {
|
|
1141
|
+
message: z.object({
|
|
1142
|
+
version: z.literal("v1").default("v1"),
|
|
1143
|
+
runId: z.string()
|
|
1144
|
+
})
|
|
1053
1145
|
}
|
|
1054
1146
|
};
|
|
1055
1147
|
var ProdWorkerSocketData = z.object({
|
|
@@ -1057,9 +1149,10 @@ var ProdWorkerSocketData = z.object({
|
|
|
1057
1149
|
projectRef: z.string(),
|
|
1058
1150
|
envId: z.string(),
|
|
1059
1151
|
runId: z.string(),
|
|
1060
|
-
|
|
1152
|
+
attemptFriendlyId: z.string().optional(),
|
|
1061
1153
|
podName: z.string(),
|
|
1062
|
-
deploymentId: z.string()
|
|
1154
|
+
deploymentId: z.string(),
|
|
1155
|
+
deploymentVersion: z.string()
|
|
1063
1156
|
});
|
|
1064
1157
|
var PRIMARY_VARIANT = "primary";
|
|
1065
1158
|
var Variant = z.enum([
|
|
@@ -1193,12 +1286,22 @@ var FetchRetryStrategy = z.discriminatedUnion("strategy", [
|
|
|
1193
1286
|
FetchRetryHeadersStrategy,
|
|
1194
1287
|
FetchRetryBackoffStrategy
|
|
1195
1288
|
]);
|
|
1196
|
-
var
|
|
1289
|
+
var FetchRetryByStatusOptions = z.record(z.string(), FetchRetryStrategy);
|
|
1197
1290
|
var FetchTimeoutOptions = z.object({
|
|
1198
1291
|
/** The maximum time to wait for the request to complete. */
|
|
1199
1292
|
durationInMs: z.number().optional(),
|
|
1200
1293
|
retry: RetryOptions.optional()
|
|
1201
1294
|
});
|
|
1295
|
+
var FetchRetryOptions = z.object({
|
|
1296
|
+
/** The retrying strategy for specific status codes. */
|
|
1297
|
+
byStatus: FetchRetryByStatusOptions.optional(),
|
|
1298
|
+
/** The timeout options for the request. */
|
|
1299
|
+
timeout: RetryOptions.optional(),
|
|
1300
|
+
/**
|
|
1301
|
+
* The retrying strategy for connection errors.
|
|
1302
|
+
*/
|
|
1303
|
+
connectionError: RetryOptions.optional()
|
|
1304
|
+
});
|
|
1202
1305
|
var ExceptionEventProperties = z.object({
|
|
1203
1306
|
type: z.string().optional(),
|
|
1204
1307
|
message: z.string().optional(),
|
|
@@ -1237,6 +1340,18 @@ function isCancellationSpanEvent(event) {
|
|
|
1237
1340
|
return event.name === "cancellation";
|
|
1238
1341
|
}
|
|
1239
1342
|
__name(isCancellationSpanEvent, "isCancellationSpanEvent");
|
|
1343
|
+
var SpanMessagingEvent = z.object({
|
|
1344
|
+
system: z.string().optional(),
|
|
1345
|
+
client_id: z.string().optional(),
|
|
1346
|
+
operation: z.enum([
|
|
1347
|
+
"publish",
|
|
1348
|
+
"create",
|
|
1349
|
+
"receive",
|
|
1350
|
+
"deliver"
|
|
1351
|
+
]),
|
|
1352
|
+
message: z.any(),
|
|
1353
|
+
destination: z.string().optional()
|
|
1354
|
+
});
|
|
1240
1355
|
|
|
1241
1356
|
// src/zodfetch.ts
|
|
1242
1357
|
async function zodfetch(schema, url, requestInit) {
|
|
@@ -1317,9 +1432,9 @@ function flattenAttributes(obj, prefix) {
|
|
|
1317
1432
|
if (Array.isArray(value)) {
|
|
1318
1433
|
for (let i = 0; i < value.length; i++) {
|
|
1319
1434
|
if (typeof value[i] === "object" && value[i] !== null) {
|
|
1320
|
-
Object.assign(result, flattenAttributes(value[i], `${newPrefix}
|
|
1435
|
+
Object.assign(result, flattenAttributes(value[i], `${newPrefix}.[${i}]`));
|
|
1321
1436
|
} else {
|
|
1322
|
-
result[`${newPrefix}
|
|
1437
|
+
result[`${newPrefix}.[${i}]`] = value[i];
|
|
1323
1438
|
}
|
|
1324
1439
|
}
|
|
1325
1440
|
} else if (isRecord(value)) {
|
|
@@ -1338,32 +1453,45 @@ function isRecord(value) {
|
|
|
1338
1453
|
}
|
|
1339
1454
|
__name(isRecord, "isRecord");
|
|
1340
1455
|
function unflattenAttributes(obj) {
|
|
1341
|
-
if (
|
|
1456
|
+
if (typeof obj !== "object" || obj === null || Array.isArray(obj)) {
|
|
1342
1457
|
return obj;
|
|
1343
1458
|
}
|
|
1344
1459
|
const result = {};
|
|
1345
1460
|
for (const [key, value] of Object.entries(obj)) {
|
|
1346
|
-
const parts = key.split(".")
|
|
1461
|
+
const parts = key.split(".").reduce((acc, part) => {
|
|
1462
|
+
if (detectIsArrayIndex(part)) {
|
|
1463
|
+
acc.push(part);
|
|
1464
|
+
} else {
|
|
1465
|
+
acc.push(...part.split(/\.\[(.*?)\]/).filter(Boolean));
|
|
1466
|
+
}
|
|
1467
|
+
return acc;
|
|
1468
|
+
}, []);
|
|
1347
1469
|
let current = result;
|
|
1348
1470
|
for (let i = 0; i < parts.length - 1; i++) {
|
|
1349
1471
|
const part = parts[i];
|
|
1350
|
-
|
|
1351
|
-
|
|
1352
|
-
|
|
1353
|
-
|
|
1354
|
-
|
|
1355
|
-
}
|
|
1356
|
-
current = current[part];
|
|
1472
|
+
const isArray = detectIsArrayIndex(part);
|
|
1473
|
+
const cleanPart = isArray ? part.substring(1, part.length - 1) : part;
|
|
1474
|
+
const nextIsArray = detectIsArrayIndex(parts[i + 1]);
|
|
1475
|
+
if (!current[cleanPart]) {
|
|
1476
|
+
current[cleanPart] = nextIsArray ? [] : {};
|
|
1357
1477
|
}
|
|
1478
|
+
current = current[cleanPart];
|
|
1358
1479
|
}
|
|
1359
1480
|
const lastPart = parts[parts.length - 1];
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
}
|
|
1481
|
+
const cleanLastPart = detectIsArrayIndex(lastPart) ? parseInt(lastPart.substring(1, lastPart.length - 1), 10) : lastPart;
|
|
1482
|
+
current[cleanLastPart] = value;
|
|
1363
1483
|
}
|
|
1364
1484
|
return result;
|
|
1365
1485
|
}
|
|
1366
1486
|
__name(unflattenAttributes, "unflattenAttributes");
|
|
1487
|
+
function detectIsArrayIndex(key) {
|
|
1488
|
+
const match = key.match(/^\[(\d+)\]$/);
|
|
1489
|
+
if (match) {
|
|
1490
|
+
return true;
|
|
1491
|
+
}
|
|
1492
|
+
return false;
|
|
1493
|
+
}
|
|
1494
|
+
__name(detectIsArrayIndex, "detectIsArrayIndex");
|
|
1367
1495
|
function primitiveValueOrflattenedAttributes(obj, prefix) {
|
|
1368
1496
|
if (typeof obj === "string" || typeof obj === "number" || typeof obj === "boolean" || obj === null || obj === void 0) {
|
|
1369
1497
|
return obj;
|
|
@@ -1420,7 +1548,8 @@ var SemanticInternalAttributes = {
|
|
|
1420
1548
|
METADATA: "$metadata",
|
|
1421
1549
|
TRIGGER: "$trigger",
|
|
1422
1550
|
PAYLOAD: "$payload",
|
|
1423
|
-
|
|
1551
|
+
SHOW: "$show",
|
|
1552
|
+
SHOW_ACTIONS: "$show.actions",
|
|
1424
1553
|
WORKER_ID: "worker.id",
|
|
1425
1554
|
WORKER_VERSION: "worker.version",
|
|
1426
1555
|
CLI_VERSION: "cli.version",
|
|
@@ -1688,14 +1817,17 @@ var _ZodMessageHandler = class _ZodMessageHandler {
|
|
|
1688
1817
|
};
|
|
1689
1818
|
}
|
|
1690
1819
|
registerHandlers(emitter, logger2) {
|
|
1691
|
-
const log = logger2 ?? console
|
|
1820
|
+
const log = logger2 ?? console;
|
|
1692
1821
|
if (!__privateGet(this, _handlers)) {
|
|
1693
|
-
log("No handlers provided");
|
|
1822
|
+
log.info("No handlers provided");
|
|
1694
1823
|
return;
|
|
1695
1824
|
}
|
|
1696
1825
|
for (const eventName of Object.keys(__privateGet(this, _schema))) {
|
|
1697
1826
|
emitter.on(eventName, async (message, callback) => {
|
|
1698
|
-
log(`handling ${eventName}`,
|
|
1827
|
+
log.info(`handling ${eventName}`, {
|
|
1828
|
+
payload: message,
|
|
1829
|
+
hasCallback: !!callback
|
|
1830
|
+
});
|
|
1699
1831
|
let ack;
|
|
1700
1832
|
if ("payload" in message) {
|
|
1701
1833
|
ack = await this.handleMessage({
|
|
@@ -1813,27 +1945,37 @@ var _ZodSocketMessageHandler = class _ZodSocketMessageHandler {
|
|
|
1813
1945
|
};
|
|
1814
1946
|
}
|
|
1815
1947
|
registerHandlers(emitter, logger2) {
|
|
1816
|
-
const log = logger2 ?? console
|
|
1948
|
+
const log = logger2 ?? console;
|
|
1817
1949
|
if (!__privateGet(this, _handlers2)) {
|
|
1818
|
-
log("No handlers provided");
|
|
1950
|
+
log.info("No handlers provided");
|
|
1819
1951
|
return;
|
|
1820
1952
|
}
|
|
1821
1953
|
for (const eventName of Object.keys(__privateGet(this, _handlers2))) {
|
|
1822
1954
|
emitter.on(eventName, async (message, callback) => {
|
|
1823
|
-
log(`handling ${eventName}`,
|
|
1955
|
+
log.info(`handling ${eventName}`, {
|
|
1956
|
+
payload: message,
|
|
1957
|
+
hasCallback: !!callback
|
|
1958
|
+
});
|
|
1824
1959
|
let ack;
|
|
1825
|
-
|
|
1826
|
-
|
|
1827
|
-
|
|
1828
|
-
|
|
1829
|
-
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1833
|
-
|
|
1834
|
-
|
|
1835
|
-
|
|
1960
|
+
try {
|
|
1961
|
+
if ("payload" in message) {
|
|
1962
|
+
ack = await this.handleMessage({
|
|
1963
|
+
type: eventName,
|
|
1964
|
+
...message
|
|
1965
|
+
});
|
|
1966
|
+
} else {
|
|
1967
|
+
const { version, ...payload } = message;
|
|
1968
|
+
ack = await this.handleMessage({
|
|
1969
|
+
type: eventName,
|
|
1970
|
+
version,
|
|
1971
|
+
payload
|
|
1972
|
+
});
|
|
1973
|
+
}
|
|
1974
|
+
} catch (error) {
|
|
1975
|
+
log.error("Error while handling message", {
|
|
1976
|
+
error
|
|
1836
1977
|
});
|
|
1978
|
+
return;
|
|
1837
1979
|
}
|
|
1838
1980
|
if (callback && typeof callback === "function") {
|
|
1839
1981
|
callback(ack);
|
|
@@ -1904,7 +2046,9 @@ var _ZodSocketConnection = class _ZodSocketConnection {
|
|
|
1904
2046
|
},
|
|
1905
2047
|
extraHeaders: opts.extraHeaders
|
|
1906
2048
|
});
|
|
1907
|
-
__privateSet(this, _logger,
|
|
2049
|
+
__privateSet(this, _logger, new SimpleStructuredLogger(opts.namespace, LogLevel.info, {
|
|
2050
|
+
socketId: this.socket.id
|
|
2051
|
+
}));
|
|
1908
2052
|
__privateSet(this, _handler, new ZodSocketMessageHandler({
|
|
1909
2053
|
schema: opts.serverMessages,
|
|
1910
2054
|
handlers: opts.handlers
|
|
@@ -1915,19 +2059,22 @@ var _ZodSocketConnection = class _ZodSocketConnection {
|
|
|
1915
2059
|
socket: this.socket
|
|
1916
2060
|
}));
|
|
1917
2061
|
this.socket.on("connect_error", async (error) => {
|
|
1918
|
-
__privateGet(this, _logger).
|
|
2062
|
+
__privateGet(this, _logger).error(`connect_error: ${error}`);
|
|
1919
2063
|
if (opts.onError) {
|
|
1920
2064
|
await opts.onError(this.socket, error, __privateGet(this, _logger));
|
|
1921
2065
|
}
|
|
1922
2066
|
});
|
|
1923
2067
|
this.socket.on("connect", async () => {
|
|
1924
|
-
__privateGet(this, _logger).
|
|
2068
|
+
__privateGet(this, _logger).info("connect");
|
|
1925
2069
|
if (opts.onConnection) {
|
|
1926
2070
|
await opts.onConnection(this.socket, __privateGet(this, _handler), __privateGet(this, _sender2), __privateGet(this, _logger));
|
|
1927
2071
|
}
|
|
1928
2072
|
});
|
|
1929
2073
|
this.socket.on("disconnect", async (reason, description) => {
|
|
1930
|
-
__privateGet(this, _logger).
|
|
2074
|
+
__privateGet(this, _logger).info("disconnect", {
|
|
2075
|
+
reason,
|
|
2076
|
+
description
|
|
2077
|
+
});
|
|
1931
2078
|
if (opts.onDisconnect) {
|
|
1932
2079
|
await opts.onDisconnect(this.socket, reason, description, __privateGet(this, _logger));
|
|
1933
2080
|
}
|
|
@@ -1951,16 +2098,79 @@ _handler = new WeakMap();
|
|
|
1951
2098
|
_logger = new WeakMap();
|
|
1952
2099
|
__name(_ZodSocketConnection, "ZodSocketConnection");
|
|
1953
2100
|
var ZodSocketConnection = _ZodSocketConnection;
|
|
1954
|
-
function createLogger(prefix) {
|
|
1955
|
-
return (...args) => console.log(prefix, ...args);
|
|
1956
|
-
}
|
|
1957
|
-
__name(createLogger, "createLogger");
|
|
1958
2101
|
|
|
1959
2102
|
// src/v3/zodNamespace.ts
|
|
1960
|
-
var
|
|
2103
|
+
var LogLevel;
|
|
2104
|
+
(function(LogLevel2) {
|
|
2105
|
+
LogLevel2[LogLevel2["log"] = 0] = "log";
|
|
2106
|
+
LogLevel2[LogLevel2["error"] = 1] = "error";
|
|
2107
|
+
LogLevel2[LogLevel2["warn"] = 2] = "warn";
|
|
2108
|
+
LogLevel2[LogLevel2["info"] = 3] = "info";
|
|
2109
|
+
LogLevel2[LogLevel2["debug"] = 4] = "debug";
|
|
2110
|
+
})(LogLevel || (LogLevel = {}));
|
|
2111
|
+
var _structuredLog, structuredLog_fn;
|
|
2112
|
+
var _SimpleStructuredLogger = class _SimpleStructuredLogger {
|
|
2113
|
+
constructor(name, level = [
|
|
2114
|
+
"1",
|
|
2115
|
+
"true"
|
|
2116
|
+
].includes(process.env.DEBUG ?? "") ? LogLevel.debug : LogLevel.info, fields) {
|
|
2117
|
+
__privateAdd(this, _structuredLog);
|
|
2118
|
+
this.name = name;
|
|
2119
|
+
this.level = level;
|
|
2120
|
+
this.fields = fields;
|
|
2121
|
+
}
|
|
2122
|
+
child(fields, level) {
|
|
2123
|
+
return new _SimpleStructuredLogger(this.name, level, {
|
|
2124
|
+
...this.fields,
|
|
2125
|
+
...fields
|
|
2126
|
+
});
|
|
2127
|
+
}
|
|
2128
|
+
log(message, ...args) {
|
|
2129
|
+
if (this.level < LogLevel.log)
|
|
2130
|
+
return;
|
|
2131
|
+
__privateMethod(this, _structuredLog, structuredLog_fn).call(this, console.log, message, "log", ...args);
|
|
2132
|
+
}
|
|
2133
|
+
error(message, ...args) {
|
|
2134
|
+
if (this.level < LogLevel.error)
|
|
2135
|
+
return;
|
|
2136
|
+
__privateMethod(this, _structuredLog, structuredLog_fn).call(this, console.error, message, "error", ...args);
|
|
2137
|
+
}
|
|
2138
|
+
warn(message, ...args) {
|
|
2139
|
+
if (this.level < LogLevel.warn)
|
|
2140
|
+
return;
|
|
2141
|
+
__privateMethod(this, _structuredLog, structuredLog_fn).call(this, console.warn, message, "warn", ...args);
|
|
2142
|
+
}
|
|
2143
|
+
info(message, ...args) {
|
|
2144
|
+
if (this.level < LogLevel.info)
|
|
2145
|
+
return;
|
|
2146
|
+
__privateMethod(this, _structuredLog, structuredLog_fn).call(this, console.info, message, "info", ...args);
|
|
2147
|
+
}
|
|
2148
|
+
debug(message, ...args) {
|
|
2149
|
+
if (this.level < LogLevel.debug)
|
|
2150
|
+
return;
|
|
2151
|
+
__privateMethod(this, _structuredLog, structuredLog_fn).call(this, console.debug, message, "debug", ...args);
|
|
2152
|
+
}
|
|
2153
|
+
};
|
|
2154
|
+
_structuredLog = new WeakSet();
|
|
2155
|
+
structuredLog_fn = /* @__PURE__ */ __name(function(loggerFunction, message, level, ...args) {
|
|
2156
|
+
const structuredLog = {
|
|
2157
|
+
...args.length === 1 ? args[0] : args,
|
|
2158
|
+
...this.fields,
|
|
2159
|
+
timestamp: /* @__PURE__ */ new Date(),
|
|
2160
|
+
name: this.name,
|
|
2161
|
+
message,
|
|
2162
|
+
level
|
|
2163
|
+
};
|
|
2164
|
+
loggerFunction(JSON.stringify(structuredLog));
|
|
2165
|
+
}, "#structuredLog");
|
|
2166
|
+
__name(_SimpleStructuredLogger, "SimpleStructuredLogger");
|
|
2167
|
+
var SimpleStructuredLogger = _SimpleStructuredLogger;
|
|
2168
|
+
var _logger2, _handler2;
|
|
1961
2169
|
var _ZodNamespace = class _ZodNamespace {
|
|
1962
2170
|
constructor(opts) {
|
|
2171
|
+
__privateAdd(this, _logger2, void 0);
|
|
1963
2172
|
__privateAdd(this, _handler2, void 0);
|
|
2173
|
+
__privateSet(this, _logger2, opts.logger ?? new SimpleStructuredLogger(opts.name));
|
|
1964
2174
|
__privateSet(this, _handler2, new ZodSocketMessageHandler({
|
|
1965
2175
|
schema: opts.clientMessages,
|
|
1966
2176
|
handlers: opts.handlers
|
|
@@ -1982,7 +2192,10 @@ var _ZodNamespace = class _ZodNamespace {
|
|
|
1982
2192
|
});
|
|
1983
2193
|
if (opts.preAuth) {
|
|
1984
2194
|
this.namespace.use(async (socket, next) => {
|
|
1985
|
-
const logger2 =
|
|
2195
|
+
const logger2 = __privateGet(this, _logger2).child({
|
|
2196
|
+
socketId: socket.id,
|
|
2197
|
+
socketStage: "preAuth"
|
|
2198
|
+
});
|
|
1986
2199
|
if (typeof opts.preAuth === "function") {
|
|
1987
2200
|
await opts.preAuth(socket, next, logger2);
|
|
1988
2201
|
}
|
|
@@ -1990,34 +2203,43 @@ var _ZodNamespace = class _ZodNamespace {
|
|
|
1990
2203
|
}
|
|
1991
2204
|
if (opts.authToken) {
|
|
1992
2205
|
this.namespace.use((socket, next) => {
|
|
1993
|
-
const logger2 =
|
|
2206
|
+
const logger2 = __privateGet(this, _logger2).child({
|
|
2207
|
+
socketId: socket.id,
|
|
2208
|
+
socketStage: "auth"
|
|
2209
|
+
});
|
|
1994
2210
|
const { auth } = socket.handshake;
|
|
1995
2211
|
if (!("token" in auth)) {
|
|
1996
|
-
logger2("no token");
|
|
2212
|
+
logger2.error("no token");
|
|
1997
2213
|
return socket.disconnect(true);
|
|
1998
2214
|
}
|
|
1999
2215
|
if (auth.token !== opts.authToken) {
|
|
2000
|
-
logger2("invalid token");
|
|
2216
|
+
logger2.error("invalid token");
|
|
2001
2217
|
return socket.disconnect(true);
|
|
2002
2218
|
}
|
|
2003
|
-
logger2("success");
|
|
2219
|
+
logger2.info("success");
|
|
2004
2220
|
next();
|
|
2005
2221
|
});
|
|
2006
2222
|
}
|
|
2007
2223
|
if (opts.postAuth) {
|
|
2008
2224
|
this.namespace.use(async (socket, next) => {
|
|
2009
|
-
const logger2 =
|
|
2225
|
+
const logger2 = __privateGet(this, _logger2).child({
|
|
2226
|
+
socketId: socket.id,
|
|
2227
|
+
socketStage: "auth"
|
|
2228
|
+
});
|
|
2010
2229
|
if (typeof opts.postAuth === "function") {
|
|
2011
2230
|
await opts.postAuth(socket, next, logger2);
|
|
2012
2231
|
}
|
|
2013
2232
|
});
|
|
2014
2233
|
}
|
|
2015
2234
|
this.namespace.on("connection", async (socket) => {
|
|
2016
|
-
const logger2 =
|
|
2017
|
-
|
|
2235
|
+
const logger2 = __privateGet(this, _logger2).child({
|
|
2236
|
+
socketId: socket.id,
|
|
2237
|
+
socketStage: "connection"
|
|
2238
|
+
});
|
|
2239
|
+
logger2.info("connected");
|
|
2018
2240
|
__privateGet(this, _handler2).registerHandlers(socket, logger2);
|
|
2019
2241
|
socket.on("disconnect", async (reason, description) => {
|
|
2020
|
-
logger2("disconnect", {
|
|
2242
|
+
logger2.info("disconnect", {
|
|
2021
2243
|
reason,
|
|
2022
2244
|
description
|
|
2023
2245
|
});
|
|
@@ -2026,7 +2248,9 @@ var _ZodNamespace = class _ZodNamespace {
|
|
|
2026
2248
|
}
|
|
2027
2249
|
});
|
|
2028
2250
|
socket.on("error", async (error) => {
|
|
2029
|
-
logger2("error",
|
|
2251
|
+
logger2.error("error", {
|
|
2252
|
+
error
|
|
2253
|
+
});
|
|
2030
2254
|
if (opts.onError) {
|
|
2031
2255
|
await opts.onError(socket, error, logger2);
|
|
2032
2256
|
}
|
|
@@ -2040,13 +2264,10 @@ var _ZodNamespace = class _ZodNamespace {
|
|
|
2040
2264
|
return this.namespace.fetchSockets();
|
|
2041
2265
|
}
|
|
2042
2266
|
};
|
|
2267
|
+
_logger2 = new WeakMap();
|
|
2043
2268
|
_handler2 = new WeakMap();
|
|
2044
2269
|
__name(_ZodNamespace, "ZodNamespace");
|
|
2045
2270
|
var ZodNamespace = _ZodNamespace;
|
|
2046
|
-
function createLogger2(prefix) {
|
|
2047
|
-
return (...args) => console.log(prefix, ...args);
|
|
2048
|
-
}
|
|
2049
|
-
__name(createLogger2, "createLogger");
|
|
2050
2271
|
var messageSchema2 = z.object({
|
|
2051
2272
|
version: z.literal("v1").default("v1"),
|
|
2052
2273
|
type: z.string(),
|
|
@@ -2821,6 +3042,7 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
2821
3042
|
}
|
|
2822
3043
|
async waitForDuration(ms) {
|
|
2823
3044
|
let timeout;
|
|
3045
|
+
const now = Date.now();
|
|
2824
3046
|
const resolveAfterDuration = new Promise((resolve) => {
|
|
2825
3047
|
timeout = setTimeout(resolve, ms);
|
|
2826
3048
|
});
|
|
@@ -2835,13 +3057,19 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
2835
3057
|
};
|
|
2836
3058
|
});
|
|
2837
3059
|
const { willCheckpointAndRestore } = await this.ipc.sendWithAck("WAIT_FOR_DURATION", {
|
|
2838
|
-
ms
|
|
3060
|
+
ms,
|
|
3061
|
+
now
|
|
2839
3062
|
});
|
|
2840
3063
|
if (!willCheckpointAndRestore) {
|
|
2841
3064
|
await resolveAfterDuration;
|
|
2842
3065
|
return;
|
|
2843
3066
|
}
|
|
2844
|
-
|
|
3067
|
+
this.ipc.send("READY_FOR_CHECKPOINT", {});
|
|
3068
|
+
await Promise.race([
|
|
3069
|
+
waitForRestore,
|
|
3070
|
+
resolveAfterDuration
|
|
3071
|
+
]);
|
|
3072
|
+
this.ipc.send("CANCEL_CHECKPOINT", {});
|
|
2845
3073
|
clearTimeout(timeout);
|
|
2846
3074
|
}
|
|
2847
3075
|
resumeAfterRestore() {
|
|
@@ -2862,7 +3090,7 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
2862
3090
|
});
|
|
2863
3091
|
});
|
|
2864
3092
|
await this.ipc.send("WAIT_FOR_TASK", {
|
|
2865
|
-
|
|
3093
|
+
friendlyId: params.id
|
|
2866
3094
|
});
|
|
2867
3095
|
return await promise;
|
|
2868
3096
|
}
|
|
@@ -2882,8 +3110,8 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
2882
3110
|
});
|
|
2883
3111
|
}));
|
|
2884
3112
|
await this.ipc.send("WAIT_FOR_BATCH", {
|
|
2885
|
-
|
|
2886
|
-
|
|
3113
|
+
batchFriendlyId: params.id,
|
|
3114
|
+
runFriendlyIds: params.runs
|
|
2887
3115
|
});
|
|
2888
3116
|
const results = await promise;
|
|
2889
3117
|
return {
|
|
@@ -3176,6 +3404,16 @@ var defaultRetryOptions = {
|
|
|
3176
3404
|
maxTimeoutInMs: 6e4,
|
|
3177
3405
|
randomize: true
|
|
3178
3406
|
};
|
|
3407
|
+
({
|
|
3408
|
+
byStatus: {
|
|
3409
|
+
"429,408,409,5xx": {
|
|
3410
|
+
strategy: "backoff",
|
|
3411
|
+
...defaultRetryOptions
|
|
3412
|
+
}
|
|
3413
|
+
},
|
|
3414
|
+
connectionError: defaultRetryOptions,
|
|
3415
|
+
timeout: defaultRetryOptions
|
|
3416
|
+
});
|
|
3179
3417
|
function calculateNextRetryDelay(options, attempt) {
|
|
3180
3418
|
const opts = {
|
|
3181
3419
|
...defaultRetryOptions,
|
|
@@ -3747,21 +3985,17 @@ var TaskExecutor = _TaskExecutor;
|
|
|
3747
3985
|
// package.json
|
|
3748
3986
|
var dependencies = {
|
|
3749
3987
|
"@google-cloud/precise-date": "^4.0.0",
|
|
3750
|
-
"@opentelemetry/api": "^1.
|
|
3988
|
+
"@opentelemetry/api": "^1.8.0",
|
|
3751
3989
|
"@opentelemetry/api-logs": "^0.48.0",
|
|
3752
|
-
"@opentelemetry/
|
|
3753
|
-
"@opentelemetry/exporter-
|
|
3754
|
-
"@opentelemetry/
|
|
3755
|
-
"@opentelemetry/
|
|
3756
|
-
"@opentelemetry/
|
|
3757
|
-
"@opentelemetry/
|
|
3758
|
-
"@opentelemetry/
|
|
3759
|
-
"@opentelemetry/
|
|
3760
|
-
"@opentelemetry/
|
|
3761
|
-
"@opentelemetry/sdk-node": "^0.48.0",
|
|
3762
|
-
"@opentelemetry/sdk-trace-base": "^1.21.0",
|
|
3763
|
-
"@opentelemetry/sdk-trace-node": "^1.21.0",
|
|
3764
|
-
"@opentelemetry/semantic-conventions": "^1.21.0",
|
|
3990
|
+
"@opentelemetry/exporter-logs-otlp-http": "^0.49.1",
|
|
3991
|
+
"@opentelemetry/exporter-trace-otlp-http": "^0.49.1",
|
|
3992
|
+
"@opentelemetry/instrumentation": "^0.49.1",
|
|
3993
|
+
"@opentelemetry/resources": "^1.22.0",
|
|
3994
|
+
"@opentelemetry/sdk-logs": "^0.49.1",
|
|
3995
|
+
"@opentelemetry/sdk-node": "^0.49.1",
|
|
3996
|
+
"@opentelemetry/sdk-trace-base": "^1.22.0",
|
|
3997
|
+
"@opentelemetry/sdk-trace-node": "^1.22.0",
|
|
3998
|
+
"@opentelemetry/semantic-conventions": "^1.22.0",
|
|
3765
3999
|
"humanize-duration": "^3.27.3",
|
|
3766
4000
|
"socket.io": "^4.7.4",
|
|
3767
4001
|
"socket.io-client": "^4.7.4",
|
|
@@ -3786,6 +4020,6 @@ function parseBatchTriggerTaskRequestBody(body) {
|
|
|
3786
4020
|
}
|
|
3787
4021
|
__name(parseBatchTriggerTaskRequestBody, "parseBatchTriggerTaskRequestBody");
|
|
3788
4022
|
|
|
3789
|
-
export { ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, DevRuntimeManager, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, GetPersonalAccessTokenRequestSchema, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, ImageDetailsMetadata, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, Machine, OtelTaskLogger, OtherSpanEvent, PRIMARY_VARIANT, PlatformToCoordinatorMessages, PlatformToProviderMessages, ProdChildToWorkerMessages, ProdRuntimeManager, ProdTaskRunExecution, ProdTaskRunExecutionPayload, ProdWorkerSocketData, ProdWorkerToChildMessages, ProdWorkerToCoordinatorMessages, ProviderToPlatformMessages, QueueOptions, RateLimitOptions, RetryOptions, SemanticInternalAttributes, SharedQueueToClientMessages, SlidingWindowRateLimit, SpanEvent, SpanEvents, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskContextSpanProcessor, TaskEventStyle, TaskExecutor, TaskMetadata, TaskMetadataWithFilePath, TaskResource, TaskRun, TaskRunBuiltInError, TaskRunContext, TaskRunCustomErrorObject, TaskRunError, TaskRunErrorCodes, TaskRunExecution, TaskRunExecutionAttempt, TaskRunExecutionBatch, TaskRunExecutionEnvironment, TaskRunExecutionOrganization, TaskRunExecutionPayload, TaskRunExecutionProject, TaskRunExecutionQueue, TaskRunExecutionResult, TaskRunExecutionRetry, TaskRunExecutionTask, TaskRunFailedExecutionResult, TaskRunInternalError, TaskRunStringError, TaskRunSuccessfulExecutionResult, TracingSDK, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UncaughtExceptionMessage, WhoAmIResponseSchema, ZodIpcConnection, ZodMessageHandler, ZodMessageSchema, ZodMessageSender, ZodNamespace, ZodSocketConnection, ZodSocketMessageHandler, ZodSocketMessageSender, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculatePreciseDateHrTime, calculateResetAt2 as calculateResetAt, childToWorkerMessages, clientWebsocketMessages, correctErrorStackTrace, createErrorTaskError, defaultRetryOptions, detectDependencyVersion, eventFilterMatches, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, getEnvVar, iconStringForSeverity, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, parseBatchTriggerTaskRequestBody, parseError, parseTriggerTaskRequestBody, preciseDateOriginNow, primitiveValueOrflattenedAttributes, recordSpanException, runtime, serverWebsocketMessages, stringPatternMatchers, taskContextManager, unflattenAttributes, workerToChildMessages };
|
|
4023
|
+
export { ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, DevRuntimeManager, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, GetPersonalAccessTokenRequestSchema, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, ImageDetailsMetadata, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, LogLevel, Machine, OtelTaskLogger, OtherSpanEvent, PRIMARY_VARIANT, PlatformToCoordinatorMessages, PlatformToProviderMessages, ProdChildToWorkerMessages, ProdRuntimeManager, ProdTaskRunExecution, ProdTaskRunExecutionPayload, ProdWorkerSocketData, ProdWorkerToChildMessages, ProdWorkerToCoordinatorMessages, ProviderToPlatformMessages, QueueOptions, RateLimitOptions, RetryOptions, SemanticInternalAttributes, SharedQueueToClientMessages, SimpleStructuredLogger, SlidingWindowRateLimit, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskContextSpanProcessor, TaskEventStyle, TaskExecutor, TaskMetadata, TaskMetadataWithFilePath, TaskResource, TaskRun, TaskRunBuiltInError, TaskRunContext, TaskRunCustomErrorObject, TaskRunError, TaskRunErrorCodes, TaskRunExecution, TaskRunExecutionAttempt, TaskRunExecutionBatch, TaskRunExecutionEnvironment, TaskRunExecutionOrganization, TaskRunExecutionPayload, TaskRunExecutionProject, TaskRunExecutionQueue, TaskRunExecutionResult, TaskRunExecutionRetry, TaskRunExecutionTask, TaskRunFailedExecutionResult, TaskRunInternalError, TaskRunStringError, TaskRunSuccessfulExecutionResult, TracingSDK, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UncaughtExceptionMessage, WaitReason, WhoAmIResponseSchema, ZodIpcConnection, ZodMessageHandler, ZodMessageSchema, ZodMessageSender, ZodNamespace, ZodSocketConnection, ZodSocketMessageHandler, ZodSocketMessageSender, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculatePreciseDateHrTime, calculateResetAt2 as calculateResetAt, childToWorkerMessages, clientWebsocketMessages, correctErrorStackTrace, createErrorTaskError, defaultRetryOptions, detectDependencyVersion, eventFilterMatches, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, getEnvVar, iconStringForSeverity, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, parseBatchTriggerTaskRequestBody, parseError, parseTriggerTaskRequestBody, preciseDateOriginNow, primitiveValueOrflattenedAttributes, recordSpanException, runtime, serverWebsocketMessages, stringPatternMatchers, taskContextManager, unflattenAttributes, workerToChildMessages };
|
|
3790
4024
|
//# sourceMappingURL=out.js.map
|
|
3791
4025
|
//# sourceMappingURL=index.mjs.map
|