axios-debug-log
Advanced tools
Comparing version 0.8.4 to 1.0.0
15
index.js
@@ -0,7 +1,6 @@ | ||
/* eslint-disable no-var */ | ||
'use strict' | ||
var axios = require('axios') | ||
var isAbsoluteURL = require('axios/lib/helpers/isAbsoluteURL') | ||
var buildURL = require('axios/lib/helpers/buildURL') | ||
var combineURLs = require('axios/lib/helpers/combineURLs') | ||
var axiosDebug = require('debug')('axios') | ||
@@ -11,13 +10,5 @@ | ||
function getURL (config) { | ||
var url = config.url | ||
if (config.baseURL && !isAbsoluteURL(url)) { | ||
url = combineURLs(config.baseURL, url) | ||
} | ||
return buildURL(url, config.params, config.paramsSerializer) | ||
} | ||
var options = { | ||
request: function (debug, config) { | ||
var url = getURL(config) | ||
var url = axios.getUri(config) | ||
Object.defineProperty(config, URL_KEY, { value: url }) | ||
@@ -24,0 +15,0 @@ debug( |
{ | ||
"name": "axios-debug-log", | ||
"version": "0.8.4", | ||
"version": "1.0.0", | ||
"description": "Axios interceptor of logging requests & responses by debug.", | ||
@@ -38,14 +38,14 @@ "main": "index.js", | ||
"devDependencies": { | ||
"axios": ">=0.17.0", | ||
"mocha": "^9.0.2", | ||
"axios": ">=1.0.0", | ||
"mocha": "^9.0.0", | ||
"nyc": "^15.0.0", | ||
"should": "^13.1.3", | ||
"should": "^13.0.0", | ||
"should-sinon": "0.0.6", | ||
"sinon": "^11.1.1", | ||
"standard": "^16.0.1", | ||
"typescript": "^4.0.2" | ||
"sinon": "^14.0.0", | ||
"standard": "^17.0.0", | ||
"typescript": "^4.0.0" | ||
}, | ||
"peerDependencies": { | ||
"axios": ">=0.17.0" | ||
"axios": ">=1.0.0" | ||
} | ||
} |
# axios-debug-log | ||
[![Build Status](https://travis-ci.org/Gerhut/axios-debug-log.svg?branch=master)](https://travis-ci.org/Gerhut/axios-debug-log) | ||
[![Node.js CI](https://github.com/Gerhut/axios-debug-log/actions/workflows/ci.yaml/badge.svg)](https://github.com/Gerhut/axios-debug-log/actions/workflows/ci.yaml) | ||
[![Coverage Status](https://coveralls.io/repos/github/Gerhut/axios-debug-log/badge.svg?branch=master)](https://coveralls.io/github/Gerhut/axios-debug-log?branch=master) | ||
[![dependencies Status](https://david-dm.org/Gerhut/axios-debug-log/status.svg)](https://david-dm.org/Gerhut/axios-debug-log) | ||
[![devDependencies Status](https://david-dm.org/Gerhut/axios-debug-log/dev-status.svg)](https://david-dm.org/Gerhut/axios-debug-log?type=dev) | ||
[![JavaScript Style Guide](https://img.shields.io/badge/code%20style-standard-brightgreen.svg)](http://standardjs.com/) | ||
@@ -8,0 +6,0 @@ |
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
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
0
7790
75
91