fix npm pacjage not importing init.cjs (#1743)

This commit is contained in:
Neal Shah
2025-10-12 19:46:04 -04:00
committed by GitHub
parent 6a72c261e2
commit 9e0ba954ff
3 changed files with 5 additions and 5 deletions

View File

@@ -1,12 +1,12 @@
{
"name": "puter",
"version": "2.0.14",
"version": "2.0.15",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"name": "puter",
"version": "2.0.14",
"version": "2.0.15",
"license": "Apache-2.0",
"dependencies": {
"@heyputer/kv.js": "^0.1.92",

View File

@@ -1,6 +1,6 @@
{
"name": "@heyputer/puter.js",
"version": "2.0.14",
"version": "2.0.15",
"description": "Puter.js - A JavaScript library for interacting with Puter services.",
"main": "src/index.js",
"types": "index.d.ts",
@@ -42,4 +42,4 @@
"@heyputer/kv.js": "^0.2.1",
"@heyputer/putility": "^1.0.3"
}
}
}

View File

@@ -19,7 +19,7 @@ const init = (authToken) => {
}
});
goodContext.globalThis = goodContext;
const code = readFileSync(`${resolve(__filename, '..')}/../dist/puter.js`, 'utf8');
const code = readFileSync(`${resolve(__filename, '..')}/../dist/puter.cjs`, 'utf8');
const context = vm.createContext(goodContext);
vm.runInNewContext(code, context);
if ( authToken ) {