@trigger.dev/sdk 0.0.0-cross-runtime-20231201153629 → 0.0.0-cross-runtime-20231201154528
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.js +5 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4 -5
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -4
package/dist/index.js
CHANGED
|
@@ -304,7 +304,6 @@ var Job = _Job;
|
|
|
304
304
|
|
|
305
305
|
// src/triggerClient.ts
|
|
306
306
|
var import_core8 = require("@trigger.dev/core");
|
|
307
|
-
var import_colorette = require("colorette");
|
|
308
307
|
|
|
309
308
|
// src/apiClient.ts
|
|
310
309
|
var import_core3 = require("@trigger.dev/core");
|
|
@@ -3004,7 +3003,7 @@ var DynamicSchedule = _DynamicSchedule;
|
|
|
3004
3003
|
var import_node_events = __toESM(require("node:events"));
|
|
3005
3004
|
|
|
3006
3005
|
// package.json
|
|
3007
|
-
var version = "0.0.0-cross-runtime-
|
|
3006
|
+
var version = "0.0.0-cross-runtime-20231201154528";
|
|
3008
3007
|
|
|
3009
3008
|
// src/concurrencyLimit.ts
|
|
3010
3009
|
var _ConcurrencyLimit = class _ConcurrencyLimit {
|
|
@@ -3465,7 +3464,7 @@ var _TriggerClient = class _TriggerClient {
|
|
|
3465
3464
|
defineJob(options) {
|
|
3466
3465
|
const existingRegisteredJob = __privateGet(this, _registeredJobs)[options.id];
|
|
3467
3466
|
if (existingRegisteredJob) {
|
|
3468
|
-
console.warn(
|
|
3467
|
+
console.warn(`[@trigger.dev/sdk] Warning: The Job "${existingRegisteredJob.id}" you're attempting to define has already been defined. Please assign a different ID to the job.`);
|
|
3469
3468
|
}
|
|
3470
3469
|
return new Job(this, options);
|
|
3471
3470
|
}
|
|
@@ -3488,7 +3487,7 @@ var _TriggerClient = class _TriggerClient {
|
|
|
3488
3487
|
defineHttpEndpoint(options, suppressWarnings = false) {
|
|
3489
3488
|
const existingHttpEndpoint = __privateGet(this, _registeredHttpEndpoints)[options.id];
|
|
3490
3489
|
if (!suppressWarnings && existingHttpEndpoint) {
|
|
3491
|
-
console.warn(
|
|
3490
|
+
console.warn(`[@trigger.dev/sdk] Warning: The HttpEndpoint "${existingHttpEndpoint.id}" you're attempting to define has already been defined. Please assign a different ID to the HttpEndpoint.`);
|
|
3492
3491
|
}
|
|
3493
3492
|
const endpoint = httpEndpoint(options);
|
|
3494
3493
|
__privateGet(this, _registeredHttpEndpoints)[endpoint.id] = endpoint;
|
|
@@ -4856,7 +4855,7 @@ __name(_WebhookTrigger, "WebhookTrigger");
|
|
|
4856
4855
|
var WebhookTrigger = _WebhookTrigger;
|
|
4857
4856
|
|
|
4858
4857
|
// src/security.ts
|
|
4859
|
-
var
|
|
4858
|
+
var import_node_crypto3 = __toESM(require("node:crypto"));
|
|
4860
4859
|
async function verifyRequestSignature({ request, headerName, headerEncoding = "hex", secret, algorithm }) {
|
|
4861
4860
|
if (!secret) {
|
|
4862
4861
|
return {
|
|
@@ -4890,7 +4889,7 @@ async function verifyRequestSignature({ request, headerName, headerEncoding = "h
|
|
|
4890
4889
|
}
|
|
4891
4890
|
__name(verifyRequestSignature, "verifyRequestSignature");
|
|
4892
4891
|
function verifyHmacSha256(headerValue, headerEncoding, secret, body) {
|
|
4893
|
-
const bodyDigest =
|
|
4892
|
+
const bodyDigest = import_node_crypto3.default.createHmac("sha256", secret).update(body).digest(headerEncoding);
|
|
4894
4893
|
const signature = headerValue?.replace("hmac-sha256=", "").replace("sha256=", "") ?? "";
|
|
4895
4894
|
return signature === bodyDigest;
|
|
4896
4895
|
}
|