@heyputer/puter.js 2.0.8 → 2.0.10
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
package/src/safeLoadPuter.cjs
CHANGED
|
@@ -4,7 +4,7 @@ const { resolve } = require('node:path');
|
|
|
4
4
|
/**
|
|
5
5
|
* Method for loading puter.js in Node.js environment
|
|
6
6
|
* @param {string} authToken - Optional auth token to initialize puter with
|
|
7
|
-
* @returns {
|
|
7
|
+
* @returns {import('../index.d.ts').puter} The `puter` object from puter.js
|
|
8
8
|
*/
|
|
9
9
|
const safeLoadPuterJs = (authToken) => {
|
|
10
10
|
const goodContext = {};
|
|
@@ -78,7 +78,7 @@ export class FilesystemService extends putility.concepts.Service {
|
|
|
78
78
|
|
|
79
79
|
this.socket = io(api_info.api_origin, {
|
|
80
80
|
auth: { auth_token: api_info.auth_token },
|
|
81
|
-
autoUnref:
|
|
81
|
+
autoUnref: this._.context.env === 'nodejs',
|
|
82
82
|
});
|
|
83
83
|
|
|
84
84
|
this.bindSocketEvents();
|