@forklaunch/core 1.5.9 → 1.5.11
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/lib/http/createHmacToken.d.ts.map +1 -1
- package/lib/http/index.js +2 -2
- package/lib/http/index.js.map +1 -1
- package/lib/http/index.mjs +2 -2
- package/lib/http/index.mjs.map +1 -1
- package/lib/http/middleware/request/parse.middleware.d.ts.map +1 -1
- package/lib/http/types/apiDefinition.types.d.ts +12 -2
- package/lib/http/types/apiDefinition.types.d.ts.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"createHmacToken.d.ts","sourceRoot":"","sources":["../../src/http/createHmacToken.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACL,SAAS,EACV,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,
|
|
1
|
+
{"version":3,"file":"createHmacToken.d.ts","sourceRoot":"","sources":["../../src/http/createHmacToken.ts"],"names":[],"mappings":"AAGA;;;;;;;;;GASG;AACH,wBAAgB,eAAe,CAAC,EAC9B,MAAM,EACN,IAAI,EACJ,IAAI,EACJ,SAAS,EACT,KAAK,EACL,SAAS,EACV,EAAE;IACD,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,SAAS,EAAE,IAAI,CAAC;IAChB,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,EAAE,MAAM,CAAC;CACnB,UAoBA"}
|
package/lib/http/index.js
CHANGED
|
@@ -728,7 +728,7 @@ function createHmacToken({
|
|
|
728
728
|
secretKey
|
|
729
729
|
}) {
|
|
730
730
|
const hmac = (0, import_crypto.createHmac)("sha256", secretKey);
|
|
731
|
-
const bodyString = body ? `${(0, import_common5.safeStringify)(body)}
|
|
731
|
+
const bodyString = body ? `${Buffer.isBuffer(body) ? body.toString("utf8") : typeof body === "string" ? body : (0, import_common5.safeStringify)(body)}
|
|
732
732
|
` : void 0;
|
|
733
733
|
hmac.update(
|
|
734
734
|
`${method}
|
|
@@ -1221,7 +1221,7 @@ function isRequestShape(maybeResponseShape) {
|
|
|
1221
1221
|
function parse(req, res, next) {
|
|
1222
1222
|
const globalOptions = req._globalOptions?.();
|
|
1223
1223
|
const collapsedOptions = req.contractDetails.options?.requestValidation ?? (globalOptions?.validation === false ? "none" : globalOptions?.validation?.request);
|
|
1224
|
-
req._rawBody
|
|
1224
|
+
req._rawBody ??= req.body;
|
|
1225
1225
|
const request = {
|
|
1226
1226
|
params: req.params,
|
|
1227
1227
|
query: req.query,
|