{"_id":"almostnode","_rev":"16-cff7a76712cc790caa591e99d32f57f9","name":"almostnode","dist-tags":{"latest":"0.2.14"},"versions":{"0.1.0":{"name":"almostnode","version":"0.1.0","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.1.0","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/user/almostnode#readme","bugs":{"url":"https://github.com/user/almostnode/issues"},"dist":{"shasum":"fbe61fd62213e53e04eec5a3758578c843e042f2","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.1.0.tgz","fileCount":216,"integrity":"sha512-kyMtRml9PWvXlqK3fS7CCkLpp9JBetlEIRzgoVHvyfY+rPtxVrv9Eo7aXzTj8YF+DPmyZ/ktXmlAbAWv7PMsEw==","signatures":[{"sig":"MEYCIQD7o5aI9p8J9EF0RBrtJB4jFoV9Qo+8TN/rjf/yr3ybfAIhAJlVMjsRgUbyfLGYbEKxYH7Rb2kh+pM+0cBOcJyWmkXN","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12450555},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}}},"gitHead":"3b13e481a17a4d5e496ef66046582c2137b70958","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/user/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","brotli":"^1.3.3","comlink":"^4.4.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.1.0_1769850611024_0.5661244771220193","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"almostnode","version":"0.2.0","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.0","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/user/almostnode#readme","bugs":{"url":"https://github.com/user/almostnode/issues"},"dist":{"shasum":"f637ef6cd42adac06970c17e7cd6f717024ff244","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.0.tgz","fileCount":230,"integrity":"sha512-3a2RsG29zEux0X+3PqZO1dSBev8dzq1JPJ+Ckreyc9hhaTsjd8Ea46pQkt+4zssvMX5OTU9VCYjGmyrk2xWt8A==","signatures":[{"sig":"MEYCIQDhIuaHVGR5rLZecfDEHYMd1/TVwwQzXn30IOFjOShlRgIhAMLghB0DKL5ViblddLTQfbddMFQTxn69Ro9EJajDJski","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12508964},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"854470b35ac93dcfe2b23ddd8b2a80592da610b0","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/user/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","brotli":"^1.3.3","comlink":"^4.4.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.0_1769860972228_0.3961382138245133","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"almostnode","version":"0.2.1","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.1","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/Macaly/almostnode#readme","bugs":{"url":"https://github.com/Macaly/almostnode/issues"},"dist":{"shasum":"584c776bb1cc17e2a80ce29a2213e715b2d72045","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.1.tgz","fileCount":230,"integrity":"sha512-QFRMsGtPuNgUWYLgTkCnVBSqZNsAIHEU3ETn8SmXKTAPEju2c2WUJi8QT0iXMSf735VlNw8kxTDDB7q+RSZq1g==","signatures":[{"sig":"MEYCIQCyErhfJ4y1epUDCCi9Fh37sbue6qt5A70MiA3eXp7ZYwIhAI1eZ8zKnNFpRjzg8+gGjD9NoTPeoE7K6LzIZf1rm7Uu","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12509759},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"8c926c2ea77901ad5e6c64e0a8da7bc3e7e3d810","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/Macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","brotli":"^1.3.3","comlink":"^4.4.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.1_1769861369798_0.8772624790023182","host":"s3://npm-registry-packages-npm-production"}},"0.2.2":{"name":"almostnode","version":"0.2.2","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.2","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/Macaly/almostnode#readme","bugs":{"url":"https://github.com/Macaly/almostnode/issues"},"dist":{"shasum":"2b8b3e59240b33a3d1f8da4f179aa08265934d69","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.2.tgz","fileCount":230,"integrity":"sha512-92Pfjjvl45ZopPZ82qyz1LZV8ILZs+5Bv4E0L0fwHaO0bfV7/Q3ZzbVmpOcxRswuE3EGPJ/YqUXQMP58iDb0og==","signatures":[{"sig":"MEQCIHEo1V4DieRlXveq589leW1sBhyHgC9Qa1Q7HJ01GFrdAiAlbHwKFizXtOUSzKtGBTtu9zBO/2NPPhOwFwhbqt0ULQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12512031},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"3ceb1a684195dedc56eacf60ce997ff6ef7405a6","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/Macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","brotli":"^1.3.3","comlink":"^4.4.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.2_1769861807805_0.6738668670499623","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"almostnode","version":"0.2.3","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.3","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/Macaly/almostnode#readme","bugs":{"url":"https://github.com/Macaly/almostnode/issues"},"dist":{"shasum":"2462cb928c7693d7963b6706e0304be3e436fc7b","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.3.tgz","fileCount":230,"integrity":"sha512-yTG4pVsionrQI331Ld99or01ToLBV57AX6gHuaqlJdLDRnTZY8vSeXY4+2ZWXi8dwraSZtCOWuYdYafJIruKSQ==","signatures":[{"sig":"MEQCIAVwolrfqkodP06gZq00tVWmjKZ2oAG7jcAjB5OAuR7iAiBIkBvCKHaNrcmK4pApyvc7j34BX7I6aoknlTHC5CQcaw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12529137},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"b5ddaca25a307741f6afb320970e896f83ec15c8","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/Macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","brotli":"^1.3.3","comlink":"^4.4.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.3_1769865169778_0.7263487071087213","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"almostnode","version":"0.2.4","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.4","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/Macaly/almostnode#readme","bugs":{"url":"https://github.com/Macaly/almostnode/issues"},"dist":{"shasum":"735a5117e797aaa9324c73f0c75bdcd578c1b9cd","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.4.tgz","fileCount":230,"integrity":"sha512-cs/sUyWMcSqa32a5X96gha1uZ3G6+DkIf0+Lh4YXj1yDI6hYRweRyZuB8OOg1d0FcX15ZLIsElYEGRLGurWR0Q==","signatures":[{"sig":"MEYCIQDWviqwXTWAg3+TbyI1jtExUhm/BTHfuMpwj9zduCIZ/AIhAOZ52J2eHZIwV4IBIxTke6xWPy/sFR7EebBMGVEx6L/U","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12571367},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"8e006d03e3c2c9045d097f6df85d380e506d6a85","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/Macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","brotli":"^1.3.3","comlink":"^4.4.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.4_1769865853263_0.9906438640757969","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"almostnode","version":"0.2.5","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.5","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/Macaly/almostnode#readme","bugs":{"url":"https://github.com/Macaly/almostnode/issues"},"dist":{"shasum":"2096c5d3cc1ba275ce1fcad3c02de4d8cb815149","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.5.tgz","fileCount":236,"integrity":"sha512-F4lWgfjZWGcVl72f6bQyvWn9jYpElU4D1/84RH0Vp6cJ2NpIGvG0fWcKKp6vdR4jROu3PPFZNHKwKtA01pONIw==","signatures":[{"sig":"MEUCIQDzbf4c+sPrGMtt+y1IQUz4hAmiCDVOncU3/759N/cTcQIgPsYmfHMwgFysCGtJqcHqkPFgynDy2fQGqr0x5TdZVF4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12616507},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"7d18a303a65e8f40b1e38e5b56ef218e1ac7bf4d","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/Macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","brotli":"^1.3.3","comlink":"^4.4.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.5_1769971078181_0.3143216666174036","host":"s3://npm-registry-packages-npm-production"}},"0.2.6":{"name":"almostnode","version":"0.2.6","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.6","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/Macaly/almostnode#readme","bugs":{"url":"https://github.com/Macaly/almostnode/issues"},"dist":{"shasum":"97770c688f1ea1377a6c7ce1ef85296e55761fb4","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.6.tgz","fileCount":242,"integrity":"sha512-G9NlDVPty5cM/w6JABbcWaNcgUHJqM/R27CyhOKZFMXD/r/s4R1oDvayB2LdmX86gyX+NQ8Kczwtb/cLLovlEg==","signatures":[{"sig":"MEYCIQCcHd8ixAn18BaUTFAVOxflvfgZgsdreArr47vnTiS/NQIhAOhr08dhpVw1pTb68D3JwKIHFCC32Ent4sILtk1JCyZx","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":12915699},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"c4cd08b91c7da72c2ce7d45f84502f7f718f9937","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/Macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","brotli":"^1.3.3","comlink":"^4.4.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","esbuild":"^0.27.2","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.6_1770041761621_0.05434583235541557","host":"s3://npm-registry-packages-npm-production"}},"0.2.7":{"name":"almostnode","version":"0.2.7","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.7","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/Macaly/almostnode#readme","bugs":{"url":"https://github.com/Macaly/almostnode/issues"},"dist":{"shasum":"9772e17158ed16d087fd4fbd836bbfe544de417c","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.7.tgz","fileCount":245,"integrity":"sha512-eRfTBHj/lmg1kR5LcKWdqRI8/Bl7qbR/yYdJsJ83xxWKt2yPszZeazq619/Xwz5B3o7HbxLRz2hj/ergFkmuKg==","signatures":[{"sig":"MEUCIQCYDRW+e1tH5LnfkpQNWZZUKeEZAIr447EXlRichhqmvQIgX8LLJjGAeSV35CiN1IXZvRMJoWX+ooSo4MnSorLc1fM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19051114},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"758146a59a956553bbfc3764f6b52117c38d0acc","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/Macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","acorn":"^8.15.0","brotli":"^1.3.3","comlink":"^4.4.2","css-tree":"^3.1.0","acorn-jsx":"^5.3.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","esbuild":"^0.27.2","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@types/css-tree":"^2.3.11","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.7_1770321514752_0.6111070667428333","host":"s3://npm-registry-packages-npm-production"}},"0.2.8":{"name":"almostnode","version":"0.2.8","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.8","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/macaly/almostnode#readme","bugs":{"url":"https://github.com/macaly/almostnode/issues"},"dist":{"shasum":"79679bc7fd7e4918ac1254db7a9320a85e72adb5","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.8.tgz","fileCount":257,"integrity":"sha512-CQcI7P75x0dAPmbSeWPyovfa+nw58DKi/17Mkc7WXJSmyELxy8ukc4VF91Jwhx5HvGOXEHFabOUiaq02IshkxQ==","signatures":[{"sig":"MEQCIBXK329YMZIiK6m2GWxcLCMF/yMc3FYWj9CeU94ESh76AiADGhejsWx/+s49M1cSQ1U+A/ggZKV9kHiPpqdLZUKprw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19323556},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"7e875c9676f4211e0be0afe706aa6456911428fc","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","acorn":"^8.15.0","brotli":"^1.3.3","comlink":"^4.4.2","css-tree":"^3.1.0","acorn-jsx":"^5.3.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","esbuild":"^0.27.2","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@types/css-tree":"^2.3.11","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.8_1770464701561_0.14649709241000886","host":"s3://npm-registry-packages-npm-production"}},"0.2.9":{"name":"almostnode","version":"0.2.9","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.9","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/macaly/almostnode#readme","bugs":{"url":"https://github.com/macaly/almostnode/issues"},"dist":{"shasum":"98102cba60e1e1fc2f245adb122365fee823e413","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.9.tgz","fileCount":259,"integrity":"sha512-fQn44dun8eo/Nofr5EYhEv8iTLJrAQ/gE+KZ2dVEHPdIpGaUhafrLjESzCKa+Vurms3GS83AWvOIwHWPtkvtzw==","signatures":[{"sig":"MEYCIQDLhD571SKcyL2ukaiJ8twikg+ySWrgEPjJWJ6zDwQuSAIhAKXrvbQz0wyrI2s5SnqnkWZ20g8olzJcI3HrotL26pJM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19633696},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"91e239a988139884cea5a458aaae43f877d20335","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","acorn":"^8.15.0","brotli":"^1.3.3","comlink":"^4.4.2","css-tree":"^3.1.0","acorn-jsx":"^5.3.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","esbuild":"^0.27.2","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@types/css-tree":"^2.3.11","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.9_1770570687191_0.9823247501529786","host":"s3://npm-registry-packages-npm-production"}},"0.2.10":{"name":"almostnode","version":"0.2.10","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.10","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/macaly/almostnode#readme","bugs":{"url":"https://github.com/macaly/almostnode/issues"},"dist":{"shasum":"ac67f28589604615b271c6eccefb37a1cda069e5","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.10.tgz","fileCount":265,"integrity":"sha512-X+jgXBqox89tDxhkM4RmvOUTQzsgkX1xdYcys/22nmol3ysNPQ9g6OhHuZhhvksl+fw/9dF7v9v0NrbaXZJ49g==","signatures":[{"sig":"MEYCIQCq9nn6Jy1mZpqyagLbwdv3sYfDq2necMIiPb9BOb2m1gIhAP7YrZ4/dmTr90PY9v+1kxL3kK9t1mtcqZ/HtQvwyBTw","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19622107},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"5d12120ea273ad555fd8a78d84ca733678be8435","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","acorn":"^8.15.0","brotli":"^1.3.3","comlink":"^4.4.2","css-tree":"^3.1.0","acorn-jsx":"^5.3.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","esbuild":"^0.27.2","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@types/css-tree":"^2.3.11","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.10_1770648073966_0.8653596314699967","host":"s3://npm-registry-packages-npm-production"}},"0.2.11":{"name":"almostnode","version":"0.2.11","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.11","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/macaly/almostnode#readme","bugs":{"url":"https://github.com/macaly/almostnode/issues"},"dist":{"shasum":"6a36c1b0938803b76febe9e9496af902ff2abd52","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.11.tgz","fileCount":265,"integrity":"sha512-iKRxyToppWoUcuS1I6JubuMoKeI6R6P3gqY7jvmgk9flPMVoVk5vfFZqNLPxKBhE9MZtiKwSomdX8r6S2PuUXw==","signatures":[{"sig":"MEQCIGycNehaXvSBTanBeVq8BanzkWkhclnNoJUTjB0Gn6KeAiBIdLc12EKjvPLZZIHhRDvGKyVBeZL4pXvRlZ/sDBhtpg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":19630462},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"f0595fc74210df3d3b9e29459ed66712378149ac","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","type-check":"tsc --noEmit","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","acorn":"^8.15.0","brotli":"^1.3.3","comlink":"^4.4.2","css-tree":"^3.1.0","acorn-jsx":"^5.3.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","resolve.exports":"^2.0.3","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","esbuild":"^0.27.2","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@types/css-tree":"^2.3.11","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.11_1770668600690_0.3046292150146983","host":"s3://npm-registry-packages-npm-production"}},"0.2.12":{"name":"almostnode","version":"0.2.12","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.12","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/macaly/almostnode#readme","bugs":{"url":"https://github.com/macaly/almostnode/issues"},"dist":{"shasum":"000cbefd4b3d0f946882280c385f0b420570af88","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.12.tgz","fileCount":271,"integrity":"sha512-LQRG8tz64pqRl+y1Ysnd4jLJ2DFd3RQv7sRGmkl1hy4WK8BbU5LI6FNGix3BI2zk+GvI7AyHv74UNQaj8KmBJg==","signatures":[{"sig":"MEQCIF820y9X+/Y4061p3stByJtVFZ/KCkvC7hTyfwzTcQjWAiAoGSgm19ps1EXrdMLRrm1x6HWjV/bJImAtwf9AtzbZkA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":22101980},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"6cfccdc6734bc430c77122e62923d62c60d9a885","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","type-check":"tsc --noEmit","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","acorn":"^8.15.0","brotli":"^1.3.3","comlink":"^4.4.2","css-tree":"^3.1.0","acorn-jsx":"^5.3.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","@xterm/xterm":"^6.0.0","resolve.exports":"^2.0.3","@xterm/addon-fit":"^0.11.0","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","esbuild":"^0.27.2","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@types/css-tree":"^2.3.11","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.12_1770899095267_0.4690381676749662","host":"s3://npm-registry-packages-npm-production"}},"0.2.13":{"name":"almostnode","version":"0.2.13","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"author":"","license":"MIT","_id":"almostnode@0.2.13","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"homepage":"https://github.com/macaly/almostnode#readme","bugs":{"url":"https://github.com/macaly/almostnode/issues"},"dist":{"shasum":"c43e477384f88ba48762e21d5bbeba7038b152fe","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.13.tgz","fileCount":271,"integrity":"sha512-wAIc8P3fXHlKnU57Csqbb1N50Q8ymvY4QXG33NKBUyyMBZuxGbcIEwwmyhGhmi4Jm6eJQHVp76iDx5lowTRpvA==","signatures":[{"sig":"MEUCIFLVUfmj8NQciF5BpY2KAuhX/LThdCOjqtLkRvXVXESiAiEA5QdlMbtD1pcpqucHCw/dUTObfB0zgFMi2dY+ptUogxw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":21829996},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.mjs","engines":{"node":">=20.0.0"},"exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}}},"gitHead":"82c913712bd65dd46511c1dcc15e657dd8716189","scripts":{"dev":"vite","test":"vitest","build":"vite build","preview":"vite preview","sandbox":"vite --port 3002 --config vite.sandbox.config.js","test:e2e":"playwright test","test:run":"vitest run","build:lib":"vite build --config vite.lib.config.js","type-check":"tsc --noEmit","build:types":"tsc --project tsconfig.build.json","test:e2e:ui":"playwright test --ui","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","build:publish":"npm run build:lib && npm run build:types","prepublishOnly":"npm run test:run && npm run build:publish","test:e2e:debug":"playwright test --debug"},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"repository":{"url":"git+https://github.com/macaly/almostnode.git","type":"git"},"_npmVersion":"10.8.2","description":"Node.js in your browser. Just like that.","directories":{},"sideEffects":false,"_nodeVersion":"20.19.6","dependencies":{"pako":"^2.1.0","acorn":"^8.15.0","brotli":"^1.3.3","comlink":"^4.4.2","css-tree":"^3.1.0","acorn-jsx":"^5.3.2","just-bash":"^2.7.0","brotli-wasm":"^3.0.1","@xterm/xterm":"^6.0.0","resolve.exports":"^2.0.3","@xterm/addon-fit":"^0.11.0","vite-plugin-wasm":"^3.5.0","vite-plugin-top-level-await":"^1.6.0"},"_hasShrinkwrap":false,"devDependencies":{"vite":"^5.4.0","jsdom":"^27.4.0","vitest":"^4.0.18","esbuild":"^0.27.2","typescript":"^5.9.3","@types/node":"^25.0.10","@types/pako":"^2.0.4","@types/css-tree":"^2.3.11","@playwright/test":"^1.58.0"},"_npmOperationalInternal":{"tmp":"tmp/almostnode_0.2.13_1770921423071_0.08531213585460429","host":"s3://npm-registry-packages-npm-production"}},"0.2.14":{"name":"almostnode","version":"0.2.14","description":"Node.js in your browser. Just like that.","type":"module","license":"MIT","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"repository":{"type":"git","url":"git+https://github.com/macaly/almostnode.git"},"homepage":"https://github.com/macaly/almostnode#readme","bugs":{"url":"https://github.com/macaly/almostnode/issues"},"author":"","engines":{"node":">=20.0.0"},"main":"./dist/index.cjs","module":"./dist/index.mjs","types":"./dist/index.d.ts","exports":{".":{"import":{"types":"./dist/index.d.ts","default":"./dist/index.mjs"},"require":{"types":"./dist/index.d.ts","default":"./dist/index.cjs"}},"./vite":{"import":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.mjs"},"require":{"types":"./dist/vite-plugin.d.ts","default":"./dist/vite-plugin.cjs"}},"./next":{"import":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.mjs"},"require":{"types":"./dist/next-plugin.d.ts","default":"./dist/next-plugin.cjs"}}},"sideEffects":false,"scripts":{"dev":"vite","build":"vite build","build:lib":"vite build --config vite.lib.config.js","build:types":"tsc --project tsconfig.build.json","build:publish":"npm run build:lib && npm run build:types","preview":"vite preview","test":"vitest","test:run":"vitest run","test:e2e":"playwright test","test:e2e:ui":"playwright test --ui","test:e2e:debug":"playwright test --debug","sandbox":"vite --port 3002 --config vite.sandbox.config.js","sandbox:demo":"echo 'Run in two terminals:\\n  Terminal 1: npm run sandbox (serves sandbox on port 3002)\\n  Terminal 2: npm run dev (serves main app on port 5173)\\nThen open: http://localhost:5173/examples/sandbox-next-demo.html'","type-check":"tsc --noEmit","prepublishOnly":"npm run test:run && npm run build:publish"},"dependencies":{"@ai-sdk/openai":"^3.0.28","@ai-sdk/react":"^3.0.87","@xterm/addon-fit":"^0.11.0","@xterm/xterm":"^6.0.0","acorn":"^8.15.0","acorn-jsx":"^5.3.2","ai":"^6.0.85","brotli":"^1.3.3","brotli-wasm":"^3.0.1","comlink":"^4.4.2","css-tree":"^3.1.0","just-bash":"^2.7.0","pako":"^2.1.0","resolve.exports":"^2.0.3","vite-plugin-top-level-await":"^1.6.0","vite-plugin-wasm":"^3.5.0","zod":"^4.3.6"},"devDependencies":{"@playwright/test":"^1.58.0","@types/css-tree":"^2.3.11","@types/node":"^25.0.10","@types/pako":"^2.0.4","dotenv":"^17.3.1","esbuild":"^0.27.2","jsdom":"^27.4.0","react-dom":"^19.2.4","typescript":"^5.9.3","vite":"^5.4.0","vitest":"^4.0.18"},"_id":"almostnode@0.2.14","gitHead":"c01e9186646c930986e092979e36f1bc11998dfb","_nodeVersion":"20.19.6","_npmVersion":"10.8.2","dist":{"integrity":"sha512-Sp+S0JYToYP2g5A6MoIZQpzDIuRrNiU13FLJ9kRbB7c6DqS/7sG3rDG8qqhsijbQDSZKp02Y2pH9tlnM+s8NIw==","shasum":"e16f0b44b1cfee2d19187437f877742699768f4d","tarball":"https://registry.npmjs.org/almostnode/-/almostnode-0.2.14.tgz","fileCount":283,"unpackedSize":16003376,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDL02mqBniwkaUwo6HYioR+tIjTH0NMMDyO5xNYEt0TEgIgEtTvF4nH7vqZIy7XwWL75F5OX3iEfiLboyN8Vcfx9us="}]},"_npmUser":{"name":"petrbrzek","email":"petrbrzek@gmail.com"},"directories":{},"maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/almostnode_0.2.14_1771107360269_0.2828361948232554"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-31T09:10:11.023Z","modified":"2026-02-14T22:16:00.729Z","0.1.0":"2026-01-31T09:10:11.296Z","0.2.0":"2026-01-31T12:02:52.473Z","0.2.1":"2026-01-31T12:09:30.056Z","0.2.2":"2026-01-31T12:16:48.082Z","0.2.3":"2026-01-31T13:12:50.056Z","0.2.4":"2026-01-31T13:24:13.552Z","0.2.5":"2026-02-01T18:37:58.508Z","0.2.6":"2026-02-02T14:16:01.913Z","0.2.7":"2026-02-05T19:58:35.066Z","0.2.8":"2026-02-07T11:45:01.828Z","0.2.9":"2026-02-08T17:11:27.566Z","0.2.10":"2026-02-09T14:41:14.280Z","0.2.11":"2026-02-09T20:23:21.013Z","0.2.12":"2026-02-12T12:24:55.619Z","0.2.13":"2026-02-12T18:37:03.494Z","0.2.14":"2026-02-14T22:16:00.618Z"},"bugs":{"url":"https://github.com/macaly/almostnode/issues"},"license":"MIT","homepage":"https://github.com/macaly/almostnode#readme","keywords":["node","browser","runtime","virtual-filesystem","sandbox","vite","nextjs","hmr","typescript"],"repository":{"type":"git","url":"git+https://github.com/macaly/almostnode.git"},"description":"Node.js in your browser. Just like that.","maintainers":[{"name":"petrbrzek","email":"petrbrzek@gmail.com"}],"readme":"# almostnode\n\n**Node.js in your browser. Just like that.**\n\nA lightweight, browser-native Node.js runtime environment. Run Node.js code, install npm packages, and develop with Vite or Next.js - all without a server.\n\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)\n[![TypeScript](https://img.shields.io/badge/TypeScript-5.0-blue.svg)](https://www.typescriptlang.org/)\n[![Node.js](https://img.shields.io/badge/Node.js-%3E%3D20-green.svg)](https://nodejs.org/)\n\nBuilt by the creators of [Macaly.com](https://macaly.com) — a tool that lets anyone build websites and web apps, even without coding experience. Think Claude Code for non-developers.\n\n> **Warning:** This project is experimental and may contain bugs. Use with caution in production environments.\n\n---\n\n## Features\n\n- **Virtual File System** - Full in-memory filesystem with Node.js-compatible API\n- **Node.js API Shims** - 40+ shimmed modules (`fs`, `path`, `http`, `events`, and more)\n- **npm Package Installation** - Install and run real npm packages in the browser with automatic bin stub creation\n- **Run Any CLI Tool** - npm packages with `bin` entries (vitest, eslint, tsc, etc.) work automatically\n- **Dev Servers** - Built-in Vite and Next.js development servers\n- **Hot Module Replacement** - React Refresh support for instant updates\n- **TypeScript Support** - First-class TypeScript/TSX transformation via esbuild-wasm\n- **Service Worker Architecture** - Intercepts requests for seamless dev experience\n- **Optional Web Worker Support** - Offload code execution to a Web Worker for improved UI responsiveness\n- **Secure by Default** - Cross-origin sandbox support for running untrusted code safely\n\n---\n\n## Requirements\n\n- **Node.js 20+** - Required for development and building\n- **Modern browser** - Chrome, Firefox, Safari, or Edge with ES2020+ support\n\n> **Note:** almostnode runs in the browser and emulates Node.js 20 APIs. The Node.js requirement is only for development tooling (Vite, Vitest, TypeScript).\n\n---\n\n## Quick Start\n\n### Installation\n\n```bash\nnpm install almostnode\n```\n\n### Basic Usage\n\n```typescript\nimport { createContainer } from 'almostnode';\n\n// Create a Node.js container in the browser\nconst container = createContainer();\n\n// Execute JavaScript code directly\nconst result = container.execute(`\n  const path = require('path');\n  const fs = require('fs');\n\n  // Use Node.js APIs in the browser!\n  fs.writeFileSync('/hello.txt', 'Hello from the browser!');\n  module.exports = fs.readFileSync('/hello.txt', 'utf8');\n`);\n\nconsole.log(result.exports); // \"Hello from the browser!\"\n```\n\n> **⚠️ Security Warning:** The example above runs code on the main thread with full access to your page. **Do not use `createContainer()` or `container.execute()` with untrusted code.** For untrusted code, use `createRuntime()` with a cross-origin sandbox - see [Sandbox Setup](#sandbox-setup).\n\n### Running Untrusted Code Securely\n\n```typescript\nimport { createRuntime, VirtualFS } from 'almostnode';\n\nconst vfs = new VirtualFS();\n\n// Create a secure runtime with cross-origin isolation\nconst runtime = await createRuntime(vfs, {\n  sandbox: 'https://your-sandbox.vercel.app', // Deploy with generateSandboxFiles()\n});\n\n// Now it's safe to run untrusted code\nconst result = await runtime.execute(untrustedCode);\n```\n\nSee [Sandbox Setup](#sandbox-setup) for deployment instructions.\n\n### Working with Virtual File System\n\n```typescript\nimport { createContainer } from 'almostnode';\n\nconst container = createContainer();\nconst { vfs } = container;\n\n// Pre-populate the virtual filesystem\nvfs.writeFileSync('/src/index.js', `\n  const data = require('./data.json');\n  console.log('Users:', data.users.length);\n  module.exports = data;\n`);\n\nvfs.writeFileSync('/src/data.json', JSON.stringify({\n  users: [{ name: 'Alice' }, { name: 'Bob' }]\n}));\n\n// Run from the virtual filesystem\nconst result = container.runFile('/src/index.js');\n```\n\n### With npm Packages\n\n```typescript\nimport { createContainer } from 'almostnode';\n\nconst container = createContainer();\n\n// Install a package\nawait container.npm.install('lodash');\n\n// Use it in your code\ncontainer.execute(`\n  const _ = require('lodash');\n  console.log(_.capitalize('hello world'));\n`);\n// Output: Hello world\n```\n\n### Running Shell Commands\n\n```typescript\nimport { createContainer } from 'almostnode';\n\nconst container = createContainer();\n\n// Write a package.json with scripts\ncontainer.vfs.writeFileSync('/package.json', JSON.stringify({\n  name: 'my-app',\n  scripts: {\n    build: 'echo Building...',\n    test: 'vitest run'\n  }\n}));\n\n// Run shell commands directly\nconst result = await container.run('npm run build');\nconsole.log(result.stdout); // \"Building...\"\n\nawait container.run('npm test');\nawait container.run('echo hello && echo world');\nawait container.run('ls /');\n```\n\nSupported npm commands: `npm run <script>`, `npm start`, `npm test`, `npm install`, `npm ls`.\nPre/post lifecycle scripts (`prebuild`, `postbuild`, etc.) run automatically.\n\n### Running CLI Tools\n\nAny npm package with a `bin` field works automatically after install — no configuration needed.\n\n```typescript\n// Install a package that includes a CLI tool\nawait container.npm.install('vitest');\n\n// Run it directly — bin stubs are created in /node_modules/.bin/\nconst result = await container.run('vitest run');\nconsole.log(result.stdout); // Test results\n```\n\nThis works because `npm install` reads each package's `bin` field and creates executable scripts in `/node_modules/.bin/`. The shell's PATH includes `/node_modules/.bin`, so tools like `vitest`, `eslint`, `tsc`, etc. resolve automatically.\n\n### Streaming Output & Long-Running Commands\n\nFor commands that run continuously (like watch mode), use streaming callbacks and abort signals:\n\n```typescript\nconst controller = new AbortController();\n\nawait container.run('vitest --watch', {\n  onStdout: (data) => console.log(data),\n  onStderr: (data) => console.error(data),\n  signal: controller.signal,\n});\n\n// Send input to the running process\ncontainer.sendInput('a'); // Press 'a' to re-run all tests\n\n// Stop the command\ncontroller.abort();\n```\n\n### With Next.js Dev Server\n\n```typescript\nimport { VirtualFS, NextDevServer, getServerBridge } from 'almostnode';\n\nconst vfs = new VirtualFS();\n\n// Create a Next.js page\nvfs.mkdirSync('/pages', { recursive: true });\nvfs.writeFileSync('/pages/index.jsx', `\n  import { useState } from 'react';\n\n  export default function Home() {\n    const [count, setCount] = useState(0);\n    return (\n      <div>\n        <h1>Count: {count}</h1>\n        <button onClick={() => setCount(c => c + 1)}>+</button>\n      </div>\n    );\n  }\n`);\n\n// Start the dev server\nconst server = new NextDevServer(vfs, { port: 3000 });\nconst bridge = getServerBridge();\nawait bridge.initServiceWorker();\nbridge.registerServer(server, 3000);\n\n// Access at: /__virtual__/3000/\n```\n\n---\n\n## Service Worker Setup\n\nalmostnode uses a Service Worker to intercept HTTP requests and route them to virtual dev servers (e.g., `ViteDevServer`, `NextDevServer`).\n\n> **Note:** The service worker is only needed if you're using dev servers with URL access (e.g., `/__virtual__/3000/`). If you're only executing code with `runtime.execute()`, you don't need the service worker.\n\n### Which Setup Do I Need?\n\n| Use Case | Setup Required |\n|----------|----------------|\n| Cross-origin sandbox (recommended for untrusted code) | `generateSandboxFiles()` - includes everything |\n| Same-origin with Vite | `almostnodePlugin` from `almostnode/vite` |\n| Same-origin with Next.js | `getServiceWorkerContent` from `almostnode/next` |\n| Same-origin with other frameworks | Manual copy to public directory |\n\n---\n\n### Option 1: Cross-Origin Sandbox (Recommended)\n\nWhen using `createRuntime()` with a cross-origin `sandbox` URL, the service worker must be deployed **with the sandbox**, not your main app.\n\nThe `generateSandboxFiles()` helper generates all required files:\n\n```typescript\nimport { generateSandboxFiles } from 'almostnode';\nimport fs from 'fs';\n\nconst files = generateSandboxFiles();\n\n// Creates: index.html, vercel.json, __sw__.js\nfs.mkdirSync('sandbox', { recursive: true });\nfor (const [filename, content] of Object.entries(files)) {\n  fs.writeFileSync(`sandbox/${filename}`, content);\n}\n\n// Deploy to a different origin:\n// cd sandbox && vercel --prod\n```\n\n**Generated files:**\n| File | Purpose |\n|------|---------|\n| `index.html` | Sandbox page that loads almostnode and registers the service worker |\n| `vercel.json` | CORS headers for cross-origin iframe embedding |\n| `__sw__.js` | Service worker for intercepting dev server requests |\n\nSee [Sandbox Setup](#sandbox-setup) for full deployment instructions.\n\n---\n\n### Option 2: Same-Origin with Vite\n\nFor trusted code using `dangerouslyAllowSameOrigin: true`:\n\n```typescript\n// vite.config.ts\nimport { defineConfig } from 'vite';\nimport { almostnodePlugin } from 'almostnode/vite';\n\nexport default defineConfig({\n  plugins: [almostnodePlugin()]\n});\n```\n\nThe plugin serves `/__sw__.js` automatically during development.\n\n**Custom path:**\n\n```typescript\n// vite.config.ts\nalmostnodePlugin({ swPath: '/custom/__sw__.js' })\n\n// Then in your app:\nawait bridge.initServiceWorker({ swUrl: '/custom/__sw__.js' });\n```\n\n---\n\n### Option 3: Same-Origin with Next.js\n\nFor trusted code using `dangerouslyAllowSameOrigin: true`:\n\n**App Router:**\n\n```typescript\n// app/__sw__.js/route.ts\nimport { getServiceWorkerContent } from 'almostnode/next';\n\nexport async function GET() {\n  return new Response(getServiceWorkerContent(), {\n    headers: {\n      'Content-Type': 'application/javascript',\n      'Cache-Control': 'no-cache',\n    },\n  });\n}\n```\n\n**Pages Router:**\n\n```typescript\n// pages/api/__sw__.ts\nimport { getServiceWorkerContent } from 'almostnode/next';\nimport type { NextApiRequest, NextApiResponse } from 'next';\n\nexport default function handler(req: NextApiRequest, res: NextApiResponse) {\n  res.setHeader('Content-Type', 'application/javascript');\n  res.setHeader('Cache-Control', 'no-cache');\n  res.send(getServiceWorkerContent());\n}\n```\n\n**Initialize with the correct path:**\n\n```typescript\n// App Router (file-based route)\nawait bridge.initServiceWorker({ swUrl: '/__sw__.js' });\n\n// Pages Router (API route)\nawait bridge.initServiceWorker({ swUrl: '/api/__sw__' });\n```\n\n**Available exports from `almostnode/next`:**\n\n| Export | Description |\n|--------|-------------|\n| `getServiceWorkerContent()` | Returns the service worker file content as a string |\n| `getServiceWorkerPath()` | Returns the absolute path to the service worker file |\n\n---\n\n### Option 4: Manual Setup (Other Frameworks)\n\nCopy the service worker to your public directory:\n\n```bash\ncp node_modules/almostnode/dist/__sw__.js ./public/\n```\n\nOr programmatically:\n\n```typescript\nimport { getServiceWorkerPath } from 'almostnode/next';\nimport fs from 'fs';\n\nfs.copyFileSync(getServiceWorkerPath(), './public/__sw__.js');\n```\n\n---\n\n## Comparison with WebContainers\n\n| Feature | almostnode | WebContainers |\n|---------|-----------|---------------|\n| **Bundle Size** | ~250KB gzipped | ~2MB |\n| **Startup Time** | Instant | 2-5 seconds |\n| **Execution Model** | Main thread or Web Worker (configurable) | Web Worker isolates |\n| **Shell** | `just-bash` (POSIX subset) | Full Linux kernel |\n| **Native Modules** | Stubs only | Full support |\n| **Networking** | Virtual ports | Real TCP/IP |\n| **Use Case** | Lightweight playgrounds, demos | Full development environments |\n\n### When to use almostnode\n\n- Building code playgrounds or tutorials\n- Creating interactive documentation\n- Prototyping without server setup\n- Educational tools\n- Lightweight sandboxed execution\n\n### Example: Code Playground\n\n```typescript\nimport { createContainer } from 'almostnode';\n\nfunction createPlayground() {\n  const container = createContainer();\n\n  return {\n    run: (code: string) => {\n      try {\n        const result = container.execute(code);\n        return { success: true, result: result.exports };\n      } catch (error) {\n        return { success: false, error: error.message };\n      }\n    },\n    reset: () => container.runtime.clearCache(),\n  };\n}\n\n// Usage\nconst playground = createPlayground();\nconst output = playground.run(`\n  const crypto = require('crypto');\n  module.exports = crypto.randomUUID();\n`);\nconsole.log(output); // { success: true, result: \"550e8400-e29b-...\" }\n```\n\n### When to use WebContainers\n\n- Full-fidelity Node.js development\n- Running native modules\n- Complex build pipelines\n- Production-like environments\n\n---\n\n## API Reference\n\n### `createContainer(options?)`\n\nCreates a new container with all components initialized.\n\n```typescript\ninterface ContainerOptions {\n  cwd?: string;           // Working directory (default: '/')\n  env?: Record<string, string>;  // Environment variables\n  onConsole?: (method: string, args: any[]) => void;  // Console hook\n}\n\nconst container = createContainer({\n  cwd: '/app',\n  env: { NODE_ENV: 'development' },\n  onConsole: (method, args) => console.log(`[${method}]`, ...args),\n});\n```\n\nReturns:\n- `container.vfs` - VirtualFS instance\n- `container.runtime` - Runtime instance\n- `container.npm` - PackageManager instance\n- `container.serverBridge` - ServerBridge instance\n- `container.run(command, options?)` - Run a shell command (returns `Promise<RunResult>`)\n- `container.sendInput(data)` - Send stdin data to the currently running process\n- `container.execute(code)` - Execute JavaScript code\n- `container.runFile(filename)` - Run a file from VirtualFS\n\n#### `container.run(command, options?)`\n\n```typescript\ninterface RunResult {\n  stdout: string;\n  stderr: string;\n  exitCode: number;\n}\n\ninterface RunOptions {\n  onStdout?: (data: string) => void;  // Stream stdout in real-time\n  onStderr?: (data: string) => void;  // Stream stderr in real-time\n  signal?: AbortSignal;                // Cancel the command\n}\n```\n\n#### `container.sendInput(data)`\n\nSends data to the stdin of the currently running process. Emits both `data` and `keypress` events for compatibility with readline-based tools (e.g., vitest watch mode).\n\n### VirtualFS\n\nNode.js-compatible filesystem API.\n\n```typescript\n// Synchronous operations\nvfs.writeFileSync(path, content);\nvfs.readFileSync(path, encoding?);\nvfs.mkdirSync(path, { recursive: true });\nvfs.readdirSync(path);\nvfs.statSync(path);\nvfs.unlinkSync(path);\nvfs.rmdirSync(path);\nvfs.existsSync(path);\nvfs.renameSync(oldPath, newPath);\n\n// Async operations\nawait vfs.readFile(path, encoding?);\nawait vfs.stat(path);\n\n// File watching\nvfs.watch(path, { recursive: true }, (event, filename) => {\n  console.log(`${event}: ${filename}`);\n});\n```\n\n### Runtime\n\nExecute JavaScript/TypeScript code.\n\n```typescript\n// Execute code string\nruntime.execute('console.log(\"Hello\")');\n\n// Run a file from VirtualFS\nruntime.runFile('/path/to/file.js');\n\n// Require a module\nconst module = runtime.require('/path/to/module.js');\n```\n\n### createRuntime (Async Runtime Factory)\n\nFor advanced use cases, use `createRuntime` to create a runtime with security options:\n\n```typescript\nimport { createRuntime, VirtualFS } from 'almostnode';\n\nconst vfs = new VirtualFS();\n\n// RECOMMENDED: Cross-origin sandbox (fully isolated)\nconst secureRuntime = await createRuntime(vfs, {\n  sandbox: 'https://your-sandbox.vercel.app',\n});\n\n// For demos/trusted code: Same-origin with explicit opt-in\nconst demoRuntime = await createRuntime(vfs, {\n  dangerouslyAllowSameOrigin: true,\n  useWorker: true,  // Optional: run in Web Worker\n  cwd: '/project',\n  env: { NODE_ENV: 'development' },\n});\n\n// Both modes use the same async API\nconst result = await secureRuntime.execute('module.exports = 1 + 1;');\nconsole.log(result.exports); // 2\n```\n\n#### Security Modes\n\n| Mode | Option | Security Level | Use Case |\n|------|--------|----------------|----------|\n| **Cross-origin sandbox** | `sandbox: 'https://...'` | Highest | Production, untrusted code |\n| **Same-origin Worker** | `dangerouslyAllowSameOrigin: true, useWorker: true` | Medium | Demos with trusted code |\n| **Same-origin main thread** | `dangerouslyAllowSameOrigin: true` | Lowest | Trusted code only |\n\n**Security by default:** `createRuntime()` throws an error if neither `sandbox` nor `dangerouslyAllowSameOrigin` is provided.\n\n---\n\n## Sandbox Setup\n\nFor running untrusted code securely, deploy a cross-origin sandbox. The key requirement is that the sandbox must be served from a **different origin** (different domain, subdomain, or port).\n\n### Quick Setup (Vercel)\n\n```typescript\nimport { generateSandboxFiles } from 'almostnode';\nimport fs from 'fs';\n\nconst files = generateSandboxFiles();\n// Generates: index.html, vercel.json, __sw__.js\n\nfs.mkdirSync('sandbox', { recursive: true });\nfor (const [filename, content] of Object.entries(files)) {\n  fs.writeFileSync(`sandbox/${filename}`, content);\n}\n\n// Deploy: cd sandbox && vercel --prod\n```\n\nThe generated files include:\n- `index.html` - Sandbox page with service worker registration\n- `vercel.json` - CORS headers for cross-origin iframe embedding\n- `__sw__.js` - Service worker for dev server URL access\n\n### Manual Setup (Any Platform)\n\nThe sandbox requires two things:\n\n#### 1. The sandbox HTML page\n\nCreate an `index.html` that loads almostnode and handles postMessage:\n\n```html\n<!DOCTYPE html>\n<html>\n<head><meta charset=\"UTF-8\"></head>\n<body>\n<script type=\"module\">\n  import { VirtualFS, Runtime } from 'https://unpkg.com/almostnode/dist/index.js';\n\n  let vfs = null;\n  let runtime = null;\n\n  window.addEventListener('message', async (event) => {\n    const { type, id, code, filename, vfsSnapshot, options, path, content } = event.data;\n\n    try {\n      switch (type) {\n        case 'init':\n          vfs = VirtualFS.fromSnapshot(vfsSnapshot);\n          runtime = new Runtime(vfs, {\n            cwd: options?.cwd,\n            env: options?.env,\n            onConsole: (method, args) => {\n              parent.postMessage({ type: 'console', consoleMethod: method, consoleArgs: args }, '*');\n            },\n          });\n          break;\n        case 'execute':\n          const result = runtime.execute(code, filename);\n          parent.postMessage({ type: 'result', id, result }, '*');\n          break;\n        case 'runFile':\n          const runResult = runtime.runFile(filename);\n          parent.postMessage({ type: 'result', id, result: runResult }, '*');\n          break;\n        case 'syncFile':\n          if (content === null) { try { vfs.unlinkSync(path); } catch {} }\n          else { vfs.writeFileSync(path, content); }\n          break;\n        case 'clearCache':\n          runtime?.clearCache();\n          break;\n      }\n    } catch (error) {\n      if (id) parent.postMessage({ type: 'error', id, error: error.message }, '*');\n    }\n  });\n\n  parent.postMessage({ type: 'ready' }, '*');\n</script>\n</body>\n</html>\n```\n\n#### 2. Required HTTP headers\n\nThe sandbox server must include these headers:\n\n```\nAccess-Control-Allow-Origin: *\nCross-Origin-Resource-Policy: cross-origin\n```\n\n**Example configurations:**\n\n<details>\n<summary>Nginx</summary>\n\n```nginx\nserver {\n    listen 3002;\n    root /path/to/sandbox;\n\n    location / {\n        add_header Access-Control-Allow-Origin *;\n        add_header Cross-Origin-Resource-Policy cross-origin;\n    }\n}\n```\n</details>\n\n<details>\n<summary>Apache (.htaccess)</summary>\n\n```apache\nHeader set Access-Control-Allow-Origin \"*\"\nHeader set Cross-Origin-Resource-Policy \"cross-origin\"\n```\n</details>\n\n<details>\n<summary>Express.js</summary>\n\n```javascript\napp.use((req, res, next) => {\n  res.setHeader('Access-Control-Allow-Origin', '*');\n  res.setHeader('Cross-Origin-Resource-Policy', 'cross-origin');\n  next();\n});\napp.use(express.static('sandbox'));\napp.listen(3002);\n```\n</details>\n\n<details>\n<summary>Python (http.server)</summary>\n\n```python\nfrom http.server import HTTPServer, SimpleHTTPRequestHandler\n\nclass CORSHandler(SimpleHTTPRequestHandler):\n    def end_headers(self):\n        self.send_header('Access-Control-Allow-Origin', '*')\n        self.send_header('Cross-Origin-Resource-Policy', 'cross-origin')\n        super().end_headers()\n\nHTTPServer(('', 3002), CORSHandler).serve_forever()\n```\n</details>\n\n### Use in your app\n\n```typescript\nconst runtime = await createRuntime(vfs, {\n  sandbox: 'https://sandbox.yourdomain.com',  // Must be different origin!\n});\n\n// Code runs in isolated cross-origin iframe\nconst result = await runtime.execute(untrustedCode);\n```\n\n### Local Development\n\nFor local testing, run the sandbox on a different port:\n\n```bash\n# Terminal 1: Main app on port 5173\nnpm run dev\n\n# Terminal 2: Sandbox on port 3002\nnpm run sandbox\n```\n\nThen use `sandbox: 'http://localhost:3002/sandbox/'` in your app.\n\n### What cross-origin sandbox protects\n\n| Threat | Status |\n|--------|--------|\n| Cookies | Blocked (different origin) |\n| localStorage | Blocked (different origin) |\n| IndexedDB | Blocked (different origin) |\n| DOM access | Blocked (cross-origin iframe) |\n\n**Note:** Network requests from the sandbox are still possible. Add CSP headers for additional protection.\n\n### PackageManager\n\nInstall npm packages.\n\n```typescript\n// Install a package\nawait npm.install('react');\nawait npm.install('lodash@4.17.21');\n\n// Install multiple packages\nawait npm.install(['react', 'react-dom']);\n```\n\n---\n\n## Supported Node.js APIs\n\n**967 compatibility tests** verify our Node.js API coverage.\n\n### Fully Shimmed Modules\n\n| Module | Tests | Coverage | Notes |\n|--------|-------|----------|-------|\n| `path` | 219 | High | POSIX paths (no Windows) |\n| `buffer` | 95 | High | All common operations |\n| `fs` | 76 | High | Sync + promises API |\n| `url` | 67 | High | WHATWG URL + legacy parser |\n| `util` | 77 | High | format, inspect, promisify |\n| `process` | 60 | High | env, cwd, hrtime, EventEmitter |\n| `events` | 50 | High | Full EventEmitter API |\n| `os` | 58 | High | Platform info (simulated) |\n| `crypto` | 57 | High | Hash, HMAC, random, sign/verify |\n| `querystring` | 52 | High | parse, stringify, escape |\n| `stream` | 44 | Medium | Readable, Writable, Transform |\n| `zlib` | 39 | High | gzip, deflate, brotli |\n| `tty` | 40 | High | ReadStream, WriteStream |\n| `perf_hooks` | 33 | High | Performance API |\n\n### Stubbed Modules\n\nThese modules export empty objects or no-op functions:\n- `net`, `tls`, `dns`, `dgram`\n- `cluster`, `worker_threads`\n- `vm`, `v8`, `inspector`\n- `async_hooks`\n\n---\n\n## Framework Support\n\n### Vite\n\n```typescript\nimport { VirtualFS, ViteDevServer, getServerBridge } from 'almostnode';\n\nconst vfs = new VirtualFS();\n\n// Create a React app\nvfs.writeFileSync('/index.html', `\n  <!DOCTYPE html>\n  <html>\n    <body>\n      <div id=\"root\"></div>\n      <script type=\"module\" src=\"/src/main.jsx\"></script>\n    </body>\n  </html>\n`);\n\nvfs.mkdirSync('/src', { recursive: true });\nvfs.writeFileSync('/src/main.jsx', `\n  import React from 'react';\n  import ReactDOM from 'react-dom/client';\n\n  function App() {\n    return <h1>Hello Vite!</h1>;\n  }\n\n  ReactDOM.createRoot(document.getElementById('root')).render(<App />);\n`);\n\n// Start Vite dev server\nconst server = new ViteDevServer(vfs, { port: 5173 });\n```\n\n### Next.js\n\nSupports both **Pages Router** and **App Router**:\n\n#### Pages Router\n\n```\n/pages\n  /index.jsx      → /\n  /about.jsx      → /about\n  /users/[id].jsx → /users/:id\n  /api/hello.js   → /api/hello\n```\n\n#### App Router\n\n```\n/app\n  /layout.jsx           → Root layout\n  /page.jsx             → /\n  /about/page.jsx       → /about\n  /users/[id]/page.jsx  → /users/:id\n```\n\n---\n\n## Hot Module Replacement (HMR)\n\nalmostnode includes built-in Hot Module Replacement support for instant updates during development. When you edit files, changes appear immediately in the preview without a full page reload.\n\n### How It Works\n\nHMR is automatically enabled when using `NextDevServer` or `ViteDevServer`. The system uses:\n\n1. **VirtualFS file watching** - Detects file changes via `vfs.watch()`\n2. **postMessage API** - Communicates updates between the main page and preview iframe\n3. **React Refresh** - Preserves React component state during updates\n\n```typescript\n// HMR works automatically - just edit files and save\nvfs.writeFileSync('/app/page.tsx', updatedContent);\n// The preview iframe will automatically refresh with the new content\n```\n\n### Setup Requirements\n\nFor security, the preview iframe should be sandboxed. HMR uses `postMessage` for communication, which works correctly with sandboxed iframes:\n\n```typescript\n// Create sandboxed iframe for security\nconst iframe = document.createElement('iframe');\niframe.src = '/__virtual__/3000/';\n// Sandbox restricts the iframe's capabilities - add only what you need\niframe.sandbox = 'allow-forms allow-scripts allow-same-origin allow-popups';\ncontainer.appendChild(iframe);\n\n// Register the iframe as HMR target after it loads\niframe.onload = () => {\n  if (iframe.contentWindow) {\n    devServer.setHMRTarget(iframe.contentWindow);\n  }\n};\n```\n\n**Recommended sandbox permissions:**\n- `allow-scripts` - Required for JavaScript execution\n- `allow-same-origin` - Allows the iframe to access cookies, localStorage, and IndexedDB (only add if your app needs these; omit for better isolation)\n- `allow-forms` - If your app uses forms\n- `allow-popups` - If your app opens new windows/tabs\n\n> **Note:** The service worker intercepts `/__virtual__/` requests at the origin level, not the iframe level. The `allow-same-origin` attribute does NOT affect service worker functionality. For maximum security isolation, consider using **cross-origin sandbox mode** (see below) which doesn't use `allow-same-origin`.\n\n### Manual HMR Triggering\n\nIf you need to manually trigger HMR updates (e.g., after programmatic file changes):\n\n```typescript\nfunction triggerHMR(path: string, iframe: HTMLIFrameElement): void {\n  if (iframe.contentWindow) {\n    iframe.contentWindow.postMessage({\n      type: 'update',\n      path,\n      timestamp: Date.now(),\n      channel: 'next-hmr', // Use 'vite-hmr' for Vite\n    }, '*');\n  }\n}\n\n// After writing a file\nvfs.writeFileSync('/app/page.tsx', newContent);\ntriggerHMR('/app/page.tsx', iframe);\n```\n\n### Supported File Types\n\n| File Type | HMR Behavior |\n|-----------|--------------|\n| `.jsx`, `.tsx` | React Refresh (preserves state) |\n| `.js`, `.ts` | Full module reload |\n| `.css` | Style injection (no reload) |\n| `.json` | Full page reload |\n\n---\n\n## Demos\n\nStart the dev server with `npm run dev` and open any demo at `http://localhost:5173`:\n\n| Demo | Path | Description |\n|------|------|-------------|\n| **Next.js** | `/examples/next-demo.html` | Pages & App Router, CSS modules, route groups, API routes, HMR |\n| **Vite** | `/examples/vite-demo.html` | Vite dev server with React and HMR |\n| **Vitest** | `/examples/vitest-demo.html` | Real vitest execution with xterm.js terminal and watch mode |\n| **Express** | `/examples/express-demo.html` | Express.js HTTP server running in the browser |\n| **Convex** | `/examples/demo-convex-app.html` | Real-time todo app with Convex cloud deployment |\n| **Vercel AI SDK** | `/examples/demo-vercel-ai-sdk.html` | Streaming AI chatbot with Next.js and OpenAI |\n| **Bash** | `/examples/bash-demo.html` | Interactive POSIX shell emulator |\n\n---\n\n## Development\n\n### Setup\n\n```bash\ngit clone https://github.com/macaly/almostnode.git\ncd almostnode\nnpm install\n```\n\n### Run Tests\n\n```bash\n# Unit tests\nnpm test\n\n# E2E tests (requires Playwright)\nnpm run test:e2e\n```\n\n### Development Server\n\n```bash\nnpm run dev\n```\n\nSee the [Demos](#demos) section for all available examples.\n\n---\n\n## Contributing\n\nContributions are welcome! Please:\n\n1. Fork the repository\n2. Create a feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n---\n\n## License\n\nMIT License - see [LICENSE](LICENSE) for details.\n\n---\n\n## Acknowledgments\n\n- [esbuild-wasm](https://github.com/evanw/esbuild) - Lightning-fast JavaScript/TypeScript transformation\n- [just-bash](https://github.com/user/just-bash) - POSIX shell in WebAssembly\n- [React Refresh](https://github.com/facebook/react/tree/main/packages/react-refresh) - Hot module replacement for React\n- [Comlink](https://github.com/GoogleChromeLabs/comlink) - Web Worker communication made simple\n\n---\n\n<p align=\"center\">\n  Built by the creators of <a href=\"https://macaly.com\">Macaly.com</a>\n</p>\n","readmeFilename":"README.md"}