@trigger.dev/core 3.0.0-beta.26 → 3.0.0-beta.27
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/{catalog-g2Qc0Ukb.d.mts → catalog-Bh7P1hZc.d.mts} +3 -3
- package/dist/{catalog-XNyNDUOF.d.ts → catalog-akmn1vqt.d.ts} +3 -3
- package/dist/v3/index.d.mts +88 -3
- package/dist/v3/index.d.ts +88 -3
- package/dist/v3/index.js +42 -0
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +40 -1
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/workers/index.d.mts +2 -2
- package/dist/v3/workers/index.d.ts +2 -2
- package/dist/v3/workers/index.js +41 -3
- package/dist/v3/workers/index.js.map +1 -1
- package/dist/v3/workers/index.mjs +41 -3
- package/dist/v3/workers/index.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4,8 +4,8 @@ export { TracingDiagnosticLogLevel, recordSpanException } from '../otel/index.mj
|
|
|
4
4
|
import { p as TaskRunExecution, T as TaskRunExecutionResult } from '../../manager-WNMVbgHf.mjs';
|
|
5
5
|
export { R as RuntimeManager } from '../../manager-WNMVbgHf.mjs';
|
|
6
6
|
import { B as BackgroundWorkerProperties } from '../../messages-vq7Bk4Ap.mjs';
|
|
7
|
-
import { f as TriggerTracer, p as Config, G as ProjectConfig, B as HandleErrorFunction, c as TaskMetadataWithFunctions, C as Clock, a as ClockTime, b as TaskCatalog, d as TaskFileMetadata, e as TaskMetadataWithFilePath } from '../../catalog-
|
|
8
|
-
export { O as OtelTaskLogger, J as logLevels } from '../../catalog-
|
|
7
|
+
import { f as TriggerTracer, p as Config, G as ProjectConfig, B as HandleErrorFunction, c as TaskMetadataWithFunctions, C as Clock, a as ClockTime, b as TaskCatalog, d as TaskFileMetadata, e as TaskMetadataWithFilePath } from '../../catalog-Bh7P1hZc.mjs';
|
|
8
|
+
export { O as OtelTaskLogger, J as logLevels } from '../../catalog-Bh7P1hZc.mjs';
|
|
9
9
|
import { PreciseDate } from '@google-cloud/precise-date';
|
|
10
10
|
import { LogRecordProcessor, LogRecord } from '@opentelemetry/sdk-logs';
|
|
11
11
|
import { SpanProcessor, Span } from '@opentelemetry/sdk-trace-base';
|
|
@@ -4,8 +4,8 @@ export { TracingDiagnosticLogLevel, recordSpanException } from '../otel/index.js
|
|
|
4
4
|
import { p as TaskRunExecution, T as TaskRunExecutionResult } from '../../manager-WNMVbgHf.js';
|
|
5
5
|
export { R as RuntimeManager } from '../../manager-WNMVbgHf.js';
|
|
6
6
|
import { B as BackgroundWorkerProperties } from '../../messages-vq7Bk4Ap.js';
|
|
7
|
-
import { f as TriggerTracer, p as Config, G as ProjectConfig, B as HandleErrorFunction, c as TaskMetadataWithFunctions, C as Clock, a as ClockTime, b as TaskCatalog, d as TaskFileMetadata, e as TaskMetadataWithFilePath } from '../../catalog-
|
|
8
|
-
export { O as OtelTaskLogger, J as logLevels } from '../../catalog-
|
|
7
|
+
import { f as TriggerTracer, p as Config, G as ProjectConfig, B as HandleErrorFunction, c as TaskMetadataWithFunctions, C as Clock, a as ClockTime, b as TaskCatalog, d as TaskFileMetadata, e as TaskMetadataWithFilePath } from '../../catalog-akmn1vqt.js';
|
|
8
|
+
export { O as OtelTaskLogger, J as logLevels } from '../../catalog-akmn1vqt.js';
|
|
9
9
|
import { PreciseDate } from '@google-cloud/precise-date';
|
|
10
10
|
import { LogRecordProcessor, LogRecord } from '@opentelemetry/sdk-logs';
|
|
11
11
|
import { SpanProcessor, Span } from '@opentelemetry/sdk-trace-base';
|
package/dist/v3/workers/index.js
CHANGED
|
@@ -1087,6 +1087,39 @@ zod.z.object({
|
|
|
1087
1087
|
page: zod.z.number().optional(),
|
|
1088
1088
|
perPage: zod.z.number().optional()
|
|
1089
1089
|
});
|
|
1090
|
+
var RunStatus = zod.z.enum([
|
|
1091
|
+
"PENDING",
|
|
1092
|
+
"EXECUTING",
|
|
1093
|
+
"PAUSED",
|
|
1094
|
+
"COMPLETED",
|
|
1095
|
+
"FAILED",
|
|
1096
|
+
"CANCELED"
|
|
1097
|
+
]);
|
|
1098
|
+
var AttemptStatus = zod.z.enum([
|
|
1099
|
+
"PENDING",
|
|
1100
|
+
"EXECUTING",
|
|
1101
|
+
"PAUSED",
|
|
1102
|
+
"COMPLETED",
|
|
1103
|
+
"FAILED",
|
|
1104
|
+
"CANCELED"
|
|
1105
|
+
]);
|
|
1106
|
+
var RetrieveRunResponse = zod.z.object({
|
|
1107
|
+
id: zod.z.string(),
|
|
1108
|
+
status: RunStatus,
|
|
1109
|
+
taskIdentifier: zod.z.string(),
|
|
1110
|
+
idempotencyKey: zod.z.string().optional(),
|
|
1111
|
+
version: zod.z.string().optional(),
|
|
1112
|
+
createdAt: zod.z.coerce.date(),
|
|
1113
|
+
updatedAt: zod.z.coerce.date(),
|
|
1114
|
+
attempts: zod.z.array(zod.z.object({
|
|
1115
|
+
id: zod.z.string(),
|
|
1116
|
+
status: AttemptStatus,
|
|
1117
|
+
createdAt: zod.z.coerce.date(),
|
|
1118
|
+
updatedAt: zod.z.coerce.date(),
|
|
1119
|
+
startedAt: zod.z.coerce.date().optional(),
|
|
1120
|
+
completedAt: zod.z.coerce.date().optional()
|
|
1121
|
+
}).optional())
|
|
1122
|
+
});
|
|
1090
1123
|
|
|
1091
1124
|
// src/v3/apiErrors.ts
|
|
1092
1125
|
var _APIError = class _APIError extends Error {
|
|
@@ -1460,6 +1493,12 @@ var _ApiClient = class _ApiClient {
|
|
|
1460
1493
|
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
|
|
1461
1494
|
}, zodFetchOptions);
|
|
1462
1495
|
}
|
|
1496
|
+
retrieveRun(runId) {
|
|
1497
|
+
return zodfetch(RetrieveRunResponse, `${this.baseUrl}/api/v3/runs/${runId}`, {
|
|
1498
|
+
method: "GET",
|
|
1499
|
+
headers: __privateMethod(this, _getHeaders, getHeaders_fn).call(this, false)
|
|
1500
|
+
}, zodFetchOptions);
|
|
1501
|
+
}
|
|
1463
1502
|
replayRun(runId) {
|
|
1464
1503
|
return zodfetch(ReplayRunResponse, `${this.baseUrl}/api/v1/runs/${runId}/replay`, {
|
|
1465
1504
|
method: "POST",
|
|
@@ -2279,7 +2318,6 @@ var logLevels = [
|
|
|
2279
2318
|
"none",
|
|
2280
2319
|
"error",
|
|
2281
2320
|
"warn",
|
|
2282
|
-
"log",
|
|
2283
2321
|
"info",
|
|
2284
2322
|
"debug"
|
|
2285
2323
|
];
|
|
@@ -2292,7 +2330,7 @@ var _OtelTaskLogger = class _OtelTaskLogger {
|
|
|
2292
2330
|
this._level = logLevels.indexOf(_config.level);
|
|
2293
2331
|
}
|
|
2294
2332
|
debug(message, properties) {
|
|
2295
|
-
if (this._level <
|
|
2333
|
+
if (this._level < 4)
|
|
2296
2334
|
return;
|
|
2297
2335
|
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "debug", apiLogs.SeverityNumber.DEBUG, properties);
|
|
2298
2336
|
}
|
|
@@ -2302,7 +2340,7 @@ var _OtelTaskLogger = class _OtelTaskLogger {
|
|
|
2302
2340
|
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "log", apiLogs.SeverityNumber.INFO, properties);
|
|
2303
2341
|
}
|
|
2304
2342
|
info(message, properties) {
|
|
2305
|
-
if (this._level <
|
|
2343
|
+
if (this._level < 3)
|
|
2306
2344
|
return;
|
|
2307
2345
|
__privateMethod(this, _emitLog, emitLog_fn).call(this, message, __privateMethod(this, _getTimestampInHrTime, getTimestampInHrTime_fn).call(this), "info", apiLogs.SeverityNumber.INFO, properties);
|
|
2308
2346
|
}
|