From ad2ac74d26dac15463048c4bdf1aa561e225e1a0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?John=20Molakvo=C3=A6?= Date: Thu, 17 Aug 2023 13:59:46 +0200 Subject: [PATCH] feat: simplify destination handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: John Molakvoæ --- lib/components/UploadPicker.vue | 45 +---- lib/upload.ts | 25 +-- lib/uploader.ts | 73 +++----- package-lock.json | 319 ++++++++++++++++++++++++++------ package.json | 5 +- 5 files changed, 313 insertions(+), 154 deletions(-) diff --git a/lib/components/UploadPicker.vue b/lib/components/UploadPicker.vue index 0c95608c..4f687ea3 100644 --- a/lib/components/UploadPicker.vue +++ b/lib/components/UploadPicker.vue @@ -4,7 +4,7 @@ class="upload-picker" data-upload-picker> - @@ -72,7 +72,7 @@ diff --git a/lib/upload.ts b/lib/upload.ts index 478ba370..c9b2112d 100644 --- a/lib/upload.ts +++ b/lib/upload.ts @@ -11,21 +11,21 @@ export enum Status { } export class Upload { - private _path: string + private _source: string private _isChunked: boolean private _chunks: number private _size: number - private _uploaded: number = 0 - private _startTime: number = 0 + private _uploaded = 0 + private _startTime = 0 private _status: Status = Status.INITIALIZED private _controller: AbortController private _response: AxiosResponse|null = null - constructor(path: string, chunked: boolean = false, size: number) { + constructor(source: string, chunked = false, size: number) { const chunks = getMaxChunksSize() > 0 ? Math.ceil(size / getMaxChunksSize()) : 1 - this._path = path + this._source = source this._isChunked = chunked && getMaxChunksSize() > 0 && chunks > 1 this._chunks = this._isChunked ? chunks : 1 this._size = size @@ -33,7 +33,11 @@ export class Upload { } get path(): string { - return this._path + return this._source + } + + get source(): string { + return this._source } get isChunked(): boolean { @@ -48,10 +52,6 @@ export class Upload { return this._size } - get uploaded(): number { - return this._uploaded - } - get startTime(): number { return this._startTime } @@ -60,11 +60,14 @@ export class Upload { this._response = response } - get response(): AxiosResponse|null { return this._response } + get uploaded(): number { + return this._uploaded + } + /** * Update the uploaded bytes of this upload */ diff --git a/lib/uploader.ts b/lib/uploader.ts index a0db9101..6be860d0 100644 --- a/lib/uploader.ts +++ b/lib/uploader.ts @@ -1,6 +1,7 @@ import { CanceledError } from 'axios' import { generateRemoteUrl } from '@nextcloud/router' import { getCurrentUser } from '@nextcloud/auth' +import { Folder, Permission } from '@nextcloud/files' import axios from '@nextcloud/axios' import PCancelable from 'p-cancelable' import PQueue from 'p-queue' @@ -19,9 +20,7 @@ export enum Status { export class Uploader { // Initialized via setter in the constructor - private rootFolder!: string - private destinationFolder!: string - + private _destinationFolder!: Folder private _isPublic: boolean // Global upload queue @@ -35,16 +34,28 @@ export class Uploader { * Initialize uploader * * @param {boolean} isPublic are we in public mode ? - * @param {string} rootFolder the operation root folder - * @param {string} destinationFolder the context folder to operate, relative to the root folder + * @param {Folder} destinationFolder the context folder to operate, relative to the root folder */ constructor( isPublic = false, - rootFolder = `dav/files/${getCurrentUser()?.uid}`, - destinationFolder = '/' + destinationFolder?: Folder, ) { this._isPublic = isPublic - this.root = rootFolder + + if (!destinationFolder) { + const owner = getCurrentUser()?.uid + const source = generateRemoteUrl(`dav/files/${owner}`) + if (!owner) { + throw new Error('User is not logged in') + } + destinationFolder = new Folder({ + id: 0, + owner, + permissions: Permission.ALL, + root: `/files/${owner}`, + source, + }) + } this.destination = destinationFolder logger.debug('Upload workspace initialized', { @@ -58,52 +69,25 @@ export class Uploader { /** * Get the upload destination path relative to the root folder */ - get destination() { - return this.destinationFolder + get destination(): Folder { + return this._destinationFolder } /** * Set the upload destination path relative to the root folder */ - set destination(path: string) { - if (typeof path !== 'string' || path === '') { - this.destinationFolder = '/' - return + set destination(folder: Folder) { + if (!(folder instanceof Folder)) { + throw new Error('Invalid destination folder') } - - if (!path.startsWith('/')) { - path = `/${path}` - } - this.destinationFolder = path.replace(/\/$/, '') + this._destinationFolder = folder } /** * Get the root folder */ get root() { - return this.rootFolder - } - - /** - * Set the root folder - * - * @param {string} path should be the remoteUrl path. - * This method uses the generateRemoteUrl method - */ - set root(path: string) { - if (typeof path !== 'string' || path === '') { - this.rootFolder = generateRemoteUrl(`dav/files/${getCurrentUser()?.uid}`) - return - } - - if (path.startsWith('http')) { - throw new Error('The path should be a remote url string. E.g `dav/files/admin`.') - } - - if (path.startsWith('/')) { - path = path.slice(1) - } - this.rootFolder = generateRemoteUrl(path) + return this._destinationFolder.source } /** @@ -169,10 +153,11 @@ export class Uploader { /** * Upload a file to the given path + * @param {string} destinationPath the destination path relative to the root folder. e.g. /foo/bar.txt + * @param {File} file the file to upload */ upload(destinationPath: string, file: File) { - const destinationFolder = this.destinationFolder === '/' ? '' : this.destinationFolder - const destinationFile = `${this.rootFolder}${destinationFolder}/${destinationPath.replace(/^\//, '')}` + const destinationFile = `${this.root}/${destinationPath.replace(/^\//, '')}` logger.debug(`Uploading ${file.name} to ${destinationFile}`) diff --git a/package-lock.json b/package-lock.json index 4d769cf4..ba6bf9f1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11,11 +11,10 @@ "dependencies": { "@nextcloud/auth": "^2.1.0", "@nextcloud/axios": "^2.4.0", - "@nextcloud/files": "^3.0.0-beta.9", + "@nextcloud/files": "^3.0.0-beta.14", "@nextcloud/l10n": "^2.1.0", "@nextcloud/logger": "^2.5.0", "@nextcloud/router": "^2.1.1", - "@nextcloud/vue": "^7.11.4", "@skjnldsv/sanitize-svg": "^1.0.2", "@types/node": "^20.1.3", "buffer": "^6.0.3", @@ -33,7 +32,7 @@ "@jest/globals": "^29.5.0", "@nextcloud/babel-config": "^1.0.0", "@nextcloud/eslint-config": "^8.3.0-beta.2", - "@nextcloud/vue": "^7.11.4", + "@nextcloud/vue": "^8.0.0-beta.3", "@nextcloud/webpack-vue-config": "^5.3.0", "@rollup-extras/plugin-clean": "^1.3.5", "@rollup/plugin-commonjs": "^25.0.0", @@ -1899,6 +1898,14 @@ "integrity": "sha512-0hYQ8SB4Db5zvZB4axdMHGwEaQjkZzFjQiN9LVYvIFB2nSUHW9tYpxWriPrWDASIxiaXax83REcLxuSdnGPZtw==", "dev": true }, + "node_modules/@buttercup/fetch": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/@buttercup/fetch/-/fetch-0.1.2.tgz", + "integrity": "sha512-mDBtsysQ0Gnrp4FamlRJGpu7HUHwbyLC4uUav1I7QAqThFAa/4d1cdZCxrV5gKvh6zO1fu95bILNJi4Y2hALhQ==", + "optionalDependencies": { + "node-fetch": "^3.3.0" + } + }, "node_modules/@colors/colors": { "version": "1.5.0", "resolved": "https://registry.npmjs.org/@colors/colors/-/colors-1.5.0.tgz", @@ -3311,13 +3318,15 @@ "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==" }, "node_modules/@nextcloud/files": { - "version": "3.0.0-beta.11", - "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.0.0-beta.11.tgz", - "integrity": "sha512-eYPtUo+pBAvY8H0pSDyBJrpUKWILIadOmPVoHKpwOFwljNN3xh+AeT1ofT3oJI6ALfrKD/lDTe18BKU8uhLADA==", + "version": "3.0.0-beta.14", + "resolved": "https://registry.npmjs.org/@nextcloud/files/-/files-3.0.0-beta.14.tgz", + "integrity": "sha512-wyq+BcOE2KFjhPtpUOIkLRHLxOPVu/ZlbioII4qoD2NtjUHCx9U8RDBo28kFr45Nj3eDsQ1TFEUipocRMJ6J7g==", "dependencies": { - "@nextcloud/auth": "^2.0.0", - "@nextcloud/l10n": "^2.1.0", - "@nextcloud/logger": "^2.5.0" + "@nextcloud/auth": "^2.1.0", + "@nextcloud/l10n": "^2.2.0", + "@nextcloud/logger": "^2.5.0", + "@nextcloud/router": "^2.1.2", + "webdav": "^5.2.3" }, "engines": { "node": "^20.0.0", @@ -3391,9 +3400,9 @@ } }, "node_modules/@nextcloud/vue": { - "version": "7.12.1", - "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-7.12.1.tgz", - "integrity": "sha512-j3wWgUkGEbq6cEdgdiG8VWWgqEd8YvKhK64o1eKbLP3OlVkcrqXfiRmPm1SafPVureGr/Yp/Ty/zIZnHBjxlNg==", + "version": "8.0.0-beta.3", + "resolved": "https://registry.npmjs.org/@nextcloud/vue/-/vue-8.0.0-beta.3.tgz", + "integrity": "sha512-inweNkwmxtQgOjntjre7YUrj7Nt5Srwqv7YrBHChLbYzPk/2fifwfDN/zlEOs5Mr+2XDOBf3j2eWw+Gpu9uTbg==", "dev": true, "dependencies": { "@floating-ui/dom": "^1.1.0", @@ -3408,16 +3417,16 @@ "@nextcloud/l10n": "^2.0.1", "@nextcloud/logger": "^2.2.1", "@nextcloud/router": "^2.0.0", - "@nextcloud/vue-select": "^3.21.2", + "@nextcloud/vue-select": "^3.23.0", "@skjnldsv/sanitize-svg": "^1.0.2", "@vueuse/components": "^10.0.2", + "@vueuse/core": "^10.1.2", "clone": "^2.1.2", "debounce": "1.2.1", - "emoji-mart-vue-fast": "^12.0.1", + "emoji-mart-vue-fast": "^15.0.0", "escape-html": "^1.0.3", "floating-vue": "^1.0.0-beta.19", "focus-trap": "^7.4.3", - "hammerjs": "^2.0.8", "linkify-string": "^4.0.0", "md5": "^2.3.0", "node-polyfill-webpack-plugin": "^2.0.1", @@ -3431,17 +3440,16 @@ "striptags": "^3.2.0", "tributejs": "^5.1.3", "unified": "^10.1.2", - "unist-builder": "^3.0.1", - "unist-util-visit": "^4.1.2", + "unist-builder": "^4.0.0", + "unist-util-visit": "^5.0.0", "vue": "^2.7.14", "vue-color": "^2.8.1", "vue-material-design-icons": "^5.1.2", - "vue-multiselect": "^2.1.6", "vue2-datepicker": "^3.11.0" }, "engines": { - "node": "^16.0.0", - "npm": "^7.0.0 || ^8.0.0" + "node": "^20.0.0", + "npm": "^9.0.0" } }, "node_modules/@nextcloud/vue-select": { @@ -3453,6 +3461,54 @@ "vue": "2.x" } }, + "node_modules/@nextcloud/vue/node_modules/@types/unist": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", + "integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==", + "dev": true + }, + "node_modules/@nextcloud/vue/node_modules/unist-util-is": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/unist-util-is/-/unist-util-is-6.0.0.tgz", + "integrity": "sha512-2qCTHimwdxLfz+YzdGfkqNlH0tLi9xjTnHddPmJwtIG9MGsdbutfTc4P+haPD7l7Cjxf/WZj+we5qfVPvvxfYw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@nextcloud/vue/node_modules/unist-util-visit": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/unist-util-visit/-/unist-util-visit-5.0.0.tgz", + "integrity": "sha512-MR04uvD+07cwl/yhVuVWAtw+3GOR/knlL55Nd/wAdblk27GCVt3lqpTivy/tkJcZoNPzTwS1Y+KMojlLDhoTzg==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0", + "unist-util-visit-parents": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, + "node_modules/@nextcloud/vue/node_modules/unist-util-visit-parents": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/unist-util-visit-parents/-/unist-util-visit-parents-6.0.1.tgz", + "integrity": "sha512-L/PqWzfTP9lzzEa6CKs0k2nARxTdZduw3zyh8d2NVBnsyvHjSX4TWse388YrrQKbvI8w20fGjGlhgT96WwKykw==", + "dev": true, + "dependencies": { + "@types/unist": "^3.0.0", + "unist-util-is": "^6.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/unified" + } + }, "node_modules/@nextcloud/webpack-vue-config": { "version": "5.5.1", "resolved": "https://registry.npmjs.org/@nextcloud/webpack-vue-config/-/webpack-vue-config-5.5.1.tgz", @@ -6034,8 +6090,12 @@ "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true + "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==" + }, + "node_modules/base-64": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/base-64/-/base-64-1.0.0.tgz", + "integrity": "sha512-kwDPIFCGx0NZHog36dj+tHiwP4QMzsZ3AgMViUBKI0+V5n4U0ufTCUMhnQ04diaRI8EX/QcPfql7zlhZ7j4zgg==" }, "node_modules/base64-js": { "version": "1.5.1", @@ -6502,6 +6562,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/byte-length": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/byte-length/-/byte-length-1.0.2.tgz", + "integrity": "sha512-ovBpjmsgd/teRmgcPh23d4gJvxDoXtAzEL9xTfMU8Yc2kqCDb7L9jAG0XHl1nzuGl+h3ebCIF1i62UFyA9V/2Q==" + }, "node_modules/bytes": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/bytes/-/bytes-3.0.0.tgz", @@ -6627,7 +6692,6 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/charenc/-/charenc-0.0.2.tgz", "integrity": "sha512-yrLQ/yVUFXkzg7EDQsPieE/53+0RlaWTs+wBrvW36cyilJ2SaDWfl4Yj7MtLTXleV9uEKefbAGUPv2/iWSooRA==", - "dev": true, "engines": { "node": "*" } @@ -7154,7 +7218,6 @@ "version": "0.0.2", "resolved": "https://registry.npmjs.org/crypt/-/crypt-0.0.2.tgz", "integrity": "sha512-mCxBlsHFYh9C+HVpiEacem8FEBnMXgU9gy4zmNC+SXAZNB/1idgp/aulFJ4FgCi7GPEVbfyng092GqL2k2rmow==", - "dev": true, "engines": { "node": "*" } @@ -7690,6 +7753,15 @@ "node": ">=0.10" } }, + "node_modules/data-uri-to-buffer": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-4.0.1.tgz", + "integrity": "sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==", + "optional": true, + "engines": { + "node": ">= 12" + } + }, "node_modules/data-urls": { "version": "3.0.2", "resolved": "https://registry.npmjs.org/data-urls/-/data-urls-3.0.2.tgz", @@ -8340,9 +8412,9 @@ } }, "node_modules/emoji-mart-vue-fast": { - "version": "12.0.5", - "resolved": "https://registry.npmjs.org/emoji-mart-vue-fast/-/emoji-mart-vue-fast-12.0.5.tgz", - "integrity": "sha512-XFNwIk+ConSAjC4tmk//s6btlo3oQco7TBgP914Qytg/15jLa/0VrWNg271W2MTv+8N8BxYl2dDn3cZJxcreqw==", + "version": "15.0.0", + "resolved": "https://registry.npmjs.org/emoji-mart-vue-fast/-/emoji-mart-vue-fast-15.0.0.tgz", + "integrity": "sha512-3BzkDrs60JyT00dLHMAxWKbpFhbyaW9C+q1AjtqGovSxTu8TC2mYAGsvTmXNYKm39IRRAS56v92TihOcB98IsQ==", "dev": true, "dependencies": { "@babel/runtime": "^7.18.6", @@ -9855,6 +9927,29 @@ "pend": "~1.2.0" } }, + "node_modules/fetch-blob": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/fetch-blob/-/fetch-blob-3.2.0.tgz", + "integrity": "sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "paypal", + "url": "https://paypal.me/jimmywarting" + } + ], + "optional": true, + "dependencies": { + "node-domexception": "^1.0.0", + "web-streams-polyfill": "^3.0.3" + }, + "engines": { + "node": "^12.20 || >= 14.13" + } + }, "node_modules/figures": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", @@ -10078,6 +10173,18 @@ "node": ">= 6" } }, + "node_modules/formdata-polyfill": { + "version": "4.0.10", + "resolved": "https://registry.npmjs.org/formdata-polyfill/-/formdata-polyfill-4.0.10.tgz", + "integrity": "sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==", + "optional": true, + "dependencies": { + "fetch-blob": "^3.1.2" + }, + "engines": { + "node": ">=12.20.0" + } + }, "node_modules/forwarded": { "version": "0.2.0", "resolved": "https://registry.npmjs.org/forwarded/-/forwarded-0.2.0.tgz", @@ -10466,15 +10573,6 @@ "dev": true, "peer": true }, - "node_modules/hammerjs": { - "version": "2.0.8", - "resolved": "https://registry.npmjs.org/hammerjs/-/hammerjs-2.0.8.tgz", - "integrity": "sha512-tSQXBXS/MWQOn/RKckawJ61vvsDpCom87JgxiYdGwHdOa0ht0vzUWDlfioofFCRU0L+6NGDt6XzbgoJvZkMeRQ==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, "node_modules/handle-thing": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/handle-thing/-/handle-thing-2.0.1.tgz", @@ -10646,7 +10744,6 @@ "version": "1.2.0", "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", - "dev": true, "bin": { "he": "bin/he" } @@ -10661,6 +10758,11 @@ "minimalistic-crypto-utils": "^1.0.1" } }, + "node_modules/hot-patcher": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/hot-patcher/-/hot-patcher-2.0.1.tgz", + "integrity": "sha512-ECg1JFG0YzehicQaogenlcs2qg6WsXQsxtnbr1i696u5tLUjtJdQAh0u2g0Q5YV45f263Ta1GnUJsc8WIfJf4Q==" + }, "node_modules/hpack.js": { "version": "2.1.6", "resolved": "https://registry.npmjs.org/hpack.js/-/hpack.js-2.1.6.tgz", @@ -11190,8 +11292,7 @@ "node_modules/is-buffer": { "version": "1.1.6", "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", - "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", - "dev": true + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==" }, "node_modules/is-builtin-module": { "version": "3.2.1", @@ -13857,6 +13958,11 @@ "shell-quote": "^1.7.3" } }, + "node_modules/layerr": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/layerr/-/layerr-0.1.2.tgz", + "integrity": "sha512-ob5kTd9H3S4GOG2nVXyQhOu9O8nBgP555XxWPkJI0tR0JeRilfyTp8WtPdIJHLXBmHMSdEq5+KMxiYABeScsIQ==" + }, "node_modules/lazy-ass": { "version": "1.6.0", "resolved": "https://registry.npmjs.org/lazy-ass/-/lazy-ass-1.6.0.tgz", @@ -14320,7 +14426,6 @@ "version": "2.3.0", "resolved": "https://registry.npmjs.org/md5/-/md5-2.3.0.tgz", "integrity": "sha512-T1GITYmFaKuO91vxyoQMFETst+O71VUPEU3ze5GNzDm0OWdP8v1ziTaAEPUr/3kLsY3Sftgz242A1SetQiDL7g==", - "dev": true, "dependencies": { "charenc": "0.0.2", "crypt": "0.0.2", @@ -15143,6 +15248,48 @@ "dev": true, "peer": true }, + "node_modules/nested-property": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/nested-property/-/nested-property-4.0.0.tgz", + "integrity": "sha512-yFehXNWRs4cM0+dz7QxCd06hTbWbSkV0ISsqBfkntU6TOY4Qm3Q88fRRLOddkGh2Qq6dZvnKVAahfhjcUvLnyA==" + }, + "node_modules/node-domexception": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/node-domexception/-/node-domexception-1.0.0.tgz", + "integrity": "sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==", + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/jimmywarting" + }, + { + "type": "github", + "url": "https://paypal.me/jimmywarting" + } + ], + "optional": true, + "engines": { + "node": ">=10.5.0" + } + }, + "node_modules/node-fetch": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-3.3.2.tgz", + "integrity": "sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==", + "optional": true, + "dependencies": { + "data-uri-to-buffer": "^4.0.0", + "fetch-blob": "^3.1.4", + "formdata-polyfill": "^4.0.10" + }, + "engines": { + "node": "^12.20.0 || ^14.13.1 || >=16.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/node-fetch" + } + }, "node_modules/node-forge": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", @@ -15690,6 +15837,11 @@ "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", "dev": true }, + "node_modules/path-posix": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/path-posix/-/path-posix-1.0.0.tgz", + "integrity": "sha512-1gJ0WpNIiYcQydgg3Ed8KzvIqTsDpNwq+cjBCssvBtuTWjEqY1AW+i+OepiEMqDCzyro9B2sLAe4RBPajMYFiA==" + }, "node_modules/path-to-regexp": { "version": "0.1.7", "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-0.1.7.tgz", @@ -16621,8 +16773,7 @@ "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", - "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==", - "dev": true + "integrity": "sha512-FIqgj2EUvTa7R50u0rGsyTftzjYmv/a3hO345bZNrqabNqjtgiDMgmo4mkUjd+nzU5oF3dClKqFIPUKybUyqoQ==" }, "node_modules/queue-microtask": { "version": "1.2.3", @@ -16971,8 +17122,7 @@ "node_modules/requires-port": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/requires-port/-/requires-port-1.0.0.tgz", - "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==", - "dev": true + "integrity": "sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==" }, "node_modules/resolve": { "version": "1.22.2", @@ -19158,18 +19308,24 @@ } }, "node_modules/unist-builder": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-3.0.1.tgz", - "integrity": "sha512-gnpOw7DIpCA0vpr6NqdPvTWnlPTApCTRzr+38E6hCWx3rz/cjo83SsKIlS1Z+L5ttScQ2AwutNnb8+tAvpb6qQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/unist-builder/-/unist-builder-4.0.0.tgz", + "integrity": "sha512-wmRFnH+BLpZnTKpc5L7O67Kac89s9HMrtELpnNaE6TAobq5DTZZs5YaTQfAZBA9bFPECx2uVAPO31c+GVug8mg==", "dev": true, "dependencies": { - "@types/unist": "^2.0.0" + "@types/unist": "^3.0.0" }, "funding": { "type": "opencollective", "url": "https://opencollective.com/unified" } }, + "node_modules/unist-builder/node_modules/@types/unist": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/@types/unist/-/unist-3.0.0.tgz", + "integrity": "sha512-MFETx3tbTjE7Uk6vvnWINA/1iJ7LuMdO4fcq8UfF0pRbj01aGLduVvQcRyswuACJdpnHgg8E3rQLhaRdNEJS0w==", + "dev": true + }, "node_modules/unist-util-generated": { "version": "2.0.1", "resolved": "https://registry.npmjs.org/unist-util-generated/-/unist-util-generated-2.0.1.tgz", @@ -19326,11 +19482,15 @@ "qs": "^6.11.0" } }, + "node_modules/url-join": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", + "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==" + }, "node_modules/url-parse": { "version": "1.5.10", "resolved": "https://registry.npmjs.org/url-parse/-/url-parse-1.5.10.tgz", "integrity": "sha512-WypcfiRhfeUP9vvF0j6rw0J3hrWrw6iZv3+22h6iRMJ/8z1Tj6XfLP4DsUix5MhMPnXpiHDoKyoZ/bdCkwBCiQ==", - "dev": true, "dependencies": { "querystringify": "^2.1.1", "requires-port": "^1.0.0" @@ -19682,16 +19842,6 @@ "resolved": "https://registry.npmjs.org/vue-material-design-icons/-/vue-material-design-icons-5.2.0.tgz", "integrity": "sha512-fcdcJHQ9fQw2CAytuLAzWSELcxH138sCdMItVhvmO7Lu9afIgojB/UCWv7XHt/lURsnq/n6O+muM4AQgw8yfig==" }, - "node_modules/vue-multiselect": { - "version": "2.1.7", - "resolved": "https://registry.npmjs.org/vue-multiselect/-/vue-multiselect-2.1.7.tgz", - "integrity": "sha512-KIegcN+Ntwg3cbkY/jhw2s/+XJUM0Lpi/LcKFYCS8PrZHcWBl2iKCVze7ZCnRj3w8H7/lUJ9v7rj9KQiNxApBw==", - "dev": true, - "engines": { - "node": ">= 4.0.0", - "npm": ">= 3.0.0" - } - }, "node_modules/vue-resize": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/vue-resize/-/vue-resize-1.0.1.tgz", @@ -19803,6 +19953,57 @@ "url": "https://github.com/sponsors/wooorm" } }, + "node_modules/web-streams-polyfill": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.2.1.tgz", + "integrity": "sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==", + "optional": true, + "engines": { + "node": ">= 8" + } + }, + "node_modules/webdav": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/webdav/-/webdav-5.2.3.tgz", + "integrity": "sha512-u5wqJULZhB7IwO3qVD9r0ikt6SMHZ4P4YYtLJ6JrCmSoZuW6KvanXWJAA4LZDm548lK7aCNUsy0VxbBKBXAGrg==", + "dependencies": { + "@buttercup/fetch": "^0.1.1", + "base-64": "^1.0.0", + "byte-length": "^1.0.2", + "fast-xml-parser": "^4.2.4", + "he": "^1.2.0", + "hot-patcher": "^2.0.0", + "layerr": "^0.1.2", + "md5": "^2.3.0", + "minimatch": "^5.1.0", + "nested-property": "^4.0.0", + "path-posix": "^1.0.0", + "url-join": "^4.0.1", + "url-parse": "^1.5.10" + }, + "engines": { + "node": ">=14" + } + }, + "node_modules/webdav/node_modules/brace-expansion": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz", + "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==", + "dependencies": { + "balanced-match": "^1.0.0" + } + }, + "node_modules/webdav/node_modules/minimatch": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-5.1.6.tgz", + "integrity": "sha512-lKwV/1brpG6mBUFHtb7NUmtABCb2WZZmm2wNiOA5hAb8VdCS4B3dtMWyvcoViccwAW/COERjXLt0zP1zXUN26g==", + "dependencies": { + "brace-expansion": "^2.0.1" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/webidl-conversions": { "version": "7.0.0", "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-7.0.0.tgz", diff --git a/package.json b/package.json index 2089438a..d1378745 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "@jest/globals": "^29.5.0", "@nextcloud/babel-config": "^1.0.0", "@nextcloud/eslint-config": "^8.3.0-beta.2", - "@nextcloud/vue": "^7.11.4", + "@nextcloud/vue": "^8.0.0-beta.3", "@nextcloud/webpack-vue-config": "^5.3.0", "@rollup-extras/plugin-clean": "^1.3.5", "@rollup/plugin-commonjs": "^25.0.0", @@ -85,11 +85,10 @@ "dependencies": { "@nextcloud/auth": "^2.1.0", "@nextcloud/axios": "^2.4.0", - "@nextcloud/files": "^3.0.0-beta.9", + "@nextcloud/files": "^3.0.0-beta.14", "@nextcloud/l10n": "^2.1.0", "@nextcloud/logger": "^2.5.0", "@nextcloud/router": "^2.1.1", - "@nextcloud/vue": "^7.11.4", "@skjnldsv/sanitize-svg": "^1.0.2", "@types/node": "^20.1.3", "buffer": "^6.0.3",