@trigger.dev/core 3.0.0-beta.1 → 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 +3 -3
- package/dist/v3/index.d.ts +3 -3
- package/dist/v3/index.js +45 -20
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +45 -20
- package/dist/v3/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/v3/index.d.mts
CHANGED
|
@@ -20315,8 +20315,8 @@ declare function packetRequiresOffloading(packet: IOPacket): {
|
|
|
20315
20315
|
size: number;
|
|
20316
20316
|
};
|
|
20317
20317
|
declare function conditionallyImportPacket(packet: IOPacket, tracer?: TriggerTracer): Promise<IOPacket>;
|
|
20318
|
-
declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataTypeKey: string): Promise<Attributes>;
|
|
20319
|
-
declare function
|
|
20318
|
+
declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataTypeKey: string): Promise<Attributes | undefined>;
|
|
20319
|
+
declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
|
|
20320
20320
|
declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
|
|
20321
20321
|
|
|
20322
20322
|
declare function parseTriggerTaskRequestBody(body: unknown): zod.SafeParseReturnType<{
|
|
@@ -20516,4 +20516,4 @@ declare function parseBatchTriggerTaskRequestBody(body: unknown): zod.SafeParseR
|
|
|
20516
20516
|
dependentAttempt?: string | undefined;
|
|
20517
20517
|
}>;
|
|
20518
20518
|
|
|
20519
|
-
export { Accessory, ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, type Context, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateUploadPayloadUrlResponseBody, DevRuntimeManager, PreciseWallClock as DurableClock, EnvironmentType, type EventEmitterLike, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type GetSocketCallbackSchema, type GetSocketMessageSchema, type GetSocketMessagesWithCallback, type GetSocketMessagesWithoutCallback, type HandleErrorArgs, type HandleErrorFnParams, type HandleErrorFunction, type HandleErrorModificationOptions, type HandleErrorResult, type IOPacket, ImageDetailsMetadata, type InferSocketCallbackSchema, type InferSocketMessageSchema, type InitFnParams, type InitOutput, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, LogLevel$1 as LogLevel, Machine, MachineCpu, MachineMemory, type MessageCatalogToSocketIoEvents, type MessageFromCatalog, type MessageFromSchema, type MessagesFromSocketCatalog, type MiddlewareFnParams, 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, type Prettify, ProdChildToWorkerMessages, ProdRuntimeManager, ProdTaskRunExecution, ProdTaskRunExecutionPayload, ProdWorkerSocketData, ProdWorkerToChildMessages, ProdWorkerToCoordinatorMessages, type ProjectConfig, ProviderToPlatformMessages, QueueOptions, RateLimitOptions, type RequireKeys, type ResolvedConfig, RetryOptions, type RunFnParams, type RuntimeManager, SemanticInternalAttributes, SharedQueueToClientMessages, SimpleStructuredLogger, SlidingWindowRateLimit, type SocketMessageHasCallback, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, type StructuredLogger, type SuccessFnParams, TaskContextSpanProcessor, TaskEventStyle, TaskExecutor, type TaskExecutorOptions, type TaskLogger, TaskMetadata, TaskMetadataWithFilePath, type TaskMetadataWithFunctions, TaskResource, TaskRun, TaskRunBuiltInError, TaskRunContext, TaskRunCustomErrorObject, TaskRunError, TaskRunErrorCodes, TaskRunExecution, TaskRunExecutionAttempt, TaskRunExecutionBatch, TaskRunExecutionEnvironment, TaskRunExecutionOrganization, TaskRunExecutionPayload, TaskRunExecutionProject, TaskRunExecutionQueue, TaskRunExecutionResult, TaskRunExecutionRetry, TaskRunExecutionTask, TaskRunFailedExecutionResult, TaskRunInternalError, TaskRunStringError, TaskRunSuccessfulExecutionResult, TracingSDK, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UncaughtExceptionMessage, Variant, WaitReason, type WhoAmIResponse, WhoAmIResponseSchema, ZodIpcConnection, type ZodMessageCatalogSchema, type ZodMessageCatalogToSocketIoEvents, ZodMessageHandler, type ZodMessageHandlerOptions, type ZodMessageHandlers, ZodMessageSchema, ZodMessageSender, type ZodMessageSenderOptions, type ZodMessageValueSchema, ZodNamespace, type ZodNamespaceSocket, type ZodSocket, ZodSocketConnection, type ZodSocketMessageCatalogSchema, ZodSocketMessageHandler, type ZodSocketMessageHandlerOptions, type ZodSocketMessageHandlers, ZodSocketMessageSender, type ZodSocketMessageSenderOptions, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, childToWorkerMessages, clientWebsocketMessages, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError,
|
|
20519
|
+
export { Accessory, ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, type Context, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateUploadPayloadUrlResponseBody, DevRuntimeManager, PreciseWallClock as DurableClock, EnvironmentType, type EventEmitterLike, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type GetSocketCallbackSchema, type GetSocketMessageSchema, type GetSocketMessagesWithCallback, type GetSocketMessagesWithoutCallback, type HandleErrorArgs, type HandleErrorFnParams, type HandleErrorFunction, type HandleErrorModificationOptions, type HandleErrorResult, type IOPacket, ImageDetailsMetadata, type InferSocketCallbackSchema, type InferSocketMessageSchema, type InitFnParams, type InitOutput, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, LogLevel$1 as LogLevel, Machine, MachineCpu, MachineMemory, type MessageCatalogToSocketIoEvents, type MessageFromCatalog, type MessageFromSchema, type MessagesFromSocketCatalog, type MiddlewareFnParams, 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, type Prettify, ProdChildToWorkerMessages, ProdRuntimeManager, ProdTaskRunExecution, ProdTaskRunExecutionPayload, ProdWorkerSocketData, ProdWorkerToChildMessages, ProdWorkerToCoordinatorMessages, type ProjectConfig, ProviderToPlatformMessages, QueueOptions, RateLimitOptions, type RequireKeys, type ResolvedConfig, RetryOptions, type RunFnParams, type RuntimeManager, SemanticInternalAttributes, SharedQueueToClientMessages, SimpleStructuredLogger, SlidingWindowRateLimit, type SocketMessageHasCallback, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, type StructuredLogger, type SuccessFnParams, TaskContextSpanProcessor, TaskEventStyle, TaskExecutor, type TaskExecutorOptions, type TaskLogger, TaskMetadata, TaskMetadataWithFilePath, type TaskMetadataWithFunctions, TaskResource, TaskRun, TaskRunBuiltInError, TaskRunContext, TaskRunCustomErrorObject, TaskRunError, TaskRunErrorCodes, TaskRunExecution, TaskRunExecutionAttempt, TaskRunExecutionBatch, TaskRunExecutionEnvironment, TaskRunExecutionOrganization, TaskRunExecutionPayload, TaskRunExecutionProject, TaskRunExecutionQueue, TaskRunExecutionResult, TaskRunExecutionRetry, TaskRunExecutionTask, TaskRunFailedExecutionResult, TaskRunInternalError, TaskRunStringError, TaskRunSuccessfulExecutionResult, TracingSDK, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UncaughtExceptionMessage, Variant, WaitReason, type WhoAmIResponse, WhoAmIResponseSchema, ZodIpcConnection, type ZodMessageCatalogSchema, type ZodMessageCatalogToSocketIoEvents, ZodMessageHandler, type ZodMessageHandlerOptions, type ZodMessageHandlers, ZodMessageSchema, ZodMessageSender, type ZodMessageSenderOptions, type ZodMessageValueSchema, ZodNamespace, type ZodNamespaceSocket, type ZodSocket, ZodSocketConnection, type ZodSocketMessageCatalogSchema, ZodSocketMessageHandler, type ZodSocketMessageHandlerOptions, type ZodSocketMessageHandlers, ZodSocketMessageSender, type ZodSocketMessageSenderOptions, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, childToWorkerMessages, clientWebsocketMessages, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, getEnvVar, iconStringForSeverity, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseBatchTriggerTaskRequestBody, parseError, parsePacket, parseTriggerTaskRequestBody, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, serverWebsocketMessages, stringPatternMatchers, stringifyIO, taskContextManager, unflattenAttributes, workerToChildMessages };
|
package/dist/v3/index.d.ts
CHANGED
|
@@ -20315,8 +20315,8 @@ declare function packetRequiresOffloading(packet: IOPacket): {
|
|
|
20315
20315
|
size: number;
|
|
20316
20316
|
};
|
|
20317
20317
|
declare function conditionallyImportPacket(packet: IOPacket, tracer?: TriggerTracer): Promise<IOPacket>;
|
|
20318
|
-
declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataTypeKey: string): Promise<Attributes>;
|
|
20319
|
-
declare function
|
|
20318
|
+
declare function createPacketAttributes(packet: IOPacket, dataKey: string, dataTypeKey: string): Promise<Attributes | undefined>;
|
|
20319
|
+
declare function createPacketAttributesAsJson(data: any, dataType: string): Promise<Attributes>;
|
|
20320
20320
|
declare function prettyPrintPacket(rawData: any, dataType?: string): Promise<string>;
|
|
20321
20321
|
|
|
20322
20322
|
declare function parseTriggerTaskRequestBody(body: unknown): zod.SafeParseReturnType<{
|
|
@@ -20516,4 +20516,4 @@ declare function parseBatchTriggerTaskRequestBody(body: unknown): zod.SafeParseR
|
|
|
20516
20516
|
dependentAttempt?: string | undefined;
|
|
20517
20517
|
}>;
|
|
20518
20518
|
|
|
20519
|
-
export { Accessory, ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, type Context, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateUploadPayloadUrlResponseBody, DevRuntimeManager, PreciseWallClock as DurableClock, EnvironmentType, type EventEmitterLike, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type GetSocketCallbackSchema, type GetSocketMessageSchema, type GetSocketMessagesWithCallback, type GetSocketMessagesWithoutCallback, type HandleErrorArgs, type HandleErrorFnParams, type HandleErrorFunction, type HandleErrorModificationOptions, type HandleErrorResult, type IOPacket, ImageDetailsMetadata, type InferSocketCallbackSchema, type InferSocketMessageSchema, type InitFnParams, type InitOutput, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, LogLevel$1 as LogLevel, Machine, MachineCpu, MachineMemory, type MessageCatalogToSocketIoEvents, type MessageFromCatalog, type MessageFromSchema, type MessagesFromSocketCatalog, type MiddlewareFnParams, 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, type Prettify, ProdChildToWorkerMessages, ProdRuntimeManager, ProdTaskRunExecution, ProdTaskRunExecutionPayload, ProdWorkerSocketData, ProdWorkerToChildMessages, ProdWorkerToCoordinatorMessages, type ProjectConfig, ProviderToPlatformMessages, QueueOptions, RateLimitOptions, type RequireKeys, type ResolvedConfig, RetryOptions, type RunFnParams, type RuntimeManager, SemanticInternalAttributes, SharedQueueToClientMessages, SimpleStructuredLogger, SlidingWindowRateLimit, type SocketMessageHasCallback, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, type StructuredLogger, type SuccessFnParams, TaskContextSpanProcessor, TaskEventStyle, TaskExecutor, type TaskExecutorOptions, type TaskLogger, TaskMetadata, TaskMetadataWithFilePath, type TaskMetadataWithFunctions, TaskResource, TaskRun, TaskRunBuiltInError, TaskRunContext, TaskRunCustomErrorObject, TaskRunError, TaskRunErrorCodes, TaskRunExecution, TaskRunExecutionAttempt, TaskRunExecutionBatch, TaskRunExecutionEnvironment, TaskRunExecutionOrganization, TaskRunExecutionPayload, TaskRunExecutionProject, TaskRunExecutionQueue, TaskRunExecutionResult, TaskRunExecutionRetry, TaskRunExecutionTask, TaskRunFailedExecutionResult, TaskRunInternalError, TaskRunStringError, TaskRunSuccessfulExecutionResult, TracingSDK, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UncaughtExceptionMessage, Variant, WaitReason, type WhoAmIResponse, WhoAmIResponseSchema, ZodIpcConnection, type ZodMessageCatalogSchema, type ZodMessageCatalogToSocketIoEvents, ZodMessageHandler, type ZodMessageHandlerOptions, type ZodMessageHandlers, ZodMessageSchema, ZodMessageSender, type ZodMessageSenderOptions, type ZodMessageValueSchema, ZodNamespace, type ZodNamespaceSocket, type ZodSocket, ZodSocketConnection, type ZodSocketMessageCatalogSchema, ZodSocketMessageHandler, type ZodSocketMessageHandlerOptions, type ZodSocketMessageHandlers, ZodSocketMessageSender, type ZodSocketMessageSenderOptions, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, childToWorkerMessages, clientWebsocketMessages, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError,
|
|
20519
|
+
export { Accessory, ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, type Context, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, type CreateAuthorizationCodeResponse, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateUploadPayloadUrlResponseBody, DevRuntimeManager, PreciseWallClock as DurableClock, EnvironmentType, type EventEmitterLike, EventFilter, ExceptionEventProperties, ExceptionSpanEvent, ExternalBuildData, FetchRetryBackoffStrategy, FetchRetryByStatusOptions, FetchRetryHeadersStrategy, FetchRetryOptions, FetchRetryStrategy, FetchTimeoutOptions, FixedWindowRateLimit, GetBatchResponseBody, GetDeploymentResponseBody, GetEnvironmentVariablesResponseBody, type GetPersonalAccessTokenRequest, GetPersonalAccessTokenRequestSchema, type GetPersonalAccessTokenResponse, GetPersonalAccessTokenResponseSchema, GetProjectEnvResponse, GetProjectResponseBody, GetProjectsResponseBody, type GetSocketCallbackSchema, type GetSocketMessageSchema, type GetSocketMessagesWithCallback, type GetSocketMessagesWithoutCallback, type HandleErrorArgs, type HandleErrorFnParams, type HandleErrorFunction, type HandleErrorModificationOptions, type HandleErrorResult, type IOPacket, ImageDetailsMetadata, type InferSocketCallbackSchema, type InferSocketMessageSchema, type InitFnParams, type InitOutput, InitializeDeploymentRequestBody, InitializeDeploymentResponseBody, LogLevel$1 as LogLevel, Machine, MachineCpu, MachineMemory, type MessageCatalogToSocketIoEvents, type MessageFromCatalog, type MessageFromSchema, type MessagesFromSocketCatalog, type MiddlewareFnParams, 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, type Prettify, ProdChildToWorkerMessages, ProdRuntimeManager, ProdTaskRunExecution, ProdTaskRunExecutionPayload, ProdWorkerSocketData, ProdWorkerToChildMessages, ProdWorkerToCoordinatorMessages, type ProjectConfig, ProviderToPlatformMessages, QueueOptions, RateLimitOptions, type RequireKeys, type ResolvedConfig, RetryOptions, type RunFnParams, type RuntimeManager, SemanticInternalAttributes, SharedQueueToClientMessages, SimpleStructuredLogger, SlidingWindowRateLimit, type SocketMessageHasCallback, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, type StructuredLogger, type SuccessFnParams, TaskContextSpanProcessor, TaskEventStyle, TaskExecutor, type TaskExecutorOptions, type TaskLogger, TaskMetadata, TaskMetadataWithFilePath, type TaskMetadataWithFunctions, TaskResource, TaskRun, TaskRunBuiltInError, TaskRunContext, TaskRunCustomErrorObject, TaskRunError, TaskRunErrorCodes, TaskRunExecution, TaskRunExecutionAttempt, TaskRunExecutionBatch, TaskRunExecutionEnvironment, TaskRunExecutionOrganization, TaskRunExecutionPayload, TaskRunExecutionProject, TaskRunExecutionQueue, TaskRunExecutionResult, TaskRunExecutionRetry, TaskRunExecutionTask, TaskRunFailedExecutionResult, TaskRunInternalError, TaskRunStringError, TaskRunSuccessfulExecutionResult, TracingSDK, type TriggerOptions, TriggerTaskRequestBody, TriggerTaskResponse, TriggerTracer, UncaughtExceptionMessage, Variant, WaitReason, type WhoAmIResponse, WhoAmIResponseSchema, ZodIpcConnection, type ZodMessageCatalogSchema, type ZodMessageCatalogToSocketIoEvents, ZodMessageHandler, type ZodMessageHandlerOptions, type ZodMessageHandlers, ZodMessageSchema, ZodMessageSender, type ZodMessageSenderOptions, type ZodMessageValueSchema, ZodNamespace, type ZodNamespaceSocket, type ZodSocket, ZodSocketConnection, type ZodSocketMessageCatalogSchema, ZodSocketMessageHandler, type ZodSocketMessageHandlerOptions, type ZodSocketMessageHandlers, ZodSocketMessageSender, type ZodSocketMessageSenderOptions, accessoryAttributes, apiClientManager, calculateNextRetryDelay, calculateResetAt, childToWorkerMessages, clientWebsocketMessages, clock, conditionallyExportPacket, conditionallyImportPacket, correctErrorStackTrace, createErrorTaskError, createPacketAttributes, createPacketAttributesAsJson, defaultFetchRetryOptions, defaultRetryOptions, detectDependencyVersion, flattenAttributes, formatDuration, formatDurationInDays, formatDurationMilliseconds, formatDurationNanoseconds, getEnvVar, iconStringForSeverity, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseBatchTriggerTaskRequestBody, parseError, parsePacket, parseTriggerTaskRequestBody, prettyPrintPacket, primitiveValueOrflattenedAttributes, runtime, serverWebsocketMessages, stringPatternMatchers, stringifyIO, taskContextManager, unflattenAttributes, workerToChildMessages };
|
package/dist/v3/index.js
CHANGED
|
@@ -3955,11 +3955,18 @@ async function stringifyIO(value) {
|
|
|
3955
3955
|
dataType: "text/plain"
|
|
3956
3956
|
};
|
|
3957
3957
|
}
|
|
3958
|
-
|
|
3959
|
-
|
|
3960
|
-
data
|
|
3961
|
-
|
|
3962
|
-
|
|
3958
|
+
try {
|
|
3959
|
+
const { stringify } = await loadSuperJSON();
|
|
3960
|
+
const data = stringify(value);
|
|
3961
|
+
return {
|
|
3962
|
+
data,
|
|
3963
|
+
dataType: "application/super+json"
|
|
3964
|
+
};
|
|
3965
|
+
} catch {
|
|
3966
|
+
return {
|
|
3967
|
+
dataType: "application/json"
|
|
3968
|
+
};
|
|
3969
|
+
}
|
|
3963
3970
|
}
|
|
3964
3971
|
__name(stringifyIO, "stringifyIO");
|
|
3965
3972
|
async function conditionallyExportPacket(packet, pathPrefix, tracer) {
|
|
@@ -4063,7 +4070,7 @@ async function importPacket(packet, span) {
|
|
|
4063
4070
|
__name(importPacket, "importPacket");
|
|
4064
4071
|
async function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
4065
4072
|
if (!packet.data) {
|
|
4066
|
-
return
|
|
4073
|
+
return;
|
|
4067
4074
|
}
|
|
4068
4075
|
switch (packet.dataType) {
|
|
4069
4076
|
case "application/json":
|
|
@@ -4073,12 +4080,19 @@ async function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
|
4073
4080
|
};
|
|
4074
4081
|
case "application/super+json":
|
|
4075
4082
|
const { parse } = await loadSuperJSON();
|
|
4076
|
-
|
|
4077
|
-
|
|
4078
|
-
|
|
4079
|
-
|
|
4080
|
-
|
|
4081
|
-
|
|
4083
|
+
if (typeof packet.data === "undefined" || packet.data === null) {
|
|
4084
|
+
return;
|
|
4085
|
+
}
|
|
4086
|
+
try {
|
|
4087
|
+
const parsed = parse(packet.data);
|
|
4088
|
+
const jsonified = JSON.parse(JSON.stringify(parsed, safeReplacer));
|
|
4089
|
+
return {
|
|
4090
|
+
...flattenAttributes(jsonified, dataKey),
|
|
4091
|
+
[dataTypeKey]: "application/json"
|
|
4092
|
+
};
|
|
4093
|
+
} catch {
|
|
4094
|
+
return;
|
|
4095
|
+
}
|
|
4082
4096
|
case "application/store":
|
|
4083
4097
|
return {
|
|
4084
4098
|
[dataKey]: packet.data,
|
|
@@ -4086,15 +4100,15 @@ async function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
|
4086
4100
|
};
|
|
4087
4101
|
case "text/plain":
|
|
4088
4102
|
return {
|
|
4089
|
-
[
|
|
4090
|
-
[
|
|
4103
|
+
[dataKey]: packet.data,
|
|
4104
|
+
[dataTypeKey]: packet.dataType
|
|
4091
4105
|
};
|
|
4092
4106
|
default:
|
|
4093
|
-
return
|
|
4107
|
+
return;
|
|
4094
4108
|
}
|
|
4095
4109
|
}
|
|
4096
4110
|
__name(createPacketAttributes, "createPacketAttributes");
|
|
4097
|
-
async function
|
|
4111
|
+
async function createPacketAttributesAsJson(data, dataType) {
|
|
4098
4112
|
if (typeof data === "string" || typeof data === "number" || typeof data === "boolean" || data === null || data === void 0) {
|
|
4099
4113
|
return data;
|
|
4100
4114
|
}
|
|
@@ -4104,7 +4118,7 @@ async function createPackageAttributesAsJson(data, dataType) {
|
|
|
4104
4118
|
case "application/super+json":
|
|
4105
4119
|
const { deserialize } = await loadSuperJSON();
|
|
4106
4120
|
const deserialized = deserialize(data);
|
|
4107
|
-
const jsonify =
|
|
4121
|
+
const jsonify = safeJsonParse(JSON.stringify(deserialized, safeReplacer));
|
|
4108
4122
|
return imposeAttributeLimits(flattenAttributes(jsonify, void 0));
|
|
4109
4123
|
case "application/store":
|
|
4110
4124
|
return data;
|
|
@@ -4112,7 +4126,7 @@ async function createPackageAttributesAsJson(data, dataType) {
|
|
|
4112
4126
|
return {};
|
|
4113
4127
|
}
|
|
4114
4128
|
}
|
|
4115
|
-
__name(
|
|
4129
|
+
__name(createPacketAttributesAsJson, "createPacketAttributesAsJson");
|
|
4116
4130
|
async function prettyPrintPacket(rawData, dataType) {
|
|
4117
4131
|
if (rawData === void 0) {
|
|
4118
4132
|
return "";
|
|
@@ -4167,6 +4181,14 @@ async function loadSuperJSON() {
|
|
|
4167
4181
|
return await import('superjson');
|
|
4168
4182
|
}
|
|
4169
4183
|
__name(loadSuperJSON, "loadSuperJSON");
|
|
4184
|
+
function safeJsonParse(value) {
|
|
4185
|
+
try {
|
|
4186
|
+
return JSON.parse(value);
|
|
4187
|
+
} catch {
|
|
4188
|
+
return;
|
|
4189
|
+
}
|
|
4190
|
+
}
|
|
4191
|
+
__name(safeJsonParse, "safeJsonParse");
|
|
4170
4192
|
|
|
4171
4193
|
// src/v3/workers/taskExecutor.ts
|
|
4172
4194
|
var _callRun, callRun_fn, _callTaskInit, callTaskInit_fn, _callTaskCleanup, callTaskCleanup_fn, _handleError, handleError_fn;
|
|
@@ -4212,7 +4234,10 @@ var _TaskExecutor = class _TaskExecutor {
|
|
|
4212
4234
|
try {
|
|
4213
4235
|
const stringifiedOutput = await stringifyIO(output);
|
|
4214
4236
|
const finalOutput = await conditionallyExportPacket(stringifiedOutput, `${execution.attempt.id}/output`, this._tracer);
|
|
4215
|
-
|
|
4237
|
+
const attributes = await createPacketAttributes(finalOutput, SemanticInternalAttributes.OUTPUT, SemanticInternalAttributes.OUTPUT_TYPE);
|
|
4238
|
+
if (attributes) {
|
|
4239
|
+
span.setAttributes(attributes);
|
|
4240
|
+
}
|
|
4216
4241
|
return {
|
|
4217
4242
|
ok: true,
|
|
4218
4243
|
id: execution.attempt.id,
|
|
@@ -4590,8 +4615,8 @@ exports.conditionallyExportPacket = conditionallyExportPacket;
|
|
|
4590
4615
|
exports.conditionallyImportPacket = conditionallyImportPacket;
|
|
4591
4616
|
exports.correctErrorStackTrace = correctErrorStackTrace;
|
|
4592
4617
|
exports.createErrorTaskError = createErrorTaskError;
|
|
4593
|
-
exports.createPackageAttributesAsJson = createPackageAttributesAsJson;
|
|
4594
4618
|
exports.createPacketAttributes = createPacketAttributes;
|
|
4619
|
+
exports.createPacketAttributesAsJson = createPacketAttributesAsJson;
|
|
4595
4620
|
exports.defaultFetchRetryOptions = defaultFetchRetryOptions;
|
|
4596
4621
|
exports.defaultRetryOptions = defaultRetryOptions;
|
|
4597
4622
|
exports.detectDependencyVersion = detectDependencyVersion;
|