@heyputer/puter.js 2.0.10 → 2.0.12

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.10",
3
+ "version": "2.0.12",
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",
@@ -2,11 +2,11 @@ const { readFileSync } = require('node:fs');
2
2
  const vm = require('node:vm');
3
3
  const { resolve } = require('node:path');
4
4
  /**
5
- * Method for loading puter.js in Node.js environment
5
+ * Method for loading puter.js in Node.js environment with auth token
6
6
  * @param {string} authToken - Optional auth token to initialize puter with
7
- * @returns {import('../index.d.ts').puter} The `puter` object from puter.js
7
+ * @returns {import('../index').puter} The `puter` object from puter.js
8
8
  */
9
- const safeLoadPuterJs = (authToken) => {
9
+ const init = (authToken) => {
10
10
  const goodContext = {};
11
11
  Object.getOwnPropertyNames(globalThis).forEach(name => {
12
12
  try {
@@ -25,4 +25,4 @@ const safeLoadPuterJs = (authToken) => {
25
25
  return goodContext.puter;
26
26
  };
27
27
 
28
- module.exports = { safeLoadPuterJs };
28
+ module.exports = { init };