@trigger.dev/linear 0.0.0-prerelease-20231013155033 → 0.0.0-prerelease-20231206103411
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 +20027 -0
- package/dist/index.d.ts +2819 -396
- package/dist/index.js +2 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +4043 -0
- package/dist/index.mjs.map +1 -0
- package/package.json +20 -9
package/dist/index.js
CHANGED
|
@@ -3,6 +3,7 @@
|
|
|
3
3
|
var sdk$1 = require('@trigger.dev/sdk');
|
|
4
4
|
var sdk = require('@linear/sdk');
|
|
5
5
|
var zod = require('zod');
|
|
6
|
+
var node_buffer = require('node:buffer');
|
|
6
7
|
|
|
7
8
|
var __defProp = Object.defineProperty;
|
|
8
9
|
var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
|
|
@@ -2239,8 +2240,6 @@ var WebhookPayloadSchema = zod.z.union([
|
|
|
2239
2240
|
ProjectUpdateEventSchema,
|
|
2240
2241
|
ReactionEventSchema
|
|
2241
2242
|
]);
|
|
2242
|
-
|
|
2243
|
-
// src/webhooks.ts
|
|
2244
2243
|
var _Webhooks = class _Webhooks {
|
|
2245
2244
|
constructor(runTask) {
|
|
2246
2245
|
this.runTask = runTask;
|
|
@@ -2469,7 +2468,7 @@ async function webhookHandler(event, logger, integration) {
|
|
|
2469
2468
|
const rawBody = await request.text();
|
|
2470
2469
|
const body = JSON.parse(rawBody);
|
|
2471
2470
|
const webhookHelper = new sdk.LinearWebhooks(source.secret);
|
|
2472
|
-
if (!webhookHelper.verify(Buffer.from(rawBody), signature, body[sdk.LINEAR_WEBHOOK_TS_FIELD])) {
|
|
2471
|
+
if (!webhookHelper.verify(node_buffer.Buffer.from(rawBody), signature, body[sdk.LINEAR_WEBHOOK_TS_FIELD])) {
|
|
2473
2472
|
logger.error("[@trigger.dev/linear] Error validating webhook signature, they don't match");
|
|
2474
2473
|
throw Error("[@trigger.dev/linear] Invalid signature");
|
|
2475
2474
|
}
|