fix(deps): update dependency axios to v1
continuous-integration/drone/push Build is passing Details

This commit is contained in:
renovate 2023-01-04 10:04:48 +00:00 committed by Gitea
parent 63671efbe2
commit 5dfaa48ea5
3 changed files with 55 additions and 48 deletions

View File

@ -36,7 +36,7 @@
"@types/lodash.clonedeep": "4.5.7",
"@types/sortablejs": "1.15.0",
"@vueuse/core": "9.10.0",
"axios": "0.27.2",
"axios": "1.2.2",
"blurhash": "2.0.4",
"bulma-css-variables": "0.9.33",
"camel-case": "4.1.2",

View File

@ -36,7 +36,7 @@ specifiers:
'@vue/tsconfig': 0.1.3
'@vueuse/core': 9.10.0
autoprefixer: 10.4.13
axios: 0.27.2
axios: 1.2.2
blurhash: 2.0.4
browserslist: 4.21.4
bulma-css-variables: 0.9.33
@ -109,7 +109,7 @@ dependencies:
'@types/lodash.clonedeep': 4.5.7
'@types/sortablejs': 1.15.0
'@vueuse/core': 9.10.0_vue@3.2.45
axios: 0.27.2
axios: 1.2.2
blurhash: 2.0.4
bulma-css-variables: 0.9.33
camel-case: 4.1.2
@ -2115,7 +2115,7 @@ packages:
hasBin: true
dependencies:
detect-libc: 1.0.3
https-proxy-agent: 5.0.0
https-proxy-agent: 5.0.1
make-dir: 3.1.0
node-fetch: 2.6.7
nopt: 5.0.0
@ -2133,7 +2133,7 @@ packages:
hasBin: true
dependencies:
detect-libc: 1.0.3
https-proxy-agent: 5.0.0_supports-color@9.2.1
https-proxy-agent: 5.0.1_supports-color@9.2.1
make-dir: 3.1.0
node-fetch: 2.6.7
nopt: 5.0.0
@ -2541,7 +2541,7 @@ packages:
dependencies:
execa: 6.1.0
map-obj: 5.0.0
micromatch: 4.0.4
micromatch: 4.0.5
moize: 6.1.3
path-exists: 5.0.0
dev: true
@ -3607,7 +3607,7 @@ packages:
estree-walker: 2.0.2
glob: 7.2.0
graceful-fs: 4.2.10
micromatch: 4.0.4
micromatch: 4.0.5
node-gyp-build: 4.3.0
resolve-from: 5.0.0
rollup-pluginutils: 2.8.2
@ -3627,7 +3627,7 @@ packages:
estree-walker: 2.0.2
glob: 7.2.0
graceful-fs: 4.2.10
micromatch: 4.0.4
micromatch: 4.0.5
node-gyp-build: 4.3.0
resolve-from: 5.0.0
rollup-pluginutils: 2.8.2
@ -4294,7 +4294,7 @@ packages:
/axios/0.25.0_debug@4.3.4:
resolution: {integrity: sha512-cD8FOb0tRH3uuEe6+evtAbgJtfxr7ly3fQjYcMcuPlgkwVS9xboaVIpcDV+cYQe+yGykgwZCs1pzjntcGa6l5g==}
dependencies:
follow-redirects: 1.15.1_debug@4.3.4
follow-redirects: 1.15.1
transitivePeerDependencies:
- debug
dev: true
@ -4306,6 +4306,17 @@ packages:
form-data: 4.0.0
transitivePeerDependencies:
- debug
dev: true
/axios/1.2.2:
resolution: {integrity: sha512-bz/J4gS2S3I7mpN/YZfGFTqhXTYzRho8Ay38w2otuuDR322KzFIWm/4W2K6gIwvWaws5n+mnb7D1lN9uD+QH6Q==}
dependencies:
follow-redirects: 1.15.1
form-data: 4.0.0
proxy-from-env: 1.1.0
transitivePeerDependencies:
- debug
dev: false
/babel-plugin-dynamic-import-node/2.3.3:
resolution: {integrity: sha512-jZVI+s9Zg3IqA/kdi0i6UDCybUI3aSBLnglhYbSSjKlV7yF1F/5LWv8MakQmvYpnbJDS6fcBL2KzHSxNCMtWSQ==}
@ -6827,7 +6838,7 @@ packages:
'@nodelib/fs.walk': 1.2.8
glob-parent: 5.1.2
merge2: 1.4.1
micromatch: 4.0.4
micromatch: 4.0.5
dev: false
/fast-glob/3.2.12:
@ -6838,7 +6849,7 @@ packages:
'@nodelib/fs.walk': 1.2.8
glob-parent: 5.1.2
merge2: 1.4.1
micromatch: 4.0.4
micromatch: 4.0.5
dev: true
/fast-json-stable-stringify/2.1.0:
@ -7112,18 +7123,6 @@ packages:
debug:
optional: true
/follow-redirects/1.15.1_debug@4.3.4:
resolution: {integrity: sha512-yLAMQs+k0b2m7cVxpS1VKJVvoz7SS9Td1zss3XRwXj+ZDH00RJgnuLx7E44wx02kQLrdM3aOOy+FpzS7+8OizA==}
engines: {node: '>=4.0'}
peerDependencies:
debug: '*'
peerDependenciesMeta:
debug:
optional: true
dependencies:
debug: 4.3.4
dev: true
/for-in/1.0.2:
resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==}
engines: {node: '>=0.10.0'}
@ -7845,7 +7844,7 @@ packages:
engines: {node: '>=8.0.0'}
dependencies:
eventemitter3: 4.0.7
follow-redirects: 1.15.1_debug@4.3.4
follow-redirects: 1.15.1
requires-port: 1.0.0
transitivePeerDependencies:
- debug
@ -7878,8 +7877,18 @@ packages:
- supports-color
dev: true
/https-proxy-agent/5.0.0_supports-color@9.2.1:
resolution: {integrity: sha512-EkYm5BcKUGiduxzSt3Eppko+PiNWNEpa4ySk9vTC6wDsQJW9rHSa+UhGNJoRYp7bz6Ht1eaRIa6QaJqO5rCFbA==}
/https-proxy-agent/5.0.1:
resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
engines: {node: '>= 6'}
dependencies:
agent-base: 6.0.2
debug: 4.3.4
transitivePeerDependencies:
- supports-color
dev: true
/https-proxy-agent/5.0.1_supports-color@9.2.1:
resolution: {integrity: sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==}
engines: {node: '>= 6'}
dependencies:
agent-base: 6.0.2_supports-color@9.2.1
@ -8592,16 +8601,6 @@ packages:
supports-color: 7.2.0
dev: true
/joi/17.6.0:
resolution: {integrity: sha512-OX5dG6DTbcr/kbMFj0KGYxuew69HPcAE3K/sZpEV2nP6e/j/C0HV+HNiBPCASxdx5T7DMoa0s8UeHWMnb6n2zw==}
dependencies:
'@hapi/hoek': 9.2.1
'@hapi/topo': 5.1.0
'@sideway/address': 4.1.3
'@sideway/formula': 3.0.0
'@sideway/pinpoint': 2.0.0
dev: true
/joi/17.7.0:
resolution: {integrity: sha512-1/ugc8djfn93rTE3WRKdCzGGt/EtiYKxITMO4Wiv6q5JL1gl9ePt4kBsl1S499nbosspfctIQTpYIhSmHA3WAg==}
dependencies:
@ -9387,6 +9386,14 @@ packages:
dependencies:
braces: 3.0.2
picomatch: 2.3.1
dev: true
/micromatch/4.0.5:
resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==}
engines: {node: '>=8.6'}
dependencies:
braces: 3.0.2
picomatch: 2.3.1
/mime-db/1.51.0:
resolution: {integrity: sha512-5y8A56jg7XVQx2mbv1lu49NR4dokRnhZYTtL+KGfaa27uq4pSTXkwQkFJl4pkRMyNFz/EtYDSkiiEHx3F7UN6g==}
@ -11117,6 +11124,10 @@ packages:
resolution: {integrity: sha512-F2JHgJQ1iqwnHDcQjVBsq3n/uoaFL+iPW/eAeL7kVxy/2RrWaN4WroKjjvbsoRtv0ftelNyC01bjRhn/bhcf4A==}
dev: true
/proxy-from-env/1.1.0:
resolution: {integrity: sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==}
dev: false
/ps-list/8.1.0:
resolution: {integrity: sha512-NoGBqJe7Ou3kfQxEvDzDyKGAyEgwIuD3YrfXinjcCmBRv0hTld0Xb71hrXvtsNPj7HSFATfemvzB8PPJtq6Yag==}
engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0}
@ -11661,12 +11672,6 @@ packages:
tslib: 1.14.1
dev: true
/rxjs/7.5.4:
resolution: {integrity: sha512-h5M3Hk78r6wAheJF0a5YahB1yRQKCsZ4MsGdZ5O9ETbVtjPcScGfrMmoOq7EBsCRzd4BDkvDJ7ogP8Sz5tTFiQ==}
dependencies:
tslib: 2.3.1
dev: true
/rxjs/7.8.0:
resolution: {integrity: sha512-F2+gxDshqmIub1KdvZkaEfGDwLNpPvk9Fs6LD/MyQxNgMds/WH9OdDDXOmxUZpME+iSK3rQCctkL0DYyytUqMg==}
dependencies:
@ -13376,10 +13381,10 @@ packages:
hasBin: true
dependencies:
axios: 0.25.0_debug@4.3.4
joi: 17.6.0
joi: 17.7.0
lodash: 4.17.21
minimist: 1.2.7
rxjs: 7.5.4
rxjs: 7.8.0
transitivePeerDependencies:
- debug
dev: true

View File

@ -5,7 +5,6 @@ import {objectToSnakeCase} from '@/helpers/case'
import AbstractModel from '@/models/abstractModel'
import type {IAbstract} from '@/modelTypes/IAbstract'
import type {Right} from '@/constants/rights'
import type {IFile} from '@/modelTypes/IFile'
interface Paths {
create : string
@ -413,7 +412,7 @@ export default abstract class AbstractService<Model extends IAbstract = IAbstrac
* @param file {IFile}
* @param fieldName The name of the field the file is uploaded to.
*/
uploadFile(url : string, file: IFile, fieldName : string) {
uploadFile(url : string, file: File, fieldName : string) {
return this.uploadBlob(url, new Blob([file]), fieldName, file.name)
}
@ -440,8 +439,11 @@ export default abstract class AbstractService<Model extends IAbstract = IAbstrac
'Content-Type':
'multipart/form-data; boundary=' + formData._boundary,
},
onUploadProgress: progressEvent => {
this.uploadProgress = Math.round((progressEvent.loaded * 100) / progressEvent.total)
// fix upload issue after upgrading to axios to 1.0.0
// see: https://github.com/axios/axios/issues/4885#issuecomment-1222419132
transformRequest: formData => formData,
onUploadProgress: ({progress}) => {
this.uploadProgress = progress? Math.round((progress * 100)) : 0
},
},
)