scrapfly-sdk 0.7.2 → 0.7.3
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/esm/webhookserver.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhookserver.d.ts","sourceRoot":"","sources":["../src/webhookserver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhookserver.d.ts","sourceRoot":"","sources":["../src/webhookserver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAM/F;AAGD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,IAAI,EACjE,GAAG,CAAC,EAAE,GAAG,GACR,OAAO,CAAC,GAAG,CAAC,CA4Cd"}
|
package/esm/webhookserver.js
CHANGED
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webhookserver.d.ts","sourceRoot":"","sources":["../src/webhookserver.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"webhookserver.d.ts","sourceRoot":"","sources":["../src/webhookserver.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAIrC,oBAAY,YAAY;IACtB,MAAM,WAAW;IACjB,IAAI,SAAS;CACd;AAED,wBAAgB,eAAe,CAAC,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,OAAO,CAM/F;AAGD,wBAAsB,YAAY,CAChC,QAAQ,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,GAAG,KAAK,IAAI,EACjE,GAAG,CAAC,EAAE,GAAG,GACR,OAAO,CAAC,GAAG,CAAC,CA4Cd"}
|
package/script/webhookserver.js
CHANGED
|
@@ -29,6 +29,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
29
29
|
exports.ResourceType = void 0;
|
|
30
30
|
exports.verifySignature = verifySignature;
|
|
31
31
|
exports.createServer = createServer;
|
|
32
|
+
const node_buffer_1 = require("node:buffer");
|
|
32
33
|
const node_crypto_1 = __importDefault(require("node:crypto"));
|
|
33
34
|
const logger_js_1 = require("./logger.js");
|
|
34
35
|
var ResourceType;
|
|
@@ -37,7 +38,7 @@ var ResourceType;
|
|
|
37
38
|
ResourceType["PING"] = "ping";
|
|
38
39
|
})(ResourceType || (exports.ResourceType = ResourceType = {}));
|
|
39
40
|
function verifySignature(body, signature, signingSecret) {
|
|
40
|
-
const secret = Buffer.from(signingSecret, 'hex');
|
|
41
|
+
const secret = node_buffer_1.Buffer.from(signingSecret, 'hex');
|
|
41
42
|
const hmac = node_crypto_1.default.createHmac('sha256', secret);
|
|
42
43
|
hmac.update(body);
|
|
43
44
|
const computed = hmac.digest('hex').toUpperCase();
|