axios-logger
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -8,3 +8,2 @@ import { ErrorLogConfig, GlobalLogConfig, RequestLogConfig, ResponseLogConfig } from './types'; | ||
method?: boolean | undefined; | ||
headers?: boolean | undefined; | ||
status?: boolean | undefined; | ||
@@ -15,2 +14,3 @@ statusText?: boolean | undefined; | ||
dateFormat?: string | boolean | undefined; | ||
headers?: boolean | undefined; | ||
} | { | ||
@@ -20,5 +20,5 @@ data?: boolean | undefined; | ||
method?: boolean | undefined; | ||
headers?: boolean | undefined; | ||
prefixText?: string | boolean | undefined; | ||
dateFormat?: string | boolean | undefined; | ||
headers?: boolean | undefined; | ||
status?: boolean | undefined; | ||
@@ -31,5 +31,5 @@ statusText?: boolean | undefined; | ||
statusText?: boolean | undefined; | ||
headers?: boolean | undefined; | ||
prefixText?: string | boolean | undefined; | ||
dateFormat?: string | boolean | undefined; | ||
headers?: boolean | undefined; | ||
url?: boolean | undefined; | ||
@@ -43,5 +43,5 @@ method?: boolean | undefined; | ||
dateFormat?: string | boolean | undefined; | ||
headers?: boolean | undefined; | ||
url?: boolean | undefined; | ||
method?: boolean | undefined; | ||
headers?: boolean | undefined; | ||
status?: boolean | undefined; | ||
@@ -48,0 +48,0 @@ statusText?: boolean | undefined; |
@@ -5,5 +5,11 @@ import { GlobalLogConfig } from './types'; | ||
private printQueue; | ||
private filteredHeaderList; | ||
constructor(config: GlobalLogConfig); | ||
makePrefix(logType: string | false): this; | ||
makeDateFormat(): this; | ||
makeHeader(headers?: { | ||
[key: string]: { | ||
value: string; | ||
}; | ||
}): this; | ||
makeUrl(url?: string): this; | ||
@@ -10,0 +16,0 @@ makeMethod(method?: string): this; |
@@ -31,4 +31,21 @@ 'use strict'; | ||
_defineProperty(this, 'filteredHeaderList', void 0); | ||
this.config = config; | ||
this.printQueue = []; | ||
this.filteredHeaderList = [ | ||
'common', | ||
'delete', | ||
'get', | ||
'head', | ||
'post', | ||
'put', | ||
'patch', | ||
'content-type', | ||
'content-length', | ||
'vary', | ||
'date', | ||
'connection', | ||
'content-security-policy', | ||
]; | ||
} | ||
@@ -50,2 +67,18 @@ | ||
makeHeader(headers) { | ||
if (this.config.headers && headers) { | ||
const headerMap = {}; | ||
for (let key in headers) { | ||
if (!this.filteredHeaderList.includes(key)) { | ||
headerMap[key] = headers[key]; | ||
} | ||
} | ||
this.printQueue.push(JSON.stringify(headerMap)); | ||
} | ||
return this; | ||
} | ||
makeUrl(url) { | ||
@@ -78,2 +111,2 @@ if (url) this.printQueue.push(url); | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vc3RyaW5nLWJ1aWxkZXIudHMiXSwibmFtZXMiOlsiU3RyaW5nQnVpbGRlciIsImNvbnN0cnVjdG9yIiwiY29uZmlnIiwicHJpbnRRdWV1ZSIsIm1ha2VQcmVmaXgiLCJsb2dUeXBlIiwicHJlZml4IiwicHJlZml4VGV4dCIsInB1c2giLCJjaGFsayIsImdyZWVuIiwibWFrZURhdGVGb3JtYXQiLCJkYXRlRm9ybWF0IiwiRGF0ZSIsIm1ha2VVcmwiLCJ1cmwiLCJtYWtlTWV0aG9kIiwibWV0aG9kIiwieWVsbG93IiwidG9VcHBlckNhc2UiLCJtYWtlRGF0YSIsImRhdGEiLCJKU09OIiwic3RyaW5naWZ5IiwibWFrZVN0YXR1cyIsInN0YXR1cyIsInN0YXR1c1RleHQiLCJidWlsZCIsImpvaW4iXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFBQTs7QUFFQTs7Ozs7O0FBRUEsTUFBTUEsYUFBTixDQUFvQjtBQUloQkMsRUFBQUEsV0FBVyxDQUFDQyxNQUFELEVBQTBCO0FBQUE7O0FBQUE7O0FBQ2pDLFNBQUtBLE1BQUwsR0FBY0EsTUFBZDtBQUNBLFNBQUtDLFVBQUwsR0FBa0IsRUFBbEI7QUFDSDs7QUFFREMsRUFBQUE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Zml4VGV4dCB8fCAnQXhpb3MnfV1bJHtsb2dUeXBlfV1gO1xuICAgICAgICB0aGlzLnByaW50UXVldWUucHVzaChjaGFsay5ncmVlbihwcmVmaXgpKTtcbiAgICAgICAgcmV0dXJuIHRoaXM7XG4gICAgfVxuXG4gICAgbWFrZURhdGVGb3JtYXQoKSB7XG4gICAgICAgIC8vIEB0cy1pZ25vcmVcbiAgICAgICAgY29uc3QgZGF0ZUZvcm1hdCA9IGRhdGVmb3JtYXQobmV3IERhdGUoKSwgdGhpcy5jb25maWcuZGF0ZUZvcm1hdCB8fCAnaXNvRGF0ZVRpbWUnKTtcbiAgICAgICAgdGhpcy5wcmludFF1ZXVlLnB1c2goZGF0ZUZvcm1hdCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VIZWFkZXIoaGVhZGVycz86IHsgW2tleTpzdHJpbmddIDoge3ZhbHVlOnN0cmluZ319KSB7XG4gICAgICAgIGlmKHRoaXMuY29uZmlnLmhlYWRlcnMgJiYgaGVhZGVycykge1xuICAgICAgICAgICAgY29uc3QgaGVhZGVyTWFwOnsgW2tleTpzdHJpbmddIDoge3ZhbHVlOnN0cmluZ319ID0ge307XG4gICAgICAgICAgICBmb3IobGV0IGtleSBpbiBoZWFkZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYoIXRoaXMuZmlsdGVyZWRIZWFkZXJMaXN0LmluY2x1ZGVzKGtleSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyTWFwW2tleV0gPSBoZWFkZXJzW2tleV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnByaW50UXVldWUucHVzaChKU09OLnN0cmluZ2lmeShoZWFkZXJNYXApKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBtYWtlVXJsKHVybD86IHN0cmluZykge1xuICAgICAgICBpZih1cmwpIHRoaXMucHJpbnRRdWV1ZS5wdXNoKHVybCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VNZXRob2QobWV0aG9kPzogc3RyaW5nKSB7XG4gICAgICAgIGlmKG1ldGhvZCkgdGhpcy5wcmludFF1ZXVlLnB1c2goY2hhbGsueWVsbG93KG1ldGhvZC50b1VwcGVyQ2FzZSgpKSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VEYXRhKGRhdGE6IG9iamVjdCkge1xuICAgICAgICBpZihkYXRhKSB0aGlzLnByaW50UXVldWUucHVzaChKU09OLnN0cmluZ2lmeShkYXRhKSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VTdGF0dXMoc3RhdHVzPzpudW1iZXIsIHN0YXR1c1RleHQ/OiBzdHJpbmcpIHtcbiAgICAgICAgaWYoc3RhdHVzICYmIHN0YXR1c1RleHQpIHRoaXMucHJpbnRRdWV1ZS5wdXNoKGAke3N0YXR1c306JHtzdGF0dXNUZXh0fWApO1xuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBidWlsZCgpIHtcbiAgICAgICAgcmV0dXJuIHRoaXMucHJpbnRRdWV1ZS5qb2luKCcgJyk7XG4gICAgfVxufVxuXG5leHBvcnQgZGVmYXVsdCBTdHJpbmdCdWlsZGVyOyJdfQ== |
export interface CommonConfig { | ||
prefixText?: string | boolean; | ||
dateFormat?: string | boolean; | ||
headers?: boolean; | ||
} | ||
@@ -9,3 +10,2 @@ export interface GlobalLogConfig extends CommonConfig { | ||
method?: boolean; | ||
headers?: boolean; | ||
status?: boolean; | ||
@@ -19,3 +19,2 @@ statusText?: boolean; | ||
method?: boolean; | ||
headers?: boolean; | ||
} | ||
@@ -26,3 +25,2 @@ export interface ResponseLogConfig extends CommonConfig { | ||
statusText?: boolean; | ||
headers?: boolean; | ||
} | ||
@@ -29,0 +27,0 @@ export interface ErrorLogConfig extends CommonConfig { |
@@ -24,3 +24,3 @@ 'use strict'; | ||
} = error; | ||
let status, statusText, data; | ||
let status, statusText, data, headers; | ||
@@ -31,2 +31,3 @@ if (response) { | ||
data = response.data; | ||
headers = response.headers; | ||
} | ||
@@ -42,2 +43,3 @@ | ||
.makeStatus(status, statusText) | ||
.makeHeader(headers) | ||
.makeData(data) | ||
@@ -52,2 +54,2 @@ .build(); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvZXJyb3IudHMiXSwibmFtZXMiOlsiZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZSIsImVycm9yIiwiY29uZmlnIiwidXJsIiwibWV0aG9kIiwicmVzcG9uc2UiLCJzdGF0dXMiLCJzdGF0dXNUZXh0IiwiZGF0YSIsImJ1aWxkQ29uZmlnIiwic3RyaW5nQnVpbGRlciIsIlN0cmluZ0J1aWxkZXIiLCJsb2ciLCJtYWtlUHJlZml4IiwibWFrZURhdGVGb3JtYXQiLCJtYWtlVXJsIiwibWFrZU1ldGhvZCIsIm1ha2VTdGF0dXMiLCJtYWtlRGF0YSIsImJ1aWxkIiwiZXJyb3JMb2dnZXIiLCJQcm9taXNlIiwicmVqZWN0Il0sIm1hcHBpbmdzIjoiOzs7Ozs7OztBQUVBOztBQUNBOztBQUNBOzs7O0FBRUEsU0FBU0EseUJBQVQsQ0FBbUNDLEtBQW5DLEVBQXNEQyxNQUF0RCxFQUErRTtBQUUzRSxRQUFNO0FBQUNBLElBQUFBLE1BQU0sRUFBRTtBQUFDQyxNQUFBQSxHQUFEO0FBQU1DLE1BQUFBO0FBQU4sS0FBVDtBQUF3QkMsSUFBQUE7QUFBeEIsTUFBb0NKLEtBQTFDO0FBRUEsTUFBSUssTUFBSixFQUFZQyxVQUFaLEVBQXdCQyxJQUF4Qjs7QUFDQSxNQUFHSCxRQUFILEVBQVk7QUFDUkMsSUFBQUEsTUFBT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HVybiBlcnJvcjtcbn1cblxuZnVuY3Rpb24gZXJyb3JMb2dnZXIoZXJyb3I6IEF4aW9zRXJyb3IpIHtcbiAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZShlcnJvcikpO1xufVxuXG5leHBvcnQgeyBlcnJvckxvZ2dlciwgZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZSB9OyJdfQ== |
@@ -19,3 +19,3 @@ 'use strict'; | ||
function requestLogger(request, config) { | ||
const { url, method, data } = request; | ||
const { url, method, data, headers } = request; | ||
const buildConfig = config ? config : (0, _config.mergeWithGlobalConfig)(config); | ||
@@ -28,2 +28,3 @@ const stringBuilder = new _stringBuilder.default(buildConfig); | ||
.makeMethod(method) | ||
.makeHeader(headers) | ||
.makeData(data) | ||
@@ -37,2 +38,2 @@ .build(); | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvcmVxdWVzdC50cyJdLCJuYW1lcyI6WyJyZXF1ZXN0TG9nZ2VyIiwicmVxdWVzdCIsImNvbmZpZyIsInVybCIsIm1ldGhvZCIsImRhdGEiLCJidWlsZENvbmZpZyIsInN0cmluZ0J1aWxkZXIiLCJTdHJpbmdCdWlsZGVyIiwibG9nIiwibWFrZVByZWZpeCIsIm1ha2VEYXRlRm9ybWF0IiwibWFrZVVybCIsIm1ha2VNZXRob2QiLCJtYWtlRGF0YSIsImJ1aWxkIl0sIm1hcHBpbmdzIjoiOzs7Ozs7O0FBRUE7O0FBQ0E7O0FBQ0E7Ozs7QUFFQSxTQUFTQSxhQUFULENBQXVCQyxPQUF2QixFQUFvREMsTUFBcEQsRUFBK0U7QUFFM0UsUUFBTTtBQUFDQyxJQUFBQSxHQUFEO0FBQU1DLElBQUFBLE1BQU47QUFBY0MsSUFBQUE7QUFBZCxNQUFzQkosT0FBNUI7Q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lnKTtcblxuICAgIGNvbnN0IHN0cmluZ0J1aWxkZXIgPSBuZXcgU3RyaW5nQnVpbGRlcihidWlsZENvbmZpZyk7XG4gICAgY29uc3QgbG9nID0gc3RyaW5nQnVpbGRlclxuICAgICAgICAubWFrZVByZWZpeCgnUmVxdWVzdCcpXG4gICAgICAgIC5tYWtlRGF0ZUZvcm1hdCgpXG4gICAgICAgIC5tYWtlVXJsKHVybClcbiAgICAgICAgLm1ha2VNZXRob2QobWV0aG9kKVxuICAgICAgICAubWFrZUhlYWRlcihoZWFkZXJzKVxuICAgICAgICAubWFrZURhdGEoZGF0YSlcbiAgICAgICAgLmJ1aWxkKCk7XG5cbiAgICBwcmludExvZyhsb2cpO1xuXG4gICAgcmV0dXJuIHJlcXVlc3Q7XG59XG5cbmV4cG9ydCBkZWZhdWx0IHJlcXVlc3RMb2dnZXI7Il19 |
@@ -24,2 +24,3 @@ 'use strict'; | ||
data, | ||
headers, | ||
} = response; | ||
@@ -34,2 +35,3 @@ const buildConfig = config ? config : (0, _config.mergeWithGlobalConfig)(config); | ||
.makeStatus(status, statusText) | ||
.makeHeader(headers) | ||
.makeData(data) | ||
@@ -43,2 +45,2 @@ .build(); | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvcmVzcG9uc2UudHMiXSwibmFtZXMiOlsicmVzcG9uc2VMb2dnZXIiLCJyZXNwb25zZSIsImNvbmZpZyIsInVybCIsIm1ldGhvZCIsInN0YXR1cyIsInN0YXR1c1RleHQiLCJkYXRhIiwiYnVpbGRDb25maWciLCJzdHJpbmdCdWlsZGVyIiwiU3RyaW5nQnVpbGRlciIsImxvZyIsIm1ha2VQcmVmaXgiLCJtYWtlRGF0ZUZvcm1hdCIsIm1ha2VVcmwiLCJtYWtlTWV0aG9kIiwibWFrZVN0YXR1cyIsIm1ha2VEYXRhIiwiYnVpbGQiXSwibW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blxuICAgIHByaW50TG9nKGxvZyk7XG5cbiAgICByZXR1cm4gcmVzcG9uc2U7XG59XG5cbmV4cG9ydCBkZWZhdWx0IHJlc3BvbnNlTG9nZ2VyOyJdfQ== |
{ | ||
"name": "axios-logger", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Beautify Axios Logging Messages", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
36234
458