Comparing version 0.0.8 to 0.0.9
@@ -24,3 +24,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
METLO_DETAILS.pool = pool; | ||
function compileInformation(request, response) { | ||
function compileInformation(request, response, response_body) { | ||
return __awaiter(this, void 0, void 0, function* () { | ||
@@ -42,3 +42,3 @@ const data = JSON.stringify({ | ||
headers: Object.entries(response.headers).map(([k, v]) => ({ name: k, value: v })), | ||
body: response.body, | ||
body: response_body, | ||
}, | ||
@@ -62,3 +62,3 @@ meta: { | ||
fastifyInst.addHook("onSend", (request, reply, payload) => __awaiter(this, void 0, void 0, function* () { | ||
compileInformation(request, reply); | ||
compileInformation(request, reply, payload); | ||
return payload; | ||
@@ -65,0 +65,0 @@ })); |
{ | ||
"name": "metlo", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"license": "MIT", | ||
@@ -11,3 +11,3 @@ "description": "The node agent for Metlo API Security.", | ||
"build": "tsc", | ||
"clean": "rm -rf dist/*", | ||
"clean": "rm -rf dist", | ||
"format": "prettier --write './src/**/*.{ts,tsx}'" | ||
@@ -14,0 +14,0 @@ }, |
@@ -23,3 +23,3 @@ <p align="center"> | ||
```bash | ||
yarn install metlo | ||
yarn add metlo | ||
``` | ||
@@ -26,0 +26,0 @@ |
@@ -20,3 +20,3 @@ const ritm = require("require-in-the-middle") | ||
async function compileInformation(request, response) { | ||
async function compileInformation(request, response, response_body) { | ||
const data = JSON.stringify( | ||
@@ -38,3 +38,3 @@ { | ||
headers: Object.entries(response.headers).map(([k, v]) => ({ name: k, value: v })), | ||
body: response.body, | ||
body: response_body, | ||
}, | ||
@@ -61,3 +61,3 @@ meta: { | ||
fastifyInst.addHook("onSend", async (request, reply, payload) => { | ||
compileInformation(request, reply) | ||
compileInformation(request, reply, payload) | ||
return payload | ||
@@ -64,0 +64,0 @@ }) |
Sorry, the diff of this file is not supported yet
AI-detected potential security risk
Supply chain riskAI has determined that this package may contain potential security issues or vulnerabilities.
Found 1 instance in 1 package
50081
2