@uppy/onedrive
Advanced tools
Comparing version 3.2.1 to 3.3.0
# @uppy/onedrive | ||
## 3.3.0 | ||
Released: 2024-03-27 | ||
Included in: Uppy v3.24.0 | ||
- @uppy/onedrive: refactor to TypeScript (Murderlon / #4979) | ||
## 3.2.1 | ||
@@ -4,0 +11,0 @@ |
@@ -1,15 +0,18 @@ | ||
import { h } from 'preact'; | ||
import { Provider, getAllowedHosts, tokenStorage } from '@uppy/companion-client'; | ||
import { UIPlugin } from '@uppy/core'; | ||
import { Provider } from '@uppy/companion-client'; | ||
import { ProviderViews } from '@uppy/provider-views'; | ||
import { h } from 'preact'; | ||
import locale from "./locale.js"; | ||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment | ||
// @ts-ignore We don't want TS to generate types for the package.json | ||
const packageJson = { | ||
"version": "3.2.1" | ||
"version": "3.3.0" | ||
}; | ||
import locale from './locale.js'; | ||
export default class OneDrive extends UIPlugin { | ||
constructor(uppy, opts) { | ||
super(uppy, opts); | ||
this.type = 'acquirer'; | ||
this.files = []; | ||
this.storage = this.opts.storage || tokenStorage; | ||
this.id = this.opts.id || 'OneDrive'; | ||
Provider.initPlugin(this, opts); | ||
this.title = this.opts.title || 'OneDrive'; | ||
this.icon = () => h("svg", { | ||
@@ -37,2 +40,3 @@ "aria-hidden": "true", | ||
}))); | ||
this.opts.companionAllowedHosts = getAllowedHosts(this.opts.companionAllowedHosts, this.opts.companionUrl); | ||
this.provider = new Provider(uppy, { | ||
@@ -69,4 +73,4 @@ companionUrl: this.opts.companionUrl, | ||
} | ||
onFirstRender() { | ||
return Promise.all([this.provider.fetchPreAuthToken(), this.view.getFolder()]); | ||
async onFirstRender() { | ||
await Promise.all([this.provider.fetchPreAuthToken(), this.view.getFolder()]); | ||
} | ||
@@ -73,0 +77,0 @@ render(state) { |
{ | ||
"name": "@uppy/onedrive", | ||
"description": "Import files from OneDrive, into Uppy.", | ||
"version": "3.2.1", | ||
"version": "3.3.0", | ||
"license": "MIT", | ||
@@ -24,10 +24,10 @@ "main": "lib/index.js", | ||
"dependencies": { | ||
"@uppy/companion-client": "^3.7.4", | ||
"@uppy/provider-views": "^3.10.0", | ||
"@uppy/utils": "^5.7.4", | ||
"@uppy/companion-client": "^3.8.0", | ||
"@uppy/provider-views": "^3.11.0", | ||
"@uppy/utils": "^5.7.5", | ||
"preact": "^10.5.13" | ||
}, | ||
"peerDependencies": { | ||
"@uppy/core": "^3.9.3" | ||
"@uppy/core": "^3.10.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
20995
223
Updated@uppy/provider-views@^3.11.0
Updated@uppy/utils@^5.7.5