axios-logger
Advanced tools
Comparing version 2.2.1 to 2.3.0
import { ErrorLogConfig, GlobalLogConfig, RequestLogConfig, ResponseLogConfig } from './types'; | ||
declare function getGlobalConfig(): GlobalLogConfig; | ||
declare function setGlobalConfig(config: GlobalLogConfig): void; | ||
declare function mergeWithGlobalConfig(config?: RequestLogConfig | ResponseLogConfig | ErrorLogConfig): { | ||
declare function assembleBuildConfig(config?: RequestLogConfig | ResponseLogConfig | ErrorLogConfig): { | ||
data?: boolean | undefined; | ||
@@ -45,2 +45,2 @@ url?: boolean | undefined; | ||
}; | ||
export { getGlobalConfig, setGlobalConfig, mergeWithGlobalConfig, }; | ||
export { getGlobalConfig, setGlobalConfig, assembleBuildConfig, }; |
@@ -1,50 +0,34 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.getGlobalConfig = getGlobalConfig; | ||
exports.setGlobalConfig = setGlobalConfig; | ||
exports.mergeWithGlobalConfig = mergeWithGlobalConfig; | ||
exports.assembleBuildConfig = assembleBuildConfig; | ||
function _objectSpread(target) { | ||
for (var i = 1; i < arguments.length; i++) { | ||
var source = arguments[i] != null ? arguments[i] : {}; | ||
var ownKeys = Object.keys(source); | ||
if (typeof Object.getOwnPropertySymbols === 'function') { | ||
ownKeys = ownKeys.concat( | ||
Object.getOwnPropertySymbols(source).filter(function(sym) { | ||
return Object.getOwnPropertyDescriptor(source, sym).enumerable; | ||
}) | ||
); | ||
} | ||
ownKeys.forEach(function(key) { | ||
_defineProperty(target, key, source[key]); | ||
}); | ||
} | ||
return target; | ||
} | ||
function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); if (enumerableOnly) symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; }); keys.push.apply(keys, symbols); } return keys; } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { _defineProperty(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
let globalConfig; | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
let globalConfig = { | ||
url: true, | ||
method: true, | ||
data: true, | ||
status: true | ||
}; | ||
function getGlobalConfig() { | ||
return globalConfig; | ||
return globalConfig; | ||
} | ||
function setGlobalConfig(config) { | ||
globalConfig = config; | ||
globalConfig = _objectSpread({}, globalConfig, {}, config); | ||
} | ||
function mergeWithGlobalConfig(config) { | ||
return _objectSpread({}, globalConfig, config); | ||
function assembleBuildConfig(config) { | ||
return _objectSpread({}, globalConfig, {}, config); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vY29uZmlnLnRzIl0sIm5hbWVzIjpbImdsb2JhbENvbmZpZyIsImdldEdsb2JhbENvbmZpZyIsInNldEdsb2JhbENvbmZpZyIsImNvbmZpZyIsIm1lcmdlV2l0aEdsb2JhbENvbmZpZyJdLCJtYXBwaW5ncyI6Ijs7Ozs7Ozs7Ozs7OztBQUVBLElBQUlBLFlBQUo7O0FBRUEsU0FBU0MsZUFBVCxHQUEyQjtBQUN2QixTQUFPRCxZQUFQO0FBQ0g7O0FBRUQsU0FBU0UsZUFBVCxDQUF5QkM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sb2JhbENvbmZpZyA9IHtcbiAgICAgICAgLi4uZ2xvYmFsQ29uZmlnLFxuICAgICAgICAuLi5jb25maWcsXG4gICAgfTtcbn1cblxuZnVuY3Rpb24gYXNzZW1ibGVCdWlsZENvbmZpZyhjb25maWc/OiBSZXF1ZXN0TG9nQ29uZmlnIHwgUmVzcG9uc2VMb2dDb25maWcgfCBFcnJvckxvZ0NvbmZpZykge1xuICAgIHJldHVybiB7XG4gICAgICAgIC4uLmdsb2JhbENvbmZpZyxcbiAgICAgICAgLi4uY29uZmlnLFxuICAgIH07XG59XG5cbmV4cG9ydCB7XG4gICAgZ2V0R2xvYmFsQ29uZmlnLFxuICAgIHNldEdsb2JhbENvbmZpZyxcbiAgICBhc3NlbWJsZUJ1aWxkQ29uZmlnLFxufTsiXX0= |
@@ -1,5 +0,5 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
@@ -9,4 +9,4 @@ exports.printLog = printLog; | ||
function printLog(text) { | ||
console.log(text); | ||
console.log(text); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vcHJpbnQudHMiXSwibmFtZXMiOlsicHJpbnRMb2ciLCJ0ZXh0IiwiY29uc29sZSIsImxvZyJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLFNBQVNBLFFBQVQsQ0FBbUJDLElBQW5CLEVBQWlDO0FBQzdCQyxFQUFBQSxPQUFPLENBQUNDLEdBQVIsQ0FBWUYsSUFBWjtBQUNIIiwic291cmNlc0NvbnRlbnQiOlsiZnVuY3Rpb24gcHJpbnRMb2cgKHRleHQ6IHN0cmluZykge1xuICAgIGNvbnNvbGUubG9nKHRleHQpO1xufVxuXG5leHBvcnQge1xuICAgIHByaW50TG9nLFxufVxuIl19 | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vcHJpbnQudHMiXSwibmFtZXMiOlsicHJpbnRMb2ciLCJ0ZXh0IiwiY29uc29sZSIsImxvZyJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUFBLFNBQVNBLFFBQVQsQ0FBbUJDLElBQW5CLEVBQWlDO0FBQzdCQyxFQUFBQSxPQUFPLENBQUNDLEdBQVIsQ0FBWUYsSUFBWjtBQUNIIiwic291cmNlc0NvbnRlbnQiOlsiZnVuY3Rpb24gcHJpbnRMb2cgKHRleHQ6IHN0cmluZykge1xuICAgIGNvbnNvbGUubG9nKHRleHQpO1xufVxuXG5leHBvcnQge1xuICAgIHByaW50TG9nLFxufVxuIl19 |
@@ -7,4 +7,4 @@ import { GlobalLogConfig } from './types'; | ||
constructor(config: GlobalLogConfig); | ||
makePrefix(logType: string | false): this; | ||
makeDateFormat(): this; | ||
makeLogTypeWithPrefix(logType: string): this; | ||
makeDateFormat(date: Date): this; | ||
makeHeader(headers?: { | ||
@@ -11,0 +11,0 @@ [key: string]: { |
@@ -1,105 +0,82 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _dateformat = _interopRequireDefault(require('dateformat')); | ||
var _dateformat = _interopRequireDefault(require("dateformat")); | ||
var _chalk = _interopRequireDefault(require('chalk')); | ||
var _chalk = _interopRequireDefault(require("chalk")); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function _defineProperty(obj, key, value) { | ||
if (key in obj) { | ||
Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); | ||
} else { | ||
obj[key] = value; | ||
} | ||
return obj; | ||
} | ||
function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; } | ||
class StringBuilder { | ||
constructor(config) { | ||
_defineProperty(this, 'config', void 0); | ||
constructor(config) { | ||
_defineProperty(this, "config", void 0); | ||
_defineProperty(this, 'printQueue', void 0); | ||
_defineProperty(this, "printQueue", void 0); | ||
_defineProperty(this, 'filteredHeaderList', void 0); | ||
_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', | ||
]; | ||
} | ||
this.config = config; | ||
this.printQueue = []; | ||
this.filteredHeaderList = ['common', 'delete', 'get', 'head', 'post', 'put', 'patch', 'content-type', 'content-length', 'vary', 'date', 'connection', 'content-security-policy']; | ||
} | ||
makePrefix(logType) { | ||
const prefix = | ||
this.config.prefixText === false ? `[${logType}]` : `[${this.config.prefixText || 'Axios'}][${logType}]`; | ||
this.printQueue.push(_chalk.default.green(prefix)); | ||
return this; | ||
} | ||
makeLogTypeWithPrefix(logType) { | ||
const prefix = this.config.prefixText === false ? `[${logType}]` : `[${this.config.prefixText || 'Axios'}][${logType}]`; | ||
this.printQueue.push(_chalk.default.green(prefix)); | ||
return this; | ||
} | ||
makeDateFormat() { | ||
// @ts-ignore | ||
const dateFormat = (0, _dateformat.default)(new Date(), this.config.dateFormat || 'isoDateTime'); | ||
this.printQueue.push(dateFormat); | ||
return this; | ||
} | ||
makeDateFormat(date) { | ||
// @ts-ignore | ||
const dateFormat = (0, _dateformat.default)(date, this.config.dateFormat || 'isoDateTime'); | ||
this.printQueue.push(dateFormat); | ||
return this; | ||
} | ||
makeHeader(headers) { | ||
if (this.config.headers && headers) { | ||
const headerMap = {}; | ||
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)); | ||
for (let key in headers) { | ||
if (!this.filteredHeaderList.includes(key)) { | ||
headerMap[key] = headers[key]; | ||
} | ||
} | ||
return this; | ||
this.printQueue.push(JSON.stringify(headerMap)); | ||
} | ||
makeUrl(url) { | ||
if (url) this.printQueue.push(url); | ||
return this; | ||
} | ||
return this; | ||
} | ||
makeMethod(method) { | ||
if (method) this.printQueue.push(_chalk.default.yellow(method.toUpperCase())); | ||
return this; | ||
} | ||
makeUrl(url) { | ||
if (this.config.url && url) this.printQueue.push(url); | ||
return this; | ||
} | ||
makeData(data) { | ||
if (data) this.printQueue.push(JSON.stringify(data)); | ||
return this; | ||
} | ||
makeMethod(method) { | ||
if (this.config.method && method) this.printQueue.push(_chalk.default.yellow(method.toUpperCase())); | ||
return this; | ||
} | ||
makeStatus(status, statusText) { | ||
if (status && statusText) this.printQueue.push(`${status}:${statusText}`); | ||
return this; | ||
} | ||
makeData(data) { | ||
if (this.config.data && data) this.printQueue.push(JSON.stringify(data)); | ||
return this; | ||
} | ||
build() { | ||
return this.printQueue.join(' '); | ||
} | ||
makeStatus(status, statusText) { | ||
if (status && statusText) this.printQueue.push(`${status}:${statusText}`); | ||
return this; | ||
} | ||
build() { | ||
return this.printQueue.join(' '); | ||
} | ||
} | ||
@@ -109,2 +86,2 @@ | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9jb21tb24vc3RyaW5nLWJ1aWxkZXIudHMiXSwibmFtZXMiOlsiU3RyaW5nQnVpbGRlciIsImNvbnN0cnVjdG9yIiwiY29uZmlnIiwicHJpbnRRdWV1ZSIsImZpbHRlcmVkSGVhZGVyTGlzdCIsIm1ha2VQcmVmaXg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HVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VIZWFkZXIoaGVhZGVycz86IHsgW2tleTpzdHJpbmddIDoge3ZhbHVlOnN0cmluZ319KSB7XG4gICAgICAgIGlmKHRoaXMuY29uZmlnLmhlYWRlcnMgJiYgaGVhZGVycykge1xuICAgICAgICAgICAgY29uc3QgaGVhZGVyTWFwOnsgW2tleTpzdHJpbmddIDoge3ZhbHVlOnN0cmluZ319ID0ge307XG4gICAgICAgICAgICBmb3IobGV0IGtleSBpbiBoZWFkZXJzKSB7XG4gICAgICAgICAgICAgICAgaWYoIXRoaXMuZmlsdGVyZWRIZWFkZXJMaXN0LmluY2x1ZGVzKGtleSkpIHtcbiAgICAgICAgICAgICAgICAgICAgaGVhZGVyTWFwW2tleV0gPSBoZWFkZXJzW2tleV07XG4gICAgICAgICAgICAgICAgfVxuICAgICAgICAgICAgfVxuXG4gICAgICAgICAgICB0aGlzLnByaW50UXVldWUucHVzaChKU09OLnN0cmluZ2lmeShoZWFkZXJNYXApKTtcbiAgICAgICAgfVxuICAgICAgICByZXR1cm4gdGhpcztcbiAgICB9XG5cbiAgICBtYWtlVXJsKHVybD86IHN0cmluZykge1xuICAgICAgICBpZih1cmwpIHRoaXMucHJpbnRRdWV1ZS5wdXNoKHVybCk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VNZXRob2QobWV0aG9kPzogc3RyaW5nKSB7XG4gICAgICAgIGlmKG1ldGhvZCkgdGhpcy5wcmludFF1ZXVlLnB1c2goY2hhbGsueWVsbG93KG1ldGhvZC50b1VwcGVyQ2FzZSgpKSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1ha2VEYXRhKGRhdGE6IG9iamVjdCkge1xuICAgICAgICBpZihkYXRhKSB0aGlzLnByaW50UXVldWUucHVzaChKU09OLnN0cmluZ2lmeShkYXRhKSk7XG4gICAgICAgIHJldHVybiB0aGlzO1xuICAgIH1cblxuICAgIG1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1xuICAgICAgICByZXR1cm4gdGhpcy5wcmludFF1ZXVlLmpvaW4oJyAnKTtcbiAgICB9XG59XG5cbmV4cG9ydCBkZWZhdWx0IFN0cmluZ0J1aWxkZXI7XG4iXX0= |
@@ -1,2 +0,2 @@ | ||
'use strict'; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbXX0= | ||
"use strict"; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IiIsInNvdXJjZXNDb250ZW50IjpbXX0= |
@@ -1,42 +0,40 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
Object.defineProperty(exports, 'setGlobalConfig', { | ||
enumerable: true, | ||
get: function() { | ||
return _config.setGlobalConfig; | ||
}, | ||
Object.defineProperty(exports, "setGlobalConfig", { | ||
enumerable: true, | ||
get: function () { | ||
return _config.setGlobalConfig; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'requestLogger', { | ||
enumerable: true, | ||
get: function() { | ||
return _request.default; | ||
}, | ||
Object.defineProperty(exports, "requestLogger", { | ||
enumerable: true, | ||
get: function () { | ||
return _request.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'responseLogger', { | ||
enumerable: true, | ||
get: function() { | ||
return _response.default; | ||
}, | ||
Object.defineProperty(exports, "responseLogger", { | ||
enumerable: true, | ||
get: function () { | ||
return _response.default; | ||
} | ||
}); | ||
Object.defineProperty(exports, 'errorLogger', { | ||
enumerable: true, | ||
get: function() { | ||
return _error.errorLogger; | ||
}, | ||
Object.defineProperty(exports, "errorLogger", { | ||
enumerable: true, | ||
get: function () { | ||
return _error.errorLogger; | ||
} | ||
}); | ||
var _config = require('./common/config'); | ||
var _config = require("./common/config"); | ||
var _request = _interopRequireDefault(require('./logger/request')); | ||
var _request = _interopRequireDefault(require("./logger/request")); | ||
var _response = _interopRequireDefault(require('./logger/response')); | ||
var _response = _interopRequireDefault(require("./logger/response")); | ||
var _error = require('./logger/error'); | ||
var _error = require("./logger/error"); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldEdsb2JhbENvbmZpZyB9IGZyb20gJy4vY29tbW9uL2NvbmZpZyc7XG5pbXBvcnQgcmVxdWVzdExvZ2dlciBmcm9tICcuL2xvZ2dlci9yZXF1ZXN0JztcbmltcG9ydCByZXNwb25zZUxvZ2dlciBmcm9tICcuL2xvZ2dlci9yZXNwb25zZSc7XG5pbXBvcnQgeyBlcnJvckxvZ2dlciB9IGZyb20gJy4vbG9nZ2VyL2Vycm9yJztcblxuZXhwb3J0IHsgc2V0R2xvYmFsQ29uZmlnLCByZXF1ZXN0TG9nZ2VyLCByZXNwb25zZUxvZ2dlciwgZXJyb3JMb2dnZXIgfTsiXX0= | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uL3NyYy9pbmRleC50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiOzs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7Ozs7QUFBQTs7QUFDQTs7QUFDQTs7QUFDQSIsInNvdXJjZXNDb250ZW50IjpbImltcG9ydCB7IHNldEdsb2JhbENvbmZpZyB9IGZyb20gJy4vY29tbW9uL2NvbmZpZyc7XG5pbXBvcnQgcmVxdWVzdExvZ2dlciBmcm9tICcuL2xvZ2dlci9yZXF1ZXN0JztcbmltcG9ydCByZXNwb25zZUxvZ2dlciBmcm9tICcuL2xvZ2dlci9yZXNwb25zZSc7XG5pbXBvcnQgeyBlcnJvckxvZ2dlciB9IGZyb20gJy4vbG9nZ2VyL2Vycm9yJztcblxuZXhwb3J0IHsgc2V0R2xvYmFsQ29uZmlnLCByZXF1ZXN0TG9nZ2VyLCByZXNwb25zZUxvZ2dlciwgZXJyb3JMb2dnZXIgfTsiXX0= |
@@ -1,5 +0,5 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
@@ -9,44 +9,37 @@ exports.errorLogger = errorLogger; | ||
var _config = require('../common/config'); | ||
var _config = require("../common/config"); | ||
var _stringBuilder = _interopRequireDefault(require('../common/string-builder')); | ||
var _stringBuilder = _interopRequireDefault(require("../common/string-builder")); | ||
var _print = require('../common/print'); | ||
var _print = require("../common/print"); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function errorLoggerWithoutPromise(error, config) { | ||
const { | ||
config: { url, method }, | ||
response, | ||
} = error; | ||
let status, statusText, data, headers; | ||
const { | ||
config: { | ||
url, | ||
method | ||
}, | ||
response | ||
} = error; | ||
let status, statusText, data, headers; | ||
if (response) { | ||
status = response.status; | ||
statusText = response.statusText; | ||
data = response.data; | ||
headers = response.headers; | ||
} | ||
if (response) { | ||
status = response.status; | ||
statusText = response.statusText; | ||
data = response.data; | ||
headers = response.headers; | ||
} | ||
const buildConfig = config ? config : (0, _config.mergeWithGlobalConfig)(config); | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder | ||
.makePrefix('Error') | ||
.makeDateFormat() | ||
.makeUrl(url) | ||
.makeMethod(method) | ||
.makeStatus(status, statusText) | ||
.makeHeader(headers) | ||
.makeData(data) | ||
.build(); | ||
(0, _print.printLog)(log); | ||
return error; | ||
const buildConfig = (0, _config.assembleBuildConfig)(config); | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Error').makeDateFormat(new Date()).makeUrl(url).makeMethod(method).makeStatus(status, statusText).makeHeader(headers).makeData(data).build(); | ||
(0, _print.printLog)(log); | ||
return error; | ||
} | ||
function errorLogger(error) { | ||
return Promise.reject(errorLoggerWithoutPromise(error)); | ||
return Promise.reject(errorLoggerWithoutPromise(error)); | ||
} | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvZXJyb3IudHMiXSwibmFtZXMiOlsiZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZSIsImVycm9yIiwiY29uZmlnIiwidXJsIiwibWV0aG9kIiwicmVzcG9uc2UiLCJzdGF0dXMiLCJzdGF0dXNUZXh0IiwiZGF0YSIsImhlYWRlcnMiLCJidWlsZENvbmZpZyIsInN0cmluZ0J1aWxkZXIiLCJTdHJpbmdCdWlsZGVyIiwibG9nIiwibWFrZVByZWZpeCIsIm1ha2VEYXRlRm9ybWF0IiwibWFrZVVybCIsIm1ha2VNZXRob2QiLCJtYWtlU3RhdHVzIiwibWFrZUhlYWRlciIsIm1ha2VEYXRhIiwiYnVpbGQiLCJlcnJvckxvZ2dlciIsIlByb21pc2UiLCJyZWplY3QiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7O0FBRUE7O0FBQ0E7O0FBQ0E7Ozs7QUFFQSxTQUFTQSx5QkFBVCxDQUFtQ0MsS0F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AgIGNvbnN0IGxvZyA9IHN0cmluZ0J1aWxkZXJcbiAgICAgICAgLm1ha2VQcmVmaXgoJ0Vycm9yJylcbiAgICAgICAgLm1ha2VEYXRlRm9ybWF0KClcbiAgICAgICAgLm1ha2VVcmwodXJsKVxuICAgICAgICAubWFrZU1ldGhvZChtZXRob2QpXG4gICAgICAgIC5tYWtlU3RhdHVzKHN0YXR1cywgc3RhdHVzVGV4dClcbiAgICAgICAgLm1ha2VIZWFkZXIoaGVhZGVycylcbiAgICAgICAgLm1ha2VEYXRhKGRhdGEpXG4gICAgICAgIC5idWlsZCgpO1xuXG4gICAgcHJpbnRMb2cobG9nKTtcblxuICAgIHJldHVybiBlcnJvcjtcbn1cblxuZnVuY3Rpb24gZXJyb3JMb2dnZXIoZXJyb3I6IEF4aW9zRXJyb3IpIHtcbiAgICByZXR1cm4gUHJvbWlzZS5yZWplY3QoZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZShlcnJvcikpO1xufVxuXG5leHBvcnQgeyBlcnJvckxvZ2dlciwgZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZSB9OyJdfQ== | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvZXJyb3IudHMiXSwibmFtZXMiOlsiZXJyb3JMb2dnZXJXaXRob3V0UHJvbWlzZSIsImVycm9yIiwiY29uZmlnIiwidXJsIiwibWV0aG9kIiwicmVzcG9uc2UiLCJzdGF0dXMiLCJzdGF0dXNUZXh0IiwiZGF0YSIsImhlYWRlcnMiLCJidWlsZENvbmZpZyIsInN0cmluZ0J1aWxkZXIiLCJTdHJpbmdCdWlsZGVyIiwibG9nIiwibWFrZUxvZ1R5cGVXaXRoUHJlZml4IiwibWFrZURhdGVGb3JtYXQiLCJEYXRlIiwibWFrZVVybCIsIm1ha2VNZXRob2QiLCJtYWtlU3RhdHVzIiwibWFrZUhlYWRlciIsIm1ha2V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mxlQnVpbGRDb25maWcoY29uZmlnKTtcblxuICAgIGNvbnN0IHN0cmluZ0J1aWxkZXIgPSBuZXcgU3RyaW5nQnVpbGRlcihidWlsZENvbmZpZyk7XG4gICAgY29uc3QgbG9nID0gc3RyaW5nQnVpbGRlclxuICAgICAgICAubWFrZUxvZ1R5cGVXaXRoUHJlZml4KCdFcnJvcicpXG4gICAgICAgIC5tYWtlRGF0ZUZvcm1hdChuZXcgRGF0ZSgpKVxuICAgICAgICAubWFrZVVybCh1cmwpXG4gICAgICAgIC5tYWtlTWV0aG9kKG1ldGhvZClcbiAgICAgICAgLm1ha2VTdGF0dXMoc3RhdHVzLCBzdGF0dXNUZXh0KVxuICAgICAgICAubWFrZUhlYWRlcihoZWFkZXJzKVxuICAgICAgICAubWFrZURhdGEoZGF0YSlcbiAgICAgICAgLmJ1aWxkKCk7XG5cbiAgICBwcmludExvZyhsb2cpO1xuXG4gICAgcmV0dXJuIGVycm9yO1xufVxuXG5mdW5jdGlvbiBlcnJvckxvZ2dlcihlcnJvcjogQXhpb3NFcnJvcikge1xuICAgIHJldHVybiBQcm9taXNlLnJlamVjdChlcnJvckxvZ2dlcldpdGhvdXRQcm9taXNlKGVycm9yKSk7XG59XG5cbmV4cG9ydCB7IGVycm9yTG9nZ2VyLCBlcnJvckxvZ2dlcldpdGhvdXRQcm9taXNlIH07Il19 |
@@ -1,32 +0,28 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _config = require('../common/config'); | ||
var _config = require("../common/config"); | ||
var _stringBuilder = _interopRequireDefault(require('../common/string-builder')); | ||
var _stringBuilder = _interopRequireDefault(require("../common/string-builder")); | ||
var _print = require('../common/print'); | ||
var _print = require("../common/print"); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function requestLogger(request, config) { | ||
const { url, method, data, headers } = request; | ||
const buildConfig = config ? config : (0, _config.mergeWithGlobalConfig)(config); | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder | ||
.makePrefix('Request') | ||
.makeDateFormat() | ||
.makeUrl(url) | ||
.makeMethod(method) | ||
.makeHeader(headers) | ||
.makeData(data) | ||
.build(); | ||
(0, _print.printLog)(log); | ||
return request; | ||
const { | ||
url, | ||
method, | ||
data, | ||
headers | ||
} = request; | ||
const buildConfig = (0, _config.assembleBuildConfig)(config); | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Request').makeDateFormat(new Date()).makeUrl(url).makeMethod(method).makeHeader(headers).makeData(data).build(); | ||
(0, _print.printLog)(log); | ||
return request; | ||
} | ||
@@ -36,2 +32,2 @@ | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvcmVxdWVzdC50cyJdLCJuYW1lcyI6WyJyZXF1ZXN0TG9nZ2VyIiwicmVxdWVzdCIsImNvbmZpZyIsInVybCIsIm1ldGhvZCIsImRhdGEiLCJoZWFkZXJzIiwiYnVpbGRDb25maWciLCJzdHJpbmdCdWlsZGVyIiwiU3RyaW5nQnVpbGRlciIsImxvZyIsIm1ha2VQcmVmaXgiLCJtYWtlRGF0ZUZvcm1hdCIsIm1ha2VVcmwiLCJtYWtlTWV0aG9kIiwibWFrZUhlYWRlciIsIm1ha2VEYXRhIiwiYnVpbGQiXSwibWFwcGluZ3MiOiI7Ozs7Ozs7QUFFQTs7QUFDQTs7QUFDQTs7OztBQUVBLFNBQVNBLGFBQVQsQ0FBdUJDLE9BQXZCLEVBQW9EQyxNQUFwRCxFQUErRTtBQUUzRSxRQUFNO0FBQUNDLElBQUFBLEdBQUQ7QUFBTUMsS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IHtcblxuICAgIGNvbnN0IHt1cmwsIG1ldGhvZCwgZGF0YSwgaGVhZGVyc30gPSByZXF1ZXN0O1xuICAgIGNvbnN0IGJ1aWxkQ29uZmlnID0gYXNzZW1ibGVCdWlsZENvbmZpZyhjb25maWcpO1xuXG4gICAgY29uc3Qgc3RyaW5nQnVpbGRlciA9IG5ldyBTdHJpbmdCdWlsZGVyKGJ1aWxkQ29uZmlnKTtcbiAgICBjb25zdCBsb2cgPSBzdHJpbmdCdWlsZGVyXG4gICAgICAgIC5tYWtlTG9nVHlwZVdpdGhQcmVmaXgoJ1JlcXVlc3QnKVxuICAgICAgICAubWFrZURhdGVGb3JtYXQobmV3IERhdGUoKSlcbiAgICAgICAgLm1ha2VVcmwodXJsKVxuICAgICAgICAubWFrZU1ldGhvZChtZXRob2QpXG4gICAgICAgIC5tYWtlSGVhZGVyKGhlYWRlcnMpXG4gICAgICAgIC5tYWtlRGF0YShkYXRhKVxuICAgICAgICAuYnVpbGQoKTtcblxuICAgIHByaW50TG9nKGxvZyk7XG5cbiAgICByZXR1cm4gcmVxdWVzdDtcbn1cblxuZXhwb3J0IGRlZmF1bHQgcmVxdWVzdExvZ2dlcjsiXX0= |
@@ -1,39 +0,32 @@ | ||
'use strict'; | ||
"use strict"; | ||
Object.defineProperty(exports, '__esModule', { | ||
value: true, | ||
Object.defineProperty(exports, "__esModule", { | ||
value: true | ||
}); | ||
exports.default = void 0; | ||
var _config = require('../common/config'); | ||
var _config = require("../common/config"); | ||
var _stringBuilder = _interopRequireDefault(require('../common/string-builder')); | ||
var _stringBuilder = _interopRequireDefault(require("../common/string-builder")); | ||
var _print = require('../common/print'); | ||
var _print = require("../common/print"); | ||
function _interopRequireDefault(obj) { | ||
return obj && obj.__esModule ? obj : { default: obj }; | ||
} | ||
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; } | ||
function responseLogger(response, config) { | ||
const { | ||
config: { url, method }, | ||
status, | ||
statusText, | ||
data, | ||
headers, | ||
} = response; | ||
const buildConfig = config ? config : (0, _config.mergeWithGlobalConfig)(config); | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder | ||
.makePrefix('Response') | ||
.makeDateFormat() | ||
.makeUrl(url) | ||
.makeMethod(method) | ||
.makeStatus(status, statusText) | ||
.makeHeader(headers) | ||
.makeData(data) | ||
.build(); | ||
(0, _print.printLog)(log); | ||
return response; | ||
const { | ||
config: { | ||
url, | ||
method | ||
}, | ||
status, | ||
statusText, | ||
data, | ||
headers | ||
} = response; | ||
const buildConfig = (0, _config.assembleBuildConfig)(config); | ||
const stringBuilder = new _stringBuilder.default(buildConfig); | ||
const log = stringBuilder.makeLogTypeWithPrefix('Response').makeDateFormat(new Date()).makeUrl(url).makeMethod(method).makeStatus(status, statusText).makeHeader(headers).makeData(data).build(); | ||
(0, _print.printLog)(log); | ||
return response; | ||
} | ||
@@ -43,2 +36,2 @@ | ||
exports.default = _default; | ||
//# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIi4uLy4uL3NyYy9sb2dnZXIvcmVzcG9uc2UudHMiXSwibmFtZXMiOlsicmVzcG9uc2VMb2dnZXIiLCJyZXNwb25zZSIsImNvbmZpZyIsInVybCIsIm1ldGhvZCIsInN0YXR1cyIsInN0YXR1c1RleHQiLCJkYXRhIiwiaGVhZGVycyIsImJ1aWxkQ29uZmlnIiwic3RyaW5nQnVpbGRlciIsIlN0cmluZ0J1aWxkZXIiLCJsb2ciLCJtYWtlUHJlZml4IiwibWFrZURhdGVGb3JtYXQiLCJtYWtlVXJsIiwibWFrZU1ldGhvZCIsIm1ha2VTdGF0dXMiLCJtYWtlSGVhZGVyIiwibWFrZURhdGEiLCJidWlsZCJdLCJtYXBwaW5ncyI6Ijs7Ozs7OztBQUVBOztBQUNBOztBQUNBOzs7O0FBRUEsU0FBU0EsY0FBVCxDQUF3QkMsUUFBeEIsRUFBaURDLE1BQWpELEVBQTZFO0FBQ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5idWlsZCgpO1xuXG4gICAgcHJpbnRMb2cobG9nKTtcblxuICAgIHJldHVybiByZXNwb25zZTtcbn1cblxuZXhwb3J0IGRlZmF1bHQgcmVzcG9uc2VMb2dnZXI7Il19 |
{ | ||
"name": "axios-logger", | ||
"version": "2.2.1", | ||
"version": "2.3.0", | ||
"description": "Beautify Axios Logging Messages", | ||
@@ -30,10 +30,10 @@ "main": "lib/index.js", | ||
"devDependencies": { | ||
"@babel/cli": "^7.4.4", | ||
"@babel/core": "^7.4.5", | ||
"@babel/plugin-proposal-class-properties": "^7.4.4", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.4.4", | ||
"@babel/preset-env": "^7.4.5", | ||
"@babel/preset-typescript": "^7.3.3", | ||
"@types/jest": "^24.0.15", | ||
"@types/node": "^12.0.10", | ||
"@babel/cli": "^7.7.7", | ||
"@babel/core": "^7.7.7", | ||
"@babel/plugin-proposal-class-properties": "^7.7.4", | ||
"@babel/plugin-proposal-object-rest-spread": "^7.7.7", | ||
"@babel/preset-env": "^7.7.7", | ||
"@babel/preset-typescript": "^7.7.7", | ||
"@types/jest": "^24.0.25", | ||
"@types/node": "^12.12.22", | ||
"axios": "^0.18.0", | ||
@@ -43,12 +43,12 @@ "body-parser": "^1.19.0", | ||
"cookie-parser": "^1.4.4", | ||
"cross-env": "^5.2.0", | ||
"cross-env": "^5.2.1", | ||
"express": "^4.17.1", | ||
"husky": "^2.4.1", | ||
"jest": "^24.8.0", | ||
"husky": "^2.7.0", | ||
"jest": "^24.9.0", | ||
"lint-staged": "^8.2.1", | ||
"prettier": "^1.18.2", | ||
"typescript": "^3.5.2" | ||
"prettier": "^1.19.1", | ||
"typescript": "^3.7.4" | ||
}, | ||
"dependencies": { | ||
"@types/dateformat": "^3.0.0", | ||
"@types/dateformat": "^3.0.1", | ||
"chalk": "^2.4.1", | ||
@@ -76,4 +76,5 @@ "dateformat": "^3.0.3" | ||
"test:watch": "jest --watchAll", | ||
"test:server": "node ./test/server.js" | ||
"test:server": "node ./test/server.js", | ||
"deploy": "npm test && npm run build && npm publish" | ||
} | ||
} |
@@ -10,2 +10,4 @@ # axios-logger | ||
![logo](https://user-images.githubusercontent.com/10627668/71610488-dbdd5c80-2bd4-11ea-8a8a-15c0328bba0b.png) | ||
When you send a request in nodejs, you need to show the log to the console. | ||
@@ -118,2 +120,6 @@ This library display the necessary information while communicating with the server. | ||
- url: boolean (default true) | ||
- method: boolean (default true) | ||
- data: boolean (default true) | ||
- status: boolean (default true) | ||
- prefixText: string | false (default Axios) | ||
@@ -120,0 +126,0 @@ - dateFormat: [dateformat](https://github.com/felixge/node-dateformat) | false (default isoDateTime) |
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
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
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
36900
130
330
1
Updated@types/dateformat@^3.0.1