Comparing version 2.1.5 to 3.0.0
"use strict"; | ||
var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; | ||
function _typeof(obj) { "@babel/helpers - typeof"; if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { _typeof = function _typeof(obj) { return typeof obj; }; } else { _typeof = function _typeof(obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj; }; } return _typeof(obj); } | ||
(function () { | ||
/** | ||
* Install plugin | ||
* @param Vue | ||
* @param app | ||
* @param axios | ||
*/ | ||
function plugin(Vue, axios) { | ||
function plugin(app, axios) { | ||
if (plugin.installed) { | ||
return; | ||
} | ||
plugin.installed = true; | ||
@@ -25,19 +21,6 @@ if (!axios) { | ||
Vue.axios = axios; | ||
Object.defineProperties(Vue.prototype, { | ||
axios: { | ||
get: function get() { | ||
return axios; | ||
} | ||
}, | ||
$http: { | ||
get: function get() { | ||
return axios; | ||
} | ||
} | ||
}); | ||
plugin.installed = true; | ||
app.axios = axios; | ||
app.config.globalProperties.axios = axios; | ||
app.config.globalProperties.$http = axios; | ||
} | ||
@@ -44,0 +27,0 @@ |
@@ -1,1 +0,1 @@ | ||
"use strict";var _typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o};!function(){function o(e,t){if(!o.installed){if(o.installed=!0,!t)return void console.error("You have to install axios");e.axios=t,Object.defineProperties(e.prototype,{axios:{get:function(){return t}},$http:{get:function(){return t}}})}}"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=o:"function"==typeof define&&define.amd?define([],function(){return o}):window.Vue&&window.axios&&Vue.use(o,window.axios)}(); | ||
"use strict";function _typeof(o){"@babel/helpers - typeof";return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(o){return typeof o}:function(o){return o&&"function"==typeof Symbol&&o.constructor===Symbol&&o!==Symbol.prototype?"symbol":typeof o})(o)}!function(){function o(e,t){if(!o.installed){if(!t)return void console.error("You have to install axios");o.installed=!0,e.axios=t,e.config.globalProperties.axios=t,e.config.globalProperties.$http=t}}"object"==("undefined"==typeof exports?"undefined":_typeof(exports))?module.exports=o:"function"==typeof define&&define.amd?define([],function(){return o}):window.Vue&&window.axios&&Vue.use(o,window.axios)}(); |
@@ -1,12 +0,11 @@ | ||
import Vue, {PluginFunction, PluginObject} from "vue"; | ||
import { AxiosStatic } from "axios"; | ||
import { App } from "vue"; | ||
declare module "vue/types/vue" { | ||
interface Vue { | ||
declare module "@vue/runtime-core" { | ||
export interface ComponentCustomProperties { | ||
$http: AxiosStatic; | ||
axios: AxiosStatic; | ||
$http: AxiosStatic; | ||
} | ||
interface VueConstructor { | ||
export interface App { | ||
axios: AxiosStatic; | ||
@@ -16,6 +15,4 @@ } | ||
declare class VueAxios { | ||
static install: PluginFunction<AxiosStatic>; | ||
} | ||
declare function VueAxios(app: App, axios: AxiosStatic): void; | ||
export default VueAxios; |
{ | ||
"name": "vue-axios", | ||
"version": "2.1.5", | ||
"version": "3.0.0", | ||
"description": "A small wrapper for integrating axios to Vuejs", | ||
@@ -31,15 +31,19 @@ "main": "dist/vue-axios.min.js", | ||
"homepage": "https://github.com/imcvampire/vue-axios#readme", | ||
"dependencies": { | ||
"axios": "^0.20.0", | ||
"vue": "^3.0.0" | ||
}, | ||
"devDependencies": { | ||
"axios": "^0.19.0", | ||
"babel-core": "^6.26.3", | ||
"gulp": "^3.9.1", | ||
"gulp-babel": "^6.1.2", | ||
"babel-preset-es2015": "^6.24.1", | ||
"gulp-rename": "^1.4.0", | ||
"gulp-uglifyjs": "^0.6.2", | ||
"vue": "^2.6.10" | ||
"@babel/core": "^7.11.6", | ||
"@babel/preset-env": "^7.11.5", | ||
"gulp": "^4.0.2", | ||
"gulp-babel": "^8.0.0", | ||
"gulp-clean": "^0.4.0", | ||
"gulp-rename": "^2.0.0", | ||
"gulp-uglify-es": "^2.0.0", | ||
"gulp-uglifyjs": "^0.6.2" | ||
}, | ||
"peerDependencies": { | ||
"vue": ">= 1.0.0" | ||
"vue": ">= 3.0.0" | ||
} | ||
} |
@@ -5,12 +5,10 @@ (function () { | ||
* Install plugin | ||
* @param Vue | ||
* @param app | ||
* @param axios | ||
*/ | ||
function plugin(Vue, axios) { | ||
function plugin(app, axios) { | ||
if (plugin.installed) { | ||
return | ||
} | ||
plugin.installed = true | ||
@@ -22,19 +20,8 @@ if (!axios) { | ||
Vue.axios = axios | ||
plugin.installed = true; | ||
Object.defineProperties(Vue.prototype, { | ||
app.axios = axios; | ||
axios: { | ||
get() { | ||
return axios | ||
} | ||
}, | ||
$http: { | ||
get() { | ||
return axios | ||
} | ||
} | ||
}) | ||
app.config.globalProperties.axios = axios; | ||
app.config.globalProperties.$http = axios; | ||
} | ||
@@ -49,3 +36,2 @@ | ||
} | ||
})(); |
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
5704
3
71
+ Addedaxios@^0.20.0
+ Addedvue@^3.0.0
+ Addedaxios@0.20.0(transitive)
+ Addedfollow-redirects@1.15.9(transitive)