@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
|
@@ -9,7 +9,6 @@ import { NodeTracerProvider, BatchSpanProcessor, SimpleSpanProcessor } from '@op
|
|
|
9
9
|
import { SemanticResourceAttributes } from '@opentelemetry/semantic-conventions';
|
|
10
10
|
import { z } from 'zod';
|
|
11
11
|
import { fromZodError } from 'zod-validation-error';
|
|
12
|
-
import { AsyncLocalStorage } from 'node:async_hooks';
|
|
13
12
|
import { PreciseDate } from '@google-cloud/precise-date';
|
|
14
13
|
import util from 'node:util';
|
|
15
14
|
|
|
@@ -936,7 +935,8 @@ z.object({
|
|
|
936
935
|
variables: z.record(z.string())
|
|
937
936
|
});
|
|
938
937
|
z.object({
|
|
939
|
-
imageReference: z.string()
|
|
938
|
+
imageReference: z.string(),
|
|
939
|
+
selfHosted: z.boolean().optional()
|
|
940
940
|
});
|
|
941
941
|
z.object({
|
|
942
942
|
id: z.string(),
|
|
@@ -1409,19 +1409,6 @@ function requestInitWithCache(requestInit) {
|
|
|
1409
1409
|
}
|
|
1410
1410
|
}
|
|
1411
1411
|
__name(requestInitWithCache, "requestInitWithCache");
|
|
1412
|
-
var _SafeAsyncLocalStorage = class _SafeAsyncLocalStorage {
|
|
1413
|
-
constructor() {
|
|
1414
|
-
this.storage = new AsyncLocalStorage();
|
|
1415
|
-
}
|
|
1416
|
-
runWith(context2, fn) {
|
|
1417
|
-
return this.storage.run(context2, fn);
|
|
1418
|
-
}
|
|
1419
|
-
getStore() {
|
|
1420
|
-
return this.storage.getStore();
|
|
1421
|
-
}
|
|
1422
|
-
};
|
|
1423
|
-
__name(_SafeAsyncLocalStorage, "SafeAsyncLocalStorage");
|
|
1424
|
-
var SafeAsyncLocalStorage = _SafeAsyncLocalStorage;
|
|
1425
1412
|
|
|
1426
1413
|
// src/v3/apiClient/index.ts
|
|
1427
1414
|
var zodFetchOptions = {
|
|
@@ -1573,19 +1560,33 @@ getHeaders_fn = /* @__PURE__ */ __name(function(spanParentAsLink) {
|
|
|
1573
1560
|
}, "#getHeaders");
|
|
1574
1561
|
__name(_ApiClient, "ApiClient");
|
|
1575
1562
|
var ApiClient = _ApiClient;
|
|
1576
|
-
|
|
1577
|
-
|
|
1563
|
+
|
|
1564
|
+
// src/v3/apiClientManager/index.ts
|
|
1565
|
+
var API_NAME2 = "api-client";
|
|
1566
|
+
var _getConfig, getConfig_fn;
|
|
1567
|
+
var _APIClientManagerAPI = class _APIClientManagerAPI {
|
|
1578
1568
|
constructor() {
|
|
1579
|
-
__privateAdd(this,
|
|
1580
|
-
|
|
1569
|
+
__privateAdd(this, _getConfig);
|
|
1570
|
+
}
|
|
1571
|
+
static getInstance() {
|
|
1572
|
+
if (!this._instance) {
|
|
1573
|
+
this._instance = new _APIClientManagerAPI();
|
|
1574
|
+
}
|
|
1575
|
+
return this._instance;
|
|
1576
|
+
}
|
|
1577
|
+
disable() {
|
|
1578
|
+
unregisterGlobal(API_NAME2);
|
|
1579
|
+
}
|
|
1580
|
+
setGlobalAPIClientConfiguration(config) {
|
|
1581
|
+
return registerGlobal(API_NAME2, config);
|
|
1581
1582
|
}
|
|
1582
1583
|
get baseURL() {
|
|
1583
|
-
const store = __privateMethod(this,
|
|
1584
|
+
const store = __privateMethod(this, _getConfig, getConfig_fn).call(this);
|
|
1584
1585
|
return store?.baseURL ?? getEnvVar("TRIGGER_API_URL") ?? "https://api.trigger.dev";
|
|
1585
1586
|
}
|
|
1586
1587
|
get accessToken() {
|
|
1587
|
-
const store = __privateMethod(this,
|
|
1588
|
-
return store?.
|
|
1588
|
+
const store = __privateMethod(this, _getConfig, getConfig_fn).call(this);
|
|
1589
|
+
return store?.secretKey ?? getEnvVar("TRIGGER_SECRET_KEY");
|
|
1589
1590
|
}
|
|
1590
1591
|
get client() {
|
|
1591
1592
|
if (!this.baseURL || !this.accessToken) {
|
|
@@ -1593,17 +1594,16 @@ var _ApiClientManager = class _ApiClientManager {
|
|
|
1593
1594
|
}
|
|
1594
1595
|
return new ApiClient(this.baseURL, this.accessToken);
|
|
1595
1596
|
}
|
|
1596
|
-
runWith(context2, fn) {
|
|
1597
|
-
return this._storage.runWith(context2, fn);
|
|
1598
|
-
}
|
|
1599
1597
|
};
|
|
1600
|
-
|
|
1601
|
-
|
|
1602
|
-
return
|
|
1603
|
-
}, "#
|
|
1604
|
-
__name(
|
|
1605
|
-
var
|
|
1606
|
-
|
|
1598
|
+
_getConfig = new WeakSet();
|
|
1599
|
+
getConfig_fn = /* @__PURE__ */ __name(function() {
|
|
1600
|
+
return getGlobal(API_NAME2);
|
|
1601
|
+
}, "#getConfig");
|
|
1602
|
+
__name(_APIClientManagerAPI, "APIClientManagerAPI");
|
|
1603
|
+
var APIClientManagerAPI = _APIClientManagerAPI;
|
|
1604
|
+
|
|
1605
|
+
// src/v3/apiClientManager-api.ts
|
|
1606
|
+
var apiClientManager = APIClientManagerAPI.getInstance();
|
|
1607
1607
|
|
|
1608
1608
|
// src/v3/utils/ioSerialization.ts
|
|
1609
1609
|
async function parsePacket(value) {
|
|
@@ -2274,7 +2274,7 @@ __name(_SimpleClock, "SimpleClock");
|
|
|
2274
2274
|
var SimpleClock = _SimpleClock;
|
|
2275
2275
|
|
|
2276
2276
|
// src/v3/clock/index.ts
|
|
2277
|
-
var
|
|
2277
|
+
var API_NAME3 = "clock";
|
|
2278
2278
|
var SIMPLE_CLOCK = new SimpleClock();
|
|
2279
2279
|
var _getClock, getClock_fn;
|
|
2280
2280
|
var _ClockAPI = class _ClockAPI {
|
|
@@ -2288,7 +2288,7 @@ var _ClockAPI = class _ClockAPI {
|
|
|
2288
2288
|
return this._instance;
|
|
2289
2289
|
}
|
|
2290
2290
|
setGlobalClock(clock2) {
|
|
2291
|
-
return registerGlobal(
|
|
2291
|
+
return registerGlobal(API_NAME3, clock2);
|
|
2292
2292
|
}
|
|
2293
2293
|
preciseNow() {
|
|
2294
2294
|
return __privateMethod(this, _getClock, getClock_fn).call(this).preciseNow();
|
|
@@ -2299,7 +2299,7 @@ var _ClockAPI = class _ClockAPI {
|
|
|
2299
2299
|
};
|
|
2300
2300
|
_getClock = new WeakSet();
|
|
2301
2301
|
getClock_fn = /* @__PURE__ */ __name(function() {
|
|
2302
|
-
return getGlobal(
|
|
2302
|
+
return getGlobal(API_NAME3) ?? SIMPLE_CLOCK;
|
|
2303
2303
|
}, "#getClock");
|
|
2304
2304
|
__name(_ClockAPI, "ClockAPI");
|
|
2305
2305
|
var ClockAPI = _ClockAPI;
|