@trigger.dev/core 0.0.0-v3-deploy-fix-20240506100153 → 0.0.0-v3-prerelease-20240513155118
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-akmn1vqt.d.ts → catalog-KbyTBoap.d.ts} +1 -1
- package/dist/{catalog-Bh7P1hZc.d.mts → catalog-ck7x04PV.d.mts} +1 -1
- package/dist/v3/index.d.mts +35 -16
- package/dist/v3/index.d.ts +35 -16
- package/dist/v3/index.js +86 -59
- package/dist/v3/index.js.map +1 -1
- package/dist/v3/index.mjs +86 -59
- package/dist/v3/index.mjs.map +1 -1
- package/dist/v3/otel/index.js.map +1 -1
- package/dist/v3/otel/index.mjs.map +1 -1
- package/dist/v3/prod/index.js +1 -1
- package/dist/v3/prod/index.js.map +1 -1
- package/dist/v3/prod/index.mjs +1 -1
- package/dist/v3/prod/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 +35 -35
- package/dist/v3/workers/index.js.map +1 -1
- package/dist/v3/workers/index.mjs +35 -35
- package/dist/v3/workers/index.mjs.map +1 -1
- package/dist/v3/zodMessageHandler.d.mts +1 -1
- package/dist/v3/zodMessageHandler.d.ts +1 -1
- package/package.json +1 -1
|
@@ -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-KbyTBoap.js';
|
|
8
|
+
export { O as OtelTaskLogger, J as logLevels } from '../../catalog-KbyTBoap.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
|
@@ -11,7 +11,6 @@ var sdkTraceNode = require('@opentelemetry/sdk-trace-node');
|
|
|
11
11
|
var semanticConventions = require('@opentelemetry/semantic-conventions');
|
|
12
12
|
var zod = require('zod');
|
|
13
13
|
var zodValidationError = require('zod-validation-error');
|
|
14
|
-
var async_hooks = require('async_hooks');
|
|
15
14
|
var preciseDate = require('@google-cloud/precise-date');
|
|
16
15
|
var util = require('util');
|
|
17
16
|
|
|
@@ -942,7 +941,8 @@ zod.z.object({
|
|
|
942
941
|
variables: zod.z.record(zod.z.string())
|
|
943
942
|
});
|
|
944
943
|
zod.z.object({
|
|
945
|
-
imageReference: zod.z.string()
|
|
944
|
+
imageReference: zod.z.string(),
|
|
945
|
+
selfHosted: zod.z.boolean().optional()
|
|
946
946
|
});
|
|
947
947
|
zod.z.object({
|
|
948
948
|
id: zod.z.string(),
|
|
@@ -1415,19 +1415,6 @@ function requestInitWithCache(requestInit) {
|
|
|
1415
1415
|
}
|
|
1416
1416
|
}
|
|
1417
1417
|
__name(requestInitWithCache, "requestInitWithCache");
|
|
1418
|
-
var _SafeAsyncLocalStorage = class _SafeAsyncLocalStorage {
|
|
1419
|
-
constructor() {
|
|
1420
|
-
this.storage = new async_hooks.AsyncLocalStorage();
|
|
1421
|
-
}
|
|
1422
|
-
runWith(context2, fn) {
|
|
1423
|
-
return this.storage.run(context2, fn);
|
|
1424
|
-
}
|
|
1425
|
-
getStore() {
|
|
1426
|
-
return this.storage.getStore();
|
|
1427
|
-
}
|
|
1428
|
-
};
|
|
1429
|
-
__name(_SafeAsyncLocalStorage, "SafeAsyncLocalStorage");
|
|
1430
|
-
var SafeAsyncLocalStorage = _SafeAsyncLocalStorage;
|
|
1431
1418
|
|
|
1432
1419
|
// src/v3/apiClient/index.ts
|
|
1433
1420
|
var zodFetchOptions = {
|
|
@@ -1579,19 +1566,33 @@ getHeaders_fn = /* @__PURE__ */ __name(function(spanParentAsLink) {
|
|
|
1579
1566
|
}, "#getHeaders");
|
|
1580
1567
|
__name(_ApiClient, "ApiClient");
|
|
1581
1568
|
var ApiClient = _ApiClient;
|
|
1582
|
-
|
|
1583
|
-
|
|
1569
|
+
|
|
1570
|
+
// src/v3/apiClientManager/index.ts
|
|
1571
|
+
var API_NAME2 = "api-client";
|
|
1572
|
+
var _getConfig, getConfig_fn;
|
|
1573
|
+
var _APIClientManagerAPI = class _APIClientManagerAPI {
|
|
1584
1574
|
constructor() {
|
|
1585
|
-
__privateAdd(this,
|
|
1586
|
-
|
|
1575
|
+
__privateAdd(this, _getConfig);
|
|
1576
|
+
}
|
|
1577
|
+
static getInstance() {
|
|
1578
|
+
if (!this._instance) {
|
|
1579
|
+
this._instance = new _APIClientManagerAPI();
|
|
1580
|
+
}
|
|
1581
|
+
return this._instance;
|
|
1582
|
+
}
|
|
1583
|
+
disable() {
|
|
1584
|
+
unregisterGlobal(API_NAME2);
|
|
1585
|
+
}
|
|
1586
|
+
setGlobalAPIClientConfiguration(config) {
|
|
1587
|
+
return registerGlobal(API_NAME2, config);
|
|
1587
1588
|
}
|
|
1588
1589
|
get baseURL() {
|
|
1589
|
-
const store = __privateMethod(this,
|
|
1590
|
+
const store = __privateMethod(this, _getConfig, getConfig_fn).call(this);
|
|
1590
1591
|
return store?.baseURL ?? getEnvVar("TRIGGER_API_URL") ?? "https://api.trigger.dev";
|
|
1591
1592
|
}
|
|
1592
1593
|
get accessToken() {
|
|
1593
|
-
const store = __privateMethod(this,
|
|
1594
|
-
return store?.
|
|
1594
|
+
const store = __privateMethod(this, _getConfig, getConfig_fn).call(this);
|
|
1595
|
+
return store?.secretKey ?? getEnvVar("TRIGGER_SECRET_KEY");
|
|
1595
1596
|
}
|
|
1596
1597
|
get client() {
|
|
1597
1598
|
if (!this.baseURL || !this.accessToken) {
|
|
@@ -1599,17 +1600,16 @@ var _ApiClientManager = class _ApiClientManager {
|
|
|
1599
1600
|
}
|
|
1600
1601
|
return new ApiClient(this.baseURL, this.accessToken);
|
|
1601
1602
|
}
|
|
1602
|
-
runWith(context2, fn) {
|
|
1603
|
-
return this._storage.runWith(context2, fn);
|
|
1604
|
-
}
|
|
1605
1603
|
};
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
return
|
|
1609
|
-
}, "#
|
|
1610
|
-
__name(
|
|
1611
|
-
var
|
|
1612
|
-
|
|
1604
|
+
_getConfig = new WeakSet();
|
|
1605
|
+
getConfig_fn = /* @__PURE__ */ __name(function() {
|
|
1606
|
+
return getGlobal(API_NAME2);
|
|
1607
|
+
}, "#getConfig");
|
|
1608
|
+
__name(_APIClientManagerAPI, "APIClientManagerAPI");
|
|
1609
|
+
var APIClientManagerAPI = _APIClientManagerAPI;
|
|
1610
|
+
|
|
1611
|
+
// src/v3/apiClientManager-api.ts
|
|
1612
|
+
var apiClientManager = APIClientManagerAPI.getInstance();
|
|
1613
1613
|
|
|
1614
1614
|
// src/v3/utils/ioSerialization.ts
|
|
1615
1615
|
async function parsePacket(value) {
|
|
@@ -2280,7 +2280,7 @@ __name(_SimpleClock, "SimpleClock");
|
|
|
2280
2280
|
var SimpleClock = _SimpleClock;
|
|
2281
2281
|
|
|
2282
2282
|
// src/v3/clock/index.ts
|
|
2283
|
-
var
|
|
2283
|
+
var API_NAME3 = "clock";
|
|
2284
2284
|
var SIMPLE_CLOCK = new SimpleClock();
|
|
2285
2285
|
var _getClock, getClock_fn;
|
|
2286
2286
|
var _ClockAPI = class _ClockAPI {
|
|
@@ -2294,7 +2294,7 @@ var _ClockAPI = class _ClockAPI {
|
|
|
2294
2294
|
return this._instance;
|
|
2295
2295
|
}
|
|
2296
2296
|
setGlobalClock(clock2) {
|
|
2297
|
-
return registerGlobal(
|
|
2297
|
+
return registerGlobal(API_NAME3, clock2);
|
|
2298
2298
|
}
|
|
2299
2299
|
preciseNow() {
|
|
2300
2300
|
return __privateMethod(this, _getClock, getClock_fn).call(this).preciseNow();
|
|
@@ -2305,7 +2305,7 @@ var _ClockAPI = class _ClockAPI {
|
|
|
2305
2305
|
};
|
|
2306
2306
|
_getClock = new WeakSet();
|
|
2307
2307
|
getClock_fn = /* @__PURE__ */ __name(function() {
|
|
2308
|
-
return getGlobal(
|
|
2308
|
+
return getGlobal(API_NAME3) ?? SIMPLE_CLOCK;
|
|
2309
2309
|
}, "#getClock");
|
|
2310
2310
|
__name(_ClockAPI, "ClockAPI");
|
|
2311
2311
|
var ClockAPI = _ClockAPI;
|