Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@uppy/companion-client

Package Overview
Dependencies
Maintainers
5
Versions
89
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@uppy/companion-client - npm Package Compare versions

Comparing version 1.2.0 to 1.3.0

6

lib/Provider.js

@@ -53,4 +53,6 @@ 'use strict';

response = _RequestClient.prototype.onReceiveResponse.call(this, response);
var authenticated = response.status !== 401;
this.uppy.getPlugin(this.pluginId).setPluginState({
var plugin = this.uppy.getPlugin(this.pluginId);
var oldAuthenticated = plugin.getPluginState().authenticated;
var authenticated = oldAuthenticated ? response.status !== 401 : response.status < 400;
plugin.setPluginState({
authenticated: authenticated

@@ -57,0 +59,0 @@ });

@@ -209,3 +209,3 @@ 'use strict';

return {
'Accept': 'application/json',
Accept: 'application/json',
'Content-Type': 'application/json',

@@ -218,2 +218,2 @@ 'Uppy-Versions': "@uppy/companion-client=" + RequestClient.VERSION

return RequestClient;
}(), _class.VERSION = "1.2.0", _temp);
}(), _class.VERSION = "1.3.0", _temp);
{
"name": "@uppy/companion-client",
"description": "Client library for communication with Companion. Intended for use in Uppy plugins.",
"version": "1.2.0",
"version": "1.3.0",
"license": "MIT",

@@ -26,3 +26,3 @@ "main": "lib/index.js",

},
"gitHead": "bd2beedcffbaa840de7069860e341f02268ddbb1"
"gitHead": "056a7114a15fc7480a4014342d7f2c19305dc96c"
}

@@ -33,4 +33,6 @@ 'use strict'

response = super.onReceiveResponse(response)
const authenticated = response.status !== 401
this.uppy.getPlugin(this.pluginId).setPluginState({ authenticated })
const plugin = this.uppy.getPlugin(this.pluginId)
const oldAuthenticated = plugin.getPluginState().authenticated
const authenticated = oldAuthenticated ? response.status !== 401 : response.status < 400
plugin.setPluginState({ authenticated })
return response

@@ -37,0 +39,0 @@ }

@@ -29,3 +29,3 @@ 'use strict'

return {
'Accept': 'application/json',
Accept: 'application/json',
'Content-Type': 'application/json',

@@ -32,0 +32,0 @@ 'Uppy-Versions': `@uppy/companion-client=${RequestClient.VERSION}`

@@ -17,11 +17,15 @@ const UppySocket = require('./Socket')

}
close (args) {
webSocketCloseSpy(args)
}
send (json) {
webSocketSendSpy(json)
}
triggerOpen () {
this.onopen()
}
triggerClose () {

@@ -28,0 +32,0 @@ this.onclose()

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc