{"_id":"brs-emu","_rev":"44-e1dd3755d2e8579c0174bf49519de764","name":"brs-emu","dist-tags":{"latest":"0.10.22","dev":"0.11.8-dev","Dev":"0.10.13-dev"},"versions":{"0.9.1":{"name":"brs-emu","version":"0.9.1","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"git+https://github.com/lvcabral/brs-emu.git"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","jpeg-js":"^0.4.3","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.1.0","p-settle":"^2.1.0","path-parse":"^1.0.6","ts-loader":"^6.0.4","upng-js":"^2.1.0","url-parse":"^1.4.7","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.4","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"^1.17.0","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"3","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"gitHead":"d3cf5377c82a8d8ba0d36237fc81259c3f873179","bugs":{"url":"https://github.com/lvcabral/brs-emu/issues"},"_id":"brs-emu@0.9.1","_nodeVersion":"14.17.0","_npmVersion":"6.14.13","dist":{"integrity":"sha512-URogWk+gYejrQDxflBw/uyn3qYaFmHdI8NV6nlbEU/1481ctAcOAT/Iao5+7LHNNwyWnBkluBHqe8R5Thola9w==","shasum":"0201fa13e673d9dc447674d6d24d75da9c4aa363","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.9.1.tgz","fileCount":9,"unpackedSize":9303757,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJg3BfJCRA9TVsSAnZWagAAp+4P/3erR9Qj2of1Mo4D6qEw\ncZIE87hlCzwRf2uOCFE3EZujwx06wnafFnmjyL/upyEVHRcUHldS0vR/yYCr\nZwAf7Ydok1HMT7zVQvuJfidJBPHra0USnX6dfUBObSksVRxKt9oc5TegL/nN\noVgWx3TX23mx0RR02rn/fMTa5mWKKIMmkiaP7fctZkNEVjluAtc6kzlKj4ZV\n/6sGBnYUCbUShqurfde++rqnt2wK2HAAhK/K/ynFLhRbbCzkmEn735JWCLUc\nBRn6HQRTw6hvKLf+B5ZCd298op7jeXBcU1rVKtZhOXWvUxnVsD7Wo0xjAlt4\nRQFhQtHCBPKJjfQoc0nRf45saoZ+EaJ97potd3rb4RgoY7IjH74eQRKzzCdE\nOZIBtj5ZiMKtkLeF0lCez7Bud6PLSHfpGMT0l7TsyQDcgeKTMMXjAAlQ6aAW\niP1fGq87VNcxg54nxiXWHA3gQRtg1J90lS7O0gu2CMrXk3MfyNjmgShiEEO/\nFZNY8brMe17GMT0YynYlr2x63EsNjoX2lKg8YjgbzqUwjhMCdoUIpS2yuBl9\n2DTOPt7ExpcETcNoKdOquQhA0vOpkhIweBAXOSbePhaI6pYFymZHT8hmT3Fj\nrQCKttzkr8ulgc1SjzjQyGcY7Q5NyG1UfmwmABATxYdceRcKSHKtbbiMCg91\nH0SX\r\n=eHgS\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCLeqy9jb5Cw2xdfxrCiygBiHA8Y5XgHMe6gUy78Qx7zgIga50N91BIswpRurBooKnoRdej24gcpyIIYHAF+k58tJ8="}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.9.1_1625036744744_0.28344986886609624"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.0-dev":{"name":"brs-emu","version":"0.10.0-dev","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"git+https://github.com/lvcabral/brs-emu.git"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"babel-loader":"^8.3.0","bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.4","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readme":"# BRS-EMU: BrightScript 2D API Emulator\r\n\r\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\r\n\r\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\r\n\r\n## The Library\r\n\r\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by implementing the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \r\n\r\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\r\n\r\n<p align=\"center\">\r\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\r\n</p>\r\n\r\n## Technology and Compatibility\r\n\r\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \r\n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\r\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\r\n\r\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript 2D API Emulator** is a full client-side library, nothing is sent or processed in the server side.\r\n\r\n ## How to use it\r\n\r\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\r\n\r\n### Desktop Application\r\n\r\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\r\n\r\n\r\n### Installation\r\nThe **brs-emu** project is published as a `node` package, so use `npm`:\r\n\r\n```shell\r\n$ npm install brs-emu\r\n```\r\n\r\nor `yarn` if that's your preference:\r\n\r\n```shell\r\n$ yarn add brs-emu\r\n```\r\n\r\n### Documentation\r\n\r\n* [How add the Emulator to a Web Application](docs/integrating.md)\r\n* [BrightScript Emulator API](docs/emulator-api.md)\r\n\r\n## Contributing\r\n\r\nThere are many ways in which you can participate in the project, read documents below to know the details:\r\n\r\n* [How to contribute](docs/contributing.md)\r\n* [How to build from source](docs/build-from-source.md)\r\n\r\n### Note for BrightScript Developers\r\n\r\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\r\n\r\n## Games and Demos\r\n\r\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\r\n\r\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\r\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\r\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\r\n\r\n\r\n## Author Links\r\n\r\n- My website is [https://lvcabral.com](https://lvcabral.com)\r\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\r\n- My podcast is [PODebug Podcast](http://podebug.com)\r\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\r\n\r\n## License\r\n\r\nCopyright © Marcelo Lv Cabral. All rights reserved.\r\n\r\nLicensed under the [MIT](LICENSE) license.\r\n","readmeFilename":"README.md","gitHead":"1839785874db483f981054813e6a57e96ef3f937","bugs":{"url":"https://github.com/lvcabral/brs-emu/issues"},"_id":"brs-emu@0.10.0-dev","_nodeVersion":"14.17.0","_npmVersion":"6.14.18","dist":{"integrity":"sha512-IYxqCSlRkkNG2YWCBmR8vyEnVdFQBEHFgxC0R2txbJKKlWJTqMV9VT2gKBafM8udU8sCUzGfqAuW1dQs+CJ1CA==","shasum":"f5235d09a9810e05abcc3cab8412372131c5f343","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.0-dev.tgz","fileCount":9,"unpackedSize":787690,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQClQpes0tWqguj8PXkLWE6ZxveWsJgs/QDYaC0smfu79gIgA3nZkoXgv1ZyAxEJw1gaqlDs1pMvRugNIYapnPrhgzo="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2tuSACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo0UBAAiz60G/Nuyr0N8vwN/WNIiffOJKkXar6rDzDjKcymhQflDSZ7\r\nN6NjP4ZOUcZq/iJkzww8b3k/GyDPB9qjXrBTn4l0wGjNFeKjgNZw1S9mqBmH\r\nZxc7pDGcC05PH0op8cWEq9qLvEmmFmhROni2GLzn17LG3JOEbRZkQ29OCqAw\r\na1cM/KwLzPf0PCLjr6HHiKZPlqvZjqV4Z9RKSzahfrTh/j2V5R+r7rAfi+4U\r\ngY29uzjRfucibRyDMmnVyDd35jff6S6gjfiRQS224JSpL0AWipj+mHPMCyAz\r\n1UEVZhcLVR2+xU4H2aLYG+xeAH3agCa4iTYOihMt2kRzLPVmdBr6ftwBYZ4+\r\nbq0fU115yjBm5uYtMuxsRWYeNucqlQhTKMfFf3d47mzZXmtvvvWuxsosPtHl\r\nL2GmistKPR3g5mOgdSpSg2TM2VZcGvHDB5kPVfnXHLtcjO/PrKPmYQGFG0b3\r\nYNc/uos/SF0735mfQ9C3vtLE9mQ3x5xRyRtqyAdYYY1GMRPYdoOg5BEwIoRw\r\nBsAkXmgaJaPwFSmzTTop1S+pOK/d85qwloEv5zUmNoiEYxPqh4kunjX2vWvi\r\nc/dyqXAmt1WfmFxZd97lJmOZRkoQ8n8OlMBmR4CUZjrLQ9qWUTIRHeELvJ36\r\nvfQZRFolWF50fjG/JxnSW0c/qlDX0K/fcC8=\r\n=8kIf\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.0-dev_1675287441820_0.8948417089159997"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.1":{"name":"brs-emu","version":"0.10.1","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"git+https://github.com/lvcabral/brs-emu.git"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"babel-loader":"^8.3.0","bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.4","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readme":"# BRS-EMU: BrightScript 2D API Emulator\r\n\r\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\r\n\r\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\r\n\r\n## The Library\r\n\r\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by implementing the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \r\n\r\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\r\n\r\n<p align=\"center\">\r\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\r\n</p>\r\n\r\n## Technology and Compatibility\r\n\r\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \r\n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\r\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\r\n\r\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript 2D API Emulator** is a full client-side library, nothing is sent or processed in the server side.\r\n\r\n ## How to use it\r\n\r\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\r\n\r\n### Desktop Application\r\n\r\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\r\n\r\n\r\n### Installation\r\nThe **brs-emu** project is published as a `node` package, so use `npm`:\r\n\r\n```shell\r\n$ npm install brs-emu\r\n```\r\n\r\nor `yarn` if that's your preference:\r\n\r\n```shell\r\n$ yarn add brs-emu\r\n```\r\n\r\n### Documentation\r\n\r\n* [How add the Emulator to a Web Application](docs/integrating.md)\r\n* [BrightScript Emulator API](docs/emulator-api.md)\r\n\r\n## Contributing\r\n\r\nThere are many ways in which you can participate in the project, read documents below to know the details:\r\n\r\n* [How to contribute](docs/contributing.md)\r\n* [How to build from source](docs/build-from-source.md)\r\n\r\n### Note for BrightScript Developers\r\n\r\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\r\n\r\n## Games and Demos\r\n\r\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\r\n\r\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\r\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\r\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\r\n\r\n\r\n## Author Links\r\n\r\n- My website is [https://lvcabral.com](https://lvcabral.com)\r\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\r\n- My podcast is [PODebug Podcast](http://podebug.com)\r\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\r\n\r\n## License\r\n\r\nCopyright © Marcelo Lv Cabral. All rights reserved.\r\n\r\nLicensed under the [MIT](LICENSE) license.\r\n","readmeFilename":"README.md","gitHead":"9458ac281d591ae5b90530e1460bdcb8969696f3","bugs":{"url":"https://github.com/lvcabral/brs-emu/issues"},"_id":"brs-emu@0.10.1","_nodeVersion":"14.17.0","_npmVersion":"6.14.18","dist":{"integrity":"sha512-HgQWv5yC6oUv+cMcy7l1Z+xkqONqxFLwoQanYjUTyGhfp+cIDvjr9DbA5bpRpGVokZMIdAJZxD07GGlO1ebUcg==","shasum":"71dbd0a90bda5a9b0cabbe883691b9e9227b661e","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.1.tgz","fileCount":10,"unpackedSize":8903476,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDho6wyjgzAtuKUckaK12aR2NHFzPR4Gao+POqruY2+ZwIhAJI8Cp1cW7vCseg/cRblLKzkuzF8WDG97gE6k061H1Pn"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2t5uACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5TA/+MEGMDu6HWgG3lWp2hoi2rZwKP3I+ex5hn5j6qjj896kRU9T4\r\ntEZ0UlKSfnur/IQI9BQ+XSCxMyNCkue3QT6q4jOsgYhDx5y9rkzOPuyKFyYF\r\nqmoEVUeu4jE+nOAsqo6RllQ9ZdHPR89F2q41rT3GVxT06/+okBgeyvNCnC1F\r\nVA2Q7lfEmCAPc/Jj8wyKSn7B8L8+Kx7+Ai2UmdXkv/vJw9TcL0zMa1AbbaXX\r\n8xtndy+KPN9tv0CGGmnUAPcUqWHnkp0LIKMyHkw5w42ubhg2V6hi3rckRCON\r\n97zny4EDgTI1aLZgpkmPb1hjC8760f+pG/jXbXI3Gwx3PvNDuFWbbgVuVkir\r\nmLkWh/DQQRWXyIrV51/F7i8l5qwcCPb0XpKwYyszsnY1kAbXX78SxfWgsUTz\r\nkWnjAmdZVy/PGl3LE5KL8So4eR6IczEeBG86WL9wBdgyrCl5h6CzDAKuSIOm\r\napNoSBVxMaRII+piyFtWP5rI9syjFnzeJwc7qHoCHU3DdDNhmTDKwfjCt2+w\r\ne5nF2EX8YKY23BTmnvzRtRuFf41aoKc7uzlXEa4CH07vLXwq2LqEONHQZLcF\r\nhQSXvWTU/wSY0Q6lyL14I9yM5Do5hEwtBdCvlKyVmu0JmJOP4RVaEVKHZjmK\r\nltMBlB9JYlq8ZxqFqPn1rTBAY3fe3+0mMnQ=\r\n=IBwO\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.1_1675288174352_0.19623310201668565"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.2-dev":{"name":"brs-emu","version":"0.10.2-dev","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"git+https://github.com/lvcabral/brs-emu.git"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"babel-loader":"^8.3.0","bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.4","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readme":"# BRS-EMU: BrightScript Emulator\r\n\r\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\r\n\r\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\r\n\r\n## The Library\r\n\r\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \r\n\r\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\r\n\r\n<p align=\"center\">\r\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\r\n</p>\r\n\r\n## Technology and Compatibility\r\n\r\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \r\n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\r\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\r\n\r\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\r\n\r\n ## How to use it\r\n\r\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\r\n\r\n### Desktop Application\r\n\r\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\r\n\r\n\r\n### Installation\r\nThe **brs-emu** project is published as a `node` package, so use `npm`:\r\n\r\n```shell\r\n$ npm install brs-emu\r\n```\r\n\r\nor `yarn` if that's your preference:\r\n\r\n```shell\r\n$ yarn add brs-emu\r\n```\r\n\r\n### Documentation\r\n\r\n* [How add the Emulator to a Web Application](docs/integrating.md)\r\n* [BrightScript Emulator API](docs/emulator-api.md)\r\n\r\n## Contributing\r\n\r\nThere are many ways in which you can participate in the project, read documents below to know the details:\r\n\r\n* [How to contribute](docs/contributing.md)\r\n* [How to build from source](docs/build-from-source.md)\r\n\r\n### Note for BrightScript Developers\r\n\r\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\r\n\r\n## Games and Demos\r\n\r\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\r\n\r\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\r\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\r\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\r\n\r\n## Author Links\r\n\r\n- My website is [https://lvcabral.com](https://lvcabral.com)\r\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\r\n- My podcast is [PODebug Podcast](http://podebug.com)\r\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\r\n\r\n## License\r\n\r\nCopyright © Marcelo Lv Cabral. All rights reserved.\r\n\r\nLicensed under the [MIT](LICENSE) license.\r\n","readmeFilename":"README.md","gitHead":"f062353412ccc6ba137ac984f173f793f92e1395","bugs":{"url":"https://github.com/lvcabral/brs-emu/issues"},"_id":"brs-emu@0.10.2-dev","_nodeVersion":"14.17.0","_npmVersion":"6.14.18","dist":{"integrity":"sha512-qFmLhKZrVhggx6Ma1V9kJh7mfadNvQUXYw1XEGJS72H7hoFHgR6TOidt9+bCShQlb2ccJwNauWQiz1E/TKq6Ew==","shasum":"dc1014b2687b1c7ea396e5ec5f0b2ed411679a2a","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.2-dev.tgz","fileCount":10,"unpackedSize":8903369,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIH6y1svf0lNTnypJOawe8ZqFWCQe80LzMafKg1pvG8SyAiEAn1f063GwdXLjI5JULSmQ/BHw0kDU2TtIP32gmuP3feU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj2zumACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoLSRAAksM3HSSJY5FNYObSFYQb2Y5LCP9dDNkgjYOa7Rzr0u2gajTd\r\npHCHbDY1zdIlS6MP6jIPPCR8kP3LoflQRkicaraMJafnxSfKYsqN8JvYZ5j6\r\nHMFcVQ8oIvNNwyByiE2vu+HkodzF/b8jL4FCbYB8sNssrOYu2g8x3Tb6x/Bf\r\nDz37nCq3jc5oGtpn10pjn+3VYfk2qxgN/yaNjfFll9ylMExBt8Bl9V88NVOb\r\nNnWqLDmMJbfOf5fuSw5YoP8LXCk6EqXAp/49OQsmmub8P+cQKdQHKc0lBtXX\r\nA1898ME9nGrazVtl1Z8MU0aM5F52VLo/1Hw6HmaKS7MTMffTaHs7ygUyC0+o\r\n3NMTu4onJk6QwOJfMtOPiY+zBANSZyHGkOr8pKm2/836F/s6OFGrfDM4iCfi\r\nRYipyVLt3k48tL8bSley9L67wfEAG6f0WQ2nfrC9HDQej1qH5s3KEvEM65/H\r\n1ckq553zDC7IkhqUNnG2Am7c4dWcG/+EJoCWFzxUxoXo01St3UJBNYixyVP9\r\nrf0nyZKbSDQb77PBeAh9vtz0zRLk21sTEkJYztVhrXIlPOhJZLLRWsN7i++Q\r\njo+L0JUiqEKwaTgwPoIu4E/PufaZPvAS0EEOKAaNcZ+1AV4symsv6aAU9q41\r\nMTGBdymQo+Ljn8VBTyYd0ixPe3m2Vdsrj6k=\r\n=Sdgi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.2-dev_1675312038385_0.7563160397986974"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.3-dev":{"name":"brs-emu","version":"0.10.3-dev","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"babel-loader":"^8.3.0","bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.4","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2021, Marcelo Lv Cabral\nCopyright (c) 2018-2021, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.3-dev","dist":{"shasum":"f2f344ecccfcb9dc7248e783b1769acffd452329","integrity":"sha512-L7KOCb+aylufQwHRIzOIKSRibnAxX3VKEwY3+6Qz+Lv5vR6A8RF6PGHMj8UTQIs9S64fkFTCKccDSc511UhmzA==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.3-dev.tgz","fileCount":14,"unpackedSize":8985455,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIGUIO5063T/6/PduOMeaRJ7VhOWnaXdPRGvdg2wW+w1kAiBrTVaFZLjHcDmI4IPOw3goIXbaBSEmbkTB+qNlD7/A1g=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj30xeACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrlVhAAgGl+St+f8odAq9mES0TlU97I+qbboNbLm5Lt0QPz0ziTxWBl\r\naxVI/A0ZUcpo/vZm9Gwuia/HUWH1D9SYrFIMKyTMSOtjqxW98oVXeH7pLFxk\r\n/2nUw8uRxlYIm5J2JDyahgNW+bfX0kdwJPS/9zSer6NxRbtL+0XOrA74pXKL\r\nQun2+wywatLkpzKH3qRXC4BW3SB5K0mJVDYd33DWhQ/GUkNmtf1gcmWHsoas\r\n1y4/RhCV6DWx/ws3ciars+F4bzOiqS7t4RfhG8YyGQx7WYbItGteGrJdZf5C\r\nuoNBxlYrpJ8cSmWKW6pXk0ADhaupRBP90kLhAc6apyk+A0J5dwhVF1jgyDHF\r\njtmoEypIiRRL3GYtiIhRtehq4J2SjUfmVOseKDuiEkosGz4h4mr7U8U3huAh\r\nLNHgQz4XRYuFIXnPsqVJRF/oBuyoGy0FmTM+3zro5elIgs7vBEg1kqO5FghU\r\nRXqqS+RORQi45CXl7PN5ezZPsMLygszt2spA5ukb4/f6JyfIBNMG7vasMWuo\r\nsV50K7VO5sE63pWRzVhxFLGkYbJlvgmLJTCXLwfKRZ1rzAr7VRC8yqdd5x1I\r\nsy5xG+2Z0TwO/a9pYCIyJ+/MjlsJn+tsHvUKgoH+rBEEX6QQ7b/7BafI8xAk\r\nhiR/Ra1TimqUufFTzzIlUi1w2+i+zcc4tV8=\r\n=cQmq\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.3-dev_1675578461896_0.3829444842876668"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.4-dev":{"name":"brs-emu","version":"0.10.4-dev","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"babel-loader":"^8.3.0","bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.4","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.4-dev","dist":{"shasum":"3ec6cfbd37ae5d4c6e7a0c5a265c032c5470665b","integrity":"sha512-wk7aYoXQqQlvW+bXSyzy/j32+/4n+APNoKS8jlQ0fEjsIb1N3zOUDn8NLcFSq6xlVI+dPEMzfDQSYmIVvBhdlQ==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.4-dev.tgz","fileCount":14,"unpackedSize":9005780,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFt8gbt5jQ3PdZV8DMf0kUBTR4QjeaHptgGKKT9JAgKeAiEA/0eFvxmmpzXwA19xSbsGbqltyktwaXGO6YkMzWzwQDU="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4es0ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmrelw//TK7sb4FUIDjWnz5IeXpFkrqJ1kZ6XYQffqbWsFDWxOAeGCYs\r\npzYcWFSWxMpp1Sfw7Xm3VNtFogEIbSu/VvnnInCYUoQWnJyD2qpXaaQe+F5l\r\nLuIaMf3zqJgLhba8fNvI12kX98S0TyIzOD3cHm/zdu+tPIZN/Hs9JJ9VlSk4\r\nD+Grq1m/M23FTIvJML3Z/o0w0KFpmRaUIkHLkGO83pXb1rUOIIiXM2QfphDs\r\nv6mghqggi43wO277ekrE3lFVKW4HzHwkFQE2E8M5gn0159XTLfpCGGtANzjs\r\nm39MtjfLTqsS7ulQypxtPpe4nUjkICVuU+CKHw6pgGed+Y4OCVEB2foGigGA\r\n4ufAhfGXeiztyhGdgd9rBXTNh553Y8ULfI0GZ0ZJxlG09FKRqAqzf/DG15qB\r\nFvu7MWpQTcU+ap+3D+ftjKtep3DyKJW41/cNMfPRrdIH+LUN4tdBXyW0qxKq\r\nvhgUPq0aa9QvRV9dUIXzFP+7R8GcXT+xkn+jw/yN/jT4aRwxtIEwjXAsRW0/\r\n2a24KBWyKuhuknrjB+LrkqabyRriuV5Xa57V/FDBobZxtM5eAlMB8MlZu4Qn\r\n5zeGtscdPylfYCqP29bI46jNoYdZUB7QZrkFmAgvDPBDbpW2LFpM091u0vqP\r\n97LHyc49ELNKp52qeVaeJmkxk+wCGb58pmY=\r\n=q5S7\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.4-dev_1675750196548_0.1218627915141619"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.5-dev":{"name":"brs-emu","version":"0.10.5-dev","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"babel-loader":"^8.3.0","bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.4","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.5-dev","dist":{"shasum":"b8786257a383d6d0b6ed29afde19b20bf679df9f","integrity":"sha512-XpLd2tOSG3jyA5tZS7Gy/O9BeAL+Jiwpi3uwceg3NGEXdTQADbxCMRe7FgthxC4tTnZX5JO64omAhCy0/Wc50g==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.5-dev.tgz","fileCount":14,"unpackedSize":9018930,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIA1j0JEFv+kPffp+bmYEkzG7fF+0lmvJzDp9qL5AwDneAiBQSINAGRptsSzUKxVzBIdNa+dU4OyzYAom5uw4TICAgA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj4zK2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmouyA/9E64oWwVsD09dLYXQ1dChmw1s7dj4krGrF3VlC798p+HYgxIP\r\nvZHLvXYwfMZQ6Oxx0LwN7X7QujrK+mwikqzeITS0udGAnAHK2gp47u+gj7AK\r\nMXkcc9lkaBwktsN7DIkoMiKdOAsYY5MstPCOQwueBvXUfe3UeBrs8m2OSgzB\r\nfen4DjIadTuWWDHBUi+uqRaYGLk3TP6aGNGkkBg33492d3i1FfolgHnJcNO8\r\nGNnPcb10wUSAoGQgt7xiOx8WVZXwwrX0NS9AIicSZmiIsPqmY0vN4/yShmTM\r\nsm8eZ9Y91Xox6du+FqyRtjYI0VmRQBGmjyGNacY533Hblncz8Ui+JmVy4mlK\r\nmG1XVq74yyHr1KtO6dRHfziyJOKHEJY1uXs7RxbFVjOzqVtjjlTYZOWWb3Er\r\nMt1F5lp140UpCxaIpXRRPdzgzQq5M/EgbZd5UAXPzJNrsFPNC4xRDGLKjlOK\r\nnBNzo7KCqnD8D/ABhm3nAMFTcg/6ArtKjDMIHEGlQoIFUfbrXwKIVN5dzmBd\r\nuqXY+P7jKXhoDNd2pRyHagi+pFnw2L9pFZfletZsR2MN0DurpPQ+knAKo8Xb\r\n7R6hna5B5vNZnu/JuFxSlR9IP2qdoZgqn9K+ih0GaznzrKNWtP97C8QepZNp\r\nh1jNk77MUQKXtOnqunZbJKEoZguo/P9OY9c=\r\n=Y3Mk\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.5-dev_1675834037815_0.026493304853247412"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.6-dev":{"name":"brs-emu","version":"0.10.6-dev","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"babel-loader":"^8.3.0","bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.8","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.6-dev","dist":{"shasum":"52e7ae8903d0809eead1ede8034df9390c7a5d04","integrity":"sha512-gWtqFIvLxAve5vPXYb55fcg33RoYf5+VuHzdWY+D3OAfsiGW3TFuCJ5tFya5c4vlP5la8iwUv8wkXUMNbRZWhw==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.6-dev.tgz","fileCount":14,"unpackedSize":9059906,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCuElm/vjd0iooSzyGUiCKsAs4VUiZLfxV6a0JK4ieM8AIgcJEbLEeGIJF6QzQ08s7eC4G8cdN6yubNPIGBolNtBeg="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj6me3ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmoceg/+N3XhGp66ZZSmPBbtBEZxRK/bpykD9+GawVmdo4iAMQ9YFULq\r\nBV+GzYbsu5t74fuOEL+EjN58N6zCEeS+O3B6NQuI596Pz6DwhhWDouNJR2Cm\r\na86/o6Dh+xhoy0t9WNjWoPsTemlmqPfgAey3Bh8sdsZXWGlFrsDjTJ2CsJ3m\r\nt7vo3vNUB6CtzEfOt3bzpOYTWUBEsb5C5TuNP5lMjhlhpIZeDVGCxMxsTsf8\r\nxBuGpJj0i6cKL7ADSgOvqqy0AaJpyg80BeWRUjjm1XLjHWoZufgGvX3pc45Z\r\nrsAjfoU4YrbaNpvCQDWVE6l1lnnJlYj+DbQjzoFQBlN6LCqEzF/H4tbKwz9u\r\nkRzj18FbKZZHed/f5NJe6DEymbdRFO4wUNqx9GCtLZswsUGV0IQefTMZGXYk\r\nARbdZJlIi5dkQ/gcanpY6Mm+nO/KFqF0N3ji2B6yCeVrAUb6u+whmLXGGHx6\r\nrVECW77y/OSFxToCSXma5rKE5uwbTPxjoh1DA0G8mYC03Mmimompnyj9QFUS\r\nc+3KQG28cbYKMBaFsBcWd6VSCc8bjJ4Y6+XeTVeK/YFn5cE6fD3wisxAAvcN\r\nYNkKV2ycQTzcfqcji84MZJzJ945a7SCMi5oOosf4J/bJjl+nNlxdlzUdBKXh\r\njltxNGZRfDl4WeIbxyVMM/vuKuGNcWtbS7E=\r\n=rrhD\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.6-dev_1676306359388_0.3720624998689699"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.7-dev":{"name":"brs-emu","version":"0.10.7-dev","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"babel-loader":"^8.3.0","bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.3","@types/xml2js":"^0.4.8","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.7-dev","dist":{"shasum":"d04e2e1559626a60a41155f1671bbf5a7128d5e7","integrity":"sha512-3nO93mX2KWQr1VNW4RKQ1E5JGFp7mDMD/fc59atvDJYcoW+MI9iGj6ilZqJkYYEJtXqZI4WqiyoxRoc3xx2hbQ==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.7-dev.tgz","fileCount":14,"unpackedSize":9075307,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIBHZF/H0icqM9YsikG4XF0D1598M/nek6q+iWfcUW4jVAiBy8QbAzPIYgjE0VII8+SNfNzD6r45bVA+Xi6BNX2Ka4Q=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj7YFgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmqvfw/6A3ZUqQ6seBIJPV2GHMFKxtmojsQ38eHbqBB2orrVXCqN1+9z\r\nMbv8y3ian8fl9zLZx/bc+kjRf78T2UfTc43oxGF43jwKWn46yUm0bQylmaJO\r\nJPPJlP9NaAA2HnlFDtWUe0Gs9/8181iuvC/Sw30nAZo1yjVt6+AwUfDP61GY\r\nmB0to7a3MmcwsV1pZ3aU9Cls5YnTkJ+TATBv1Tj7JFfzXkYs1N1/HoSq4G8B\r\njuJN8hA9RdJ1IQTF74onxjP8Ph1TEZOODWOGUmTjxah6i0nGg7rg/ai6MXd/\r\ntDKd2L6TjNSb0NyQeS2/5zVxf8cWSYcRaLs42/j5TILGkPyoMm2XqOSgOTAM\r\np2taWNm+9zidm17dpNnZBPi41ESvhrE9x/ufJxHYJt/FWM3kLF9aUfk4h2XQ\r\neVZf03TNPj3yDq2vSs4rWL2oy8zei9OTf3jlO9FaolUp3n10QK60GfDkyea0\r\npXVduYTKC07pezc6IvOtQoj1EAbJPps5hvX0Ibz5CZXraK3AfuQ7VpQELb++\r\nGOBQi2P+YNvNWMEz5KYhlsTRioOgLPxzET+dl3sJiccOumGAMI78KnLZBwef\r\nQ6hpb4YEBQGADqAU4gW54J+YIBJkz5zyhOlnyWhN4zly3dUqF1lbmjKvmpks\r\nD2rpT8hCGbNpB3CgHSqjL4dev69MptlQVaE=\r\n=R7Lp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.7-dev_1676509536586_0.9311335368061888"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.8-dev":{"name":"brs-emu","version":"0.10.8-dev","description":"BrightScript Draw 2D API Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"./types/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","stats.js":"^0.17.0","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@babel/core":"^7.20.12","@babel/preset-env":"^7.20.2","@babel/preset-typescript":"^7.18.6","@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","babel-loader":"^8.3.0","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.8-dev","dist":{"shasum":"f16a7b06680b340aa928cbc96b7c205e12d7d199","integrity":"sha512-KUNr0OZNg87E6Ux/CdHIDumyTf6FLADzXteK1QE1MBKZWDFeYMzWj6AsiZVULvMpCVpw6ZKgOxxwgF2NweNd1Q==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.8-dev.tgz","fileCount":14,"unpackedSize":9979069,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIC/RdNUANNi8BeUtSWHZSRLfzdN8sTwJrM0epsc2H55YAiBfLkeHUBPFozaMVzf+J1sH6CthXY5vtDDn4/2kbki4Wg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj9DojACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo3eg//b5obu+hBygJuTZJTJKRVm2pe/23vDWcGNyn7d7I4y5uqpRf3\r\nbP1O1tA/fuag72pEhyp3Y+kBH4t92SreKxDbkatqXOh3PUPwJPBcjG2qWZc+\r\nEARlo865FeTUUnR2w7myePDq22HYiUxptBj4ddTFEOi4Vf0vJsic/L070yro\r\nd8a5uHVsQzlWEW9DRczgTuYYb+rsHWje/M9UlkPo8p/QrMPe32dtgS4Dtczh\r\nmLf8L4T6pEbZ2rSViX4iXcvN4f0RkCSPP5yB0wYlfWrvptp0HyAMty4M+Ok+\r\n92hhlI8UQvFqdIvgm83CyDoz5WV47Toy5ljHFGhvPc5H/igv1EbG4Wa9W14l\r\nBwjymvcICGKBE+kxQGRNGfVFlLJKqFQp+BiQZX+sxnDyi8jxnBkTdmrICW0U\r\nbomq2LKFjtoShQ3UIuAT4EPiWRfANgd36prXYna5Sv0IPSaONOrUzEV/qe0F\r\nAkk7PWTz6fRCu1AInvrIbsXWnVZc7dD4QPNoW4g4QLDPQ7AY04j5sDTFHXlq\r\nNl4vI/pVOBNOd/UxgZD+srqKcsahAzBRVGUCIYfWyfJKmvgT75LPFcDgGvHM\r\nMWMKGZ9taxAUs9E6MmFG0yTRymI/FrJ7bQpgx/9igjXkPI6P5SO+y/+4sCfJ\r\nD+j16DgNa572q9u8YycQxTwEDh3W6sJZXH0=\r\n=bfGi\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.8-dev_1676950050926_0.212990530211139"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.9-dev":{"name":"brs-emu","version":"0.10.9-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","typings":"types/src/api/device.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","sprintf-js":"^1.1.2","stats.js":"^0.17.0","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.9-dev","dist":{"shasum":"cea3514987cffc90f3c707d98d3185faf746363f","integrity":"sha512-ygSV088fNE/dw7c3osi6usv/eFHqQuCbLySH/zFVpKHidkZipIGOwh4CvdudNWICUI/X1mYjvs8HOhgOI7pkwQ==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.9-dev.tgz","fileCount":22,"unpackedSize":10095418,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICXPjUO+0Bn4OX88se00/6G9AhAJhXHkNckw9xofhZYZAiBU+H+/3mAXWesVpGeJQyh5btlKpwIbpnxsQfsWc+FVLA=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj/TjAACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq+zRAAlDCTVHXGBknGYKfTsG5J7NpTbd88B/fI9Jn27k6rjLUz5jkA\r\n8mn7balJZfG59aB1bB9dwlN7hOLcixFIEeZGBWKm712++NhBJJaTy8wn7oKv\r\nvQzusPBKTXDp/NIIu7+FC0q1ccT01bHVxvPlbiKyH6zjsa6w0LlK20tiQU73\r\nFsKRSTIO7YIH/26PBbscTbEYa2M9rOmctISk7jGZRvi6ViPbH9Nu3xJBA7/e\r\n7LqNTUL1wlZ6RIcrOYSP45fSkFJ4fXF1UDqZkQyAyGhGY5ekUoSF43OwufWY\r\nIdZZnS+vyjBoq2me6rq+rxj7ash3VM2X2k514pcXGbL8ZniHJGvQQFiPhTAN\r\nBp8tjahOUq2l4J7c0tSDTmQanyi7oE4tqhZHtt56O7qCQeQo5cmoMtrbBYE+\r\nKI6uKvcqxI67/JNTgxvT2tRRhs5HOfhXnKDQdZ7PuxXpivxqvBY2p3nA45vO\r\n5t+9RWSoxHLsYZXjZXBj3QrMUZc7v4CYgaYIa4rJWMe7IzszVzULN0ck8JIN\r\nPVRZX1OayfYoOmdM2gyjoLBzaUgOlN1oFfJqiiLwGcjXF/MR1BCyrcYVfmlZ\r\nUaUBMUVMX3L7malBZ+Ay5Hy8XWzdTmKD6OpiGwauEjDTeoGts/fiigG2pKgS\r\nX/Tl7UvRalaN6YvL6iLwLV6vSRENDhRc0U0=\r\n=TvAC\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.9-dev_1677539520677_0.44647896200332204"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.10-dev":{"name":"brs-emu","version":"0.10.10-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","sprintf-js":"^1.1.2","stats.js":"^0.17.0","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.10-dev","dist":{"shasum":"bf89c8b0b91a1daa639b454bf43906199968bf6b","integrity":"sha512-l5ocOoFgVdflj9T4bErtaxXuMXnCK57YMBf8dw54KPtVG00FlhAoqPWXowuVaQaC47m1M4I8YMwoJqxzzC5qPA==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.10-dev.tgz","fileCount":21,"unpackedSize":9679092,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICDxQBdWfOWIoS7wGMniou0MzyNslx4yFcczPJ/ppEnzAiBo6K6dWSjLpHOmNUoT/AiZuGbW44KKPFEqK6wn1Vnxsg=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj//JCACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrRSQ//fY6a80eYlRbKo9BccEo5/ZlDIRrkSYCVJdOhfP2vp+5Pbbyf\r\npiSAEqDbWF0rDo7/d4b+ftj7v1P+vcLWDj3jjOO6kCIF+BxiCXIzyQmQlCJd\r\nHQF5iTI53ZhByAsQ2oebbaz9s6Z7wVG/OqLr9R/V8J1jITgeJk13RkqsuydA\r\nKXglicCfIKVZmgoo5x2h9Xer9PZgCWfPz7IAXzLh66jyV4tDPJLMIXwY9psV\r\nz60PYPQQcqEyGsauW0peB8JLsGAUGNgSVKG8CxXlKo1Gw75JsxzwC5P+ggBs\r\n7tV9zA2yYcO6plDLObFtAPeBznDjiY7Tx67Eh6kJgR8EgBr7BPNM5nKvfqwi\r\npQ6N+5FJmyJjuqCgoyamudVFnWF/Ej1QssTy00OH1SZNzl7qkaav2wFrpYL4\r\nwaH/Jfk9Ii/mcKhBuzncPz4s/RinbXWsL8j/KBxMIdQIHoqntxpFjEn+pYNl\r\ntjXvOeSGV+/UM++9Zbw7sY2LyKb83Uhqa6sGFLprz6/c1FW9ByYV4uUbOnVT\r\nnFgTHO3avueCqUIC3iMjzxFsWVqp8ccQC9ZcmwxrbLkrYGKK1P3m4FQe764Y\r\ncPaZQ/52fo/uvWGe+eOy0kUGWcsd0NCcomV5SFgeUgTjq/Hzd3qngTCrVr0E\r\nDw94iTQmT7xTp8ftWVwQvdLGLw0TJe+M25I=\r\n=8x2K\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.10-dev_1677718082103_0.5427779257419221"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.11-dev":{"name":"brs-emu","version":"0.10.11-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","sprintf-js":"^1.1.2","stats.js":"^0.17.0","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.11-dev","dist":{"shasum":"006840820f5a9542f8f6bccb966226439f37b326","integrity":"sha512-Be3ZxAKd1D2flEBVMbtKsUl6OZNhfbBgf0tWLFkXKxDq+QKiTKlGDK7GUzOAjwixko6NSu8TC6HmZt/KKoniCQ==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.11-dev.tgz","fileCount":22,"unpackedSize":10095947,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEJobIY45zOUEdqT34rN5dWTHHNANjNIJ+FATpQ3mL06AiAMCYqnuvlC0XbGKdeB8ExSmN3NMY3IgdRoGUGt4jNAhw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJj//UXACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrC3A//bjEXdyluD+49nvEYSSar5Dm7815hpbyER0uTwB4YQSdF3rEb\r\npm5O4mCbHIMkEBbUMH8zL1fPICeR+7fuq6qvMPbUqAC5f8QfSPH0yMkwifam\r\nNtdZngUS0ebMaZrC38lj/moszqGF/sm0TkBocr0e1Vd8oagTkohT3rjooLXQ\r\nVTi6Xz1zH35IMYIoU//H2sAEU7SlHpWMjUwE5tYOJIYBFSsnLDu9NUn220GN\r\nDCyfUa15rlNIIBrWW9HudMBPle+SVrcIfOCismNyaigCTgteoQqizoOWGvGT\r\nQGq9h4R9wwraX8G3AznmTO7AQhkCeTztYZiABEhkY8YfFg62euLyMEWC+I/8\r\n/dfy/geegZKuU6mPhpT0VayCRZ5heSaDsk7cXPuh1ZZDLcbmueU8a2AEB7Bw\r\nyuULJ824QNwpnxD+7fqHaNjcPJQ9Yr8YH+fdmajW/1QWu/4ORCfhVKv8JKkA\r\nj/gkUIT3KdmQUyWrRVVaL5Y749skkvwrDNyACaqb0Kw2xK/3pYeYxbVqPPEA\r\naCz4RrXoOpqWC1AF45GxHcZQUOooo/D48jhmEXGL2yhXCnM1+Z/54b+a0/2P\r\n12wZdVkWxT3k4/EPfhTMJ0oXmWV26NVIxSQXuZLwIoLrANpL3rCp2is62nwU\r\nWSaeFw0R35SOx5OZZFBqA/Y98LKOXpHgSOg=\r\n=a2RJ\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.11-dev_1677718807060_0.31667769068575335"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.12-dev":{"name":"brs-emu","version":"0.10.12-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env.NODE_ENV=development","release":"webpack --env.NODE_ENV=production --env.production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"bowser":"^2.11.0","crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","p-settle":"^2.1.0","path-parse":"^1.0.6","sprintf-js":"^1.1.2","stats.js":"^0.17.0","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/css-font-loading-module":"^0.0.2","@types/howler":"^2.2.7","@types/lolex":"^2.1.3","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/p-settle":"^2.0.1","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","husky":">=1","jest":"26","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.2","prettier":"2","raw-loader":"^3.1.0","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^4.46.0","webpack-cli":"^3.3.12","webpack-obfuscator":"^0.18.8"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.12-dev","dist":{"shasum":"12e80871e13e12966fc6f280696cd7f5a4603a7a","integrity":"sha512-NhTlydj9A4UxSWkP03dG8YPURZGs6dfkKn/LHw6xSr4CXdATPwIstjIR2yrOKAhzhj9lEgKgLqwwhQNwnHH+fg==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.12-dev.tgz","fileCount":27,"unpackedSize":10262392,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCBAM/SGnzbPkKSDM943jmFml6mHQlayNV9iEcUcH75DAIhAIAYJljZVCIMNo5YrN6U2uNkmSF5ou+BbsvX7sLiUzt9"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAYZIACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeYA//dcEPox+7Z7V4BTzArtqE7eieoB3xH1AkFyGL2ywFotLrKfyz\r\nPZVN2ujeolfzTDobFSi5WZc2YcJ6kGNbaGwcu1sB0AkPbAjw+ErDVL7MZH9y\r\nBvt7g9JG16Ezjtf6kFxww7yCCED3I1qR0SL8HLIt5pk/sUG4iZvJncBrICNP\r\nezrvuMvhvhxCWBkh/J13mbTEYOKiCCZF97N38+xxPE83/RUKs7JSPWyhdgFC\r\n6zzFrRLVpNAiFOaoIH0Qv4GDzqfj+kVMgCdQN/k+iAuB7/Ut8VB8Ajln2tM4\r\nwJks9n2qq0NcJ3on8CUaxXRBBLhW8fUJwa0TAMk72JrIYv5MwlgWHPWUlZiU\r\nCFIXurPsuROk+9B0JfjTQVODw82+QoPmaFc+B/ssO0Y9zStP5BoVD1eKLmGq\r\nSNPyfB7xKuFaATX3Xx42A6lfVHM8k9/oaa8dzGFP10wkQeBUTBEiqTK28X8+\r\nXYMPv0T9cLNpbjRotQfnv9pMIK5odaD3HjTAuKFWNzhldS9VP6xPr+U/15aq\r\nqEFRBXOmUhvBd699hc1AH3FXBsMRDY02v8UjYFja3BDV6SOBNj18Sg5zojSX\r\nKDF9zK6ywv0f9GmxbukwcL+G9vJSQEiSN/tjBTQAfOuU2ZeOtqHmbL+rK3ge\r\nXJNDCqKke/v+BTqFV1ujEEhgH+4hcgNekWU=\r\n=CYAl\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.12-dev_1677821512609_0.9463811516489802"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.13-dev":{"name":"brs-emu","version":"0.10.13-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.13-dev","dist":{"shasum":"0468a3195f3dc6a866fc851dc83f35e419914aec","integrity":"sha512-CgkYC5LNw7j/8iPjkImhkIsofPm8/FixDZKTG630dgyDk84San30jQDR3Ma2Z0Dk4+WGQRvAZQsOfsfjKDUHBw==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.13-dev.tgz","fileCount":27,"unpackedSize":10590240,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIAJ3vlgZ154WmO3p5UbVL/x9ezLogNkx1ppx33sGV9pjAiEA1GbOH/JaUi64G/zoHNn+kbyAwmoYR6WaOPvikXtPu7A="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAnTfACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmq1Pg/9FmEooVN6cIWKqs8ug8grqfsCLUBGN4f5RhVnaNLP5PpNCR45\r\nqD+cEz3AalH3DX/ylzuRpkSBWD0ThDKFcZcQORrFS1RPYMkPdRXvdE6I/Vvn\r\nAYFG2n59CjW0kXrTaQoqC2IAyeDHEDiy6XSW5sd/CKS3qDfjqVLb8ezhVZ/4\r\nw75IDdD4PxZe3J8yCJ6BuafucuinI2195SaF7OiEvYGej36IR/OeBCMOJHez\r\nW/cZ/5lh55bGtDrx24KecQemQxUPwbQjpu8NsjJHrqlrQtH+ZFkfzMDusrQg\r\nddKgcCNg7aTBle1XofpCL8W3MyYtLoVXR+0tgD9rHaf/F05A7cNXzkzS8Dax\r\nvz9cuIIdbbyDm2v8i1uisHZL+8QGD4+tyjhOJUw7Z8Hz+bVm9PT97XVeonyP\r\nd5Y0U7a+CYbshfyEmm49aQMJm4fUE3EWCOd6/OGwvjnhZV9aYE7Z8yANHyqS\r\n4qrsLK6UwaaDJDmTf15DxJbSd4jn9wJlKPeuUpcLQ73uuCBtvoxyf7Y4ITO6\r\njD0dCRDa4NNzH8mqlEYxGgiveCd8kbE9uGz5/vevwhkyE7HPflRajru8ttta\r\nq1SHALTvksuWrRIXtarf9Ly8qXRFOUGRQ2Z7NvwFHOj33NFhqaqeqV480TQy\r\nPvEqsAyZvkdwqUxaTv+WjPipaTQyVvEO+Aw=\r\n=FUmo\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.13-dev_1677882591041_0.2672592886133862"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.14-dev":{"name":"brs-emu","version":"0.10.14-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.14-dev","dist":{"shasum":"7e4f0cfd82c13dd3c3027529845415b89a4431e3","integrity":"sha512-FUUmcZJVxh7OueI9slQrjiu35hE5JhJAbwOXRNmshdXfsOkOQv5lA7InG6W526vzfCKR8njq2nws+iOOdAH/6w==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.14-dev.tgz","fileCount":27,"unpackedSize":10590704,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQC153hodVPVvZ/0xiqtYEyF3+TBcSuEBWMtHH9h35giYAIhANBrvE31kHpSGC6sRTvzoygRuHMvHRwwN4uFeRnoDYjJ"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkAoT2ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrHfg/+J+o4m0zXWQQ7fJHjBGVqgFI2pofB3bht6UQSvPRik3osqaGX\r\nUd0KfU6OKPIR1WtBM94awKnpbiXt8nMRcoAORxIO22JXiUW6euAQ95v40B2X\r\nWO9P7s4SA+ishnqlGpjJhvX2g1aLRwxJbAxeJnzZDeSt5mn9NA7t1Q47hocN\r\nYZf/+oTWlsG5zX4QoWrxyKuDXhFZHarDKYK+6Tql85Dz54nhT3Ec+fxcZ58K\r\nmsBALudCZOH5GAb+s26R0LCGlkxao9zqlzFDdz0uPn27xiYujr4bOwZv1X68\r\nBRTdjV9ELee8Z1w8bbh/qrd9R+AL1B6CkVoFBoVksNDWJe0J9eXYcHBEsP5k\r\nQFhIZQ5L5jFHNTBIN9GZgTU6tZAeklWAmVuq4wtu8hgvlp15eYY8L8A0n4bO\r\n0AIeYwfrtEO6d4x8DcqV2i5QHhC9B0mxZ5g/l6G6j3E3ReddcbP4hbwY4CNk\r\nJpmfXKfqNI9mWZU2MMEYksfwm87yFZz5+2Yj++tjggRGnS3gJGPzjNnYYYv5\r\nu3Mu3AukNcvBzU6VvKaFVQw902N3G8Lbh1A+wCIkcr4nPoCGi7uwJ5CQxx2o\r\nI0W3v8ET3VuUfzgol80+Po+8kKpvyQmncwmbSqbtHuuSwMjVehRQJhcY8+Pm\r\nOMLwfNMUw1vad2Y0w23RrbBZwCg2YhkmfrA=\r\n=U/yp\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.14-dev_1677886710529_0.5498434364740858"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.15-dev":{"name":"brs-emu","version":"0.10.15-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.15-dev","dist":{"shasum":"eb4386ca9c52d446b644bd099f6906f8a313d112","integrity":"sha512-45m1Cx+NMPS8wq1Kzsoht0H1xivIdNnzJADuLYzSKPW1aGS8zBgxcJXaiVrhJ8tWfLHoof9zK5/baCwquxw8ww==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.15-dev.tgz","fileCount":27,"unpackedSize":10649430,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDB/zHCEuBprX3AN9q/l4Ae9FrcRtv3XqXGz3U8u+YyRAiEAx1QhkCr6eNJJQfJ1J8JW6BiPlJjB8b+ijcygB5TtHyc="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkBuM7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBEA/+P7RWlos09nSBsAF7W1lBBM/0OBZporSL4KLlSsb6p3Ri+ani\r\ncMmM0+rq3Pru7GG+hjKsGfmAdxHTz3JlRI+o5v9o+Md21STwf9U4sdVG2wXx\r\nq4bQUIAcq+9F05a1I/oSr8sEiKJwHbg/7ViaAvYPmHTpJ6LwlptIDVNJCJou\r\nyDYje6zW3auLVKihQsexDP8wgZCmEZp4TgQUJnh1PwVUQIwfEPoa8hpBMKW3\r\n0lmkiwSv1B8meYAx9vE6qnHcvwler9TJqRQAD3dWyLAZ/yySUsk3dCPq1Vfm\r\nC5V8GBKHbZe8er5gMz7EkpjCpFClbx8eCiGgVZ+lyy/W6KBtQmzI00xQXAlZ\r\noHPj6eQHcpJaiB8B2Nha0Vq2zBX96DaQeOK+6lxPg++KnOEYcU1HANSTVoD3\r\nDNSQQ5ucJW7CnHx4hmoXnFBKPZGSUdKtaLB5yAdemBncabxobnZYxfrHe6qn\r\nQ9bziB/1NaZRRNmvEYAO9nY5Nor3Rf1KBdDIdRQEbF1BBPQv7GgL54+8zt37\r\n+15JP48M9VuLYlFktpr89eNBjrh2ojrY4OTphGkB2YVFK7tgYod4lsbjNKqS\r\nsiiFNyvxrrIgqUWrqRr66QFJlqp92/htpVxlJZnZzb74buUMCUhurrBPGCQu\r\nIr1MFNLuinTxSIhakq5NEA6iwat0zx11vZ4=\r\n=Enjm\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.15-dev_1678172987564_0.06336839213912615"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.16-dev":{"name":"brs-emu","version":"0.10.16-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.16-dev","dist":{"shasum":"b53c8d048fd6fa41d9471f13ad25267246f2681e","integrity":"sha512-YSCp2RlPe+7nmdMSFfXHNQJIVvC2Xp2gQnJHHfx0PIJ/9Ei1Y5MZbWo8qPardFmC96c8FgNz6iM6ag9Q2QDAow==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.16-dev.tgz","fileCount":27,"unpackedSize":10696902,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIC7ekvpMT20BNeErTwCE+yktHE/HRcS+3vJUyyJpGLqyAiEAv1vyFIojpvtrLq33arGS4MMgpvuIoehtwEZIxbR8YiQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkC9ahACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqBGA//dW7GWxGxlWghbAMCB4xNnrW3SJj0YW1EcjFZJt+QFGNK47Ip\r\ncyE2pIwVeDt72jvAGD4kNWRfKcCOlvrUkARl+rckarV/gOff0xxL3e3tsfZs\r\nhP7omZJWizOqCcQ8hL1846A05HcBmCXEHBwSwUnI+9aSwFfmKQ45JJ+ZqwY3\r\nYj7vrGjp/8pLV0/2Cf1nWgwyFG6VIygQg9qr6A1VIC8p5FsfscuRhu0DITHZ\r\nXrQJ3CoUNomWGi80ZC6fi9kbKKImsdjiBCumb15Fu3B7Ieal7XyiJliwj7u5\r\nvSM6UqLWf3Axn1+D7UDow9cBFERVjbgdhSsuG4j0TvMFucLxJYFYhGIiuvOW\r\nEYDxZzQRJcURykkHPeDBvAcrEqKzK+BXhEMAG5IvHcIWHlFTHXeHpB1xV8bE\r\n83iBAtKKmcxvZLuKKhp7eJzrKB2L/9I+lDdvkd2TqVjM4d/nvqPNB1RsRK6B\r\nYDvFiSl5/fRYL2/9l2SXm0djiAuu59uuZzsWIrOUdC7K9g9oj6K57QT7IRpT\r\nQNXobK+IKHmTR7WsObmeJu51cYJ+KdRWpe+FVnaA9Mt1pzT6JgOuvt4F3Gdo\r\n5iY9igrZBeKSWpR7p/s3RIoW3nh7u3nsDmxvlkWKG6v+EgVOoSDkaHO89dAr\r\nzqNX/tkF9litgPz/lPSrn0ogcb0JGWaqGw8=\r\n=J6d2\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.16-dev_1678497440892_0.049084682355434506"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.17-dev":{"name":"brs-emu","version":"0.10.17-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.17-dev","dist":{"shasum":"9cf812c15bf4d5279568e24ad16c77805b3cfa1d","integrity":"sha512-bni+hB/cOw57m4cLv7GrmaoKJB0ato/sbqvIfPoVeyOrBEHn+mx4HztqgfGochvKVhQ0HQfvtQtArrAldLFgSQ==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.17-dev.tgz","fileCount":27,"unpackedSize":10692568,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDwX6ElrmOSPeD+EZuRHLjDfpc9GwSPS3Px/2dcmK9SHAiEA8X6/JP/IkN6ImYdCUOxQkU23kNvCUJXDOF0ZtN8iSOQ="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkDmJgACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmo+5A/7BTsiEQk0e7kdJ0xqsc+LD4SEt/iy58QCrtZB60dj3VJKzsNw\r\n9McTctfeGbTD1WkNkC4fula+qc6UBh+cmA/RSgqixHVEUI/uxLHAXDvOyJjF\r\nWbx5lW2SerXC5JYrPGenCO8HbpuVq6JMQKaCSfq4x+9aTC47K7sqWTHRZL//\r\nU/lXNZZ9VcOQ6mxiwh+2HGQT9womejYD0O24OWyDaLvLpSOagElEOUBiHbxu\r\nsSGJwzozzomP/Hv6rYyimPvekcAsBryV4zCkHGtszVip/bJxSht9xKQEulak\r\nWpK9FB15x7209SMuMM14/c/aIm0E/yGIgvTbNPbGPEQd88udF7TOgwScgzkb\r\n0H8vjy9AWfJKoBsMijfp2c6jaHwvV0V1+AIrDsUiFi3qbqFX8UlQNklTWA0O\r\n45ZBb2BQvMzFr+tkGLGAnzCgUCSw2E47CXSKlVGhF8OGFE9ZP75mnpd2KZaj\r\n/HGGcVvr9VQtEjK4PKVXIf/jblDSWvGIvc731txP4CZiZBVGAVT6oULw1HXQ\r\n94B9Fh3ZCkK9wGeszFZ5/vmNeoyz9qPq2Qb8Yz8mbhQOMYLM2ew5fajv6mOL\r\nd/ybEsfuiiNYbrHa2hnFLuLMTlsztMdWOA0HJ6w/Pu6Cwx5gm8AKbx6JsD+b\r\nONGnciyqLc+rQ9Z71zz0ugdqxvgLU1X0w4M=\r\n=99Pz\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.17-dev_1678664288516_0.49583408695226816"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.18-dev":{"name":"brs-emu","version":"0.10.18-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.18-dev","dist":{"shasum":"0de1f02e45c8c84364167f726fa958589f3b00e2","integrity":"sha512-AHVPpxnTtzes9iUPXw6ILMta18chIlLojGeCsSRtNse5vNuss3j5555Lrq6vb4/Wv0PhOtlxLXQ17Jg2YUKtig==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.18-dev.tgz","fileCount":27,"unpackedSize":10697804,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIBFiy4/LS+A0Vyo1wD9rZQ2Vgy5117NeZhKtid/hzlqkAiEA2U4qWz4JEph0CdW4EIjb9jHNuE23f3m73frHFPx6cSk="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEOkHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmqDkA/+LYY8/YBxw4sffzzM3uIxiC+hBe4N6d8nNbLHbzN2v6YbHOGN\r\nNawViseNkTUJ1DnM4/QP9y+FysHc6Ge2naKVDx2+i1yFnikAVKm1VgXs4zDR\r\nKYYUHTUhNDj6FAkPlO3VUh2u0jxQUEdv3Ugj15YU55G6Vk492gePWPOjGloq\r\n1qvN6cA6QgBJw7IP+ioO7m3516D4EAROMe6/IM6oDKJgWP2tHFLbTfFeQBaH\r\ntlSTb1NoYajyaSawyJudrOP3wlHAhUtP0YQatLg3yvjuH65DGcZ7/70L7WYL\r\nhJ6fUM3rEB8FKI1quCtMhKCcObKiAZqu/vy9G8sKhAvQeFr22ZQtWXm37qlY\r\nEicK/vqGwE8SK/EpRSS4V6BwGDwEP/8fPv9PdSCIZor5BDyLTtxSWohRovHO\r\naJLTU3OPiVfYT4hGyKqRwy1NBiIvFDaqatTNNPbg4wKwIjmblJx8fSVTdUR8\r\nEYIulBftJ5j9DFcvINYBlLH7rluk/Hq8muOX2WGZYEyrOfzZ1JELiCF7Gipo\r\njV0lcVgjL0RYzD7p+3JivfbNiUkZe0r7VG0T5j80n+cLERwTtj0sCKoPx26D\r\niVPMx/Is0wsAJ1gTrIQ8Ud3mQKipGHiyBxcK7O/2qRc33htucxdqbv6ZJVMZ\r\nSyXgD+22P5WAg8bJKFexASkwbe+JFq3MLLQ=\r\n=G0fF\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.18-dev_1678829831320_0.23378146989428794"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.19-dev":{"name":"brs-emu","version":"0.10.19-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.19-dev","dist":{"shasum":"d10033be9c6378b07ea6c10ea85c2241b3b2f70b","integrity":"sha512-FdfEHARFIXqGc9KwjcMUv4hmwt1C8lXBwfXHZgZcuaF7oUmGyVB4yfnpOVHnXAY1gPy3cXiqtA5fi0rlgrmHaA==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.19-dev.tgz","fileCount":27,"unpackedSize":10699147,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICdHtPN4k1P6YQO62ckzIDw18s5gyRmmWKPUiGbLFao3AiA7TTL8Ux4CT7Vsy+i/Korm4cvOlYDS1MJeZintGI826w=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkEs6hACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrjRA/+LgSyAojJ2U+pyPAFxOuFxYrPYMBYcaaFgmdZu6BTXy6Zzinz\r\nlMv6rLJ2Sl6Rgj3B/FeiczciOiyoaz+LIoLBbOF5LSGvigZYh+ckZn6gGUHm\r\nvHGfabj8Kh6yUFx1Hz21yRvrXjHanIZty/ScRqRRMbyfg1NUSlTS+ctBVBNS\r\nQj8YOZ4SLD48WIN37GRodUqlafji2MZVYL2byRN3ZLtaR9cvWn7D2ARjFeES\r\nOLeqHelawKCZVxlD2fqPa5TEmcMMDPcY9WhulhiWLDbxODmJhbetGMFfgofu\r\neMMmfNK/3vEsXtTO6L/hs9X8WojK0QUL65+Y1MpCgBmG/bVjJh8j4uTGEsV+\r\nNq5V1jdt2MXwfxeXl2LaRlOx8JznS2kg2y+AGuRGxwFUPH8xzbTqGSnx7Lyw\r\nVcH6uJ08qosMI+WxLV7bEg1b3q0ir3iyiRlodE76qzJz+2oqyca3CYloOipT\r\n7frxHmyrwLzS7F1RudOmA3nxYe2HU7FpfR4XaL0xkXADoHQH5cx3P0A3iXiQ\r\nJDch1OOgF20gX85jpPSEmYwe92v9WF5rx3EtwsACexSyGXvRxtAnUpApzMBZ\r\nrvKMAErQ+9EsWxD6A6C8pA854UAmDq5Pt2B7FOVUykCbyolfakTlXXZ1+Dzl\r\nWXwJXMvFJ59f62PTLyamxt2kqGg0ApN8LKk=\r\n=vOA1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.19-dev_1678954145180_0.8956234815423654"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.20-dev":{"name":"brs-emu","version":"0.10.20-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on Firefox or Chrome browsers and Electron applications.\n\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, by focusing on the implementation of the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) and several other **BrightScript** components allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku remote control. \n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS** user interface, see [Current Limitations](docs/limitations.md) page for full details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines implementation, because of that, at this moment, it can only be executed in [Firefox](https://firefox.com) (version 105 or higher) or [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/), [Edge](https://www.microsoft.com/en-us/edge). The emulator can also be embedded on an [Electron](https://electronjs.org/) application. The **BrightScript Emulator** is a full client-side library, nothing is sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to try the emulator, not installing or downloading anything, then simply go to the web application at: https://lvcabral.com/brs\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project, download and install the specific OS package from the [latest release](https://github.com/lvcabral/brs-emu/releases). For the app source and documentation check the [app repository](https://github.com/lvcabral/brs-emu-app). The desktop app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n\n### Installation\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n\n## Contributing\n\nThere are many ways in which you can participate in the project, read documents below to know the details:\n\n* [How to contribute](docs/contributing.md)\n* [How to build from source](docs/build-from-source.md)\n\n### Note for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. If your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.20-dev","dist":{"shasum":"49fb79ba61a936b00ea2c453e9cbd101dc71609d","integrity":"sha512-Mhdae8geB9FCl5U8mLsBlbF6XDtHKvs6nvWP3SzuponCle6P8lLkqXf3G2cFVolIhkWiHvmJdciSbZQZT2/Wng==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.20-dev.tgz","fileCount":27,"unpackedSize":10700427,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCypsxyv3epjRUUH3vyey2kZ8fY3sOKmRuigQOGHrqc5gIhAMrqlJ4gQoiLLmTxT4yxMHEp+qIvNqpd8knL9EZHzZrI"}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkFQSkACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpeEg//ZI7DHxqs3IzV8SQHU28UBOAT+MbEI/PvcImAzTWEq4o0Wrac\r\ntRpdv1cRPVVPC8Rtqtn/iTqU/bYaMi05HWRfQk8GRNBkNbBtIsj6QxCFHvei\r\neKoo+GVrpW8w9pfs83QsHJx0NFVTCh+4rwme8Ca770JTwR89iX/im3qnCb1V\r\nGVKDfNZa22RCzjIxbuVg4C232efhobKVtrNne4eZmnRSHnLfARQJIOoaEQy/\r\npA3Muq6GHPFHzjZ0DADr9ZV2GZJM4/ZHFwLQalBCN+UN0JTSwiq8SSj4iByC\r\nH4Z020Se/hA6zT4HKsvboSJfdpgcKKvU5tRSj7VpBX22/818g6SL/OmK3qMo\r\nMq0VHFc9ohMN1UOfAV2CmQQj6HSja4P9+alher7ylCzf1N7DjKqG3BRkzqZD\r\nqECUuu7Dzk7RxhIZVIAoOBbSA6/5PdJQ7l2AFpwocPylOOYd/uHXtD0ipGN8\r\nWeiY7cmrfidjURLmeeBQJKCfobn5D7VN8A/jBrkraha37ER0c8goggdfH7wt\r\n3pzsjV8BRXT7NDMX+3utSsegzpiGKqKMrFYReDfU8P9FtdK2in47o9oiYdWN\r\naEx9941IOJk4AD3Tb+PwdV7YSD+EFxO4ugHizrgbSzYsVONvmi3Eg8TQ2RNR\r\n0IDaXTIoaJ2uNbKj/0Z4sfjOtIL5gbQIP+Y=\r\n=6G4M\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.20-dev_1679099043816_0.005128067279974724"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.21":{"name":"brs-emu","version":"0.10.21","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.21","dist":{"shasum":"e86e2ed257ac8270cc5cd8d4fc389d2d7ad3988c","integrity":"sha512-uq3jhF++8hoPmimNTNrqfcruA+VtqsvbXxtLVDHj1ZRfgb9Gl2X6MD7SUgP96fXIMLFb2kqBP+K3QIlnNbGqhA==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.21.tgz","fileCount":27,"unpackedSize":10704171,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD0An/DjcR4+FQT4Q0v/LkyjYHGKbTZnWJr3SSWe8NqIAIgPieLzVC+Ru61DXdMaLoQqMU0ZbFRERMvG4eeDWevCIM="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJkGXKsACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmotcw//d/9RuK5RGdGJO+IGlSfXTPKGmYW9W4FoEv7XCkGMuFR9vBjX\r\nR0nw117FMldhBdz6oyxNwXEizq9uwg2JQEFm4d1NjmDYIn1PcnqbjEeAsdUT\r\nk45etRcED1cIxG1dFjVWH7ZDSoGEVWhvGKg6JmRY5jHR9bSVMxte7x5/oly2\r\nKdm4efeJEQir24L79EiqbdcXlauOUGlXuO0X7RH1aIOFnMyCNykBSDdnFU5K\r\nCkLiCwicU6i4jp6ULdtu5Eqnzl/Up7iHvpLee1EqBrHP/s3ARnw4T5ek675V\r\nM4C/M5xwKeYPEvafkVTjjIR6vtCjlXo/nJN2rXPtkkvryHLyzd7f76DeQzmW\r\nV+yw45D9KPQrjgJl9ik2158XkQlLoUV7kiPTcsJt3oskF40G+397boJYk6a4\r\nuRTiib5krW6pZ1r0HEis65wdxQlooW+eaUroiQ+WiwZdmnHXVXyoBfILNb6d\r\nHlAcO+N58rHmTCw7pXxAtGa5IK+SLkCeo0Zy/z8JHN20esx3NTSFlsARvmsg\r\nNJD/vvHhjXqAlB4LukMUrWVsUDr18YNsCQ+hxpMuJfRKrCTnqAHpommK5kfF\r\nYuvLIBJ8gk2Q+N1hrTXOfY8QI4cwWzIrRqhzZTxQ/d9KJFUlZk3ViX2AB+1q\r\nQYGZF86shV2VJ1cy1rh5mNQigI0TXpVIT3c=\r\n=B8wH\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.21_1679389356328_0.9371407766141244"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.22":{"name":"brs-emu","version":"0.10.22","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build lint prettier"},"dependencies":{"crc":"^3.8.0","decode-bmp":"^0.1.0","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","linked-list-typescript":"^1.0.15","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.4.23"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.22","dist":{"shasum":"ab500e2925433445ee80990e35acf32b80158d99","integrity":"sha512-hn+bVrOLA2k4/mMbO39StmrL8aQTybjd4kkopuMqypCS+Ga8DxgfojoXVHUUxoewEEuQJXJMuIA7dxvdxZ8nNQ==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.22.tgz","fileCount":27,"unpackedSize":10693771,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICp0p9tjHNb5kvYv/h2GCgtfv6iPItfv9Gzk9h3YldPJAiBKYu4DLnNPibji0hTruxijzUNy5UGtqWlWjHBc0nniKg=="}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.22_1683568063719_0.5314278818968801"},"_hasShrinkwrap":false,"deprecated":"This project has been renamed. Install using brs-engine instead."},"0.10.23":{"name":"brs-emu","version":"0.10.23","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build release lint prettier"},"dependencies":{"@msgpack/msgpack":"^2.8.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs4EFN2zkGnUPpC_jM5q9lOv48OWw73SRzoEiqBTjMAwA1j5B4lHJIEnt7v7wG6rbe_xFtOByeXbT3ddKuRA_9zOmIhmx3IpozpRxTXZixCFrHZlpFOzA1Wtba2-TtKbP5RPCZ3gD_GhZBzMlcM8AjeEqrLGmW7SL4wD26hJoq74g4lwGlaRad7DHU34538av8EyQVSoFX5UhC57h6H8CMgXZTKLJxYnFAZdTPhBuPedJ_x8FoTI4pV-6_sL1WixNNXyNeRXrcHoDTg5dGfeXwU9q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n  - Calculate Easter Day - [Shared Link](https://brsfiddle.net/?code=XQAAAALnAwAAAAAAAABJKohmo_vGH6VeHhw0NA0u7jXQ5mXP9ZN1AWzM0PiRufiEJMb9enJ8-Fi-wVFZGTTpu3PmzKvDZVFq33L_93AZJPhIg6IOwt6LAoZfALbNSD-9F190OkUH5EOYSUHSLXWBpulCV_k83PxQO6WlKqWoMVq5LeUSoPEVV5OpcJLcDiu7O8XjE5KBBMmZgntg8nO44vkyJQNo_zE-k5zryxMYeZGHR71offjEvE3WrtKHLa55DMCeTrUqFoYZgd5t7DsddJ7Rl4ATmDgvrAOU7nY8nDjdrk1b7gccF1Hl_cgfXs1pjWGLzhGdoKrJ-UiokpUZ_p49EZy3-UQbqZ0IhBMNoHViYZJ4sVgZ0rZlexmlSB4zcmcpuHfc3cMRmUrGjr9zTg_Ulbh-OMcf5-DgHQqln58pmHCcCbIefiBntMjwIYn5yckUrS9RCRha1ZxuIYppHGpoj_2ilx1_zC9gs7kqwjCdk4QGJflduepky0fEvBQYvEHsjTHhNIBTRDiiqudQT8-62CokSMQqR1Zt5c-MUM1oFX8vdWennNziWnWoomzuMwQCAER5KYJZhOTKoBzuEM63KwqnZcBLsQoeoSs7tV5kcIXwhBGvUdDKESlfcqa-CwNBpAvENrUp7BBrrQOr6sKOnRUVL44Q4DEZzN_0_9sVDr25lTavElT57Xh2wRpiEsbmuoe66rKJ3cFP4OKVgMLUtPSkayntYNWPZg89PvidJpqOxTIQWf_nfRxV)\n  - Download Image and Sound - [Shared Link](https://brsfiddle.net/?code=XQAAAAJqCQAAAAAAAABJKoMnQ-exSUWPG3fpxfwVM0I3_ROH-bzVbB7Jp09rkgEHk97O65LMrkY-ClFix02OAL9aQHdA6uHMp6VomRlb0EzSG23ee59pGlwA2DbEVNpCpCimia_7ffBTl-0p010UxxlLTCoMZ9xkzc-ZK8hxFih-i3P-nRWSdi82_7NwrrNelSDuJOdHfV28SNUbhHOULHLQ7f1EwhvrFr_vgpoksK6d-YKwnX6XWlNIlZrwulg0tclDcoxtRQawghOcZ3oTzmLTy0FuSIagck0NdcmdD-GAqqynbbR7Pb0jhFa4IK7RBM2lcVTjoH69laKA_CBKux6zj3VYBGAnz2lXtkI6dRfT_1XRSN7zkxNIJke8HWFZbyM1uc8s_kq7oPdwYBpvtkEfdHc96hiWZQMRpbdNRFa0Bx_1Jy5k-krINqCIe9489ZrPaend2fS191EBMIaCrzqcBrkNULQET0GcYBPJ5rhnr0sFT_knv4sPfD2HlYLc5h8xOBTxNgR8ex5COmRiI0xnHEgZmWP6fWSktG-gWH9Fk3nYb5xxt8VDvQuAOoeFsyxfucaRl5R2t5jRGN5dX8ECIa3T-Z_M_RIRXr8fWvUmdIwftjlkRYYJw-Imqc0phOMyLJnDIZGEodUavAvT5L7GaI4Qn_hFmxxyHaeMZw2HnDZPshIWfjSxzkcfuJyzx-X8ZeBcEq3ppDLCWkGml-GOSUDbVRd-LvDmSOVEa652DRrwpYskvsXvVxOxo_nbMyJlCyuYdTM0tU0DIXSd6frNSLciud6YrGX0b0JcbLs-c7Fy_flud8htvUNKD4ugdOqZJTxUHi8cjV6nD9aT3v5yj_C99p4r5H-UhK7qrRii9mbQbhHkEMNi4Zb4DIfntBK8p2GIIeaP--Mvo02v8o6ZBj9CbyOM-jpv1SfhZ8tyfXcw_3KoT_VgbuDseShlzToWgbkyBa-SzJFklEZPGteuysyFRSPnmgfFOKTZTpY92mxcQ9C8TZXt6Gbwj79AbplH6d0wKPl_uQiGmXVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.10.23","dist":{"shasum":"3457d4f724ae90017e7be127104a322dc683c04b","integrity":"sha512-G+F9G2ur8or0wkA9sqYBjrBrPM2bMCkM+Suz7NJ0wGmzhCPjLK/mVN1BndZS2p7AaQnmpahe2l0fxnbcR2jgWw==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.10.23.tgz","fileCount":27,"unpackedSize":12806286,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCAk3g8Z4nvuAwYmYwlGWnOP0Ps6qLSJ8CYPWyk/Jg22gIgQhalkIM4s2I0TU/wyFe2nb5L9U0T+JE07f4f8muE1T4="}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.10.23_1698800010281_0.8706466290529886"},"_hasShrinkwrap":false,"deprecated":"deprecated dev version"},"0.11.0":{"name":"brs-emu","version":"0.11.0","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean build release lint prettier"},"dependencies":{"@msgpack/msgpack":"^2.8.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs4EFN2zkGnUPpC_jM5q9lOv48OWw73SRzoEiqBTjMAwA1j5B4lHJIEnt7v7wG6rbe_xFtOByeXbT3ddKuRA_9zOmIhmx3IpozpRxTXZixCFrHZlpFOzA1Wtba2-TtKbP5RPCZ3gD_GhZBzMlcM8AjeEqrLGmW7SL4wD26hJoq74g4lwGlaRad7DHU34538av8EyQVSoFX5UhC57h6H8CMgXZTKLJxYnFAZdTPhBuPedJ_x8FoTI4pV-6_sL1WixNNXyNeRXrcHoDTg5dGfeXwU9q4WkD2JwCOZ6A99YEh8qjkM6eGPT9d5U6qohbLL7OGEsJ4CQ6zn6yqG_71hqdWPJvqV6qTKEaD1iusxDbv_W-EYAA)\n  - Bouncing Square - [Shared Link](https://brsfiddle.net/?code=XQAAAAIrEQAAAAAAAABJKocnAkqZmqFJVufERpQkf9KVk93fxmIRqnWDhwpkoNWGesOdd0NfqUQINBpHgpEwFE0OR1eAH7wa_jMdErSC0Ef6rWNCKA7QM7K-tYEah5tFpMmXnJglupGQccD85M9hTEo7RtutiOH7nQx0jpOyrhcPrtHzQA4-biFDUWkOLewpwh3KVNGdkIWlskO5MNh1rrex5e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R2t5jRGN5dX8ECIa3T-Z_M_RIRXr8fWvUmdIwftjlkRYYJw-Imqc0phOMyLJnDIZGEodUavAvT5L7GaI4Qn_hFmxxyHaeMZw2HnDZPshIWfjSxzkcfuJyzx-X8ZeBcEq3ppDLCWkGml-GOSUDbVRd-LvDmSOVEa652DRrwpYskvsXvVxOxo_nbMyJlCyuYdTM0tU0DIXSd6frNSLciud6YrGX0b0JcbLs-c7Fy_flud8htvUNKD4ugdOqZJTxUHi8cjV6nD9aT3v5yj_C99p4r5H-UhK7qrRii9mbQbhHkEMNi4Zb4DIfntBK8p2GIIeaP--Mvo02v8o6ZBj9CbyOM-jpv1SfhZ8tyfXcw_3KoT_VgbuDseShlzToWgbkyBa-SzJFklEZPGteuysyFRSPnmgfFOKTZTpY92mxcQ9C8TZXt6Gbwj79AbplH6d0wKPl_uQiGmXVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.11.0","dist":{"shasum":"0106387c7238c8662af9632a9a4699bb00b6daf0","integrity":"sha512-lwq7dSKEz7efMlBtZq71pc+XgHus7npbnRRvaxMro2NYVjZxz4njyKUq9Ga7IkkRI6OSvATDIwwzQqccX3+Y1A==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.11.0.tgz","fileCount":29,"unpackedSize":16182069,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDYrLOYJiH9X2Jl1gM2xoYpWIKKe1ncjbwKbNVADFkHewIhANqmd6kpjQ9kANeNyCV56ajx8fy157GxhOe0RgQABHCU"}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.11.0_1698804639582_0.17388248514496984"},"_hasShrinkwrap":false,"deprecated":"Deprecated dev version"},"0.11.1":{"name":"brs-emu","version":"0.11.1","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean lint prettier build release"},"dependencies":{"@msgpack/msgpack":"^2.8.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs4EFN2zkGnUPpC_jM5q9lOv48OWw73SRzoEiqBTjMAwA1j5B4lHJIEnt7v7wG6rbe_xFtOByeXbT3ddKuRA_9zOmIhmx3IpozpRxTXZixCFrHZlpFOzA1Wtba2-TtKbP5RPCZ3gD_GhZBzMlcM8AjeEqrLGmW7SL4wD26hJoq74g4lwGlaRad7DHU34538av8EyQVSoFX5UhC57h6H8CMgXZTKLJxYnFAZdTPhBuPedJ_x8FoTI4pV-6_sL1WixNNXyNeRXrcHoDTg5dGfeXwU9q4WkD2JwCOZ6A99YEh8qjkM6eGPT9d5U6qohbLL7OGEsJ4CQ6zn6yqG_71hqdWPJvqV6qTKEaD1iusxDbv_W-EYAA)\n  - Bouncing Square - [Shared Link](https://brsfiddle.net/?code=XQAAAAIrEQAAAAAAAABJKocnAkqZmqFJVufERpQkf9KVk93fxmIRqnWDhwpkoNWGesOdd0NfqUQINBpHgpEwFE0OR1eAH7wa_jMdErSC0Ef6rWNCKA7QM7K-tYEah5tFpMmXnJglupGQccD85M9hTEo7RtutiOH7nQx0jpOyrhcPrtHzQA4-biFDUWkOLewpwh3KVNGdkIWlskO5MNh1rrex5e_N9S--J4xyUYV3ykTqocgnidX8ZYIFiQxb6J6GOW202zcXq8aWMgG-5R41nXEXigggzsTZXmLi13Xc6vsEVASb1mlaWHZlyAUU7hIhI-BvuJyDAEiWpmECFPSXVdLtdba-Hp4Q14J44MomrmpPXwI7ejX5PWKlW9TW7GdbI6kR1xTHv-SWNY7IulWCC_XXR1u11hlkAxkot6q7CUpuN3bJxWFyGL2WtiEu4htVubBbgZ4tcKR39TDePe9vNVkRbSwBDULMxlL4aHY7LxG6F4uiwj2UB1IjC7v3wQAtvIWpMN_U9Y5rJJlaPfZ5uAIN97HmQZ5Au3oonlSXGg2Edg2jPR3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M-jpv1SfhZ8tyfXcw_3KoT_VgbuDseShlzToWgbkyBa-SzJFklEZPGteuysyFRSPnmgfFOKTZTpY92mxcQ9C8TZXt6Gbwj79AbplH6d0wKPl_uQiGmXVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.11.1","dist":{"shasum":"6b71e2047af34d3bf1f3a5ae1d5df681e6e7c8ab","integrity":"sha512-SQUe/UmRUfIPgsOs+yFJo+9veKuYdFz/Y+UFRoHtFPpLPV++DShHVBGjT38aJGDp96c2aDcdgqu5p+ALPofxGg==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.11.1.tgz","fileCount":29,"unpackedSize":16173984,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIHJGRwnPkFTaGUGKFBZQkMdomiwXGCTP8zzfhBzSYpUlAiEAiM7MkwKM6DaIewtNIPW87Cy/3T2mD9NTAZW4a5JUEtA="}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.11.1_1698808078125_0.8849102379543092"},"_hasShrinkwrap":false,"deprecated":"Deprecated dev version"},"0.11.3-dev":{"name":"brs-emu","version":"0.11.3-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean lint prettier build release"},"dependencies":{"@msgpack/msgpack":"^2.8.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs4EFN2zkGnUPpC_jM5q9lOv48OWw73SRzoEiqBTjMAwA1j5B4lHJIEnt7v7wG6rbe_xFtOByeXbT3ddKuRA_9zOmIhmx3IpozpRxTXZixCFrHZlpFOzA1Wtba2-TtKbP5RPCZ3gD_GhZBzMlcM8AjeEqrLGmW7SL4wD26hJoq74g4lwGlaRad7DHU34538av8EyQVSoFX5UhC57h6H8CMgXZ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VsGtA61fwmsbPZ3b2g_CFMe8AlhWI7fiKj4wfYA9k77fba1jPGuirRAQn_eSnsAA)\n  - Calculate Easter Day - [Shared Link](https://brsfiddle.net/?code=XQAAAALnAwAAAAAAAABJKohmo_vGH6VeHhw0NA0u7jXQ5mXP9ZN1AWzM0PiRufiEJMb9enJ8-Fi-wVFZGTTpu3PmzKvDZVFq33L_93AZJPhIg6IOwt6LAoZfALbNSD-9F190OkUH5EOYSUHSLXWBpulCV_k83PxQO6WlKqWoMVq5LeUSoPEVV5OpcJLcDiu7O8XjE5KBBMmZgntg8nO44vkyJQNo_zE-k5zryxMYeZGHR71offjEvE3WrtKHLa55DMCeTrUqFoYZgd5t7DsddJ7Rl4ATmDgvrAOU7nY8nDjdrk1b7gccF1Hl_cgfXs1pjWGLzhGdoKrJ-UiokpUZ_p49EZy3-UQbqZ0IhBMNoHViYZJ4sVgZ0rZlexmlSB4zcmcpuHfc3cMRmUrGjr9zTg_Ulbh-OMcf5-DgHQqln58pmHCcCbIefiBntMjwIYn5yckUrS9RCRha1ZxuIYppHGpoj_2ilx1_zC9gs7kqwjCdk4QGJflduepky0fEvBQYvEHsjTHhNIBTRDiiqudQT8-62CokSMQqR1Zt5c-MUM1oFX8vdWennNziWnWoomzuMwQCAER5KYJZhOTKoBzuEM63KwqnZcBLsQoeoSs7tV5kcIXwhBGvUdDKESlfcqa-CwNBpAvENrUp7BBrrQOr6sKOnRUVL44Q4DEZzN_0_9sVDr25lTavElT57Xh2wRpiEsbmuoe66rKJ3cFP4OKVgMLUtPSkayntYNWPZg89PvidJpqOxTIQWf_nfRxV)\n  - Download Image and Sound - [Shared Link](https://brsfiddle.net/?code=XQAAAAJqCQAAAAAAAABJKoMnQ-exSUWPG3fpxfwVM0I3_ROH-bzVbB7Jp09rkgEHk97O65LMrkY-ClFix02OAL9aQHdA6uHMp6VomRlb0EzSG23ee59pGlwA2DbEVNpCpCimia_7ffBTl-0p010UxxlLTCoMZ9xkzc-ZK8hxFih-i3P-nRWSdi82_7NwrrNelSDuJOdHfV28SNUbhHOULHLQ7f1EwhvrFr_vgpoksK6d-YKwnX6XWlNIlZrwulg0tclDcoxtRQawghOcZ3oTzmLTy0FuSIagck0NdcmdD-GAqqynbbR7Pb0jhFa4IK7RBM2lcVTjoH69laKA_CBKux6zj3VYBGAnz2lXtkI6dRfT_1XRSN7zkxNIJke8HWFZbyM1uc8s_kq7oPdwYBpvtkEfdHc96hiWZQMRpbdNRFa0Bx_1Jy5k-krINqCIe9489ZrPaend2fS191EBMIaCrzqcBrkNULQET0GcYBPJ5rhnr0sFT_knv4sPfD2HlYLc5h8xOBTxNgR8ex5COmRiI0xnHEgZmWP6fWSktG-gWH9Fk3nYb5xxt8VDvQuAOoeFsyxfucaRl5R2t5jRGN5dX8ECIa3T-Z_M_RIRXr8fWvUmdIwftjlkRYYJw-Imqc0phOMyLJnDIZGEodUavAvT5L7GaI4Qn_hFmxxyHaeMZw2HnDZPshIWfjSxzkcfuJyzx-X8ZeBcEq3ppDLCWkGml-GOSUDbVRd-LvDmSOVEa652DRrwpYskvsXvVxOxo_nbMyJlCyuYdTM0tU0DIXSd6frNSLciud6YrGX0b0JcbLs-c7Fy_flud8htvUNKD4ugdOqZJTxUHi8cjV6nD9aT3v5yj_C99p4r5H-UhK7qrRii9mbQbhHkEMNi4Zb4DIfntBK8p2GIIeaP--Mvo02v8o6ZBj9CbyOM-jpv1SfhZ8tyfXcw_3KoT_VgbuDseShlzToWgbkyBa-SzJFklEZPGteuysyFRSPnmgfFOKTZTpY92mxcQ9C8TZXt6Gbwj79AbplH6d0wKPl_uQiGmXVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.11.3-dev","dist":{"shasum":"f920c05e1bf21c68ed7844a05c180de8cbcf7f5d","integrity":"sha512-sAaSX+ZMzubxyXjeN/v8URAFSidZOZMmBlwH395YO8dn8ZDc8+iPt+j33CpwsbkGTbk/pGT4i5kUIn9v6LdTxA==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.11.3-dev.tgz","fileCount":29,"unpackedSize":16180776,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCICRE9KEiLof8a77tCg/gxHJRsZyr1LX1Q/bJro2TLwWDAiBu0vqDg8Hg07meyOFJmvdMR6LFJJPesbaeGqi+YvqgCg=="}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.11.3-dev_1699239795260_0.6992086251634335"},"_hasShrinkwrap":false},"0.11.4-dev":{"name":"brs-emu","version":"0.11.4-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","clean":"rimraf ./app/lib/brsEmu* ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean lint prettier build release"},"dependencies":{"@msgpack/msgpack":"^2.8.0","chalk":"^5.3.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","jszip":"^3.10.1","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","luxon":"^1.8.3","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","strip-ansi":"^7.1.0","ua-parser-js":"^1.0.34","upng-js":"^2.1.0","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/luxon":"^1.4.1","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/ua-parser-js":"^0.7.36","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs4EFN2zkGnUPpC_jM5q9lOv48OWw73SRzoEiqBTjMAwA1j5B4lHJIEnt7v7wG6rbe_xFtOByeXbT3ddKuRA_9zOmIhmx3IpozpRxTXZixCFrHZlpFOzA1Wtba2-TtKbP5RPCZ3gD_GhZBzMlcM8AjeEqrLGmW7SL4wD26hJoq74g4lwGlaRad7DHU34538av8EyQVSoFX5UhC57h6H8CMgXZTKLJxYnFAZdTPhBuPedJ_x8FoTI4pV-6_sL1WixNNXyNeRXrcHoDTg5dGfeXwU9q4WkD2JwCOZ6A99YEh8qjkM6eGPT9d5U6qohbLL7OGEsJ4CQ6zn6yqG_71hqdWPJvqV6qTKEaD1iusxDbv_W-EYAA)\n  - Bouncing Square - [Shared Link](https://brsfiddle.net/?code=XQAAAAIrEQAAAAAAAABJKocnAkqZmqFJVufERpQkf9KVk93fxmIRqnWDhwpkoNWGesOdd0NfqUQINBpHgpEwFE0OR1eAH7wa_jMdErSC0Ef6rWNCKA7QM7K-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FT_knv4sPfD2HlYLc5h8xOBTxNgR8ex5COmRiI0xnHEgZmWP6fWSktG-gWH9Fk3nYb5xxt8VDvQuAOoeFsyxfucaRl5R2t5jRGN5dX8ECIa3T-Z_M_RIRXr8fWvUmdIwftjlkRYYJw-Imqc0phOMyLJnDIZGEodUavAvT5L7GaI4Qn_hFmxxyHaeMZw2HnDZPshIWfjSxzkcfuJyzx-X8ZeBcEq3ppDLCWkGml-GOSUDbVRd-LvDmSOVEa652DRrwpYskvsXvVxOxo_nbMyJlCyuYdTM0tU0DIXSd6frNSLciud6YrGX0b0JcbLs-c7Fy_flud8htvUNKD4ugdOqZJTxUHi8cjV6nD9aT3v5yj_C99p4r5H-UhK7qrRii9mbQbhHkEMNi4Zb4DIfntBK8p2GIIeaP--Mvo02v8o6ZBj9CbyOM-jpv1SfhZ8tyfXcw_3KoT_VgbuDseShlzToWgbkyBa-SzJFklEZPGteuysyFRSPnmgfFOKTZTpY92mxcQ9C8TZXt6Gbwj79AbplH6d0wKPl_uQiGmXVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.11.4-dev","dist":{"shasum":"478d08266cb85c7b6609f89cb8a5817631f5cf8a","integrity":"sha512-7IvtqVNjEyITP3caCorzKnjG7BYeBS3VZH3mzljbETrjPfq7T4pGEXlQY1MwQDu3wYYskqmDx7hv2QSOXKLsWQ==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.11.4-dev.tgz","fileCount":29,"unpackedSize":16244990,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIF31F8sTUxx85mK4i5s7MWoYlZLlqXRBehatzVBT5T7WAiB6kSTGFX+++0HSlav68LnAuDbjih2r+qppNjPp/o6O9A=="}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.11.4-dev_1699945297178_0.46863440655815136"},"_hasShrinkwrap":false},"0.11.5-dev":{"name":"brs-emu","version":"0.11.5-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","stats":"webpack-bundle-analyzer ./app/lib/stats.json","stats:api":"webpack-bundle-analyzer ./app/lib/stats-api.json","clean":"rimraf ./app/lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean lint prettier build release"},"dependencies":{"@msgpack/msgpack":"^2.8.0","chalk":"^5.3.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","dayjs":"^1.11.10","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","strip-ansi":"^7.1.0","upng-js":"lvcabral/UPNG.js","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-bundle-analyzer":"^4.10.1","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1","webpack-stats-plugin":"^1.1.3"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs4EFN2zkGnUPpC_jM5q9lOv48OWw73SRzoEiqBTjMAwA1j5B4lHJIEnt7v7wG6rbe_xFtOByeXbT3ddKuRA_9zOmIhmx3IpozpRxTXZixCFrHZlpFOzA1Wtba2-TtKbP5RPCZ3gD_GhZBzMlcM8AjeEqrLGmW7SL4wD26hJoq74g4lwGlaRad7DHU34538av8EyQVSoFX5UhC57h6H8CMgXZTKLJxYnFAZdTPhBuPedJ_x8FoTI4pV-6_sL1WixNNXyNeRXrcHoDTg5dGfeXwU9q4WkD2JwCOZ6A99YEh8qjkM6eGPT9d5U6qohbLL7OGEsJ4CQ6zn6yqG_71hqdWPJvqV6qTKEaD1iusxDbv_W-EYAA)\n  - Bouncing Square - [Shared Link](https://brsfiddle.net/?code=XQAAAAIrEQAAAAAAAABJKocnAkqZmqFJVufERpQkf9KVk93fxmIRqnWDhwpkoNWGesOdd0NfqUQINBpHgpEwFE0OR1eAH7wa_jMdErSC0Ef6rWNCKA7QM7K-tYEah5tFpMmXnJglupGQccD85M9hTEo7RtutiOH7nQx0jpOyrhcPrtHzQA4-biFDUWkOLewpwh3KVNGdkIWlskO5MNh1rrex5e_N9S--J4xyUYV3ykTqocgnidX8ZYIFiQxb6J6GOW202zcXq8aWMgG-5R41nXEXigggzsTZXmLi13Xc6vsEVASb1mlaWHZlyAUU7hIhI-BvuJyDAEiWpmECFPSXVdLtdba-Hp4Q14J44MomrmpPXwI7ejX5PWKlW9TW7GdbI6kR1xTHv-SWNY7IulWCC_XX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JlCyuYdTM0tU0DIXSd6frNSLciud6YrGX0b0JcbLs-c7Fy_flud8htvUNKD4ugdOqZJTxUHi8cjV6nD9aT3v5yj_C99p4r5H-UhK7qrRii9mbQbhHkEMNi4Zb4DIfntBK8p2GIIeaP--Mvo02v8o6ZBj9CbyOM-jpv1SfhZ8tyfXcw_3KoT_VgbuDseShlzToWgbkyBa-SzJFklEZPGteuysyFRSPnmgfFOKTZTpY92mxcQ9C8TZXt6Gbwj79AbplH6d0wKPl_uQiGmXVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.11.5-dev","dist":{"shasum":"7b1b52a502c5ecfc6803bbcade5abee5b3b43d90","integrity":"sha512-4hV3cLSvLPX2sbb0lPI3vofUh35T/K8Ri/qGysLRa6Lcnc0sQ8KVmgyCMNXqttHqMXsu8zS3r2oKVuhnLq2zdw==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.11.5-dev.tgz","fileCount":29,"unpackedSize":15035091,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFYaAu60jESUNU3I39vKp0GKx+98v55Iso0a//VVxk46AiBgVx9wfsTLNaG6FB8bfYNoYOFFEuR2Ap6wOtUIYISZSA=="}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.11.5-dev_1700792555457_0.8392985826442021"},"_hasShrinkwrap":false},"0.11.6-dev":{"name":"brs-emu","version":"0.11.6-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","stats":"webpack-bundle-analyzer ./app/lib/stats.json","stats:api":"webpack-bundle-analyzer ./app/lib/stats-api.json","clean":"rimraf ./app/lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean lint prettier build release"},"dependencies":{"@msgpack/msgpack":"^2.8.0","chalk":"^5.3.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","dayjs":"^1.11.10","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","strip-ansi":"^7.1.0","upng-js":"lvcabral/UPNG.js","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-bundle-analyzer":"^4.10.1","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1","webpack-stats-plugin":"^1.1.3"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs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XVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.11.6-dev","dist":{"shasum":"bf14ca5a5afe91360b220c6c0b6c09ff082a053f","integrity":"sha512-CgGDUK+N0h8g++o8XFksgOXB9ND+mMNtA0arN65sXhioqZGZx2z2S+cPU9KfPwDzq0vsa5lWnVIjKENT1ruXag==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.11.6-dev.tgz","fileCount":29,"unpackedSize":15039989,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCDL+MlUpP3YmYS4sBjkGHKiYOh6vvQ1moz65IltCvXaQIhAJcvcQxvcAWN/gwt2epJ1Otd0C8zRjt7CRg0MyNBGVyU"}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.11.6-dev_1700874129219_0.6037390809941894"},"_hasShrinkwrap":false},"0.11.7-dev":{"name":"brs-emu","version":"0.11.7-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","stats":"webpack-bundle-analyzer ./app/lib/stats.json","stats:api":"webpack-bundle-analyzer ./app/lib/stats-api.json","clean":"rimraf ./app/lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean lint prettier build release"},"dependencies":{"@msgpack/msgpack":"^2.8.0","chalk":"^5.3.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","dayjs":"^1.11.10","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","strip-ansi":"^7.1.0","upng-js":"lvcabral/UPNG.js","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-bundle-analyzer":"^4.10.1","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1","webpack-stats-plugin":"^1.1.3"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs4EFN2zkGnUPpC_jM5q9lOv48OWw73SRzoEiqBTjMAwA1j5B4lHJIEnt7v7wG6rbe_xFtOByeXbT3ddKuRA_9zOmIhmx3IpozpRxTXZixCFrHZlpFOzA1Wtba2-TtKbP5RPCZ3gD_GhZBzMlcM8AjeEqrLGmW7SL4wD26hJoq74g4lwGlaRad7DHU34538av8EyQVSoFX5UhC57h6H8CMgXZTKLJxYnFAZdTPhBuPedJ_x8FoTI4pV-6_sL1WixNNXyNeRXrcHoDTg5dG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SnsAA)\n  - Calculate Easter Day - [Shared Link](https://brsfiddle.net/?code=XQAAAALnAwAAAAAAAABJKohmo_vGH6VeHhw0NA0u7jXQ5mXP9ZN1AWzM0PiRufiEJMb9enJ8-Fi-wVFZGTTpu3PmzKvDZVFq33L_93AZJPhIg6IOwt6LAoZfALbNSD-9F190OkUH5EOYSUHSLXWBpulCV_k83PxQO6WlKqWoMVq5LeUSoPEVV5OpcJLcDiu7O8XjE5KBBMmZgntg8nO44vkyJQNo_zE-k5zryxMYeZGHR71offjEvE3WrtKHLa55DMCeTrUqFoYZgd5t7DsddJ7Rl4ATmDgvrAOU7nY8nDjdrk1b7gccF1Hl_cgfXs1pjWGLzhGdoKrJ-UiokpUZ_p49EZy3-UQbqZ0IhBMNoHViYZJ4sVgZ0rZlexmlSB4zcmcpuHfc3cMRmUrGjr9zTg_Ulbh-OMcf5-DgHQqln58pmHCcCbIefiBntMjwIYn5yckUrS9RCRha1ZxuIYppHGpoj_2ilx1_zC9gs7kqwjCdk4QGJflduepky0fEvBQYvEHsjTHhNIBTRDiiqudQT8-62CokSMQqR1Zt5c-MUM1oFX8vdWennNziWnWoomzuMwQCAER5KYJZhOTKoBzuEM63KwqnZcBLsQoeoSs7tV5kcIXwhBGvUdDKESlfcqa-CwNBpAvENrUp7BBrrQOr6sKOnRUVL44Q4DEZzN_0_9sVDr25lTavElT57Xh2wRpiEsbmuoe66rKJ3cFP4OKVgMLUtPSkayntYNWPZg89PvidJpqOxTIQWf_nfRxV)\n  - Download Image and Sound - [Shared Link](https://brsfiddle.net/?code=XQAAAAJqCQAAAAAAAABJKoMnQ-exSUWPG3fpxfwVM0I3_ROH-bzVbB7Jp09rkgEHk97O65LMrkY-ClFix02OAL9aQHdA6uHMp6VomRlb0EzSG23ee59pGlwA2DbEVNpCpCimia_7ffBTl-0p010UxxlLTCoMZ9xkzc-ZK8hxFih-i3P-nRWSdi82_7NwrrNelSDuJOdHfV28SNUbhHOULHLQ7f1EwhvrFr_vgpoksK6d-YKwnX6XWlNIlZrwulg0tclDcoxtRQawghOcZ3oTzmLTy0FuSIagck0NdcmdD-GAqqynbbR7Pb0jhFa4IK7RBM2lcVTjoH69laKA_CBKux6zj3VYBGAnz2lXtkI6dRfT_1XRSN7zkxNIJke8HWFZbyM1uc8s_kq7oPdwYBpvtkEfdHc96hiWZQMRpbdNRFa0Bx_1Jy5k-krINqCIe9489ZrPaend2fS191EBMIaCrzqcBrkNULQET0GcYBPJ5rhnr0sFT_knv4sPfD2HlYLc5h8xOBTxNgR8ex5COmRiI0xnHEgZmWP6fWSktG-gWH9Fk3nYb5xxt8VDvQuAOoeFsyxfucaRl5R2t5jRGN5dX8ECIa3T-Z_M_RIRXr8fWvUmdIwftjlkRYYJw-Imqc0phOMyLJnDIZGEodUavAvT5L7GaI4Qn_hFmxxyHaeMZw2HnDZPshIWfjSxzkcfuJyzx-X8ZeBcEq3ppDLCWkGml-GOSUDbVRd-LvDmSOVEa652DRrwpYskvsXvVxOxo_nbMyJlCyuYdTM0tU0DIXSd6frNSLciud6YrGX0b0JcbLs-c7Fy_flud8htvUNKD4ugdOqZJTxUHi8cjV6nD9aT3v5yj_C99p4r5H-UhK7qrRii9mbQbhHkEMNi4Zb4DIfntBK8p2GIIeaP--Mvo02v8o6ZBj9CbyOM-jpv1SfhZ8tyfXcw_3KoT_VgbuDseShlzToWgbkyBa-SzJFklEZPGteuysyFRSPnmgfFOKTZTpY92mxcQ9C8TZXt6Gbwj79AbplH6d0wKPl_uQiGmXVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.11.7-dev","dist":{"shasum":"d07263b0d69769c94f4462941289cc8fd66135a9","integrity":"sha512-lm4iifulhF1WBQY13DtnCuXnBvY9Ds8f8fpWjU+aRYcM9t2PlH5yjWrYonysHJLBkRCG+PTTwZeVMz6YyjQUqw==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.11.7-dev.tgz","fileCount":29,"unpackedSize":15034516,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIACFh5EghxcIXx0p1mZOdHoJnpjdZj924PWvPY5WLpxIAiBIKUVP6wZIjZf3Uv3L5iSF/aGatwgQTWmJIE/yUoGYdA=="}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.11.7-dev_1701067158578_0.02166791287163372"},"_hasShrinkwrap":false},"0.11.8-dev":{"name":"brs-emu","version":"0.11.8-dev","description":"BrightScript Emulator","author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"homepage":"https://lvcabral.com/brs/","contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"keywords":["brightscript","roku","emulator","webworker","worker"],"license":"MIT","main":"app/lib/brsEmu.js","browser":"app/lib/brsEmu.js","typings":"types/src/api/index.d.ts","bin":{"brs-cli":"bin\\cli.mjs"},"scripts":{"build":"webpack --env development","release":"webpack --env production","stats":"webpack-bundle-analyzer ./app/lib/stats.json","stats:api":"webpack-bundle-analyzer ./app/lib/stats-api.json","clean":"rimraf ./app/lib ./types","test":"jest","lint":"tslint --project .","prettier:write":"prettier --write \"{app,src,test}/**/*.{js,ts}\"","prettier":"prettier --check \"{app,src,test}/**/*.{js,ts}\"","prepublishOnly":"npm-run-all --serial clean lint prettier build release"},"dependencies":{"@msgpack/msgpack":"^2.8.0","chalk":"^5.3.0","commander":"^2.12.2","crc":"^3.8.0","crypto-browserify":"^3.12.0","dayjs":"^1.11.10","decode-bmp":"^0.1.0","fflate":"^0.8.1","file-type":"^12.4.2","howler":"^2.2.3","jpeg-js":"^0.4.4","libwebpjs":"lvcabral/libwebpjs","long":"^3.2.0","memory-fs":"^0.5.0","nanomatch":"^1.2.13","omggif":"^1.0.10","opentype.js":"^1.3.4","path-browserify":"^1.0.1","path-parse":"^1.0.6","readable-stream":"^4.3.0","sprintf-js":"^1.1.2","stats.js":"^0.17.0","stream-browserify":"^3.0.0","strip-ansi":"^7.1.0","upng-js":"lvcabral/UPNG.js","url-parse":"^1.5.10","xml2js":"^0.5.0"},"devDependencies":{"@types/crc":"^3.4.0","@types/howler":"^2.2.7","@types/long":"^3.0.32","@types/memory-fs":"^0.3.2","@types/node":"^8.10.52","@types/opentype.js":"^0.7.2","@types/path-parse":"^1.0.19","@types/sprintf-js":"^1.1.2","@types/stats.js":"^0.17.0","@types/upng-js":"^2.1.1","@types/url-parse":"^1.4.8","@types/xml2js":"^0.4.8","buffer":"^6.0.3","husky":">=1","ifdef-loader":"^2.3.2","javascript-obfuscator":"^4.0.2","jest":"^29.4.3","jest-junit":"^6.1.0","lint-staged":">=8","lolex":"^3.0.0","npm-run-all":"^4.1.5","prettier":"2","process":"^0.11.10","rimraf":"^2.6.2","ts-loader":"^8.4.0","tslint":"^5.11.0","tslint-config-prettier":"^1.18.0","typescript":"4","webpack":"^5.75.0","webpack-bundle-analyzer":"^4.10.1","webpack-cli":"^5.0.1","webpack-obfuscator":"^3.5.1","webpack-stats-plugin":"^1.1.3"},"jest":{"testEnvironment":"node"},"prettier":{"trailingComma":"es5","tabWidth":4,"printWidth":100},"husky":{"hooks":{"pre-commit":"lint-staged"}},"lint-staged":{"*.{ts,js}":["prettier --write","git add"]},"readmeFilename":"README.md","readme":"# BRS-EMU: BrightScript Emulator\n\nAn emulator for the Roku BrightScript language that runs on modern browsers and Electron applications.\n\n![GitHub](https://img.shields.io/github/license/lvcabral/brs-emu)\n[![NPM Version](https://badge.fury.io/js/brs-emu.svg?style=flat)](https://npmjs.org/package/brs-emu)\n[![Build](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml/badge.svg)](https://github.com/lvcabral/brs-emu/actions/workflows/build.yml)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=lvcabral_brs-emu&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=lvcabral_brs-emu)\n\n## The Library\n\nThis library extends [**brs**](https://github.com/sjbarag/brs), a _command line interpreter_ for **BrightScript** language, with the objective of implementing a full emulator for the BrightScript developer community. Initially the focus was on the **Draw 2D API** components (`roScreen`, `roCompositor`, `roRegion`, etc.) along with most of the basic elements of the **BrightScript** language, allowing a full channel execution over an **HTML5 Canvas**, including emulation of the Roku file system, registry, remote control and the Micro Debugger. At this stage, **SceneGraph** channels and video playback are not supported, but the implementation of these features is now being considered.\n\n**Note:** Although **brs-emu** runs channels with user interface, it has no intention of emulating the full **Roku OS**, it is primarily aimed as a development tool for the BrighScript Community. Please check the [Current Limitations](docs/limitations.md) documentation for further details on what is out of scope.\n\n<p align=\"center\">\n<img alt=\"Emulator Web and Desktop\" src=\"docs/images/screenshots.png?raw=true\"/>\n</p>\n\n## Technology and Compatibility\n\nThis emulator is bundled as a couple of **[Webpack](https://webpack.js.org/)** Javascript libraries: \n- `brsEmu.js` the **[emulator API](docs/emulator-api.md)** to be used by the client application.\n- `brsEmu.worker.js` the **[Web Worker](https://developer.mozilla.org/en-US/docs/Web/API/Web_Workers_API/Using_web_workers)** that runs the language interpreter in a background thread on the browser platform.\n\nIt uses features like [SharedArrayBuffer](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/SharedArrayBuffer) and [OffScreenCanvas](https://developer.mozilla.org/en-US/docs/Web/API/OffscreenCanvas), that are _bleeding edge_ in the browser engines, because of that, at this moment, it can only be executed in:\n1. [Chromium](https://www.chromium.org/Home) based browsers, like [Chrome](https://www.google.com/chrome/), [Brave](https://brave.com/download/), [Opera](https://www.opera.com/) and [Edge](https://www.microsoft.com/en-us/edge).\n1. [Electron](https://electronjs.org/) applications.\n1. [Firefox](https://firefox.com), version 105 or higher.\n1. [Safari](https://www.apple.com/safari/), version 16.4 or higher. \n\nNote: The **BrightScript Emulator** is a full client-side library, nothing needs to be sent or processed in the server side.\n\n ## How to use it\n\nIf you just want to use the emulator, not installing or downloading anything, try the applications below:\n\n* BrightScript TV - Run full emulated games and channels in your browser: https://lvcabral.com/brs\n* brsFiddle - BrightScript playground to test and share code with others: http://brsFiddle.net\n  - Hello World - [Shared Link](https://lvcabral.com/brs-fiddle/?code=XQAAAALVAQAAAAAAAABJKobEQb6kyOTPdc30dpKp7qs4EFN2zkGnUPpC_jM5q9lOv48OWw73SRzoEiqBTjMAwA1j5B4lHJIEnt7v7wG6rbe_xFtOByeXbT3ddKuRA_9zOmIhmx3IpozpRxTXZixCFrHZlpFOzA1Wtba2-TtKbP5RPCZ3gD_GhZBzMlcM8AjeEqrLGmW7SL4wD26hJoq74g4lwGlaRad7DHU34538av8EyQVSoFX5UhC57h6H8CMgXZTKLJxYnFAZdTPhBuPedJ_x8FoTI4pV-6_sL1WixNNXyNeRXrcHoDTg5dGfeXwU9q4WkD2JwCOZ6A99YEh8qjkM6eGPT9d5U6qohbLL7OGEsJ4CQ6zn6yqG_71hqdWPJvqV6qTKEaD1iusxDbv_W-EYAA)\n  - Bouncing Square - [Shared Link](https://brsfiddle.net/?code=XQAAAAIrEQAAAAAAAABJKocnAkqZmqFJVufERpQkf9KVk93fxmIRqnWDhwpkoNWGesOdd0NfqUQINBpHgpEwFE0OR1eAH7wa_jMdErSC0Ef6rWNCKA7QM7K-tYEah5tFpMmXnJglupGQccD85M9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TxNgR8ex5COmRiI0xnHEgZmWP6fWSktG-gWH9Fk3nYb5xxt8VDvQuAOoeFsyxfucaRl5R2t5jRGN5dX8ECIa3T-Z_M_RIRXr8fWvUmdIwftjlkRYYJw-Imqc0phOMyLJnDIZGEodUavAvT5L7GaI4Qn_hFmxxyHaeMZw2HnDZPshIWfjSxzkcfuJyzx-X8ZeBcEq3ppDLCWkGml-GOSUDbVRd-LvDmSOVEa652DRrwpYskvsXvVxOxo_nbMyJlCyuYdTM0tU0DIXSd6frNSLciud6YrGX0b0JcbLs-c7Fy_flud8htvUNKD4ugdOqZJTxUHi8cjV6nD9aT3v5yj_C99p4r5H-UhK7qrRii9mbQbhHkEMNi4Zb4DIfntBK8p2GIIeaP--Mvo02v8o6ZBj9CbyOM-jpv1SfhZ8tyfXcw_3KoT_VgbuDseShlzToWgbkyBa-SzJFklEZPGteuysyFRSPnmgfFOKTZTpY92mxcQ9C8TZXt6Gbwj79AbplH6d0wKPl_uQiGmXVzj9LvIsYhuY3o-Pr2ZfZGBo4O4sMuQQ5ZA892cRuvrp_XRRKSEunIhWqBIgoSxiI1yp46twsZy2SQXpVISxFdHDJaDHMdMX4VBO33Oy1I8zlfQGPrHQxik8Szk-s6qkOpgaQnNNaLcE1v8LHpRMXSP5KxfwJm6PyWkGQ)\n\n### Desktop Application\n\nYou can also run the emulator as a multi-platform **desktop application** (Windows, Linux & macOS) that uses the same library generated by this project. The app, introduces several aditional features, such as the **ECP** (External Control Protocol) and **Remote Console** servers to allow integration with 3rd party development tools like the [VSCode BrightScript Extension](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript). It also allows you to control the device configuration like screen resolution, localization, among others.\n\n#### Download Links\n\n- Installation packages: [release page](https://github.com/lvcabral/brs-emu-app/releases). \n- Source code and documentation: [app repository](https://github.com/lvcabral/brs-emu-app).\n\n## How to Integrate to my App\nThe **brs-emu** project is published as a `node` package, so use `npm`:\n\n```shell\n$ npm install brs-emu\n```\n\nor `yarn` if that's your preference:\n\n```shell\n$ yarn add brs-emu\n```\n\n### Documentation\n\nThere are many ways in which you can use and/or participate in the project, read documents below to know the details:\n\n* [How to build from source](docs/build-from-source.md)\n* [How to run as Command Line Interface](docs/run-as-cli.md)\n* [How add the Emulator to a Web Application](docs/integrating.md)\n* [BrightScript Emulator API](docs/emulator-api.md)\n* [How to contribute](docs/contributing.md)\n\n## Notes for BrightScript Developers\n\nYou can see the debug messages from `print` statements in your code using the _browser or desktop app console_, just make sure you open the _Developer Tools (Ctrl+Shift+i)_ before loading your channel package or brs file. Exceptions from the emulator will be shown there too. \n\nIf you added a break point (stop) in your code, you can also debug using the _browser console_, just send the commands using: `brsEmu.debug(\"help\")`. For a better debugging experience, is recommended to use the emulator desktop app integrated with [VSCode](https://marketplace.visualstudio.com/items?itemName=celsoaf.brightscript).\n\nThe Roku `registry` data is stored on the browser Local Storage and you can inspect it using the Developer Tools.\n\nIf your code does show an error in some scenario not listed on the [limitations documentation](docs/limitations.md), feel free to [open an issue](https://github.com/lvcabral/brs-emu/issues).\n\n## Games and Demos\n\nYou can try the emulator by running one of the demonstration channels included in the repository, these are pre-configured as _clickable icons_ on `index.html`. In addition to those, you can load your own code, either as a single **.brs** file or a channel **.zip package**. Below there is a list of tested games that are publicly available with source code, download the `zip` files and have fun!\n\n*   [Prince of Persia for Roku](https://github.com/lvcabral/Prince-of-Persia-Roku) port by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Prince-of-Persia-Roku/releases/download/v0.18.3778/Prince-of-Persia-Roku-018.zip)\n*   [Lode Runner for Roku](https://github.com/lvcabral/Lode-Runner-Roku) remake by Marcelo Lv Cabral - Download [zip file](https://github.com/lvcabral/Lode-Runner-Roku/releases/download/v0.18.707/Lode-Runner-Roku-018.zip)\n*   [Retaliate](https://github.com/lvcabral/retaliate-roku) game by Romans I XVI - Download [zip file](https://github.com/lvcabral/retaliate-roku/releases/download/v1.7.0-emu/retaliate-brs-emu.zip)\n\n## Author Links\n\n- My website is [https://lvcabral.com](https://lvcabral.com)\n- My twitter is [@lvcabral](https://twitter.com/lvcabral)\n- My podcast is [PODebug Podcast](http://podebug.com)\n- Check my other [GitHub repositories ](https://github.com/lvcabral)\n\n## License\n\nCopyright © Marcelo Lv Cabral. All rights reserved.\n\nLicensed under the [MIT](LICENSE) license.\n","licenseText":"MIT License\n\nCopyright (c) 2019-2023, Marcelo Lv Cabral\nCopyright (c) 2018-2023, Sean Barag for BRS Interpreter\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","_id":"brs-emu@0.11.8-dev","dist":{"shasum":"878913f1f93ef485000a8d355c43973cda5c1f81","integrity":"sha512-ES1kQrlmDMQ9wFTcgkSbCk32oV5HnxRXSvuyf4GHIWZ2Y9iS2guROLsbf5sLiVmbqs7ZqdgvAws+B2eRUibo3w==","tarball":"https://registry.npmjs.org/brs-emu/-/brs-emu-0.11.8-dev.tgz","fileCount":29,"unpackedSize":15046338,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCGqgPN4lcFuJ+QUpFhyNWYvLD26wR2qPH5Qm/JWgukvgIhALi6KPdItWHFWPrYSoqjn9VXZnY5hxGF1+qfcdR8F/qr"}]},"_npmUser":{"name":"lvcabral","email":"marcelo.cabral@gmail.com"},"directories":{},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/brs-emu_0.11.8-dev_1701219279548_0.10288969350479982"},"_hasShrinkwrap":false}},"time":{"created":"2021-06-30T07:05:44.744Z","0.9.1":"2021-06-30T07:05:44.970Z","modified":"2023-12-16T19:11:39.233Z","0.10.0-dev":"2023-02-01T21:37:22.081Z","0.10.1":"2023-02-01T21:49:34.628Z","0.10.2-dev":"2023-02-02T04:27:18.601Z","0.10.3-dev":"2023-02-05T06:27:42.116Z","0.10.4-dev":"2023-02-07T06:09:56.806Z","0.10.5-dev":"2023-02-08T05:27:18.050Z","0.10.6-dev":"2023-02-13T16:39:19.649Z","0.10.7-dev":"2023-02-16T01:05:36.869Z","0.10.8-dev":"2023-02-21T03:27:31.110Z","0.10.9-dev":"2023-02-27T23:12:00.935Z","0.10.10-dev":"2023-03-02T00:48:02.311Z","0.10.11-dev":"2023-03-02T01:00:07.285Z","0.10.12-dev":"2023-03-03T05:31:52.830Z","0.10.13-dev":"2023-03-03T22:29:51.246Z","0.10.14-dev":"2023-03-03T23:38:30.793Z","0.10.15-dev":"2023-03-07T07:09:47.842Z","0.10.16-dev":"2023-03-11T01:17:21.158Z","0.10.17-dev":"2023-03-12T23:38:08.778Z","0.10.18-dev":"2023-03-14T21:37:11.644Z","0.10.19-dev":"2023-03-16T08:09:05.441Z","0.10.20-dev":"2023-03-18T00:24:04.080Z","0.10.21":"2023-03-21T09:02:36.541Z","0.10.22":"2023-05-08T17:47:43.955Z","0.10.23":"2023-11-01T00:53:30.599Z","0.11.0":"2023-11-01T02:10:40.037Z","0.11.1":"2023-11-01T03:07:58.511Z","0.11.3-dev":"2023-11-06T03:03:15.572Z","0.11.4-dev":"2023-11-14T07:01:37.453Z","0.11.5-dev":"2023-11-24T02:22:35.804Z","0.11.6-dev":"2023-11-25T01:02:09.558Z","0.11.7-dev":"2023-11-27T06:39:18.905Z","0.11.8-dev":"2023-11-29T00:54:39.825Z"},"maintainers":[{"name":"lvcabral","email":"marcelo.cabral@gmail.com"}],"description":"BrightScript Emulator","homepage":"https://lvcabral.com/brs/","keywords":["brightscript","roku","emulator","webworker","worker"],"repository":{"type":"git","url":"https://github.com/lvcabral/brs-emu"},"contributors":[{"name":"Sean Barag","email":"sean@barag.org"},{"name":"Mark Pearce"}],"author":{"name":"Marcelo Lv Cabral","email":"marcelo@lvcabral.com","url":"https://lvcabral.com/"},"license":"MIT","readme":"","readmeFilename":""}