@trigger.dev/core 3.0.0-beta.0 → 3.0.0-beta.11
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 +1802 -1184
- package/dist/v3/index.d.ts +1802 -1184
- package/dist/v3/index.js +448 -131
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +434 -129
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/otel/index.js +24 -14
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs +26 -16
- 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 = {
|
|
@@ -403,7 +434,7 @@ var QueueOptions = z.object({
|
|
|
403
434
|
/** An optional property that specifies the maximum number of concurrent run executions.
|
|
404
435
|
*
|
|
405
436
|
* If this property is omitted, the task can potentially use up the full concurrency of an environment. */
|
|
406
|
-
concurrencyLimit: z.number().int().min(
|
|
437
|
+
concurrencyLimit: z.number().int().min(0).max(1e3).optional(),
|
|
407
438
|
/** @deprecated This feature is coming soon */
|
|
408
439
|
rateLimit: RateLimitOptions.optional()
|
|
409
440
|
});
|
|
@@ -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()
|
|
@@ -429,6 +461,13 @@ var UncaughtExceptionMessage = z.object({
|
|
|
429
461
|
"unhandledRejection"
|
|
430
462
|
])
|
|
431
463
|
});
|
|
464
|
+
var TaskMetadataFailedToParseData = z.object({
|
|
465
|
+
version: z.literal("v1").default("v1"),
|
|
466
|
+
tasks: z.unknown(),
|
|
467
|
+
zodIssues: z.custom((v) => {
|
|
468
|
+
return Array.isArray(v) && v.every((issue) => typeof issue === "object" && "message" in issue);
|
|
469
|
+
})
|
|
470
|
+
});
|
|
432
471
|
var childToWorkerMessages = {
|
|
433
472
|
TASK_RUN_COMPLETED: z.object({
|
|
434
473
|
version: z.literal("v1").default("v1"),
|
|
@@ -439,6 +478,7 @@ var childToWorkerMessages = {
|
|
|
439
478
|
version: z.literal("v1").default("v1"),
|
|
440
479
|
tasks: TaskMetadataWithFilePath.array()
|
|
441
480
|
}),
|
|
481
|
+
TASKS_FAILED_TO_PARSE: TaskMetadataFailedToParseData,
|
|
442
482
|
TASK_HEARTBEAT: z.object({
|
|
443
483
|
version: z.literal("v1").default("v1"),
|
|
444
484
|
id: z.string()
|
|
@@ -473,6 +513,9 @@ var ProdChildToWorkerMessages = {
|
|
|
473
513
|
tasks: TaskMetadataWithFilePath.array()
|
|
474
514
|
})
|
|
475
515
|
},
|
|
516
|
+
TASKS_FAILED_TO_PARSE: {
|
|
517
|
+
message: TaskMetadataFailedToParseData
|
|
518
|
+
},
|
|
476
519
|
TASK_HEARTBEAT: {
|
|
477
520
|
message: z.object({
|
|
478
521
|
version: z.literal("v1").default("v1"),
|
|
@@ -556,7 +599,8 @@ var TaskResource = z.object({
|
|
|
556
599
|
filePath: z.string(),
|
|
557
600
|
exportName: z.string(),
|
|
558
601
|
queue: QueueOptions.optional(),
|
|
559
|
-
retry: RetryOptions.optional()
|
|
602
|
+
retry: RetryOptions.optional(),
|
|
603
|
+
machine: Machine.partial().optional()
|
|
560
604
|
});
|
|
561
605
|
var BackgroundWorkerMetadata = z.object({
|
|
562
606
|
packageVersion: z.string(),
|
|
@@ -667,6 +711,11 @@ var InitializeDeploymentRequestBody = z.object({
|
|
|
667
711
|
contentHash: z.string(),
|
|
668
712
|
userId: z.string().optional()
|
|
669
713
|
});
|
|
714
|
+
var DeploymentErrorData = z.object({
|
|
715
|
+
name: z.string(),
|
|
716
|
+
message: z.string(),
|
|
717
|
+
stack: z.string().optional()
|
|
718
|
+
});
|
|
670
719
|
var GetDeploymentResponseBody = z.object({
|
|
671
720
|
id: z.string(),
|
|
672
721
|
status: z.enum([
|
|
@@ -682,11 +731,7 @@ var GetDeploymentResponseBody = z.object({
|
|
|
682
731
|
shortCode: z.string(),
|
|
683
732
|
version: z.string(),
|
|
684
733
|
imageReference: z.string().optional(),
|
|
685
|
-
errorData:
|
|
686
|
-
name: z.string(),
|
|
687
|
-
message: z.string(),
|
|
688
|
-
stack: z.string().optional()
|
|
689
|
-
}).optional().nullable(),
|
|
734
|
+
errorData: DeploymentErrorData.optional().nullable(),
|
|
690
735
|
worker: z.object({
|
|
691
736
|
id: z.string(),
|
|
692
737
|
version: z.string(),
|
|
@@ -701,6 +746,20 @@ var GetDeploymentResponseBody = z.object({
|
|
|
701
746
|
var CreateUploadPayloadUrlResponseBody = z.object({
|
|
702
747
|
presignedUrl: z.string()
|
|
703
748
|
});
|
|
749
|
+
var ReplayRunResponse = z.object({
|
|
750
|
+
id: z.string()
|
|
751
|
+
});
|
|
752
|
+
var CanceledRunResponse = z.object({
|
|
753
|
+
message: z.string()
|
|
754
|
+
});
|
|
755
|
+
var PostStartCauses = z.enum([
|
|
756
|
+
"index",
|
|
757
|
+
"create",
|
|
758
|
+
"restore"
|
|
759
|
+
]);
|
|
760
|
+
var PreStopCauses = z.enum([
|
|
761
|
+
"terminate"
|
|
762
|
+
]);
|
|
704
763
|
var RegexSchema = z.custom((val) => {
|
|
705
764
|
try {
|
|
706
765
|
return typeof val.test === "function";
|
|
@@ -723,11 +782,8 @@ var Config = z.object({
|
|
|
723
782
|
dependenciesToBundle: z.array(z.union([
|
|
724
783
|
z.string(),
|
|
725
784
|
RegexSchema
|
|
726
|
-
])).optional()
|
|
727
|
-
|
|
728
|
-
var Machine = z.object({
|
|
729
|
-
cpu: z.string().default("1").optional(),
|
|
730
|
-
memory: z.string().default("500Mi").optional()
|
|
785
|
+
])).optional(),
|
|
786
|
+
logLevel: z.string().optional()
|
|
731
787
|
});
|
|
732
788
|
var WaitReason = z.enum([
|
|
733
789
|
"WAIT_FOR_DURATION",
|
|
@@ -749,6 +805,27 @@ var ProviderToPlatformMessages = {
|
|
|
749
805
|
callback: z.object({
|
|
750
806
|
status: z.literal("ok")
|
|
751
807
|
})
|
|
808
|
+
},
|
|
809
|
+
WORKER_CRASHED: {
|
|
810
|
+
message: z.object({
|
|
811
|
+
version: z.literal("v1").default("v1"),
|
|
812
|
+
runId: z.string(),
|
|
813
|
+
reason: z.string().optional(),
|
|
814
|
+
exitCode: z.number().optional(),
|
|
815
|
+
message: z.string().optional(),
|
|
816
|
+
logs: z.string().optional()
|
|
817
|
+
})
|
|
818
|
+
},
|
|
819
|
+
INDEXING_FAILED: {
|
|
820
|
+
message: z.object({
|
|
821
|
+
version: z.literal("v1").default("v1"),
|
|
822
|
+
deploymentId: z.string(),
|
|
823
|
+
error: z.object({
|
|
824
|
+
name: z.string(),
|
|
825
|
+
message: z.string(),
|
|
826
|
+
stack: z.string().optional()
|
|
827
|
+
})
|
|
828
|
+
})
|
|
752
829
|
}
|
|
753
830
|
};
|
|
754
831
|
var PlatformToProviderMessages = {
|
|
@@ -765,9 +842,14 @@ var PlatformToProviderMessages = {
|
|
|
765
842
|
version: z.literal("v1").default("v1"),
|
|
766
843
|
imageTag: z.string(),
|
|
767
844
|
shortCode: z.string(),
|
|
768
|
-
envId: z.string(),
|
|
769
845
|
apiKey: z.string(),
|
|
770
|
-
apiUrl: z.string()
|
|
846
|
+
apiUrl: z.string(),
|
|
847
|
+
// identifiers
|
|
848
|
+
envId: z.string(),
|
|
849
|
+
envType: EnvironmentType,
|
|
850
|
+
orgId: z.string(),
|
|
851
|
+
projectId: z.string(),
|
|
852
|
+
deploymentId: z.string()
|
|
771
853
|
}),
|
|
772
854
|
callback: z.discriminatedUnion("success", [
|
|
773
855
|
z.object({
|
|
@@ -783,25 +865,25 @@ var PlatformToProviderMessages = {
|
|
|
783
865
|
})
|
|
784
866
|
])
|
|
785
867
|
},
|
|
786
|
-
|
|
787
|
-
message: z.object({
|
|
788
|
-
version: z.literal("v1").default("v1"),
|
|
789
|
-
name: z.string(),
|
|
790
|
-
machine: Machine
|
|
791
|
-
})
|
|
792
|
-
},
|
|
868
|
+
// TODO: this should be a shared queue message instead
|
|
793
869
|
RESTORE: {
|
|
794
870
|
message: z.object({
|
|
795
871
|
version: z.literal("v1").default("v1"),
|
|
796
|
-
checkpointId: z.string(),
|
|
797
|
-
runId: z.string(),
|
|
798
872
|
type: z.enum([
|
|
799
873
|
"DOCKER",
|
|
800
874
|
"KUBERNETES"
|
|
801
875
|
]),
|
|
802
876
|
location: z.string(),
|
|
803
877
|
reason: z.string().optional(),
|
|
804
|
-
imageRef: z.string()
|
|
878
|
+
imageRef: z.string(),
|
|
879
|
+
machine: Machine,
|
|
880
|
+
// identifiers
|
|
881
|
+
checkpointId: z.string(),
|
|
882
|
+
envId: z.string(),
|
|
883
|
+
envType: EnvironmentType,
|
|
884
|
+
orgId: z.string(),
|
|
885
|
+
projectId: z.string(),
|
|
886
|
+
runId: z.string()
|
|
805
887
|
})
|
|
806
888
|
},
|
|
807
889
|
DELETE: {
|
|
@@ -1358,7 +1440,11 @@ var SpanMessagingEvent = z.object({
|
|
|
1358
1440
|
});
|
|
1359
1441
|
|
|
1360
1442
|
// src/zodfetch.ts
|
|
1361
|
-
async function zodfetch(schema, url, requestInit) {
|
|
1443
|
+
async function zodfetch(schema, url, requestInit, options) {
|
|
1444
|
+
return await _doZodFetch(schema, url, requestInit, options);
|
|
1445
|
+
}
|
|
1446
|
+
__name(zodfetch, "zodfetch");
|
|
1447
|
+
async function _doZodFetch(schema, url, requestInit, options, attempt = 1) {
|
|
1362
1448
|
try {
|
|
1363
1449
|
const response = await fetch(url, requestInit);
|
|
1364
1450
|
if ((!requestInit || requestInit.method === "GET") && response.status === 404) {
|
|
@@ -1367,7 +1453,7 @@ async function zodfetch(schema, url, requestInit) {
|
|
|
1367
1453
|
error: `404: ${response.statusText}`
|
|
1368
1454
|
};
|
|
1369
1455
|
}
|
|
1370
|
-
if (response.status >= 400 && response.status < 500) {
|
|
1456
|
+
if (response.status >= 400 && response.status < 500 && response.status !== 429) {
|
|
1371
1457
|
const body = await response.json();
|
|
1372
1458
|
if (!body.error) {
|
|
1373
1459
|
return {
|
|
@@ -1380,6 +1466,27 @@ async function zodfetch(schema, url, requestInit) {
|
|
|
1380
1466
|
error: body.error
|
|
1381
1467
|
};
|
|
1382
1468
|
}
|
|
1469
|
+
if (response.status === 429 || response.status >= 500) {
|
|
1470
|
+
if (!options?.retry) {
|
|
1471
|
+
return {
|
|
1472
|
+
ok: false,
|
|
1473
|
+
error: `Failed to fetch ${url}, got status code ${response.status}`
|
|
1474
|
+
};
|
|
1475
|
+
}
|
|
1476
|
+
const retry = {
|
|
1477
|
+
...defaultRetryOptions,
|
|
1478
|
+
...options.retry
|
|
1479
|
+
};
|
|
1480
|
+
if (attempt > retry.maxAttempts) {
|
|
1481
|
+
return {
|
|
1482
|
+
ok: false,
|
|
1483
|
+
error: `Failed to fetch ${url}, got status code ${response.status}`
|
|
1484
|
+
};
|
|
1485
|
+
}
|
|
1486
|
+
const delay = calculateNextRetryDelay(retry, attempt);
|
|
1487
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
1488
|
+
return await _doZodFetch(schema, url, requestInit, options, attempt + 1);
|
|
1489
|
+
}
|
|
1383
1490
|
if (response.status !== 200) {
|
|
1384
1491
|
return {
|
|
1385
1492
|
ok: false,
|
|
@@ -1405,13 +1512,28 @@ async function zodfetch(schema, url, requestInit) {
|
|
|
1405
1512
|
error: parsedResult.error.message
|
|
1406
1513
|
};
|
|
1407
1514
|
} catch (error) {
|
|
1515
|
+
if (options?.retry) {
|
|
1516
|
+
const retry = {
|
|
1517
|
+
...defaultRetryOptions,
|
|
1518
|
+
...options.retry
|
|
1519
|
+
};
|
|
1520
|
+
if (attempt > retry.maxAttempts) {
|
|
1521
|
+
return {
|
|
1522
|
+
ok: false,
|
|
1523
|
+
error: error instanceof Error ? error.message : JSON.stringify(error)
|
|
1524
|
+
};
|
|
1525
|
+
}
|
|
1526
|
+
const delay = calculateNextRetryDelay(retry, attempt);
|
|
1527
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
1528
|
+
return await _doZodFetch(schema, url, requestInit, options, attempt + 1);
|
|
1529
|
+
}
|
|
1408
1530
|
return {
|
|
1409
1531
|
ok: false,
|
|
1410
1532
|
error: error instanceof Error ? error.message : JSON.stringify(error)
|
|
1411
1533
|
};
|
|
1412
1534
|
}
|
|
1413
1535
|
}
|
|
1414
|
-
__name(
|
|
1536
|
+
__name(_doZodFetch, "_doZodFetch");
|
|
1415
1537
|
|
|
1416
1538
|
// src/v3/utils/flattenAttributes.ts
|
|
1417
1539
|
function flattenAttributes(obj, prefix) {
|
|
@@ -1697,6 +1819,15 @@ function getEnvVar(name) {
|
|
|
1697
1819
|
__name(getEnvVar, "getEnvVar");
|
|
1698
1820
|
|
|
1699
1821
|
// src/v3/apiClient/index.ts
|
|
1822
|
+
var zodFetchOptions = {
|
|
1823
|
+
retry: {
|
|
1824
|
+
maxAttempts: 5,
|
|
1825
|
+
minTimeoutInMs: 1e3,
|
|
1826
|
+
maxTimeoutInMs: 3e4,
|
|
1827
|
+
factor: 2,
|
|
1828
|
+
randomize: false
|
|
1829
|
+
}
|
|
1830
|
+
};
|
|
1700
1831
|
var _getHeaders, getHeaders_fn;
|
|
1701
1832
|
var _ApiClient = class _ApiClient {
|
|
1702
1833
|
constructor(baseUrl, accessToken) {
|
|
@@ -1709,26 +1840,38 @@ var _ApiClient = class _ApiClient {
|
|
|
1709
1840
|
method: "POST",
|
|
1710
1841
|
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, options?.spanParentAsLink ?? false),
|
|
1711
1842
|
body: JSON.stringify(body)
|
|
1712
|
-
});
|
|
1843
|
+
}, zodFetchOptions);
|
|
1713
1844
|
}
|
|
1714
1845
|
batchTriggerTask(taskId, body, options) {
|
|
1715
1846
|
return zodfetch(BatchTriggerTaskResponse, `${this.baseUrl}/api/v1/tasks/${taskId}/batch`, {
|
|
1716
1847
|
method: "POST",
|
|
1717
1848
|
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, options?.spanParentAsLink ?? false),
|
|
1718
1849
|
body: JSON.stringify(body)
|
|
1719
|
-
});
|
|
1850
|
+
}, zodFetchOptions);
|
|
1720
1851
|
}
|
|
1721
1852
|
createUploadPayloadUrl(filename) {
|
|
1722
1853
|
return zodfetch(CreateUploadPayloadUrlResponseBody, `${this.baseUrl}/api/v1/packets/${filename}`, {
|
|
1723
1854
|
method: "PUT",
|
|
1724
1855
|
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
|
|
1725
|
-
});
|
|
1856
|
+
}, zodFetchOptions);
|
|
1726
1857
|
}
|
|
1727
1858
|
getPayloadUrl(filename) {
|
|
1728
1859
|
return zodfetch(CreateUploadPayloadUrlResponseBody, `${this.baseUrl}/api/v1/packets/${filename}`, {
|
|
1729
1860
|
method: "GET",
|
|
1730
1861
|
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
|
|
1731
|
-
});
|
|
1862
|
+
}, zodFetchOptions);
|
|
1863
|
+
}
|
|
1864
|
+
replayRun(runId) {
|
|
1865
|
+
return zodfetch(ReplayRunResponse, `${this.baseUrl}/api/v1/runs/${runId}/replay`, {
|
|
1866
|
+
method: "POST",
|
|
1867
|
+
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
|
|
1868
|
+
}, zodFetchOptions);
|
|
1869
|
+
}
|
|
1870
|
+
cancelRun(runId) {
|
|
1871
|
+
return zodfetch(CanceledRunResponse, `${this.baseUrl}/api/v2/runs/${runId}/cancel`, {
|
|
1872
|
+
method: "POST",
|
|
1873
|
+
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
|
|
1874
|
+
}, zodFetchOptions);
|
|
1732
1875
|
}
|
|
1733
1876
|
};
|
|
1734
1877
|
_getHeaders = new WeakSet();
|
|
@@ -1778,6 +1921,15 @@ getStore_fn2 = /* @__PURE__ */ __name(function() {
|
|
|
1778
1921
|
__name(_ApiClientManager, "ApiClientManager");
|
|
1779
1922
|
var ApiClientManager = _ApiClientManager;
|
|
1780
1923
|
var apiClientManager = new ApiClientManager();
|
|
1924
|
+
var _ZodSchemaParsedError = class _ZodSchemaParsedError extends Error {
|
|
1925
|
+
constructor(error, payload) {
|
|
1926
|
+
super(error.message);
|
|
1927
|
+
this.error = error;
|
|
1928
|
+
this.payload = payload;
|
|
1929
|
+
}
|
|
1930
|
+
};
|
|
1931
|
+
__name(_ZodSchemaParsedError, "ZodSchemaParsedError");
|
|
1932
|
+
var ZodSchemaParsedError = _ZodSchemaParsedError;
|
|
1781
1933
|
var ZodMessageSchema = z.object({
|
|
1782
1934
|
version: z.literal("v1").default("v1"),
|
|
1783
1935
|
type: z.string(),
|
|
@@ -1874,7 +2026,7 @@ var _ZodMessageSender = class _ZodMessageSender {
|
|
|
1874
2026
|
}
|
|
1875
2027
|
const parsedPayload = schema.safeParse(payload);
|
|
1876
2028
|
if (!parsedPayload.success) {
|
|
1877
|
-
throw new
|
|
2029
|
+
throw new ZodSchemaParsedError(parsedPayload.error, payload);
|
|
1878
2030
|
}
|
|
1879
2031
|
await __privateGet(this, _sender).call(this, {
|
|
1880
2032
|
type,
|
|
@@ -2043,16 +2195,23 @@ var _ZodSocketConnection = class _ZodSocketConnection {
|
|
|
2043
2195
|
__privateAdd(this, _sender2, void 0);
|
|
2044
2196
|
__privateAdd(this, _handler, void 0);
|
|
2045
2197
|
__privateAdd(this, _logger, void 0);
|
|
2046
|
-
|
|
2198
|
+
const uri = `${opts.secure ? "wss" : "ws"}://${opts.host}:${opts.port ?? (opts.secure ? "443" : "80")}/${opts.namespace}`;
|
|
2199
|
+
const logger2 = new SimpleStructuredLogger(opts.namespace, LogLevel.info);
|
|
2200
|
+
logger2.log("new zod socket", {
|
|
2201
|
+
uri
|
|
2202
|
+
});
|
|
2203
|
+
this.socket = io(uri, {
|
|
2047
2204
|
transports: [
|
|
2048
2205
|
"websocket"
|
|
2049
2206
|
],
|
|
2050
2207
|
auth: {
|
|
2051
2208
|
token: opts.authToken
|
|
2052
2209
|
},
|
|
2053
|
-
extraHeaders: opts.extraHeaders
|
|
2210
|
+
extraHeaders: opts.extraHeaders,
|
|
2211
|
+
reconnectionDelay: 500,
|
|
2212
|
+
reconnectionDelayMax: 1e3
|
|
2054
2213
|
});
|
|
2055
|
-
__privateSet(this, _logger,
|
|
2214
|
+
__privateSet(this, _logger, logger2.child({
|
|
2056
2215
|
socketId: this.socket.id
|
|
2057
2216
|
}));
|
|
2058
2217
|
__privateSet(this, _handler, new ZodSocketMessageHandler({
|
|
@@ -2371,7 +2530,7 @@ var _ZodIpcConnection = class _ZodIpcConnection {
|
|
|
2371
2530
|
}
|
|
2372
2531
|
const parsedPayload = schema.safeParse(payload);
|
|
2373
2532
|
if (!parsedPayload.success) {
|
|
2374
|
-
throw new
|
|
2533
|
+
throw new ZodSchemaParsedError(parsedPayload.error, payload);
|
|
2375
2534
|
}
|
|
2376
2535
|
await __privateMethod(this, _sendPacket, sendPacket_fn).call(this, {
|
|
2377
2536
|
type: "EVENT",
|
|
@@ -2560,6 +2719,41 @@ function correctStackTraceLine(line, projectDir) {
|
|
|
2560
2719
|
return line;
|
|
2561
2720
|
}
|
|
2562
2721
|
__name(correctStackTraceLine, "correctStackTraceLine");
|
|
2722
|
+
function groupTaskMetadataIssuesByTask(tasks, issues) {
|
|
2723
|
+
return issues.reduce((acc, issue) => {
|
|
2724
|
+
if (issue.path.length === 0) {
|
|
2725
|
+
return acc;
|
|
2726
|
+
}
|
|
2727
|
+
const taskIndex = issue.path[1];
|
|
2728
|
+
if (typeof taskIndex !== "number") {
|
|
2729
|
+
return acc;
|
|
2730
|
+
}
|
|
2731
|
+
const task = tasks[taskIndex];
|
|
2732
|
+
if (!task) {
|
|
2733
|
+
return acc;
|
|
2734
|
+
}
|
|
2735
|
+
const restOfPath = issue.path.slice(2);
|
|
2736
|
+
const taskId = task.id;
|
|
2737
|
+
const taskName = task.exportName;
|
|
2738
|
+
const filePath = task.filePath;
|
|
2739
|
+
const key = taskIndex;
|
|
2740
|
+
const existing = acc[key] ?? {
|
|
2741
|
+
id: taskId,
|
|
2742
|
+
exportName: taskName,
|
|
2743
|
+
filePath,
|
|
2744
|
+
issues: []
|
|
2745
|
+
};
|
|
2746
|
+
existing.issues.push({
|
|
2747
|
+
message: issue.message,
|
|
2748
|
+
path: restOfPath.length === 0 ? void 0 : restOfPath.join(".")
|
|
2749
|
+
});
|
|
2750
|
+
return {
|
|
2751
|
+
...acc,
|
|
2752
|
+
[key]: existing
|
|
2753
|
+
};
|
|
2754
|
+
}, {});
|
|
2755
|
+
}
|
|
2756
|
+
__name(groupTaskMetadataIssuesByTask, "groupTaskMetadataIssuesByTask");
|
|
2563
2757
|
|
|
2564
2758
|
// src/v3/utils/platform.ts
|
|
2565
2759
|
var _globalThis = typeof globalThis === "object" ? globalThis : global;
|
|
@@ -2709,27 +2903,58 @@ function iconStringForSeverity(severityNumber) {
|
|
|
2709
2903
|
}
|
|
2710
2904
|
}
|
|
2711
2905
|
__name(iconStringForSeverity, "iconStringForSeverity");
|
|
2712
|
-
|
|
2713
|
-
|
|
2714
|
-
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
2727
|
-
|
|
2728
|
-
|
|
2729
|
-
|
|
2906
|
+
var _SimpleClock = class _SimpleClock {
|
|
2907
|
+
preciseNow() {
|
|
2908
|
+
const now = new PreciseDate();
|
|
2909
|
+
const nowStruct = now.toStruct();
|
|
2910
|
+
return [
|
|
2911
|
+
nowStruct.seconds,
|
|
2912
|
+
nowStruct.nanos
|
|
2913
|
+
];
|
|
2914
|
+
}
|
|
2915
|
+
reset() {
|
|
2916
|
+
}
|
|
2917
|
+
};
|
|
2918
|
+
__name(_SimpleClock, "SimpleClock");
|
|
2919
|
+
var SimpleClock = _SimpleClock;
|
|
2920
|
+
|
|
2921
|
+
// src/v3/clock/index.ts
|
|
2922
|
+
var API_NAME2 = "clock";
|
|
2923
|
+
var SIMPLE_CLOCK = new SimpleClock();
|
|
2924
|
+
var _getClock, getClock_fn;
|
|
2925
|
+
var _ClockAPI = class _ClockAPI {
|
|
2926
|
+
constructor() {
|
|
2927
|
+
__privateAdd(this, _getClock);
|
|
2928
|
+
}
|
|
2929
|
+
static getInstance() {
|
|
2930
|
+
if (!this._instance) {
|
|
2931
|
+
this._instance = new _ClockAPI();
|
|
2932
|
+
}
|
|
2933
|
+
return this._instance;
|
|
2934
|
+
}
|
|
2935
|
+
setGlobalClock(clock2) {
|
|
2936
|
+
return registerGlobal(API_NAME2, clock2);
|
|
2937
|
+
}
|
|
2938
|
+
preciseNow() {
|
|
2939
|
+
return __privateMethod(this, _getClock, getClock_fn).call(this).preciseNow();
|
|
2940
|
+
}
|
|
2941
|
+
reset() {
|
|
2942
|
+
__privateMethod(this, _getClock, getClock_fn).call(this).reset();
|
|
2943
|
+
}
|
|
2944
|
+
};
|
|
2945
|
+
_getClock = new WeakSet();
|
|
2946
|
+
getClock_fn = /* @__PURE__ */ __name(function() {
|
|
2947
|
+
return getGlobal(API_NAME2) ?? SIMPLE_CLOCK;
|
|
2948
|
+
}, "#getClock");
|
|
2949
|
+
__name(_ClockAPI, "ClockAPI");
|
|
2950
|
+
var ClockAPI = _ClockAPI;
|
|
2951
|
+
|
|
2952
|
+
// src/v3/clock-api.ts
|
|
2953
|
+
var clock = ClockAPI.getInstance();
|
|
2730
2954
|
|
|
2731
2955
|
// src/v3/logger/taskLogger.ts
|
|
2732
2956
|
var logLevels = [
|
|
2957
|
+
"none",
|
|
2733
2958
|
"error",
|
|
2734
2959
|
"warn",
|
|
2735
2960
|
"log",
|
|
@@ -2745,37 +2970,36 @@ var _OtelTaskLogger = class _OtelTaskLogger {
|
|
|
2745
2970
|
this._level = logLevels.indexOf(_config.level);
|
|
2746
2971
|
}
|
|
2747
2972
|
debug(message, properties) {
|
|
2748
|
-
if (this._level <
|
|
2973
|
+
if (this._level < 5)
|
|
2749
2974
|
return;
|
|
2750
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "debug", SeverityNumber.DEBUG, properties);
|
|
2975
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "debug", SeverityNumber.DEBUG, properties);
|
|
2751
2976
|
}
|
|
2752
2977
|
log(message, properties) {
|
|
2753
|
-
if (this._level <
|
|
2978
|
+
if (this._level < 3)
|
|
2754
2979
|
return;
|
|
2755
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "log", SeverityNumber.INFO, properties);
|
|
2980
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "log", SeverityNumber.INFO, properties);
|
|
2756
2981
|
}
|
|
2757
2982
|
info(message, properties) {
|
|
2758
|
-
if (this._level <
|
|
2983
|
+
if (this._level < 4)
|
|
2759
2984
|
return;
|
|
2760
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "info", SeverityNumber.INFO, properties);
|
|
2985
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "info", SeverityNumber.INFO, properties);
|
|
2761
2986
|
}
|
|
2762
2987
|
warn(message, properties) {
|
|
2763
|
-
if (this._level <
|
|
2988
|
+
if (this._level < 2)
|
|
2764
2989
|
return;
|
|
2765
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "warn", SeverityNumber.WARN, properties);
|
|
2990
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "warn", SeverityNumber.WARN, properties);
|
|
2766
2991
|
}
|
|
2767
2992
|
error(message, properties) {
|
|
2768
|
-
if (this._level <
|
|
2993
|
+
if (this._level < 1)
|
|
2769
2994
|
return;
|
|
2770
|
-
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, "error", SeverityNumber.ERROR, properties);
|
|
2995
|
+
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "error", SeverityNumber.ERROR, properties);
|
|
2771
2996
|
}
|
|
2772
2997
|
trace(name, fn, options) {
|
|
2773
2998
|
return this._config.tracer.startActiveSpan(name, fn, options);
|
|
2774
2999
|
}
|
|
2775
3000
|
};
|
|
2776
3001
|
_emitLog = new WeakSet();
|
|
2777
|
-
emitLog_fn = /* @__PURE__ */ __name(function(message, severityText, severityNumber, properties) {
|
|
2778
|
-
const timestamp = __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this);
|
|
3002
|
+
emitLog_fn = /* @__PURE__ */ __name(function(message, timestamp, severityText, severityNumber, properties) {
|
|
2779
3003
|
let attributes = {
|
|
2780
3004
|
...flattenAttributes(properties)
|
|
2781
3005
|
};
|
|
@@ -2793,7 +3017,7 @@ emitLog_fn = /* @__PURE__ */ __name(function(message, severityText, severityNumb
|
|
|
2793
3017
|
}, "#emitLog");
|
|
2794
3018
|
_getTimestampInHrTime = new WeakSet();
|
|
2795
3019
|
getTimestampInHrTime_fn = /* @__PURE__ */ __name(function() {
|
|
2796
|
-
return
|
|
3020
|
+
return clock.preciseNow();
|
|
2797
3021
|
}, "#getTimestampInHrTime");
|
|
2798
3022
|
__name(_OtelTaskLogger, "OtelTaskLogger");
|
|
2799
3023
|
var OtelTaskLogger = _OtelTaskLogger;
|
|
@@ -2816,7 +3040,7 @@ __name(_NoopTaskLogger, "NoopTaskLogger");
|
|
|
2816
3040
|
var NoopTaskLogger = _NoopTaskLogger;
|
|
2817
3041
|
|
|
2818
3042
|
// src/v3/logger/index.ts
|
|
2819
|
-
var
|
|
3043
|
+
var API_NAME3 = "logger";
|
|
2820
3044
|
var NOOP_TASK_LOGGER = new NoopTaskLogger();
|
|
2821
3045
|
var _getTaskLogger, getTaskLogger_fn;
|
|
2822
3046
|
var _LoggerAPI = class _LoggerAPI {
|
|
@@ -2830,10 +3054,10 @@ var _LoggerAPI = class _LoggerAPI {
|
|
|
2830
3054
|
return this._instance;
|
|
2831
3055
|
}
|
|
2832
3056
|
disable() {
|
|
2833
|
-
unregisterGlobal(
|
|
3057
|
+
unregisterGlobal(API_NAME3);
|
|
2834
3058
|
}
|
|
2835
3059
|
setGlobalTaskLogger(taskLogger) {
|
|
2836
|
-
return registerGlobal(
|
|
3060
|
+
return registerGlobal(API_NAME3, taskLogger);
|
|
2837
3061
|
}
|
|
2838
3062
|
debug(message, metadata) {
|
|
2839
3063
|
__privateMethod(this, _getTaskLogger, getTaskLogger_fn).call(this).debug(message, metadata);
|
|
@@ -2856,7 +3080,7 @@ var _LoggerAPI = class _LoggerAPI {
|
|
|
2856
3080
|
};
|
|
2857
3081
|
_getTaskLogger = new WeakSet();
|
|
2858
3082
|
getTaskLogger_fn = /* @__PURE__ */ __name(function() {
|
|
2859
|
-
return getGlobal(
|
|
3083
|
+
return getGlobal(API_NAME3) ?? NOOP_TASK_LOGGER;
|
|
2860
3084
|
}, "#getTaskLogger");
|
|
2861
3085
|
__name(_LoggerAPI, "LoggerAPI");
|
|
2862
3086
|
var LoggerAPI = _LoggerAPI;
|
|
@@ -3071,11 +3295,10 @@ var _DevRuntimeManager = class _DevRuntimeManager {
|
|
|
3071
3295
|
};
|
|
3072
3296
|
__name(_DevRuntimeManager, "DevRuntimeManager");
|
|
3073
3297
|
var DevRuntimeManager = _DevRuntimeManager;
|
|
3074
|
-
|
|
3075
|
-
// src/v3/runtime/prodRuntimeManager.ts
|
|
3076
3298
|
var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
3077
|
-
constructor(ipc) {
|
|
3299
|
+
constructor(ipc, options = {}) {
|
|
3078
3300
|
this.ipc = ipc;
|
|
3301
|
+
this.options = options;
|
|
3079
3302
|
this._taskWaits = /* @__PURE__ */ new Map();
|
|
3080
3303
|
this._batchWaits = /* @__PURE__ */ new Map();
|
|
3081
3304
|
this._tasks = /* @__PURE__ */ new Map();
|
|
@@ -3091,12 +3314,9 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
3091
3314
|
return this._tasks.get(id);
|
|
3092
3315
|
}
|
|
3093
3316
|
async waitForDuration(ms) {
|
|
3094
|
-
let timeout;
|
|
3095
3317
|
const now = Date.now();
|
|
3096
|
-
const resolveAfterDuration =
|
|
3097
|
-
|
|
3098
|
-
});
|
|
3099
|
-
if (ms < 1e4) {
|
|
3318
|
+
const resolveAfterDuration = setTimeout$1(ms, "duration");
|
|
3319
|
+
if (ms <= this.waitThresholdInMs) {
|
|
3100
3320
|
await resolveAfterDuration;
|
|
3101
3321
|
return;
|
|
3102
3322
|
}
|
|
@@ -3120,13 +3340,13 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
3120
3340
|
resolveAfterDuration
|
|
3121
3341
|
]);
|
|
3122
3342
|
this.ipc.send("CANCEL_CHECKPOINT", {});
|
|
3123
|
-
clearTimeout(timeout);
|
|
3124
3343
|
}
|
|
3125
3344
|
resumeAfterRestore() {
|
|
3126
3345
|
if (!this._waitForRestore) {
|
|
3127
3346
|
return;
|
|
3128
3347
|
}
|
|
3129
|
-
|
|
3348
|
+
clock.reset();
|
|
3349
|
+
this._waitForRestore.resolve("restore");
|
|
3130
3350
|
this._waitForRestore = void 0;
|
|
3131
3351
|
}
|
|
3132
3352
|
async waitUntil(date) {
|
|
@@ -3181,9 +3401,49 @@ var _ProdRuntimeManager = class _ProdRuntimeManager {
|
|
|
3181
3401
|
}
|
|
3182
3402
|
this._taskWaits.delete(execution.run.id);
|
|
3183
3403
|
}
|
|
3404
|
+
get waitThresholdInMs() {
|
|
3405
|
+
return this.options.waitThresholdInMs ?? 3e4;
|
|
3406
|
+
}
|
|
3184
3407
|
};
|
|
3185
3408
|
__name(_ProdRuntimeManager, "ProdRuntimeManager");
|
|
3186
3409
|
var ProdRuntimeManager = _ProdRuntimeManager;
|
|
3410
|
+
var _originClockTime, originClockTime_get, _originPreciseDate, originPreciseDate_get;
|
|
3411
|
+
var _PreciseWallClock = class _PreciseWallClock {
|
|
3412
|
+
constructor(options = {}) {
|
|
3413
|
+
__privateAdd(this, _originClockTime);
|
|
3414
|
+
__privateAdd(this, _originPreciseDate);
|
|
3415
|
+
this._origin = {
|
|
3416
|
+
clockTime: options.origin ?? process.hrtime(),
|
|
3417
|
+
preciseDate: options.now ?? new PreciseDate()
|
|
3418
|
+
};
|
|
3419
|
+
}
|
|
3420
|
+
preciseNow() {
|
|
3421
|
+
const elapsedHrTime = process.hrtime(__privateGet(this, _originClockTime, originClockTime_get));
|
|
3422
|
+
const elapsedNanoseconds = BigInt(elapsedHrTime[0]) * BigInt(1e9) + BigInt(elapsedHrTime[1]);
|
|
3423
|
+
const preciseDate = new PreciseDate(__privateGet(this, _originPreciseDate, originPreciseDate_get).getFullTime() + elapsedNanoseconds);
|
|
3424
|
+
const dateStruct = preciseDate.toStruct();
|
|
3425
|
+
return [
|
|
3426
|
+
dateStruct.seconds,
|
|
3427
|
+
dateStruct.nanos
|
|
3428
|
+
];
|
|
3429
|
+
}
|
|
3430
|
+
reset() {
|
|
3431
|
+
this._origin = {
|
|
3432
|
+
clockTime: process.hrtime(),
|
|
3433
|
+
preciseDate: new PreciseDate()
|
|
3434
|
+
};
|
|
3435
|
+
}
|
|
3436
|
+
};
|
|
3437
|
+
_originClockTime = new WeakSet();
|
|
3438
|
+
originClockTime_get = /* @__PURE__ */ __name(function() {
|
|
3439
|
+
return this._origin.clockTime;
|
|
3440
|
+
}, "#originClockTime");
|
|
3441
|
+
_originPreciseDate = new WeakSet();
|
|
3442
|
+
originPreciseDate_get = /* @__PURE__ */ __name(function() {
|
|
3443
|
+
return this._origin.preciseDate;
|
|
3444
|
+
}, "#originPreciseDate");
|
|
3445
|
+
__name(_PreciseWallClock, "PreciseWallClock");
|
|
3446
|
+
var PreciseWallClock = _PreciseWallClock;
|
|
3187
3447
|
var _TriggerTracer = class _TriggerTracer {
|
|
3188
3448
|
constructor(_config) {
|
|
3189
3449
|
this._config = _config;
|
|
@@ -3212,7 +3472,8 @@ var _TriggerTracer = class _TriggerTracer {
|
|
|
3212
3472
|
const attributes = options?.attributes ?? {};
|
|
3213
3473
|
return this.tracer.startActiveSpan(name, {
|
|
3214
3474
|
...options,
|
|
3215
|
-
attributes
|
|
3475
|
+
attributes,
|
|
3476
|
+
startTime: clock.preciseNow()
|
|
3216
3477
|
}, parentContext, async (span) => {
|
|
3217
3478
|
this.tracer.startSpan(name, {
|
|
3218
3479
|
...options,
|
|
@@ -3233,7 +3494,7 @@ var _TriggerTracer = class _TriggerTracer {
|
|
|
3233
3494
|
});
|
|
3234
3495
|
throw e;
|
|
3235
3496
|
} finally {
|
|
3236
|
-
span.end();
|
|
3497
|
+
span.end(clock.preciseNow());
|
|
3237
3498
|
}
|
|
3238
3499
|
});
|
|
3239
3500
|
}
|
|
@@ -3256,12 +3517,11 @@ __name(_TriggerTracer, "TriggerTracer");
|
|
|
3256
3517
|
var TriggerTracer = _TriggerTracer;
|
|
3257
3518
|
var _handleLog, handleLog_fn, _getTimestampInHrTime2, getTimestampInHrTime_fn2, _getAttributes, getAttributes_fn;
|
|
3258
3519
|
var _ConsoleInterceptor = class _ConsoleInterceptor {
|
|
3259
|
-
constructor(logger2
|
|
3520
|
+
constructor(logger2) {
|
|
3260
3521
|
__privateAdd(this, _handleLog);
|
|
3261
3522
|
__privateAdd(this, _getTimestampInHrTime2);
|
|
3262
3523
|
__privateAdd(this, _getAttributes);
|
|
3263
3524
|
this.logger = logger2;
|
|
3264
|
-
this.preciseDateOrigin = preciseDateOrigin;
|
|
3265
3525
|
}
|
|
3266
3526
|
// Intercept the console and send logs to the OpenTelemetry logger
|
|
3267
3527
|
// during the execution of the callback
|
|
@@ -3286,22 +3546,21 @@ var _ConsoleInterceptor = class _ConsoleInterceptor {
|
|
|
3286
3546
|
}
|
|
3287
3547
|
}
|
|
3288
3548
|
log(...args) {
|
|
3289
|
-
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.INFO, "Log", ...args);
|
|
3549
|
+
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.INFO, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Log", ...args);
|
|
3290
3550
|
}
|
|
3291
3551
|
info(...args) {
|
|
3292
|
-
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.INFO, "Info", ...args);
|
|
3552
|
+
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.INFO, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Info", ...args);
|
|
3293
3553
|
}
|
|
3294
3554
|
warn(...args) {
|
|
3295
|
-
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.WARN, "Warn", ...args);
|
|
3555
|
+
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.WARN, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Warn", ...args);
|
|
3296
3556
|
}
|
|
3297
3557
|
error(...args) {
|
|
3298
|
-
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.ERROR, "Error", ...args);
|
|
3558
|
+
__privateMethod(this, _handleLog, handleLog_fn).call(this, SeverityNumber.ERROR, __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this), "Error", ...args);
|
|
3299
3559
|
}
|
|
3300
3560
|
};
|
|
3301
3561
|
_handleLog = new WeakSet();
|
|
3302
|
-
handleLog_fn = /* @__PURE__ */ __name(function(severityNumber, severityText, ...args) {
|
|
3562
|
+
handleLog_fn = /* @__PURE__ */ __name(function(severityNumber, timestamp, severityText, ...args) {
|
|
3303
3563
|
const body = util.format(...args);
|
|
3304
|
-
const timestamp = __privateMethod(this, _getTimestampInHrTime2, getTimestampInHrTime_fn2).call(this);
|
|
3305
3564
|
const parsed = tryParseJSON(body);
|
|
3306
3565
|
if (parsed.ok) {
|
|
3307
3566
|
this.logger.emit({
|
|
@@ -3326,7 +3585,7 @@ handleLog_fn = /* @__PURE__ */ __name(function(severityNumber, severityText, ...
|
|
|
3326
3585
|
}, "#handleLog");
|
|
3327
3586
|
_getTimestampInHrTime2 = new WeakSet();
|
|
3328
3587
|
getTimestampInHrTime_fn2 = /* @__PURE__ */ __name(function() {
|
|
3329
|
-
return
|
|
3588
|
+
return clock.preciseNow();
|
|
3330
3589
|
}, "#getTimestampInHrTime");
|
|
3331
3590
|
_getAttributes = new WeakSet();
|
|
3332
3591
|
getAttributes_fn = /* @__PURE__ */ __name(function(severityNumber1) {
|
|
@@ -3712,7 +3971,12 @@ var _TracingSDK = class _TracingSDK {
|
|
|
3712
3971
|
url: `${config.url}/v1/traces`,
|
|
3713
3972
|
timeoutMillis: config.forceFlushTimeoutMillis ?? 1e3
|
|
3714
3973
|
});
|
|
3715
|
-
traceProvider.addSpanProcessor(new TaskContextSpanProcessor(new
|
|
3974
|
+
traceProvider.addSpanProcessor(new TaskContextSpanProcessor(getEnvVar("OTEL_BATCH_PROCESSING_ENABLED") === "1" ? new BatchSpanProcessor(spanExporter, {
|
|
3975
|
+
maxExportBatchSize: parseInt(getEnvVar("OTEL_SPAN_MAX_EXPORT_BATCH_SIZE") ?? "64"),
|
|
3976
|
+
scheduledDelayMillis: parseInt(getEnvVar("OTEL_SPAN_SCHEDULED_DELAY_MILLIS") ?? "200"),
|
|
3977
|
+
exportTimeoutMillis: parseInt(getEnvVar("OTEL_SPAN_EXPORT_TIMEOUT_MILLIS") ?? "30000"),
|
|
3978
|
+
maxQueueSize: parseInt(getEnvVar("OTEL_SPAN_MAX_QUEUE_SIZE") ?? "512")
|
|
3979
|
+
}) : new SimpleSpanProcessor(spanExporter)));
|
|
3716
3980
|
traceProvider.register();
|
|
3717
3981
|
registerInstrumentations({
|
|
3718
3982
|
instrumentations: config.instrumentations ?? [],
|
|
@@ -3728,7 +3992,12 @@ var _TracingSDK = class _TracingSDK {
|
|
|
3728
3992
|
attributeValueLengthLimit: OTEL_LOG_ATTRIBUTE_VALUE_LENGTH_LIMIT
|
|
3729
3993
|
}
|
|
3730
3994
|
});
|
|
3731
|
-
loggerProvider.addLogRecordProcessor(new TaskContextLogProcessor(new
|
|
3995
|
+
loggerProvider.addLogRecordProcessor(new TaskContextLogProcessor(getEnvVar("OTEL_BATCH_PROCESSING_ENABLED") === "1" ? new BatchLogRecordProcessor(logExporter, {
|
|
3996
|
+
maxExportBatchSize: parseInt(getEnvVar("OTEL_LOG_MAX_EXPORT_BATCH_SIZE") ?? "64"),
|
|
3997
|
+
scheduledDelayMillis: parseInt(getEnvVar("OTEL_LOG_SCHEDULED_DELAY_MILLIS") ?? "200"),
|
|
3998
|
+
exportTimeoutMillis: parseInt(getEnvVar("OTEL_LOG_EXPORT_TIMEOUT_MILLIS") ?? "30000"),
|
|
3999
|
+
maxQueueSize: parseInt(getEnvVar("OTEL_LOG_MAX_QUEUE_SIZE") ?? "512")
|
|
4000
|
+
}) : new SimpleLogRecordProcessor(logExporter)));
|
|
3732
4001
|
this._logProvider = loggerProvider;
|
|
3733
4002
|
this._spanExporter = spanExporter;
|
|
3734
4003
|
this._traceProvider = traceProvider;
|
|
@@ -3737,11 +4006,11 @@ var _TracingSDK = class _TracingSDK {
|
|
|
3737
4006
|
this.getTracer = traceProvider.getTracer.bind(traceProvider);
|
|
3738
4007
|
}
|
|
3739
4008
|
async flush() {
|
|
3740
|
-
await this.
|
|
4009
|
+
await this._traceProvider.forceFlush();
|
|
3741
4010
|
await this._logProvider.forceFlush();
|
|
3742
4011
|
}
|
|
3743
4012
|
async shutdown() {
|
|
3744
|
-
await this.
|
|
4013
|
+
await this._traceProvider.shutdown();
|
|
3745
4014
|
await this._logProvider.shutdown();
|
|
3746
4015
|
}
|
|
3747
4016
|
};
|
|
@@ -3792,7 +4061,9 @@ function recordSpanException(span, error) {
|
|
|
3792
4061
|
});
|
|
3793
4062
|
}
|
|
3794
4063
|
__name(recordSpanException, "recordSpanException");
|
|
3795
|
-
|
|
4064
|
+
|
|
4065
|
+
// src/v3/utils/ioSerialization.ts
|
|
4066
|
+
async function parsePacket(value) {
|
|
3796
4067
|
if (!value.data) {
|
|
3797
4068
|
return void 0;
|
|
3798
4069
|
}
|
|
@@ -3800,6 +4071,7 @@ function parsePacket(value) {
|
|
|
3800
4071
|
case "application/json":
|
|
3801
4072
|
return JSON.parse(value.data);
|
|
3802
4073
|
case "application/super+json":
|
|
4074
|
+
const { parse } = await loadSuperJSON();
|
|
3803
4075
|
return parse(value.data);
|
|
3804
4076
|
case "text/plain":
|
|
3805
4077
|
return value.data;
|
|
@@ -3810,7 +4082,7 @@ function parsePacket(value) {
|
|
|
3810
4082
|
}
|
|
3811
4083
|
}
|
|
3812
4084
|
__name(parsePacket, "parsePacket");
|
|
3813
|
-
function stringifyIO(value) {
|
|
4085
|
+
async function stringifyIO(value) {
|
|
3814
4086
|
if (value === void 0) {
|
|
3815
4087
|
return {
|
|
3816
4088
|
dataType: "application/json"
|
|
@@ -3822,10 +4094,18 @@ function stringifyIO(value) {
|
|
|
3822
4094
|
dataType: "text/plain"
|
|
3823
4095
|
};
|
|
3824
4096
|
}
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
4097
|
+
try {
|
|
4098
|
+
const { stringify } = await loadSuperJSON();
|
|
4099
|
+
const data = stringify(value);
|
|
4100
|
+
return {
|
|
4101
|
+
data,
|
|
4102
|
+
dataType: "application/super+json"
|
|
4103
|
+
};
|
|
4104
|
+
} catch {
|
|
4105
|
+
return {
|
|
4106
|
+
dataType: "application/json"
|
|
4107
|
+
};
|
|
4108
|
+
}
|
|
3829
4109
|
}
|
|
3830
4110
|
__name(stringifyIO, "stringifyIO");
|
|
3831
4111
|
async function conditionallyExportPacket(packet, pathPrefix, tracer) {
|
|
@@ -3927,9 +4207,9 @@ async function importPacket(packet, span) {
|
|
|
3927
4207
|
return packet;
|
|
3928
4208
|
}
|
|
3929
4209
|
__name(importPacket, "importPacket");
|
|
3930
|
-
function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
4210
|
+
async function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
3931
4211
|
if (!packet.data) {
|
|
3932
|
-
return
|
|
4212
|
+
return;
|
|
3933
4213
|
}
|
|
3934
4214
|
switch (packet.dataType) {
|
|
3935
4215
|
case "application/json":
|
|
@@ -3938,12 +4218,20 @@ function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
|
3938
4218
|
[dataTypeKey]: packet.dataType
|
|
3939
4219
|
};
|
|
3940
4220
|
case "application/super+json":
|
|
3941
|
-
const
|
|
3942
|
-
|
|
3943
|
-
|
|
3944
|
-
|
|
3945
|
-
|
|
3946
|
-
|
|
4221
|
+
const { parse } = await loadSuperJSON();
|
|
4222
|
+
if (typeof packet.data === "undefined" || packet.data === null) {
|
|
4223
|
+
return;
|
|
4224
|
+
}
|
|
4225
|
+
try {
|
|
4226
|
+
const parsed = parse(packet.data);
|
|
4227
|
+
const jsonified = JSON.parse(JSON.stringify(parsed, safeReplacer));
|
|
4228
|
+
return {
|
|
4229
|
+
...flattenAttributes(jsonified, dataKey),
|
|
4230
|
+
[dataTypeKey]: "application/json"
|
|
4231
|
+
};
|
|
4232
|
+
} catch {
|
|
4233
|
+
return;
|
|
4234
|
+
}
|
|
3947
4235
|
case "application/store":
|
|
3948
4236
|
return {
|
|
3949
4237
|
[dataKey]: packet.data,
|
|
@@ -3951,15 +4239,15 @@ function createPacketAttributes(packet, dataKey, dataTypeKey) {
|
|
|
3951
4239
|
};
|
|
3952
4240
|
case "text/plain":
|
|
3953
4241
|
return {
|
|
3954
|
-
[
|
|
3955
|
-
[
|
|
4242
|
+
[dataKey]: packet.data,
|
|
4243
|
+
[dataTypeKey]: packet.dataType
|
|
3956
4244
|
};
|
|
3957
4245
|
default:
|
|
3958
|
-
return
|
|
4246
|
+
return;
|
|
3959
4247
|
}
|
|
3960
4248
|
}
|
|
3961
4249
|
__name(createPacketAttributes, "createPacketAttributes");
|
|
3962
|
-
function
|
|
4250
|
+
async function createPacketAttributesAsJson(data, dataType) {
|
|
3963
4251
|
if (typeof data === "string" || typeof data === "number" || typeof data === "boolean" || data === null || data === void 0) {
|
|
3964
4252
|
return data;
|
|
3965
4253
|
}
|
|
@@ -3967,8 +4255,9 @@ function createPackageAttributesAsJson(data, dataType) {
|
|
|
3967
4255
|
case "application/json":
|
|
3968
4256
|
return imposeAttributeLimits(flattenAttributes(data, void 0));
|
|
3969
4257
|
case "application/super+json":
|
|
4258
|
+
const { deserialize } = await loadSuperJSON();
|
|
3970
4259
|
const deserialized = deserialize(data);
|
|
3971
|
-
const jsonify =
|
|
4260
|
+
const jsonify = safeJsonParse(JSON.stringify(deserialized, safeReplacer));
|
|
3972
4261
|
return imposeAttributeLimits(flattenAttributes(jsonify, void 0));
|
|
3973
4262
|
case "application/store":
|
|
3974
4263
|
return data;
|
|
@@ -3976,13 +4265,14 @@ function createPackageAttributesAsJson(data, dataType) {
|
|
|
3976
4265
|
return {};
|
|
3977
4266
|
}
|
|
3978
4267
|
}
|
|
3979
|
-
__name(
|
|
3980
|
-
function prettyPrintPacket(rawData, dataType) {
|
|
4268
|
+
__name(createPacketAttributesAsJson, "createPacketAttributesAsJson");
|
|
4269
|
+
async function prettyPrintPacket(rawData, dataType) {
|
|
3981
4270
|
if (rawData === void 0) {
|
|
3982
4271
|
return "";
|
|
3983
4272
|
}
|
|
3984
4273
|
if (dataType === "application/super+json") {
|
|
3985
|
-
|
|
4274
|
+
const { deserialize } = await loadSuperJSON();
|
|
4275
|
+
return await prettyPrintPacket(deserialize(rawData), "application/json");
|
|
3986
4276
|
}
|
|
3987
4277
|
if (dataType === "application/json") {
|
|
3988
4278
|
return JSON.stringify(rawData, safeReplacer, 2);
|
|
@@ -4026,6 +4316,18 @@ function getPacketExtension(outputType) {
|
|
|
4026
4316
|
}
|
|
4027
4317
|
}
|
|
4028
4318
|
__name(getPacketExtension, "getPacketExtension");
|
|
4319
|
+
async function loadSuperJSON() {
|
|
4320
|
+
return await import('superjson');
|
|
4321
|
+
}
|
|
4322
|
+
__name(loadSuperJSON, "loadSuperJSON");
|
|
4323
|
+
function safeJsonParse(value) {
|
|
4324
|
+
try {
|
|
4325
|
+
return JSON.parse(value);
|
|
4326
|
+
} catch {
|
|
4327
|
+
return;
|
|
4328
|
+
}
|
|
4329
|
+
}
|
|
4330
|
+
__name(safeJsonParse, "safeJsonParse");
|
|
4029
4331
|
|
|
4030
4332
|
// src/v3/workers/taskExecutor.ts
|
|
4031
4333
|
var _callRun, callRun_fn, _callTaskInit, callTaskInit_fn, _callTaskCleanup, callTaskCleanup_fn, _handleError, handleError_fn;
|
|
@@ -4065,13 +4367,16 @@ var _TaskExecutor = class _TaskExecutor {
|
|
|
4065
4367
|
let initOutput;
|
|
4066
4368
|
try {
|
|
4067
4369
|
const payloadPacket = await conditionallyImportPacket(originalPacket, this._tracer);
|
|
4068
|
-
parsedPayload = parsePacket(payloadPacket);
|
|
4370
|
+
parsedPayload = await parsePacket(payloadPacket);
|
|
4069
4371
|
initOutput = await __privateMethod(this, _callTaskInit, callTaskInit_fn).call(this, parsedPayload, ctx);
|
|
4070
4372
|
const output = await __privateMethod(this, _callRun, callRun_fn).call(this, parsedPayload, ctx, initOutput);
|
|
4071
4373
|
try {
|
|
4072
|
-
const stringifiedOutput = stringifyIO(output);
|
|
4374
|
+
const stringifiedOutput = await stringifyIO(output);
|
|
4073
4375
|
const finalOutput = await conditionallyExportPacket(stringifiedOutput, `${execution.attempt.id}/output`, this._tracer);
|
|
4074
|
-
|
|
4376
|
+
const attributes = await createPacketAttributes(finalOutput, SemanticInternalAttributes.OUTPUT, SemanticInternalAttributes.OUTPUT_TYPE);
|
|
4377
|
+
if (attributes) {
|
|
4378
|
+
span.setAttributes(attributes);
|
|
4379
|
+
}
|
|
4075
4380
|
return {
|
|
4076
4381
|
ok: true,
|
|
4077
4382
|
id: execution.attempt.id,
|
|
@@ -4313,6 +4618,6 @@ function parseBatchTriggerTaskRequestBody(body) {
|
|
|
4313
4618
|
}
|
|
4314
4619
|
__name(parseBatchTriggerTaskRequestBody, "parseBatchTriggerTaskRequestBody");
|
|
4315
4620
|
|
|
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,
|
|
4621
|
+
export { ApiClient, ApiClientManager, BackgroundWorkerClientMessages, BackgroundWorkerMetadata, BackgroundWorkerProperties, BackgroundWorkerServerMessages, BatchTaskRunExecutionResult, BatchTriggerTaskRequestBody, BatchTriggerTaskResponse, CanceledRunResponse, CancellationSpanEvent, ClientToSharedQueueMessages, Config, ConsoleInterceptor, CoordinatorToPlatformMessages, CoordinatorToProdWorkerMessages, CreateAuthorizationCodeResponseSchema, CreateBackgroundWorkerRequestBody, CreateBackgroundWorkerResponse, CreateUploadPayloadUrlResponseBody, DeploymentErrorData, 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, ReplayRunResponse, RetryOptions, SemanticInternalAttributes, SharedQueueToClientMessages, SimpleStructuredLogger, SlidingWindowRateLimit, SpanEvent, SpanEvents, SpanMessagingEvent, StartDeploymentIndexingRequestBody, StartDeploymentIndexingResponseBody, TaskContextSpanProcessor, TaskEventStyle, TaskExecutor, TaskMetadata, TaskMetadataFailedToParseData, 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, ZodSchemaParsedError, 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, groupTaskMetadataIssuesByTask, iconStringForSeverity, imposeAttributeLimits, isCancellationSpanEvent, isExceptionSpanEvent, logLevels, logger, millisecondsToNanoseconds, nanosecondsToMilliseconds, omit, packetRequiresOffloading, parseBatchTriggerTaskRequestBody, parseError, parsePacket, parseTriggerTaskRequestBody, prettyPrintPacket, primitiveValueOrflattenedAttributes, recordSpanException, runtime, serverWebsocketMessages, stringPatternMatchers, stringifyIO, taskContextManager, unflattenAttributes, workerToChildMessages };
|
|
4317
4622
|
//# sourceMappingURL=out.js.map
|
|
4318
4623
|
//# sourceMappingURL=index.mjs.map
|