@trigger.dev/core 3.0.0-beta.0 → 3.0.0-beta.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.
- package/dist/v3/index.d.mts +622 -152
- package/dist/v3/index.d.ts +622 -152
- package/dist/v3/index.js +271 -108
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +264 -106
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/otel/index.js +22 -12
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs +24 -14
- package/dist/v3/otel/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/v3/index.mjs
CHANGED
|
@@ -7,15 +7,15 @@ import nodePath from 'node:path';
|
|
|
7
7
|
import { SeverityNumber, logs } from '@opentelemetry/api-logs';
|
|
8
8
|
import { PreciseDate } from '@google-cloud/precise-date';
|
|
9
9
|
import humanizeDuration from 'humanize-duration';
|
|
10
|
+
import { setTimeout as setTimeout$1 } from 'node:timers/promises';
|
|
10
11
|
import util from 'node:util';
|
|
11
12
|
import { OTLPLogExporter } from '@opentelemetry/exporter-logs-otlp-http';
|
|
12
13
|
import { OTLPTraceExporter } from '@opentelemetry/exporter-trace-otlp-http';
|
|
13
14
|
import { registerInstrumentations } from '@opentelemetry/instrumentation';
|
|
14
15
|
import { Resource, detectResourcesSync, processDetectorSync } from '@opentelemetry/resources';
|
|
15
|
-
import { LoggerProvider, SimpleLogRecordProcessor } from '@opentelemetry/sdk-logs';
|
|
16
|
-
import { NodeTracerProvider, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node';
|
|
16
|
+
import { LoggerProvider, BatchLogRecordProcessor, SimpleLogRecordProcessor } from '@opentelemetry/sdk-logs';
|
|
17
|
+
import { NodeTracerProvider, BatchSpanProcessor, SimpleSpanProcessor } from '@opentelemetry/sdk-trace-node';
|
|
17
18
|
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
|
|
18
|
-
import { parse, stringify, deserialize } from 'superjson';
|
|
19
19
|
|
|
20
20
|
var __defProp = Object.defineProperty;
|
|
21
21
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
@@ -217,6 +217,32 @@ var BatchTaskRunExecutionResult = z.object({
|
|
|
217
217
|
});
|
|
218
218
|
|
|
219
219
|
// src/v3/schemas/messages.ts
|
|
220
|
+
var EnvironmentType = z.enum([
|
|
221
|
+
"PRODUCTION",
|
|
222
|
+
"STAGING",
|
|
223
|
+
"DEVELOPMENT",
|
|
224
|
+
"PREVIEW"
|
|
225
|
+
]);
|
|
226
|
+
var MachineCpu = z.union([
|
|
227
|
+
z.literal(0.25),
|
|
228
|
+
z.literal(0.5),
|
|
229
|
+
z.literal(1),
|
|
230
|
+
z.literal(2),
|
|
231
|
+
z.literal(4)
|
|
232
|
+
]).default(0.5);
|
|
233
|
+
var MachineMemory = z.union([
|
|
234
|
+
z.literal(0.25),
|
|
235
|
+
z.literal(0.5),
|
|
236
|
+
z.literal(1),
|
|
237
|
+
z.literal(2),
|
|
238
|
+
z.literal(4),
|
|
239
|
+
z.literal(8)
|
|
240
|
+
]).default(1);
|
|
241
|
+
var Machine = z.object({
|
|
242
|
+
version: z.literal("v1").default("v1"),
|
|
243
|
+
cpu: MachineCpu,
|
|
244
|
+
memory: MachineMemory
|
|
245
|
+
});
|
|
220
246
|
var TaskRunExecutionPayload = z.object({
|
|
221
247
|
execution: TaskRunExecution,
|
|
222
248
|
traceContext: z.record(z.unknown()),
|
|
@@ -246,11 +272,16 @@ var BackgroundWorkerServerMessages = z.discriminatedUnion("type", [
|
|
|
246
272
|
}),
|
|
247
273
|
z.object({
|
|
248
274
|
type: z.literal("SCHEDULE_ATTEMPT"),
|
|
249
|
-
id: z.string(),
|
|
250
275
|
image: z.string(),
|
|
276
|
+
version: z.string(),
|
|
277
|
+
machine: Machine,
|
|
278
|
+
// identifiers
|
|
279
|
+
id: z.string(),
|
|
251
280
|
envId: z.string(),
|
|
252
|
-
|
|
253
|
-
|
|
281
|
+
envType: EnvironmentType,
|
|
282
|
+
orgId: z.string(),
|
|
283
|
+
projectId: z.string(),
|
|
284
|
+
runId: z.string()
|
|
254
285
|
})
|
|
255
286
|
]);
|
|
256
287
|
var serverWebsocketMessages = {
|
|
@@ -412,7 +443,8 @@ var TaskMetadata = z.object({
|
|
|
412
443
|
exportName: z.string(),
|
|
413
444
|
packageVersion: z.string(),
|
|
414
445
|
queue: QueueOptions.optional(),
|
|
415
|
-
retry: RetryOptions.optional()
|
|
446
|
+
retry: RetryOptions.optional(),
|
|
447
|
+
machine: Machine.partial().optional()
|
|
416
448
|
});
|
|
417
449
|
var TaskMetadataWithFilePath = TaskMetadata.extend({
|
|
418
450
|
filePath: z.string()
|
|
@@ -556,7 +588,8 @@ var TaskResource = z.object({
|
|
|
556
588
|
filePath: z.string(),
|
|
557
589
|
exportName: z.string(),
|
|
558
590
|
queue: QueueOptions.optional(),
|
|
559
|
-
retry: RetryOptions.optional()
|
|
591
|
+
retry: RetryOptions.optional(),
|
|
592
|
+
machine: Machine.partial().optional()
|
|
560
593
|
});
|
|
561
594
|
var BackgroundWorkerMetadata = z.object({
|
|
562
595
|
packageVersion: z.string(),
|
|
@@ -701,6 +734,14 @@ var GetDeploymentResponseBody = z.object({
|
|
|
701
734
|
var CreateUploadPayloadUrlResponseBody = z.object({
|
|
702
735
|
presignedUrl: z.string()
|
|
703
736
|
});
|
|
737
|
+
var PostStartCauses = z.enum([
|
|
738
|
+
"index",
|
|
739
|
+
"create",
|
|
740
|
+
"restore"
|
|
741
|
+
]);
|
|
742
|
+
var PreStopCauses = z.enum([
|
|
743
|
+
"terminate"
|
|
744
|
+
]);
|
|
704
745
|
var RegexSchema = z.custom((val) => {
|
|
705
746
|
try {
|
|
706
747
|
return typeof val.test === "function";
|
|
@@ -725,10 +766,6 @@ var Config = z.object({
|
|
|
725
766
|
RegexSchema
|
|
726
767
|
])).optional()
|
|
727
768
|
});
|
|
728
|
-
var Machine = z.object({
|
|
729
|
-
cpu: z.string().default("1").optional(),
|
|
730
|
-
memory: z.string().default("500Mi").optional()
|
|
731
|
-
});
|
|
732
769
|
var WaitReason = z.enum([
|
|
733
770
|
"WAIT_FOR_DURATION",
|
|
734
771
|
"WAIT_FOR_TASK",
|
|
@@ -765,9 +802,13 @@ var PlatformToProviderMessages = {
|
|
|
765
802
|
version: z.literal("v1").default("v1"),
|
|
766
803
|
imageTag: z.string(),
|
|
767
804
|
shortCode: z.string(),
|
|
768
|
-
envId: z.string(),
|
|
769
805
|
apiKey: z.string(),
|
|
770
|
-
apiUrl: z.string()
|
|
806
|
+
apiUrl: z.string(),
|
|
807
|
+
// identifiers
|
|
808
|
+
envId: z.string(),
|
|
809
|
+
envType: EnvironmentType,
|
|
810
|
+
orgId: z.string(),
|
|
811
|
+
projectId: z.string()
|
|
771
812
|
}),
|
|
772
813
|
callback: z.discriminatedUnion("success", [
|
|
773
814
|
z.object({
|
|
@@ -783,25 +824,25 @@ var PlatformToProviderMessages = {
|
|
|
783
824
|
})
|
|
784
825
|
])
|
|
785
826
|
},
|
|
786
|
-
|
|
787
|
-
message: z.object({
|
|
788
|
-
version: z.literal("v1").default("v1"),
|
|
789
|
-
name: z.string(),
|
|
790
|
-
machine: Machine
|
|
791
|
-
})
|
|
792
|
-
},
|
|
827
|
+
// TODO: this should be a shared queue message instead
|
|
793
828
|
RESTORE: {
|
|
794
829
|
message: z.object({
|
|
795
830
|
version: z.literal("v1").default("v1"),
|
|
796
|
-
checkpointId: z.string(),
|
|
797
|
-
runId: z.string(),
|
|
798
831
|
type: z.enum([
|
|
799
832
|
"DOCKER",
|
|
800
833
|
"KUBERNETES"
|
|
801
834
|
]),
|
|
802
835
|
location: z.string(),
|
|
803
836
|
reason: z.string().optional(),
|
|
804
|
-
imageRef: z.string()
|
|
837
|
+
imageRef: z.string(),
|
|
838
|
+
machine: Machine,
|
|
839
|
+
// identifiers
|
|
840
|
+
checkpointId: z.string(),
|
|
841
|
+
envId: z.string(),
|
|
842
|
+
envType: EnvironmentType,
|
|
843
|
+
orgId: z.string(),
|
|
844
|
+
projectId: z.string(),
|
|
845
|
+
runId: z.string()
|
|
805
846
|
})
|
|
806
847
|
},
|
|
807
848
|
DELETE: {
|
|
@@ -2043,16 +2084,23 @@ var _ZodSocketConnection = class _ZodSocketConnection {
|
|
|
2043
2084
|
__privateAdd(this, _sender2, void 0);
|
|
2044
2085
|
__privateAdd(this, _handler, void 0);
|
|
2045
2086
|
__privateAdd(this, _logger, void 0);
|
|
2046
|
-
|
|
2087
|
+
const uri = `${opts.secure ? "wss" : "ws"}://${opts.host}:${opts.port ?? (opts.secure ? "443" : "80")}/${opts.namespace}`;
|
|
2088
|
+
const logger2 = new SimpleStructuredLogger(opts.namespace, LogLevel.info);
|
|
2089
|
+
logger2.log("new zod socket", {
|
|
2090
|
+
uri
|
|
2091
|
+
});
|
|
2092
|
+
this.socket = io(uri, {
|
|
2047
2093
|
transports: [
|
|
2048
2094
|
"websocket"
|
|
2049
2095
|
],
|
|
2050
2096
|
auth: {
|
|
2051
2097
|
token: opts.authToken
|
|
2052
2098
|
},
|
|
2053
|
-
extraHeaders: opts.extraHeaders
|
|
2099
|
+
extraHeaders: opts.extraHeaders,
|
|
2100
|
+
reconnectionDelay: 500,
|
|
2101
|
+
reconnectionDelayMax: 1e3
|
|
2054
2102
|
});
|
|
2055
|
-
__privateSet(this, _logger,
|
|
2103
|
+
__privateSet(this, _logger, logger2.child({
|
|
2056
2104
|
socketId: this.socket.id
|
|
2057
2105
|
}));
|
|
2058
2106
|
__privateSet(this, _handler, new ZodSocketMessageHandler({
|
|
@@ -2709,24 +2757,54 @@ function iconStringForSeverity(severityNumber) {
|
|
|
2709
2757
|
}
|
|
2710
2758
|
}
|
|
2711
2759
|
__name(iconStringForSeverity, "iconStringForSeverity");
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2760
|
+
var _SimpleClock = class _SimpleClock {
|
|
2761
|
+
preciseNow() {
|
|
2762
|
+
const now = new PreciseDate();
|
|
2763
|
+
const nowStruct = now.toStruct();
|
|
2764
|
+
return [
|
|
2765
|
+
nowStruct.seconds,
|
|
2766
|
+
nowStruct.nanos
|
|
2767
|
+
];
|
|
2768
|
+
}
|
|
2769
|
+
reset() {
|
|
2770
|
+
}
|
|
2771
|
+
};
|
|
2772
|
+
__name(_SimpleClock, "SimpleClock");
|
|
2773
|
+
var SimpleClock = _SimpleClock;
|
|
2774
|
+
|
|
2775
|
+
// src/v3/clock/index.ts
|
|
2776
|
+
var API_NAME2 = "clock";
|
|
2777
|
+
var SIMPLE_CLOCK = new SimpleClock();
|
|
2778
|
+
var _getClock, getClock_fn;
|
|
2779
|
+
var _ClockAPI = class _ClockAPI {
|
|
2780
|
+
constructor() {
|
|
2781
|
+
__privateAdd(this, _getClock);
|
|
2782
|
+
}
|
|
2783
|
+
static getInstance() {
|
|
2784
|
+
if (!this._instance) {
|
|
2785
|
+
this._instance = new _ClockAPI();
|
|
2786
|
+
}
|
|
2787
|
+
return this._instance;
|
|
2788
|
+
}
|
|
2789
|
+
setGlobalClock(clock2) {
|
|
2790
|
+
return registerGlobal(API_NAME2, clock2);
|
|
2791
|
+
}
|
|
2792
|
+
preciseNow() {
|
|
2793
|
+
return __privateMethod(this, _getClock, getClock_fn).call(this).preciseNow();
|
|
2794
|
+
}
|
|
2795
|
+
reset() {
|
|
2796
|
+
__privateMethod(this, _getClock, getClock_fn).call(this).reset();
|
|
2797
|
+
}
|
|
2798
|
+
};
|
|
2799
|
+
_getClock = new WeakSet();
|
|
2800
|
+
getClock_fn = /* @__PURE__ */ __name(function() {
|
|
2801
|
+
return getGlobal(API_NAME2) ?? SIMPLE_CLOCK;
|
|
2802
|
+
}, "#getClock");
|
|
2803
|
+
__name(_ClockAPI, "ClockAPI");
|
|
2804
|
+
var ClockAPI = _ClockAPI;
|
|
2805
|
+
|
|
2806
|
+
// src/v3/clock-api.ts
|
|
2807
|
+
var clock = ClockAPI.getInstance();
|
|
2730
2808
|
|
|
2731
2809
|
// src/v3/logger/taskLogger.ts
|
|
2732
2810
|
var logLevels = [
|
|
@@ -2747,35 +2825,34 @@ var _OtelTaskLogger = class _OtelTaskLogger {
|
|
|
2747
2825
|
debug(message, properties) {
|
|
2748
2826
|
if (this._level < 4)
|
|
2749
2827
|
return;
|
|
2750
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "debug", SeverityNumber.DEBUG, properties);
|
|
2828
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "debug", SeverityNumber.DEBUG, properties);
|
|
2751
2829
|
}
|
|
2752
2830
|
log(message, properties) {
|
|
2753
2831
|
if (this._level < 2)
|
|
2754
2832
|
return;
|
|
2755
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "log", SeverityNumber.INFO, properties);
|
|
2833
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "log", SeverityNumber.INFO, properties);
|
|
2756
2834
|
}
|
|
2757
2835
|
info(message, properties) {
|
|
2758
2836
|
if (this._level < 3)
|
|
2759
2837
|
return;
|
|
2760
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "info", SeverityNumber.INFO, properties);
|
|
2838
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "info", SeverityNumber.INFO, properties);
|
|
2761
2839
|
}
|
|
2762
2840
|
warn(message, properties) {
|
|
2763
2841
|
if (this._level < 1)
|
|
2764
2842
|
return;
|
|
2765
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "warn", SeverityNumber.WARN, properties);
|
|
2843
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "warn", SeverityNumber.WARN, properties);
|
|
2766
2844
|
}
|
|
2767
2845
|
error(message, properties) {
|
|
2768
2846
|
if (this._level < 0)
|
|
2769
2847
|
return;
|
|
2770
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "error", SeverityNumber.ERROR, properties);
|
|
2848
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "error", SeverityNumber.ERROR, properties);
|
|
2771
2849
|
}
|
|
2772
2850
|
trace(name, fn, options) {
|
|
2773
2851
|
return this._config.tracer.startActiveSpan(name, fn, options);
|
|
2774
2852
|
}
|
|
2775
2853
|
};
|
|
2776
2854
|
_emitLog = new WeakSet();
|
|
2777
|
-
emitLog_fn = /* @__PURE__ */ __name(function(message, severityText, severityNumber, properties) {
|
|
2778
|
-
const timestamp = __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this);
|
|
2855
|
+
emitLog_fn = /* @__PURE__ */ __name(function(message, timestamp, severityText, severityNumber, properties) {
|
|
2779
2856
|
let attributes = {
|
|
2780
2857
|
...flattenAttributes(properties)
|
|
2781
2858
|
};
|
|
@@ -2793,7 +2870,7 @@ emitLog_fn = /* @__PURE__ */ __name(function(message, severityText, severityNumb
|
|
|
2793
2870
|
}, "#emitLog");
|
|
2794
2871
|
_getTimestampInHrTime = new WeakSet();
|
|
2795
2872
|
getTimestampInHrTime_fn = /* @__PURE__ */ __name(function() {
|
|
2796
|
-
return
|
|
2873
|
+
return clock.preciseNow();
|
|
2797
2874
|
}, "#getTimestampInHrTime");
|
|
2798
2875
|
__name(_OtelTaskLogger, "OtelTaskLogger");
|
|
2799
2876
|
var OtelTaskLogger = _OtelTaskLogger;
|
|
@@ -2816,7 +2893,7 @@ __name(_NoopTaskLogger, "NoopTaskLogger");
|
|
|
2816
2893
|
var NoopTaskLogger = _NoopTaskLogger;
|
|
2817
2894
|
|
|
2818
2895
|
// src/v3/logger/index.ts
|
|
2819
|
-
var
|
|
2896
|
+
var API_NAME3 = "logger";
|
|
2820
2897
|
var NOOP_TASK_LOGGER = new NoopTaskLogger();
|
|
2821
2898
|
var _getTaskLogger, getTaskLogger_fn;
|
|
2822
2899
|
var _LoggerAPI = class _LoggerAPI {
|
|
@@ -2830,10 +2907,10 @@ var _LoggerAPI = class _LoggerAPI {
|
|
|
2830
2907
|
return this._instance;
|
|
2831
2908
|
}
|
|
2832
2909
|
disable() {
|
|
2833
|
-
unregisterGlobal(
|
|
2910
|
+
unregisterGlobal(API_NAME3);
|
|
2834
2911
|
}
|
|
2835
2912
|
setGlobalTaskLogger(taskLogger) {
|
|
2836
|
-
return registerGlobal(
|
|
2913
|
+
return registerGlobal(API_NAME3, taskLogger);
|
|
2837
2914
|
}
|
|
2838
2915
|
debug(message, metadata) {
|
|
2839
2916
|
__privateMethod(this, _getTaskLogger, getTaskLogger_fn).call(this).debug(message, metadata);
|
|
@@ -2856,7 +2933,7 @@ var _LoggerAPI = class _LoggerAPI {
|
|
|
2856
2933
|
};
|
|
2857
2934
|
_getTaskLogger = new WeakSet();
|
|
2858
2935
|
getTaskLogger_fn = /* @__PURE__ */ __name(function() {
|
|
2859
|
-
return getGlobal(
|
|
2936
|
+
return getGlobal(API_NAME3) ?? NOOP_TASK_LOGGER;
|
|
2860
2937
|
}, "#getTaskLogger");
|
|
2861
2938
|
__name(_LoggerAPI, "LoggerAPI");
|
|
2862
2939
|
var LoggerAPI = _LoggerAPI;
|
|
@@ -3071,11 +3148,10 @@ var _DevRuntimeManager = class _DevRuntimeManager {
|
|
|
3071
3148
|
};
|
|
3072
3149
|
__name(_DevRuntimeManager, "DevRuntimeManager");
|
|
3073
3150
|
var DevRuntimeManager = _DevRuntimeManager;
|
|
3074
|
-
|
|
3075
|
-
// src/v3/runtime/prodRuntimeManager.ts
|
|
3076
3151
|
var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
3077
|
-
constructor(ipc) {
|
|
3152
|
+
constructor(ipc, options = {}) {
|
|
3078
3153
|
this.ipc = ipc;
|
|
3154
|
+
this.options = options;
|
|
3079
3155
|
this._taskWaits = /* @__PURE__ */ new Map();
|
|
3080
3156
|
this._batchWaits = /* @__PURE__ */ new Map();
|
|
3081
3157
|
this._tasks = /* @__PURE__ */ new Map();
|
|
@@ -3091,12 +3167,9 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
3091
3167
|
return this._tasks.get(id);
|
|
3092
3168
|
}
|
|
3093
3169
|
async waitForDuration(ms) {
|
|
3094
|
-
let timeout;
|
|
3095
3170
|
const now = Date.now();
|
|
3096
|
-
const resolveAfterDuration =
|
|
3097
|
-
|
|
3098
|
-
});
|
|
3099
|
-
if (ms < 1e4) {
|
|
3171
|
+
const resolveAfterDuration = setTimeout$1(ms, "duration");
|
|
3172
|
+
if (ms <= this.waitThresholdInMs) {
|
|
3100
3173
|
await resolveAfterDuration;
|
|
3101
3174
|
return;
|
|
3102
3175
|
}
|
|
@@ -3120,13 +3193,13 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
3120
3193
|
resolveAfterDuration
|
|
3121
3194
|
]);
|
|
3122
3195
|
this.ipc.send("CANCEL_CHECKPOINT", {});
|
|
3123
|
-
clearTimeout(timeout);
|
|
3124
3196
|
}
|
|
3125
3197
|
resumeAfterRestore() {
|
|
3126
3198
|
if (!this._waitForRestore) {
|
|
3127
3199
|
return;
|
|
3128
3200
|
}
|
|
3129
|
-
|
|
3201
|
+
clock.reset();
|
|
3202
|
+
this._waitForRestore.resolve("restore");
|
|
3130
3203
|
this._waitForRestore = void 0;
|
|
3131
3204
|
}
|
|
3132
3205
|
async waitUntil(date) {
|
|
@@ -3181,9 +3254,49 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
3181
3254
|
}
|
|
3182
3255
|
this._taskWaits.delete(execution.run.id);
|
|
3183
3256
|
}
|
|
3257
|
+
get waitThresholdInMs() {
|
|
3258
|
+
return this.options.waitThresholdInMs ?? 3e4;
|
|
3259
|
+
}
|
|
3184
3260
|
};
|
|
3185
3261
|
__name(_ProdRuntimeManager, "ProdRuntimeManager");
|
|
3186
3262
|
var ProdRuntimeManager = _ProdRuntimeManager;
|
|
3263
|
+
var _originClockTime, originClockTime_get, _originPreciseDate, originPreciseDate_get;
|
|
3264
|
+
var _PreciseWallClock = class _PreciseWallClock {
|
|
3265
|
+
constructor(options = {}) {
|
|
3266
|
+
__privateAdd(this, _originClockTime);
|
|
3267
|
+
__privateAdd(this, _originPreciseDate);
|
|
3268
|
+
this._origin = {
|
|
3269
|
+
clockTime: options.origin ?? process.hrtime(),
|
|
3270
|
+
preciseDate: options.now ?? new PreciseDate()
|
|
3271
|
+
};
|
|
3272
|
+
}
|
|
3273
|
+
preciseNow() {
|
|
3274
|
+
const elapsedHrTime = process.hrtime(__privateGet(this, _originClockTime, originClockTime_get));
|
|
3275
|
+
const elapsedNanoseconds = BigInt(elapsedHrTime[0]) * BigInt(1e9) + BigInt(elapsedHrTime[1]);
|
|
3276
|
+
const preciseDate = new PreciseDate(__privateGet(this, _originPreciseDate, originPreciseDate_get).getFullTime() + elapsedNanoseconds);
|
|
3277
|
+
const dateStruct = preciseDate.toStruct();
|
|
3278
|
+
return [
|
|
3279
|
+
dateStruct.seconds,
|
|
3280
|
+
dateStruct.nanos
|
|
3281
|
+
];
|
|
3282
|
+
}
|
|
3283
|
+
reset() {
|
|
3284
|
+
this._origin = {
|
|
3285
|
+
clockTime: process.hrtime(),
|
|
3286
|
+
preciseDate: new PreciseDate()
|
|
3287
|
+
};
|
|
3288
|
+
}
|
|
3289
|
+
};
|
|
3290
|
+
_originClockTime = new WeakSet();
|
|
3291
|
+
originClockTime_get = /* @__PURE__ */ __name(function() {
|
|
3292
|
+
return this._origin.clockTime;
|
|
3293
|
+
}, "#originClockTime");
|
|
3294
|
+
_originPreciseDate = new WeakSet();
|
|
3295
|
+
originPreciseDate_get = /* @__PURE__ */ __name(function() {
|
|
3296
|
+
return this._origin.preciseDate;
|
|
3297
|
+
}, "#originPreciseDate");
|
|
3298
|
+
__name(_PreciseWallClock, "PreciseWallClock");
|
|
3299
|
+
var PreciseWallClock = _PreciseWallClock;
|
|
3187
3300
|
var _TriggerTracer = class _TriggerTracer {
|
|
3188
3301
|
constructor(_config) {
|
|
3189
3302
|
this._config = _config;
|
|
@@ -3212,7 +3325,8 @@ var _TriggerTracer = class _TriggerTracer {
|
|
|
3212
3325
|
const attributes = options?.attributes ?? {};
|
|
3213
3326
|
return this.tracer.startActiveSpan(name, {
|
|
3214
3327
|
...options,
|
|
3215
|
-
attributes
|
|
3328
|
+
attributes,
|
|
3329
|
+
startTime: clock.preciseNow()
|
|
3216
3330
|
}, parentContext, async (span) => {
|
|
3217
3331
|
this.tracer.startSpan(name, {
|
|
3218
3332
|
...options,
|
|
@@ -3233,7 +3347,7 @@ var _TriggerTracer = class _TriggerTracer {
|
|
|
3233
3347
|
});
|
|
3234
3348
|
throw e;
|
|
3235
3349
|
} finally {
|
|
3236
|
-
span.end();
|
|
3350
|
+
span.end(clock.preciseNow());
|
|
3237
3351
|
}
|
|
3238
3352
|
});
|
|
3239
3353
|
}
|
|
@@ -3256,12 +3370,11 @@ __name(_TriggerTracer, "TriggerTracer");
|
|
|
3256
3370
|
var TriggerTracer = _TriggerTracer;
|
|
3257
3371
|
var _handleLog, handleLog_fn, _getTimestampInHrTime2, getTimestampInHrTime_fn2, _getAttributes, getAttributes_fn;
|
|
3258
3372
|
var _ConsoleInterceptor = class _ConsoleInterceptor {
|
|
3259
|
-
constructor(logger2
|
|
3373
|
+
constructor(logger2) {
|
|
3260
3374
|
__privateAdd(this, _handleLog);
|
|
3261
3375
|
__privateAdd(this, _getTimestampInHrTime2);
|
|
3262
3376
|
__privateAdd(this, _getAttributes);
|
|
3263
3377
|
this.logger = logger2;
|
|
3264
|
-
this.preciseDateOrigin = preciseDateOrigin;
|
|
3265
3378
|
}
|
|
3266
3379
|
// Intercept the console and send logs to the OpenTelemetry logger
|
|
3267
3380
|
// during the execution of the callback
|
|
@@ -3286,22 +3399,21 @@ var _ConsoleInterceptor = class _ConsoleInterceptor {
|
|
|
3286
3399
|
}
|
|
3287
3400
|
}
|
|
3288
3401
|
log(...args) {
|
|
3289
|
-
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.INFO, "Log", ...args);
|
|
3402
|
+
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.INFO, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Log", ...args);
|
|
3290
3403
|
}
|
|
3291
3404
|
info(...args) {
|
|
3292
|
-
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.INFO, "Info", ...args);
|
|
3405
|
+
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.INFO, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Info", ...args);
|
|
3293
3406
|
}
|
|
3294
3407
|
warn(...args) {
|
|
3295
|
-
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.WARN, "Warn", ...args);
|
|
3408
|
+
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.WARN, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Warn", ...args);
|
|
3296
3409
|
}
|
|
3297
3410
|
error(...args) {
|
|
3298
|
-
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.ERROR, "Error", ...args);
|
|
3411
|
+
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.ERROR, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Error", ...args);
|
|
3299
3412
|
}
|
|
3300
3413
|
};
|
|
3301
3414
|
_handleLog = new WeakSet();
|
|
3302
|
-
handleLog_fn = /* @__PURE__ */ __name(function(severityNumber, severityText, ...args) {
|
|
3415
|
+
handleLog_fn = /* @__PURE__ */ __name(function(severityNumber, timestamp, severityText, ...args) {
|
|
3303
3416
|
const body = util.format(...args);
|
|
3304
|
-
const timestamp = __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this);
|
|
3305
3417
|
const parsed = tryParseJSON(body);
|
|
3306
3418
|
if (parsed.ok) {
|
|
3307
3419
|
this.logger.emit({
|
|
@@ -3326,7 +3438,7 @@ handleLog_fn = /* @__PURE__ */ __name(function(severityNumber, severityText, ...
|
|
|
3326
3438
|
}, "#handleLog");
|
|
3327
3439
|
_getTimestampInHrTime2 = new WeakSet();
|
|
3328
3440
|
getTimestampInHrTime_fn2 = /* @__PURE__ */ __name(function() {
|
|
3329
|
-
return
|
|
3441
|
+
return clock.preciseNow();
|
|
3330
3442
|
}, "#getTimestampInHrTime");
|
|
3331
3443
|
_getAttributes = new WeakSet();
|
|
3332
3444
|
getAttributes_fn = /* @__PURE__ */ __name(function(severityNumber1) {
|
|
@@ -3712,7 +3824,12 @@ var _TracingSDK = class _TracingSDK {
|
|
|
3712
3824
|
url: `${config.url}/v1/traces`,
|
|
3713
3825
|
timeoutMillis: config.forceFlushTimeoutMillis ?? 1e3
|
|
3714
3826
|
});
|
|
3715
|
-
traceProvider.addSpanProcessor(new TaskContextSpanProcessor(new
|
|
3827
|
+
traceProvider.addSpanProcessor(new TaskContextSpanProcessor(getEnvVar("OTEL_BATCH_PROCESSING_ENABLED") === "1" ? new BatchSpanProcessor(spanExporter, {
|
|
3828
|
+
maxExportBatchSize: parseInt(getEnvVar("OTEL_SPAN_MAX_EXPORT_BATCH_SIZE") ?? "64"),
|
|
3829
|
+
scheduledDelayMillis: parseInt(getEnvVar("OTEL_SPAN_SCHEDULED_DELAY_MILLIS") ?? "200"),
|
|
3830
|
+
exportTimeoutMillis: parseInt(getEnvVar("OTEL_SPAN_EXPORT_TIMEOUT_MILLIS") ?? "30000"),
|
|
3831
|
+
maxQueueSize: parseInt(getEnvVar("OTEL_SPAN_MAX_QUEUE_SIZE") ?? "512")
|
|
3832
|
+
}) : new SimpleSpanProcessor(spanExporter)));
|
|
3716
3833
|
traceProvider.register();
|
|
3717
3834
|
registerInstrumentations({
|
|
3718
3835
|
instrumentations: config.instrumentations ?? [],
|
|
@@ -3728,7 +3845,12 @@ var _TracingSDK = class _TracingSDK {
|
|
|
3728
3845
|
attributeValueLengthLimit: OTEL_LOG_ATTRIBUTE_VALUE_LENGTH_LIMIT
|
|
3729
3846
|
}
|
|
3730
3847
|
});
|
|
3731
|
-
loggerProvider.addLogRecordProcessor(new TaskContextLogProcessor(new
|
|
3848
|
+
loggerProvider.addLogRecordProcessor(new TaskContextLogProcessor(getEnvVar("OTEL_BATCH_PROCESSING_ENABLED") === "1" ? new BatchLogRecordProcessor(logExporter, {
|
|
3849
|
+
maxExportBatchSize: parseInt(getEnvVar("OTEL_LOG_MAX_EXPORT_BATCH_SIZE") ?? "64"),
|
|
3850
|
+
scheduledDelayMillis: parseInt(getEnvVar("OTEL_LOG_SCHEDULED_DELAY_MILLIS") ?? "200"),
|
|
3851
|
+
exportTimeoutMillis: parseInt(getEnvVar("OTEL_LOG_EXPORT_TIMEOUT_MILLIS") ?? "30000"),
|
|
3852
|
+
maxQueueSize: parseInt(getEnvVar("OTEL_LOG_MAX_QUEUE_SIZE") ?? "512")
|
|
3853
|
+
}) : new SimpleLogRecordProcessor(logExporter)));
|
|
3732
3854
|
this._logProvider = loggerProvider;
|
|
3733
3855
|
this._spanExporter = spanExporter;
|
|
3734
3856
|
this._traceProvider = traceProvider;
|
|
@@ -3792,7 +3914,9 @@ function recordSpanException(span, error) {
|
|
|
3792
3914
|
});
|
|
3793
3915
|
}
|
|
3794
3916
|
__name(recordSpanException, "recordSpanException");
|
|
3795
|
-
|
|
3917
|
+
|
|
3918
|
+
// src/v3/utils/ioSerialization.ts
|
|
3919
|
+
async function parsePacket(value) {
|
|
3796
3920
|
if (!value.data) {
|
|
3797
3921
|
return void 0;
|
|
3798
3922
|
}
|
|
@@ -3800,6 +3924,7 @@ function parsePacket(value) {
|
|
|
3800
3924
|
case "application/json":
|
|
3801
3925
|
return JSON.parse(value.data);
|
|
3802
3926
|
case "application/super+json":
|
|
3927
|
+
const { parse } = await loadSuperJSON();
|
|
3803
3928
|
return parse(value.data);
|
|
3804
3929
|
case "text/plain":
|
|
3805
3930
|
return value.data;
|
|
@@ -3810,7 +3935,7 @@ function parsePacket(value) {
|
|
|
3810
3935
|
}
|
|
3811
3936
|
}
|
|
3812
3937
|
__name(parsePacket, "parsePacket");
|
|
3813
|
-
function stringifyIO(value) {
|
|
3938
|
+
async function stringifyIO(value) {
|
|
3814
3939
|
if (value === void 0) {
|
|
3815
3940
|
return {
|
|
3816
3941
|
dataType: "application/json"
|
|
@@ -3822,10 +3947,18 @@ function stringifyIO(value) {
|
|
|
3822
3947
|
dataType: "text/plain"
|
|
3823
3948
|
};
|
|
3824
3949
|
}
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
3950
|
+
try {
|
|
3951
|
+
const { stringify } = await loadSuperJSON();
|
|
3952
|
+
const data = stringify(value);
|
|
3953
|
+
return {
|
|
3954
|
+
data,
|
|
3955
|
+
dataType: "application/super+json"
|
|
3956
|
+
};
|
|
3957
|
+
} catch {
|
|
3958
|
+
return {
|
|
3959
|
+
dataType: "application/json"
|
|
3960
|
+
};
|
|
3961
|
+
}
|
|
3829
3962
|
}
|
|
3830
3963
|
__name(stringifyIO, "stringifyIO");
|
|
3831
3964
|
async function conditionallyExportPacket(packet, pathPrefix, tracer) {
|
|
@@ -3927,9 +4060,9 @@ async function importPacket(packet, span) {
|
|
|
3927
4060
|
return packet;
|
|
3928
4061
|
}
|
|
3929
4062
|
__name(importPacket, "importPacket");
|
|
3930
|
-
function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
4063
|
+
async function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
3931
4064
|
if (!packet.data) {
|
|
3932
|
-
return
|
|
4065
|
+
return;
|
|
3933
4066
|
}
|
|
3934
4067
|
switch (packet.dataType) {
|
|
3935
4068
|
case "application/json":
|
|
@@ -3938,12 +4071,20 @@ function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
|
3938
4071
|
[dataTypeKey]: packet.dataType
|
|
3939
4072
|
};
|
|
3940
4073
|
case "application/super+json":
|
|
3941
|
-
const
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
4074
|
+
const { parse } = await loadSuperJSON();
|
|
4075
|
+
if (typeof packet.data === "undefined" || packet.data === null) {
|
|
4076
|
+
return;
|
|
4077
|
+
}
|
|
4078
|
+
try {
|
|
4079
|
+
const parsed = parse(packet.data);
|
|
4080
|
+
const jsonified = JSON.parse(JSON.stringify(parsed, safeReplacer));
|
|
4081
|
+
return {
|
|
4082
|
+
...flattenAttributes(jsonified, dataKey),
|
|
4083
|
+
[dataTypeKey]: "application/json"
|
|
4084
|
+
};
|
|
4085
|
+
} catch {
|
|
4086
|
+
return;
|
|
4087
|
+
}
|
|
3947
4088
|
case "application/store":
|
|
3948
4089
|
return {
|
|
3949
4090
|
[dataKey]: packet.data,
|
|
@@ -3951,15 +4092,15 @@ function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
|
3951
4092
|
};
|
|
3952
4093
|
case "text/plain":
|
|
3953
4094
|
return {
|
|
3954
|
-
[
|
|
3955
|
-
[
|
|
4095
|
+
[dataKey]: packet.data,
|
|
4096
|
+
[dataTypeKey]: packet.dataType
|
|
3956
4097
|
};
|
|
3957
4098
|
default:
|
|
3958
|
-
return
|
|
4099
|
+
return;
|
|
3959
4100
|
}
|
|
3960
4101
|
}
|
|
3961
4102
|
__name(createPacketAttributes, "createPacketAttributes");
|
|
3962
|
-
function
|
|
4103
|
+
async function createPacketAttributesAsJson(data, dataType) {
|
|
3963
4104
|
if (typeof data === "string" || typeof data === "number" || typeof data === "boolean" || data === null || data === void 0) {
|
|
3964
4105
|
return data;
|
|
3965
4106
|
}
|
|
@@ -3967,8 +4108,9 @@ function createPackageAttributesAsJson(data, dataType) {
|
|
|
3967
4108
|
case "application/json":
|
|
3968
4109
|
return imposeAttributeLimits(flattenAttributes(data, void 0));
|
|
3969
4110
|
case "application/super+json":
|
|
4111
|
+
const { deserialize } = await loadSuperJSON();
|
|
3970
4112
|
const deserialized = deserialize(data);
|
|
3971
|
-
const jsonify =
|
|
4113
|
+
const jsonify = safeJsonParse(JSON.stringify(deserialized, safeReplacer));
|
|
3972
4114
|
return imposeAttributeLimits(flattenAttributes(jsonify, void 0));
|
|
3973
4115
|
case "application/store":
|
|
3974
4116
|
return data;
|
|
@@ -3976,13 +4118,14 @@ function createPackageAttributesAsJson(data, dataType) {
|
|
|
3976
4118
|
return {};
|
|
3977
4119
|
}
|
|
3978
4120
|
}
|
|
3979
|
-
__name(
|
|
3980
|
-
function prettyPrintPacket(rawData, dataType) {
|
|
4121
|
+
__name(createPacketAttributesAsJson, "createPacketAttributesAsJson");
|
|
4122
|
+
async function prettyPrintPacket(rawData, dataType) {
|
|
3981
4123
|
if (rawData === void 0) {
|
|
3982
4124
|
return "";
|
|
3983
4125
|
}
|
|
3984
4126
|
if (dataType === "application/super+json") {
|
|
3985
|
-
|
|
4127
|
+
const { deserialize } = await loadSuperJSON();
|
|
4128
|
+
return await prettyPrintPacket(deserialize(rawData), "application/json");
|
|
3986
4129
|
}
|
|
3987
4130
|
if (dataType === "application/json") {
|
|
3988
4131
|
return JSON.stringify(rawData, safeReplacer, 2);
|
|
@@ -4026,6 +4169,18 @@ function getPacketExtension(outputType) {
|
|
|
4026
4169
|
}
|
|
4027
4170
|
}
|
|
4028
4171
|
__name(getPacketExtension, "getPacketExtension");
|
|
4172
|
+
async function loadSuperJSON() {
|
|
4173
|
+
return await import('superjson');
|
|
4174
|
+
}
|
|
4175
|
+
__name(loadSuperJSON, "loadSuperJSON");
|
|
4176
|
+
function safeJsonParse(value) {
|
|
4177
|
+
try {
|
|
4178
|
+
return JSON.parse(value);
|
|
4179
|
+
} catch {
|
|
4180
|
+
return;
|
|
4181
|
+
}
|
|
4182
|
+
}
|
|
4183
|
+
__name(safeJsonParse, "safeJsonParse");
|
|
4029
4184
|
|
|
4030
4185
|
// src/v3/workers/taskExecutor.ts
|
|
4031
4186
|
var _callRun, callRun_fn, _callTaskInit, callTaskInit_fn, _callTaskCleanup, callTaskCleanup_fn, _handleError, handleError_fn;
|
|
@@ -4065,13 +4220,16 @@ var _TaskExecutor = class _TaskExecutor {
|
|
|
4065
4220
|
let initOutput;
|
|
4066
4221
|
try {
|
|
4067
4222
|
const payloadPacket = await conditionallyImportPacket(originalPacket, this._tracer);
|
|
4068
|
-
parsedPayload = parsePacket(payloadPacket);
|
|
4223
|
+
parsedPayload = await parsePacket(payloadPacket);
|
|
4069
4224
|
initOutput = await __privateMethod(this, _callTaskInit, callTaskInit_fn).call(this, parsedPayload, ctx);
|
|
4070
4225
|
const output = await __privateMethod(this, _callRun, callRun_fn).call(this, parsedPayload, ctx, initOutput);
|
|
4071
4226
|
try {
|
|
4072
|
-
const stringifiedOutput = stringifyIO(output);
|
|
4227
|
+
const stringifiedOutput = await stringifyIO(output);
|
|
4073
4228
|
const finalOutput = await conditionallyExportPacket(stringifiedOutput, `${execution.attempt.id}/output`, this._tracer);
|
|
4074
|
-
|
|
4229
|
+
const attributes = await createPacketAttributes(finalOutput, SemanticInternalAttributes.OUTPUT, SemanticInternalAttributes.OUTPUT_TYPE);
|
|
4230
|
+
if (attributes) {
|
|
4231
|
+
span.setAttributes(attributes);
|
|
4232
|
+
}
|
|
4075
4233
|
return {
|
|
4076
4234
|
ok: true,
|
|
4077
4235
|
id: execution.attempt.id,
|
|
@@ -4313,6 +4471,6 @@ function parseBatchTriggerTaskRequestBody(body) {
|
|
|
4313
4471
|
}
|
|
4314
4472
|
__name(parseBatchTriggerTaskRequestBody, "parseBatchTriggerTaskRequestBody");
|
|
4315
4473
|
|
|
4316
|
-
export { ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateUploadPayloadUrlResponseBody, 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, OFFLOAD_IO_PACKET_LENGTH_LIMIT, OTEL_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, OTEL_ATTRIBUTE_PER_LINK_COUNT_LIMIT, OTEL_LINK_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_EVENT_COUNT_LIMIT, 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,
|
|
4474
|
+
export { ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateUploadPayloadUrlResponseBody, DevRuntimeManager, PreciseWallClock as DurableClock, EnvironmentType, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, GetPersonalAccessTokenRequestSchema, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, ImageDetailsMetadata, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, LogLevel, Machine, MachineCpu, MachineMemory, OFFLOAD_IO_PACKET_LENGTH_LIMIT, OTEL_ATTRIBUTE_PER_EVENT_COUNT_LIMIT, OTEL_ATTRIBUTE_PER_LINK_COUNT_LIMIT, OTEL_LINK_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_COUNT_LIMIT, OTEL_LOG_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_ATTRIBUTE_COUNT_LIMIT, OTEL_SPAN_ATTRIBUTE_VALUE_LENGTH_LIMIT, OTEL_SPAN_EVENT_COUNT_LIMIT, OtelTaskLogger, OtherSpanEvent, PRIMARY_VARIANT, PlatformToCoordinatorMessages, PlatformToProviderMessages, PostStartCauses, PreStopCauses, 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, calculateResetAt2 as calculateResetAt, childToWorkerMessages, clientWebsocketMessages, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, eventFilterMatches, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, getEnvVar, iconStringForSeverity, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseBatchTriggerTaskRequestBody, parseError, parsePacket, parseTriggerTaskRequestBody, prettyPrintPacket, primitiveValueOrflattenedAttributes, recordSpanException, runtime, serverWebsocketMessages, stringPatternMatchers, stringifyIO, taskContextManager, unflattenAttributes, workerToChildMessages };
|
|
4317
4475
|
//# sourceMappingURL=out.js.map
|
|
4318
4476
|
//# sourceMappingURL=index.mjs.map
|