myhonda-sdk
Advanced tools
Comparing version 1.0.5 to 1.0.6-a
@@ -19,8 +19,12 @@ "use strict"; | ||
const dataForLogging = (0, misc_1.redactSensitiveFields)(config.data); | ||
this.logger.log(`[REQUEST] [URL]: ${config.url} [METHOD]: ${(_a = config.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()} [PARAMS]: ${JSON.stringify(config.params)} [DATA]: ${JSON.stringify(dataForLogging)}`); | ||
this.logger.log(`[AXIOS REQUEST] [METHOD]: ${(_a = config.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()} [URL]: ${config.url} [REQ BODY]: ${JSON.stringify(dataForLogging)}`); | ||
return config; | ||
} | ||
onResponse(response) { | ||
const dataForLogging = (0, misc_1.redactSensitiveFields)(response.data); | ||
this.logger.log(`[RESPONSE] [URL]: ${response.config.url} [STATUS]: ${response.status} [DATA]: ${JSON.stringify(dataForLogging)}`); | ||
var _a; | ||
const config = response.config; | ||
const reqBody = (config === null || config === void 0 ? void 0 : config.data) || null; | ||
const reqBodyForLogging = (0, misc_1.redactSensitiveFields)(reqBody); | ||
const resBodyForLogging = (0, misc_1.redactSensitiveFields)(response.data); | ||
this.logger.log(`[AXIOS RESPONSE] [METHOD]: ${(_a = config.method) === null || _a === void 0 ? void 0 : _a.toUpperCase()} [URL]: ${response.config.url} [REQ BODY]: ${JSON.stringify(reqBodyForLogging)} - [STATUS]: ${response.status} [RES BODY]: ${JSON.stringify(resBodyForLogging)}`); | ||
return response; | ||
@@ -27,0 +31,0 @@ } |
@@ -60,3 +60,3 @@ "use strict"; | ||
EN: 'Juristic customers are not eligible to register for the mobile application.', | ||
TH: 'นิติบุคลลไม่สามารถลงทะเบียนใช้งานแอปพลิเคชันได้', | ||
TH: 'นิติบุคคลไม่สามารถลงทะเบียนใช้งานแอปพลิเคชันได้', | ||
}, | ||
@@ -63,0 +63,0 @@ }, |
@@ -85,6 +85,12 @@ "use strict"; | ||
'passportId', | ||
'passport_id', | ||
'citizenId', | ||
'citizen_id', | ||
'idNumber', | ||
'id_number', | ||
'token', | ||
'identityValue', | ||
'identity_value', | ||
'access_token', | ||
'accessToken', | ||
]); | ||
@@ -106,2 +112,4 @@ const emailFields = new Set([ | ||
'mobileNumber', | ||
'mobilePhone', | ||
'mobile_phone', | ||
]); | ||
@@ -108,0 +116,0 @@ if (typeof data !== 'object' || data === null) { |
{ | ||
"name": "myhonda-sdk", | ||
"version": "1.0.5", | ||
"version": "1.0.6a", | ||
"description": "A NestJS SDK for building Honda-related applications, providing modules for authentication and content management.", | ||
@@ -5,0 +5,0 @@ "author": "Dendy Swarandanu", |
@@ -12,7 +12,5 @@ import { Injectable, Logger } from '@nestjs/common'; | ||
this.logger.log( | ||
`[REQUEST] [URL]: ${ | ||
`[AXIOS REQUEST] [METHOD]: ${config.method?.toUpperCase()} [URL]: ${ | ||
config.url | ||
} [METHOD]: ${config.method?.toUpperCase()} [PARAMS]: ${JSON.stringify( | ||
config.params, | ||
)} [DATA]: ${JSON.stringify(dataForLogging)}`, | ||
} [REQ BODY]: ${JSON.stringify(dataForLogging)}`, | ||
); | ||
@@ -23,7 +21,11 @@ return config; | ||
onResponse(response: AxiosResponse): AxiosResponse { | ||
const dataForLogging = redactSensitiveFields(response.data); | ||
const config = response.config; | ||
const reqBody = config?.data || null; | ||
const reqBodyForLogging = redactSensitiveFields(reqBody); | ||
const resBodyForLogging = redactSensitiveFields(response.data); | ||
this.logger.log( | ||
`[RESPONSE] [URL]: ${response.config.url} [STATUS]: ${ | ||
`[AXIOS RESPONSE] [METHOD]: ${config.method?.toUpperCase()} [URL]: ${response.config.url} [REQ BODY]: ${JSON.stringify(reqBodyForLogging)} - [STATUS]: ${ | ||
response.status | ||
} [DATA]: ${JSON.stringify(dataForLogging)}`, | ||
} [RES BODY]: ${JSON.stringify(resBodyForLogging)}`, | ||
); | ||
@@ -30,0 +32,0 @@ return response; |
@@ -62,3 +62,3 @@ export const DICTIONARY = { | ||
EN: 'Juristic customers are not eligible to register for the mobile application.', | ||
TH: 'นิติบุคลลไม่สามารถลงทะเบียนใช้งานแอปพลิเคชันได้', | ||
TH: 'นิติบุคคลไม่สามารถลงทะเบียนใช้งานแอปพลิเคชันได้', | ||
}, | ||
@@ -65,0 +65,0 @@ }, |
@@ -98,6 +98,12 @@ import { ApiHeaderOptions } from '@nestjs/swagger'; | ||
'passportId', | ||
'passport_id', | ||
'citizenId', | ||
'citizen_id', | ||
'idNumber', | ||
'id_number', | ||
'token', | ||
'identityValue', | ||
'identity_value', | ||
'access_token', | ||
'accessToken', | ||
]); | ||
@@ -120,2 +126,4 @@ | ||
'mobileNumber', | ||
'mobilePhone', | ||
'mobile_phone', | ||
]); | ||
@@ -122,0 +130,0 @@ |
Manifest confusion
Supply chain riskThis package has inconsistent metadata. This could be malicious or caused by an error when publishing the package.
Found 1 instance in 1 package
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
180415
4532
2
2