{"_id":"@chudnyi/deno-vm","name":"@chudnyi/deno-vm","dist-tags":{"dev":"0.12.0","latest":"0.12.0"},"versions":{"0.12.0":{"name":"@chudnyi/deno-vm","version":"0.12.0","description":"A VM module that provides a secure runtime environment via Deno.","main":"./dist/cjs/index.js","types":"./dist/typings/index.d.ts","module":"./dist/esm/index.js","scripts":{"build":"npm run clean && rollup -c","watch":"npm run clean && rollup -cw","test":"jest","test:watch":"jest --watchAll","clean":"gulp clean","build:docs":"typedoc --out ./docs ./src"},"repository":{"type":"git","url":"git+https://github.com/casual-simulation/node-deno-vm.git"},"keywords":["vm","sandbox","jail","worker","web worker","deno"],"author":{"name":"Kallyn Gowdy","email":"kallyngowdy@gmail.com"},"license":"MIT","bugs":{"url":"https://github.com/casual-simulation/node-deno-vm/issues"},"homepage":"https://github.com/casual-simulation/node-deno-vm#readme","husky":{"hooks":{"pre-commit":"pretty-quick --staged"}},"devDependencies":{"@types/jest":"^26.0.5","@types/node":"^14.0.23","@types/ws":"^7.2.6","@types/base64-js":"1.2.5","husky":"^4.2.5","prettier":"^2.0.5","pretty-quick":"^2.0.1","jest":"^26.1.0","rollup":"^2.22.1","rollup-plugin-typescript2":"^0.27.1","rollup-watch":"^4.3.1","ts-jest":"^26.1.3","typescript":"^3.9.7","tslib":"2.0.0","gulp":"^4.0.0","del":"^3.0.0","typedoc":"^0.17.8","ps-list":"7.2.0"},"dependencies":{"ws":"^7.5.9","base64-js":"1.5.1"},"engines":{"node":">= 12"},"gitHead":"7fe2de1c4269c4de947be8fe6c4c1e61172adf08","_id":"@chudnyi/deno-vm@0.12.0","_nodeVersion":"21.7.3","_npmVersion":"9.5.1","dist":{"integrity":"sha512-d/t6TFn9fSnomneC/ZL6Q2l20xyi0S2WFrW2fBA4cXA50b4wL/s2LibZFEqLCa3XW4m8nd8VUK7soWjgoOKilw==","shasum":"6181100441415c85b2963893ea12f9424a438961","tarball":"https://registry.npmjs.org/@chudnyi/deno-vm/-/deno-vm-0.12.0.tgz","fileCount":40,"unpackedSize":374943,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBpUfgILUp3tahy3gvXmX/SGy/vAMvWgaL5XSpvNvy2aAiAvBv5go7AjvCruCey/z47ljK+50FFKizXcj1ppTaENmA=="}]},"_npmUser":{"name":"chudnyi","email":"dmitriy@chudnyi.com"},"directories":{},"maintainers":[{"name":"chudnyi","email":"dmitriy@chudnyi.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/deno-vm_0.12.0_1714056544906_0.46834121955854746"},"_hasShrinkwrap":false}},"time":{"created":"2024-04-25T14:49:04.780Z","0.12.0":"2024-04-25T14:49:05.084Z","modified":"2024-04-25T14:49:05.330Z"},"maintainers":[{"name":"chudnyi","email":"dmitriy@chudnyi.com"}],"description":"A VM module that provides a secure runtime environment via Deno.","homepage":"https://github.com/casual-simulation/node-deno-vm#readme","keywords":["vm","sandbox","jail","worker","web worker","deno"],"repository":{"type":"git","url":"git+https://github.com/casual-simulation/node-deno-vm.git"},"author":{"name":"Kallyn Gowdy","email":"kallyngowdy@gmail.com"},"bugs":{"url":"https://github.com/casual-simulation/node-deno-vm/issues"},"license":"MIT","readme":"# deno-vm\n\n[![GitHub Workflow Status](https://img.shields.io/github/workflow/status/casual-simulation/node-deno-vm/Continuous%20Integration)](https://github.com/casual-simulation/node-deno-vm/actions?query=workflow%3A%22Continuous+Integration%22) [![npm](https://img.shields.io/npm/v/deno-vm)](https://www.npmjs.com/package/deno-vm)\n\nA VM module for Node.js that utilizes the secure environment provided by Deno.\n\n[API Documentation](https://docs.casualsimulation.com/node-deno-vm/)\n\n## Features\n\n-   Secure out-of-process VM environment provided by [Deno](https://deno.land).\n-   Web Worker-like API\n-   Supports Windows, MacOS, and Linux.\n-   Tunable permissions (via Deno's permissions).\n-   Supports passing ArrayBuffer, TypedArray, Maps, Sets, Dates, RegExp, Errors, MessagePorts, and circular objects.\n\n## Installation\n\nNote that [Deno](https://deno.land/) needs to be installed and available on the PATH.\n\n```\nnpm install deno-vm\n```\n\n## Usage\n\n```typescript\nimport { DenoWorker } from 'deno-vm';\n\nconst script = `\n    self.onmessage = (e) => {\n        self.postMessage(e.data * 2);\n    };\n`;\n\nconst worker = new DenoWorker(script);\n\nworker.onmessage = (e) => {\n    console.log('Number: ' + e.data);\n};\n\nworker.postMessage(2);\n// Number: 4\n```\n\n## Dependencies\n\n**deno-vm** depends on the following packages:\n\n-   [`ws`](https://github.com/websockets/ws) - Used for interprocess communication between the Node.js process and Deno. Stopgap solution until Deno gets [IPC support](https://github.com/denoland/deno/issues/2585).\n-   [`base64-js`](https://github.com/beatgammit/base64-js) - Used to serialize/deserialize binary data into JSON.\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2020 Casual Simulation, Inc.\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","readmeFilename":"README.md"}