@startup-booster/move
Advanced tools
Comparing version 0.1.23 to 0.1.24
@@ -28,2 +28,5 @@ type MoveEvent = 'connect' | 'disconnect'; | ||
login(auth: any): Promise<void>; | ||
logout(): Promise<void> | ||
// TODO: | ||
@@ -30,0 +33,0 @@ // insert(path: string, index: number, value: any): Promise<void>; |
16
move.js
@@ -6,3 +6,3 @@ const { EventEmitter } = require('events'); | ||
/** @type {function(string, MoveOptions): MoveClient} */ | ||
const connect = (url, options = {}) => { | ||
const connect = (url, options) => { | ||
const eventEmitter = new EventEmitter(); | ||
@@ -12,4 +12,2 @@ const listeners = {}; | ||
path: '/move', | ||
auth: options.auth, | ||
query: options.query, | ||
}); | ||
@@ -66,2 +64,6 @@ | ||
// once the server sends us an updated value | ||
if (options.onConnect) { | ||
options.onConnect(move); | ||
} | ||
for (const path in listeners) { | ||
@@ -202,2 +204,10 @@ rpc('listen', path); | ||
}, | ||
async login(auth) { | ||
return rpc('login', auth); | ||
}, | ||
async logout() { | ||
return rpc('logout'); | ||
}, | ||
}; | ||
@@ -204,0 +214,0 @@ |
{ | ||
"name": "@startup-booster/move", | ||
"version": "0.1.23", | ||
"version": "0.1.24", | ||
"main": "move.js", | ||
@@ -5,0 +5,0 @@ "license": "MIT", |
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
6038
205