@uppy/provider-views
Advanced tools
Comparing version 2.1.1 to 2.1.2
# @uppy/provider-views | ||
## 2.1.2 | ||
Released: 2022-07-06 | ||
Included in: Uppy v2.12.2 | ||
- @uppy/provider-views: improve logging (Mikael Finstad / #3638) | ||
## 2.1.1 | ||
@@ -4,0 +11,0 @@ |
@@ -24,3 +24,3 @@ "use strict"; | ||
const packageJson = { | ||
"version": "2.1.1" | ||
"version": "2.1.2" | ||
}; | ||
@@ -272,5 +272,9 @@ | ||
const handleToken = e => { | ||
if (e.source !== authWindow) { | ||
this.plugin.uppy.log('rejecting event from unknown source'); | ||
return; | ||
} | ||
if (!isOriginAllowed(e.origin, this.plugin.opts.companionAllowedHosts) || e.source !== authWindow) { | ||
this.plugin.uppy.log(`rejecting event from ${e.origin} vs allowed pattern ${this.plugin.opts.companionAllowedHosts}`); | ||
return; | ||
} // Check if it's a string before doing the JSON.parse to maintain support | ||
@@ -283,3 +287,3 @@ // for older Companion versions that used object references | ||
if (data.error) { | ||
this.plugin.uppy.log('auth aborted'); | ||
this.plugin.uppy.log('auth aborted', 'warning'); | ||
const { | ||
@@ -296,3 +300,3 @@ uppy | ||
if (!data.token) { | ||
this.plugin.uppy.log('did not receive token from auth window'); | ||
this.plugin.uppy.log('did not receive token from auth window', 'error'); | ||
return; | ||
@@ -299,0 +303,0 @@ } |
@@ -24,3 +24,3 @@ "use strict"; | ||
const packageJson = { | ||
"version": "2.1.1" | ||
"version": "2.1.2" | ||
}; | ||
@@ -27,0 +27,0 @@ /** |
{ | ||
"name": "@uppy/provider-views", | ||
"description": "View library for Uppy remote provider plugins.", | ||
"version": "2.1.1", | ||
"version": "2.1.2", | ||
"license": "MIT", | ||
@@ -28,4 +28,4 @@ "main": "lib/index.js", | ||
"peerDependencies": { | ||
"@uppy/core": "^2.3.0" | ||
"@uppy/core": "^2.3.1" | ||
} | ||
} |
@@ -246,5 +246,8 @@ import { h } from 'preact' | ||
const handleToken = (e) => { | ||
if (e.source !== authWindow) { | ||
this.plugin.uppy.log('rejecting event from unknown source') | ||
return | ||
} | ||
if (!isOriginAllowed(e.origin, this.plugin.opts.companionAllowedHosts) || e.source !== authWindow) { | ||
this.plugin.uppy.log(`rejecting event from ${e.origin} vs allowed pattern ${this.plugin.opts.companionAllowedHosts}`) | ||
return | ||
} | ||
@@ -257,3 +260,3 @@ | ||
if (data.error) { | ||
this.plugin.uppy.log('auth aborted') | ||
this.plugin.uppy.log('auth aborted', 'warning') | ||
const { uppy } = this.plugin | ||
@@ -266,3 +269,3 @@ const message = uppy.i18n('authAborted') | ||
if (!data.token) { | ||
this.plugin.uppy.log('did not receive token from auth window') | ||
this.plugin.uppy.log('did not receive token from auth window', 'error') | ||
return | ||
@@ -269,0 +272,0 @@ } |
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
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
243695
3564