@momo2555/koppeliajs 0.0.100 → 0.0.101

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.
@@ -33,11 +33,6 @@ export declare class KoppeliaWebsocket {
33
33
  * @param callback
34
34
  */
35
35
  onOpen(callback: () => void): void;
36
- /**
37
- * Generate a new request Id
38
- * @returns (string): a nex resuest id
39
- */
40
- private _generateRequestId;
41
36
  /**
42
37
  * Handle a websocket response
43
38
  * - Execute a callback of a reception if a request was send before (by checking ongoing request)
@@ -62,13 +62,6 @@ export class KoppeliaWebsocket {
62
62
  this.openCallback = callback;
63
63
  }
64
64
  /* ------ PRIVATE ------ */
65
- /**
66
- * Generate a new request Id
67
- * @returns (string): a nex resuest id
68
- */
69
- _generateRequestId() {
70
- return crypto.randomUUID();
71
- }
72
65
  /**
73
66
  * Handle a websocket response
74
67
  * - Execute a callback of a reception if a request was send before (by checking ongoing request)
@@ -1,3 +1,4 @@
1
+ import { v4 as uuidv4 } from 'uuid';
1
2
  export var PeerType;
2
3
  (function (PeerType) {
3
4
  PeerType["MONITOR"] = "monitor";
@@ -169,8 +170,7 @@ export class Message {
169
170
  this.header.from = peerToIdentify;
170
171
  }
171
172
  generateRequestId() {
172
- this.header.id = crypto.randomUUID();
173
- ;
173
+ this.header.id = uuidv4();
174
174
  }
175
175
  getRequestId() {
176
176
  return this.header.id;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@momo2555/koppeliajs",
3
- "version": "0.0.100",
3
+ "version": "0.0.101",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "vite build && npm run package",
@@ -61,6 +61,7 @@
61
61
  },
62
62
  "dependencies": {
63
63
  "express": "^4.21.2",
64
- "fs": "^0.0.1-security"
64
+ "fs": "^0.0.1-security",
65
+ "uuid": "^11.1.0"
65
66
  }
66
- }
67
+ }