@unitn-asa/deliveroo-js-sdk 1.3.0 → 1.3.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unitn-asa/deliveroo-js-sdk",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.2",
|
|
4
4
|
"description": "Software development kit for Deliveroo.js",
|
|
5
5
|
"author": "Marco Robol <marco.robol@unitn.it>",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,6 @@
|
|
|
31
31
|
"publishConfig": {
|
|
32
32
|
"access": "public"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "704da8315162c2b98b00d6f4736f5e7631c5b4c5",
|
|
35
34
|
"dependencies": {
|
|
36
35
|
"getopts": "^2.3.0"
|
|
37
36
|
}
|
|
@@ -164,7 +164,7 @@ export class DjsClientSocket extends Socket {
|
|
|
164
164
|
/**
|
|
165
165
|
* @param {string} toId
|
|
166
166
|
* @param {any} msg
|
|
167
|
-
* @returns { Promise < 'successful' > } status
|
|
167
|
+
* @returns { Promise < 'successful' | 'failed' > } status
|
|
168
168
|
*/
|
|
169
169
|
async emitSay ( toId, msg ) {
|
|
170
170
|
return new Promise( (success) => {
|
package/src/client/DjsConnect.js
CHANGED
|
@@ -46,7 +46,7 @@ export function DjsConnect ( host = args['host'] || process.env.HOST, token = ar
|
|
|
46
46
|
if ( autoconnect )
|
|
47
47
|
enhancedClientSocket.connect();
|
|
48
48
|
|
|
49
|
-
console.log( `Connecting to ${host} as ${ token ? 'token '+ (token).substring(0,5)+'...' : name ? 'name '+name : 'guest' }` );
|
|
49
|
+
console.log( `Connecting to ${host} as ${ token ? 'token '+ (token).substring(0,5)+'...'+(token).substring(token.length-5) : name ? 'name '+name : 'guest' }` );
|
|
50
50
|
|
|
51
51
|
return enhancedClientSocket;
|
|
52
52
|
|
|
@@ -141,7 +141,7 @@ export class DjsServerSocket extends Socket {
|
|
|
141
141
|
|
|
142
142
|
|
|
143
143
|
/**
|
|
144
|
-
* @param { function ( string, any, function ( 'successful' ) : void ) : void } callback ( toId, msg, ack )
|
|
144
|
+
* @param { function ( string, any, function ( 'successful' | 'failed' ) : void ) : void } callback ( toId, msg, ack )
|
|
145
145
|
*/
|
|
146
146
|
onSay ( callback ) {
|
|
147
147
|
super.on( 'say', callback );
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
* Player configuration object
|
|
47
47
|
* @property {string} agent_type Agent class
|
|
48
48
|
* @property {number} movement_duration Duration of each movement in ms
|
|
49
|
-
* @property {number
|
|
49
|
+
* @property {number} observation_distance Observation distance
|
|
50
50
|
* @property {number} capacity Capacity
|
|
51
51
|
*/
|
|
52
52
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
* 'move': function ( 'up' | 'right' | 'left' | 'down', function ( { x:number, y:number } | false ) : void = ) : { x:number, y:number } | false,
|
|
12
12
|
* 'pickup': function ( function ( { id:string } [] ) : void = ) : { id:string } [],
|
|
13
13
|
* 'putdown': function ( string [] =, function ( { id:string } [] ) : void = ) : { id:string } [],
|
|
14
|
-
* 'say': function ( string, any, function( 'successful' ) : void ) : void,
|
|
14
|
+
* 'say': function ( string, any, function( 'successful' | 'failed' ) : void ) : void,
|
|
15
15
|
* 'ask': function ( string, any, function( any ) : void ) : void,
|
|
16
16
|
* 'shout': function ( any, function( any ) : void ) : void,
|
|
17
17
|
* 'parcel': function ( 'create' | 'dispose' | 'set', { x:number, y:number } | { id:string, reward?:number } ) : void,
|
package/LICENSE.md
DELETED
|
File without changes
|