gscatterjs-core
Advanced tools
Comparing version 0.0.1 to 0.0.2
{ | ||
"name": "gscatterjs-core", | ||
"version": "0.0.1", | ||
"version": "0.0.2", | ||
"main": "dist/index.js", | ||
@@ -13,3 +13,3 @@ "license": "MIT", | ||
}, | ||
"gitHead": "314d9c4be266304b6bd42521782d457b1769ac73" | ||
"gitHead": "fab858c629ef37d6e5ee6c58e29ce593ff9ba784" | ||
} |
@@ -15,4 +15,7 @@ import PluginRepository from './plugins/PluginRepository'; | ||
const checkForExtension = (resolve, tries = 0) => { | ||
if(tries > 20) return; | ||
const checkForExtension = (resolve,reject, tries = 0) => { | ||
if(tries > 30) { | ||
reject(false); | ||
return; | ||
} | ||
if(holder.gscatter.isExtension) return resolve(true); | ||
@@ -43,3 +46,3 @@ setTimeout(() => checkForExtension(resolve, tries + 1), 100); | ||
async connect(pluginName, options){ | ||
return new Promise(resolve => { | ||
return new Promise((resolve,reject) => { | ||
if(!pluginName || !pluginName.length) throw new Error("You must specify a name for this connection"); | ||
@@ -56,11 +59,11 @@ | ||
// Defaults to gscatter extension if exists | ||
checkForExtension(resolve); | ||
checkForExtension(resolve,reject); | ||
// Tries to set up Desktop Connection | ||
SocketService.init(pluginName, options.linkTimeout); | ||
SocketService.link().then(async authenticated => { | ||
if(!authenticated) return false; | ||
this.identity = await this.getIdentityFromPermissions(); | ||
return resolve(true); | ||
}); | ||
// SocketService.init(pluginName, options.linkTimeout); | ||
// SocketService.link().then(async authenticated => { | ||
// if(!authenticated) return false; | ||
// this.identity = await this.getIdentityFromPermissions(); | ||
// return resolve(true); | ||
// }); | ||
}) | ||
@@ -67,0 +70,0 @@ } |
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
52107
802