@forklaunch/core 1.5.10 → 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.
@@ -653,7 +653,7 @@ function createHmacToken({
653
653
  secretKey
654
654
  }) {
655
655
  const hmac = createHmac("sha256", secretKey);
656
- const bodyString = body ? `${safeStringify(body)}
656
+ const bodyString = body ? `${Buffer.isBuffer(body) ? body.toString("utf8") : typeof body === "string" ? body : safeStringify(body)}
657
657
  ` : void 0;
658
658
  hmac.update(
659
659
  `${method}
@@ -1148,7 +1148,7 @@ function isRequestShape(maybeResponseShape) {
1148
1148
  function parse(req, res, next) {
1149
1149
  const globalOptions = req._globalOptions?.();
1150
1150
  const collapsedOptions = req.contractDetails.options?.requestValidation ?? (globalOptions?.validation === false ? "none" : globalOptions?.validation?.request);
1151
- req._rawBody = req.body;
1151
+ req._rawBody ??= req.body;
1152
1152
  const request = {
1153
1153
  params: req.params,
1154
1154
  query: req.query,