@heyputer/puter.js 2.0.7 → 2.0.8

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": "@heyputer/puter.js",
3
- "version": "2.0.7",
3
+ "version": "2.0.8",
4
4
  "description": "Puter.js - A JavaScript library for interacting with Puter services.",
5
5
  "main": "src/index.js",
6
6
  "types": "index.d.ts",
@@ -91,9 +91,6 @@ export class PuterJSFileSystemModule extends AdvancedBase {
91
91
  * @returns {void}
92
92
  */
93
93
  initializeSocket() {
94
- if ( puter.env === 'nodejs' ){
95
- return;
96
- }
97
94
  if ( this.socket ) {
98
95
  this.socket.disconnect();
99
96
  }
@@ -102,6 +99,7 @@ export class PuterJSFileSystemModule extends AdvancedBase {
102
99
  auth: {
103
100
  auth_token: this.authToken,
104
101
  },
102
+ autoUnref: true,
105
103
  });
106
104
 
107
105
  this.bindSocketEvents();
@@ -64,10 +64,6 @@ export class FilesystemService extends putility.concepts.Service {
64
64
  }
65
65
 
66
66
  async initializeSocket() {
67
- if ( puter.env === 'nodejs' ){
68
- return;
69
- }
70
-
71
67
  if ( this.socket ) {
72
68
  this.socket.disconnect();
73
69
  }
@@ -82,6 +78,7 @@ export class FilesystemService extends putility.concepts.Service {
82
78
 
83
79
  this.socket = io(api_info.api_origin, {
84
80
  auth: { auth_token: api_info.auth_token },
81
+ autoUnref: true,
85
82
  });
86
83
 
87
84
  this.bindSocketEvents();