Skip to content

Commit

Permalink
Merge pull request #88 from permitio/oded/per-10288-fix-node-sdk-cves
Browse files Browse the repository at this point in the history
update versions to fix cve and adjust code
  • Loading branch information
obsd committed Jul 18, 2024
2 parents 37444b8 + 8fd507e commit ca96be6
Show file tree
Hide file tree
Showing 3 changed files with 6,177 additions and 6,013 deletions.
9 changes: 5 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "permitio",
"version": "2.4.0",
"version": "2.5.2",
"description": "Node.js client library for the Permit.io full-stack permissions platform",
"main": "build/main/index.js",
"typings": "build/main/index.d.ts",
Expand Down Expand Up @@ -43,7 +43,7 @@
},
"dependencies": {
"@bitauth/libauth": "^1.17.1",
"axios": "^0.27.2",
"axios": "^1.7.2",
"lodash": "^4.17.21",
"path-to-regexp": "^6.2.1",
"pino": "8.11.0",
Expand All @@ -52,6 +52,7 @@
},
"devDependencies": {
"@ava/typescript": "^1.1.1",
"@babel/traverse": "^7.24.8",
"@istanbuljs/nyc-config-typescript": "^1.0.1",
"@openapitools/openapi-generator-cli": "^2.5.2",
"@types/express": "^4.17.9",
Expand All @@ -68,12 +69,12 @@
"eslint-plugin-eslint-comments": "^3.2.0",
"eslint-plugin-functional": "^3.0.2",
"eslint-plugin-import": "^2.22.0",
"gh-pages": "^3.1.0",
"gh-pages": "^6.1.1",
"husky": "^7.0.0",
"lint-staged": "^12.1.2",
"npm-run-all": "^4.1.5",
"nyc": "^15.1.0",
"open-cli": "^6.0.1",
"open-cli": "^8.0.0",
"prettier": "^2.5.1",
"standard-version": "^9.0.0",
"ts-node": "^9.0.0",
Expand Down
5 changes: 3 additions & 2 deletions src/utils/http-logger.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
import { AxiosInstance, AxiosRequestConfig, AxiosResponse } from 'axios';
import { AxiosInstance, AxiosResponse, InternalAxiosRequestConfig } from 'axios';
import pino from 'pino';

export class AxiosLoggingInterceptor {
static setupInterceptor(axiosInstance: AxiosInstance, logger: pino.Logger): void {
// Add a request interceptor
axiosInstance.interceptors.request.use(
function (request: AxiosRequestConfig) {
function (request: InternalAxiosRequestConfig) {
request.headers = request.headers || {}; // Ensure headers are not undefined
logger.debug(`Sending HTTP request: ${request?.method?.toUpperCase()} ${request?.url}`);
return request;
},
Expand Down
Loading

0 comments on commit ca96be6

Please sign in to comment.