@trigger.dev/sdk 0.0.0-cross-runtime-20231201154528 → 0.0.0-cross-runtime-20231201164903
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/index.d.mts +16 -16
- package/dist/index.d.ts +16 -16
- package/dist/index.js +7 -5
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -5
package/dist/index.d.mts
CHANGED
|
@@ -1426,6 +1426,22 @@ declare class ConcurrencyLimit {
|
|
|
1426
1426
|
get limit(): number;
|
|
1427
1427
|
}
|
|
1428
1428
|
|
|
1429
|
+
declare class KeyValueStore {
|
|
1430
|
+
#private;
|
|
1431
|
+
private apiClient;
|
|
1432
|
+
private type;
|
|
1433
|
+
private namespace;
|
|
1434
|
+
constructor(apiClient: ApiClient, type?: string | null, namespace?: string);
|
|
1435
|
+
delete(cacheKey: string | any[], key: string): Promise<boolean>;
|
|
1436
|
+
delete(key: string): Promise<boolean>;
|
|
1437
|
+
get<T extends Json<T> = any>(cacheKey: string | any[], key: string): Promise<T>;
|
|
1438
|
+
get<T extends Json<T> = any>(key: string): Promise<T>;
|
|
1439
|
+
has(cacheKey: string | any[], key: string): Promise<boolean>;
|
|
1440
|
+
has(key: string): Promise<boolean>;
|
|
1441
|
+
set<T extends Json<T>>(cacheKey: string | any[], key: string, value: T): Promise<T>;
|
|
1442
|
+
set<T extends Json<T>>(key: string, value: T): Promise<T>;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1429
1445
|
type WebhookCRUDContext<TParams extends any, TConfig extends Record<string, string[]>> = {
|
|
1430
1446
|
active: boolean;
|
|
1431
1447
|
params: TParams;
|
|
@@ -1561,22 +1577,6 @@ declare class WebhookTrigger<TEventSpecification extends EventSpecification<any>
|
|
|
1561
1577
|
}>;
|
|
1562
1578
|
}
|
|
1563
1579
|
|
|
1564
|
-
declare class KeyValueStore {
|
|
1565
|
-
#private;
|
|
1566
|
-
private apiClient;
|
|
1567
|
-
private type;
|
|
1568
|
-
private namespace;
|
|
1569
|
-
constructor(apiClient: ApiClient, type?: string | null, namespace?: string);
|
|
1570
|
-
delete(cacheKey: string | any[], key: string): Promise<boolean>;
|
|
1571
|
-
delete(key: string): Promise<boolean>;
|
|
1572
|
-
get<T extends Json<T> = any>(cacheKey: string | any[], key: string): Promise<T>;
|
|
1573
|
-
get<T extends Json<T> = any>(key: string): Promise<T>;
|
|
1574
|
-
has(cacheKey: string | any[], key: string): Promise<boolean>;
|
|
1575
|
-
has(key: string): Promise<boolean>;
|
|
1576
|
-
set<T extends Json<T>>(cacheKey: string | any[], key: string, value: T): Promise<T>;
|
|
1577
|
-
set<T extends Json<T>>(key: string, value: T): Promise<T>;
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
1580
|
type TriggerClientOptions = {
|
|
1581
1581
|
/** The `id` property is used to uniquely identify the client.
|
|
1582
1582
|
*/
|
package/dist/index.d.ts
CHANGED
|
@@ -1426,6 +1426,22 @@ declare class ConcurrencyLimit {
|
|
|
1426
1426
|
get limit(): number;
|
|
1427
1427
|
}
|
|
1428
1428
|
|
|
1429
|
+
declare class KeyValueStore {
|
|
1430
|
+
#private;
|
|
1431
|
+
private apiClient;
|
|
1432
|
+
private type;
|
|
1433
|
+
private namespace;
|
|
1434
|
+
constructor(apiClient: ApiClient, type?: string | null, namespace?: string);
|
|
1435
|
+
delete(cacheKey: string | any[], key: string): Promise<boolean>;
|
|
1436
|
+
delete(key: string): Promise<boolean>;
|
|
1437
|
+
get<T extends Json<T> = any>(cacheKey: string | any[], key: string): Promise<T>;
|
|
1438
|
+
get<T extends Json<T> = any>(key: string): Promise<T>;
|
|
1439
|
+
has(cacheKey: string | any[], key: string): Promise<boolean>;
|
|
1440
|
+
has(key: string): Promise<boolean>;
|
|
1441
|
+
set<T extends Json<T>>(cacheKey: string | any[], key: string, value: T): Promise<T>;
|
|
1442
|
+
set<T extends Json<T>>(key: string, value: T): Promise<T>;
|
|
1443
|
+
}
|
|
1444
|
+
|
|
1429
1445
|
type WebhookCRUDContext<TParams extends any, TConfig extends Record<string, string[]>> = {
|
|
1430
1446
|
active: boolean;
|
|
1431
1447
|
params: TParams;
|
|
@@ -1561,22 +1577,6 @@ declare class WebhookTrigger<TEventSpecification extends EventSpecification<any>
|
|
|
1561
1577
|
}>;
|
|
1562
1578
|
}
|
|
1563
1579
|
|
|
1564
|
-
declare class KeyValueStore {
|
|
1565
|
-
#private;
|
|
1566
|
-
private apiClient;
|
|
1567
|
-
private type;
|
|
1568
|
-
private namespace;
|
|
1569
|
-
constructor(apiClient: ApiClient, type?: string | null, namespace?: string);
|
|
1570
|
-
delete(cacheKey: string | any[], key: string): Promise<boolean>;
|
|
1571
|
-
delete(key: string): Promise<boolean>;
|
|
1572
|
-
get<T extends Json<T> = any>(cacheKey: string | any[], key: string): Promise<T>;
|
|
1573
|
-
get<T extends Json<T> = any>(key: string): Promise<T>;
|
|
1574
|
-
has(cacheKey: string | any[], key: string): Promise<boolean>;
|
|
1575
|
-
has(key: string): Promise<boolean>;
|
|
1576
|
-
set<T extends Json<T>>(cacheKey: string | any[], key: string, value: T): Promise<T>;
|
|
1577
|
-
set<T extends Json<T>>(key: string, value: T): Promise<T>;
|
|
1578
|
-
}
|
|
1579
|
-
|
|
1580
1580
|
type TriggerClientOptions = {
|
|
1581
1581
|
/** The `id` property is used to uniquely identify the client.
|
|
1582
1582
|
*/
|
package/dist/index.js
CHANGED
|
@@ -304,9 +304,11 @@ var Job = _Job;
|
|
|
304
304
|
|
|
305
305
|
// src/triggerClient.ts
|
|
306
306
|
var import_core8 = require("@trigger.dev/core");
|
|
307
|
+
var import_node_process2 = require("node:process");
|
|
307
308
|
|
|
308
309
|
// src/apiClient.ts
|
|
309
310
|
var import_core3 = require("@trigger.dev/core");
|
|
311
|
+
var import_node_process = require("node:process");
|
|
310
312
|
var import_zod3 = require("zod");
|
|
311
313
|
|
|
312
314
|
// src/io.ts
|
|
@@ -1900,7 +1902,7 @@ var _ApiClient = class _ApiClient {
|
|
|
1900
1902
|
__privateAdd(this, _logger, void 0);
|
|
1901
1903
|
__privateAdd(this, _storeClient, void 0);
|
|
1902
1904
|
__privateSet(this, _options, options);
|
|
1903
|
-
__privateSet(this, _apiUrl, __privateGet(this, _options).apiUrl ??
|
|
1905
|
+
__privateSet(this, _apiUrl, __privateGet(this, _options).apiUrl ?? import_node_process.env.TRIGGER_API_URL ?? "https://api.trigger.dev");
|
|
1904
1906
|
__privateSet(this, _logger, new import_core3.Logger("trigger.dev", __privateGet(this, _options).logLevel));
|
|
1905
1907
|
__privateSet(this, _storeClient, new KeyValueStoreClient(__privateMethod(this, _queryKeyValueStore, queryKeyValueStore_fn).bind(this)));
|
|
1906
1908
|
}
|
|
@@ -2338,7 +2340,7 @@ apiKey_fn = /* @__PURE__ */ __name(async function() {
|
|
|
2338
2340
|
__name(_ApiClient, "ApiClient");
|
|
2339
2341
|
var ApiClient = _ApiClient;
|
|
2340
2342
|
function getApiKey(key) {
|
|
2341
|
-
const apiKey = key ??
|
|
2343
|
+
const apiKey = key ?? import_node_process.env.TRIGGER_API_KEY;
|
|
2342
2344
|
if (!apiKey) {
|
|
2343
2345
|
return {
|
|
2344
2346
|
status: "missing"
|
|
@@ -3003,7 +3005,7 @@ var DynamicSchedule = _DynamicSchedule;
|
|
|
3003
3005
|
var import_node_events = __toESM(require("node:events"));
|
|
3004
3006
|
|
|
3005
3007
|
// package.json
|
|
3006
|
-
var version = "0.0.0-cross-runtime-
|
|
3008
|
+
var version = "0.0.0-cross-runtime-20231201164903";
|
|
3007
3009
|
|
|
3008
3010
|
// src/concurrencyLimit.ts
|
|
3009
3011
|
var _ConcurrencyLimit = class _ConcurrencyLimit {
|
|
@@ -3766,14 +3768,14 @@ var _TriggerClient = class _TriggerClient {
|
|
|
3766
3768
|
if (typeof apiKey !== "string") {
|
|
3767
3769
|
return "missing-header";
|
|
3768
3770
|
}
|
|
3769
|
-
const localApiKey = __privateGet(this, _options4).apiKey ??
|
|
3771
|
+
const localApiKey = __privateGet(this, _options4).apiKey ?? import_node_process2.env.TRIGGER_API_KEY;
|
|
3770
3772
|
if (!localApiKey) {
|
|
3771
3773
|
return "missing-client";
|
|
3772
3774
|
}
|
|
3773
3775
|
return apiKey === localApiKey ? "authorized" : "unauthorized";
|
|
3774
3776
|
}
|
|
3775
3777
|
apiKey() {
|
|
3776
|
-
return __privateGet(this, _options4).apiKey ??
|
|
3778
|
+
return __privateGet(this, _options4).apiKey ?? import_node_process2.env.TRIGGER_API_KEY;
|
|
3777
3779
|
}
|
|
3778
3780
|
};
|
|
3779
3781
|
_options4 = new WeakMap();
|